I have a problem with boost 1.34.1 (filesystem::ofstream and format).
Compiler Vc71 and vc80
Is this is a bug or my mistake.
Zdravko
Code:
#include
#include
#include
void test ()
{
boost::filesystem::ofstream os (boost::filesystem::path ("foo.out"));
os << boost::format("%s\n") % "foo.text";
}
Vc80 output:
c:\projects\boost_test\test.cpp(8) : error C2593: 'operator <<' is ambiguous
d:\libs\cpp\boost\1.34.1\boost\boost\filesystem\path.hpp(617): could be 'std::basic_ostream<_Elem,_Traits> &boost::filesystem::operator <<(std::basic_ostream<_Elem,_Traits> &,const Path &)' [found using argument-dependent lookup]
with
[
_Elem=char,
_Traits=std::char_traits<char>,
Ch=char,
Path=boost::basic_format<char>
]
d:\libs\cpp\boost\1.34.1\boost\boost\format\free_funcs.hpp(33): or 'std::basic_ostream<_Elem,_Traits> &boost::operator <<>(std::basic_ostream<_Elem,_Traits> &,const boost::basic_format<Ch> &)' [found using argument-dependent lookup]
with
[
_Elem=char,
_Traits=std::char_traits<char>,
_Ty=char,
Ch=char
]
while trying to match the argument list '(boost::filesystem::ofstream, boost::basic_format<Ch>)'
with
[
Ch=char
]