
I _think_ (correct me if I'm wrong) the problem is quite different and related to the portability issues of BOOST_CHECK_EQUAL with C string literals.
The code above doesn't compile on VC 7.1, either. However, the regression tests don't show any problems with VC 7.1!! Thus, the reason for this issue is IMO that this code isn't instantiated at all for VC 7.1 (but it _is_ for Intel) and that's very similar to the BOOST_CHECK_EQUAL problem!
No. VC7.1 has exactly the same problem. The reason it works is that I tested with this compiler and code actually looks like this: template<typename T> struct print_log_value { void operator()( std::ostream& ostr, T const& t ) { #if !BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1310)) // Show all possibly significant digits (for example, 17 for 64-bit double). if( std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::radix == 2 ) ostr.precision(2 + std::numeric_limits<T>::digits * 301/1000); #endif ostr << t; // by default print the value } };
Here is a test case - it compiles on VC 7.1 and many others (but shouldn't) but doesn't compile on EDG:
Why do you think it shouldn't? numeric_limits should work for any type, isn't it? Gennadiy