![](https://secure.gravatar.com/avatar/8b68393134f679f403bf573569e94161.jpg?s=120&d=mm&r=g)
Sorry if this is a basic c++ misunderstanding on my part, but why does this
compile, since there is no using in this code and to_iso_string is in namespace
boost::gregorian?
#include
![](https://secure.gravatar.com/avatar/2615bb9ec34d557093f5931e93157e9c.jpg?s=120&d=mm&r=g)
Sorry if this is a basic c++ misunderstanding on my part, but why does this compile, since there is no using in this code and to_iso_string is in namespace boost::gregorian?
#include
#include <iostream> int main(int argc, char** argv) { boost::gregorian::date d(2010, 1, 1); std::cout << to_iso_string(d) << std::endl; std::cout << to_iso_extended_string(d) << std::endl; std::cout << to_simple_string(d) << std::endl; return 0; }
I could be wrong, but I believe it is because of Koenig lookup: http://en.wikipedia.org/wiki/Argument-dependent_name_lookup - Rhys
participants (2)
-
Dan
-
Rhys Ulerich