Fixed a visit_each-related bug exposed by strict two-phase lookup

[SVN r33841]
This commit is contained in:
Peter Dimov
2006-04-27 16:21:01 +00:00
parent 472f9e6ebe
commit a87638486b
3 changed files with 35 additions and 6 deletions
+4 -1
View File
@@ -22,6 +22,7 @@
#endif
#include <iostream>
#include <typeinfo>
#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
# pragma warning(pop)
@@ -37,12 +38,14 @@ struct visitor
{
}
template<typename T> void operator()( T const & /*t*/ )
template<typename T> void operator()( T const & t )
{
std::cout << "visitor::operator()( T ): " << typeid( t ).name() << std::endl;
}
void operator()( int const & t )
{
std::cout << "visitor::operator()( int ): " << t << std::endl;
hash = hash * 10 + t;
}
};