Boost logo

Boost :

From: Angus Leeming (angus.leeming_at_[hidden])
Date: 2004-09-14 10:26:16


There are lots of "#ifdef BOOST_WINDOWS ... #endif" blocks wrapping code to
handle the ':' in libs/filesystem/path_posix_windows.cpp. In one place
only is the preprocessor block missing, which I believe is a bug. Patch
attached.

Silly test case. Without the patch, this:

        #include <boost/filesystem/path.hpp>
        #include <iostream>
        #include <string>

        namespace fs = boost::filesystem;

        int main()
        {
            std::string const PATH="/usr/local/bin:/usr/bin:/bin";
            fs::path const path(PATH, fs::no_check);
            std::cout << PATH << '\n'
                      << path.native_file_string() << std::endl;
            return 0;
        }

Produces
        /usr/local/bin:/usr/bin:/bin
        /usr/local/bin:usr/bin:bin
under *nix.

Regards,
Angus




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