|
Boost : |
From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2005-03-15 11:05:09
> Anyway, at the moment the only tests on EDG are those for Intel Compiler
> what makes it difficult to isolate EDG typical problems. E.g. there have
> been some problems in boost.test for a long time because of overloading
> issues where EDG works more correct than all the other compilers:
> http://tinyurl.com/5g65r (this special one has is caused by Genaddiy's
> changes after 1.32).
I believe this is a compiler/STL problem. Here is snippet of offending
code:
template<typename T>
struct print_log_value {
void operator()( std::ostream& ostr, T const& t )
{
// 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);
ostr << t; // by default print the value
}
};
If I try to print C literal this function is instantiated with char [N]. And
if fails to instantiate std::numeric_limits<char [N]>.
Shouldn't numeric_limits work for any type?
Gennadiy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk