Boost logo

Boost Users :

From: chun ping wang (cablepuff_at_[hidden])
Date: 2007-10-22 21:35:15


{
            boost::scoped_ptr<boost::filesystem::ofstream> myfile(new
boost::filesystem::ofstream(fileOutput));

            BOOST_FOREACH(int element, (getKeys<std::vector, int,
int>(pMap)))
            {
                if (pMap[element] >= min_sup)
                {
                    std::vector<int> row(1, element);
                    itemsContainer.push_back(row);
                    // (*myfile) << "(" << element << ":" << pMap[element]
<< ")\n";
                    (*myfile) << boost::format("(%1%, %2%)\n") % element %
pMap[element];
                }
            }
  }

./cs522/c++/aprioriMain.cpp(79) : error C2593: 'operator <<' is ambiguous
        C:/boost_msvc/include\boost/format/free_funcs.hpp(33): could be
'std::basic_ostream<_Elem,_Traits> &boost::operator
<<<char,std::char_traits<char>,std::allocator<_Ty>>(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
        ]
        C:/boost_msvc/include\boost/filesystem/path.hpp(617): or
'std::basic_ostream<_Elem,_Traits> &boost::filesystem::operator
<<<boost::basic_format<Ch>>(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>
        ]
        while trying to match the argument list
'(boost::filesystem::ofstream, boost::basic_format<Ch>)'
        with
        [
            Ch=char
        ]

note the commented out version works.. this only happens on msvc 2005. it
passes on mingw devc++.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net