未解决的"fs :: path :: string"的重载函数类型

Gal*_*axy 3 c++ boost

提升1.49 gcc版本4.6.3

        std::transform(barcodeFiles.begin(), barcodeFiles.end(), std::ostream_iterator<std::string>(std::cerr, "\n"),
            boost::bind(&fs::path::string, _1));
Run Code Online (Sandbox Code Playgroud)

如何编辑此代码?

[ 65%] Building CXX object c++/lib/demultiplex/CMakeFiles/casava_demultiplex.dir/BclDemultiplexer.cpp.o
/bak/software/Linux/CASAVA_v1.8.2/src/c++/lib/demultiplex/BclDemultiplexer.cpp: In member function ‘const casava::demultiplex::BclDemultiplexer::ClusterCorrectedBarcodeIndex casava::demultiplex::BclDemultiplexer::mapClusterBarcodes(unsigned int) const’:
/bak/software/Linux/CASAVA_v1.8.2/src/c++/lib/demultiplex/BclDemultiplexer.cpp:65:50: error: no matching function for call to ‘bind(, boost::arg&)’
/bak/software/Linux/CASAVA_v1.8.2/src/c++/lib/demultiplex/BclDemultiplexer.cpp:65:50

nij*_*sen 6

答案可以在boost bindFAQ中找到

std::transform(
    paths.begin(), paths.end(),
    std::ostream_iterator<std::string>(
        std::cerr, "\n"
    ),
    boost::bind(
        static_cast<
            std::string const & (boost::filesystem::path::*)() const
        >(&boost::filesystem::path::string), 
        _1
    )
);
Run Code Online (Sandbox Code Playgroud)