Boost logo

Boost :

From: John Torjo (john.lists_at_[hidden])
Date: 2003-11-19 10:31:50


Hi all,

Found a small bug in boost/format library (lates version from CVS).
The following code generates an error on VC6:

#include <boost/format.hpp>
#include <iostream>
#include <string>

int main(int argc, char* argv[])
{
     int n;
     std::cout << boost::format("% %") % n;
}

c:\boost\boost_latest\boost\boost\format\parsing.hpp(383) : error C2667:
'upper_bound_from_fstring' : none of 2 overload have a best conversion
         c:\program files\microsoft visual studio\vc98\include\streambuf(123) :
while compiling class-template member function 'class
boost::basic_format<char,struct std::char_traits<char> > &__thiscall
boost::basic_format<char,struct std::char_trait
s<char> >::parse(const class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > &)'
c:\boost\boost_latest\boost\boost\format\parsing.hpp(383) : error C2668:
'upper_bound_from_fstring' : ambiguous call to overloaded function
         c:\program files\microsoft visual studio\vc98\include\streambuf(123) :
while compiling class-template member function 'class
boost::basic_format<char,struct std::char_traits<char> > &__thiscall
boost::basic_format<char,struct std::char_trait
s<char> >::parse(const class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > &)'

It all seems to go away when I comment out the anonymous namespace, from parsing.cpp

It's strange anyway - can we have an anonymous namespace with another namespace?

Best,
John




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk