Boost logo

Boost Users :

Subject: [Boost-users] path separator char/string
From: boost001 (oldyoungguy88_at_[hidden])
Date: 2008-12-03 15:18:45


I need to get the char or string represent current system's path separator.
In ACE , we can get from this constant: ACE_DIRECTORY_SEPARATOR_CHAR. Does
Boost has the similar constant to do the same?

I looked at the path.hpp. I think maybe I can get it from the following
existing code:

1.
template<class Path> struct slash
      { BOOST_STATIC_CONSTANT( char, value = '/' ); };
2.
# ifdef BOOST_WINDOWS_PATH
    template<class Path> struct path_alt_separator
      { BOOST_STATIC_CONSTANT( char, value = '\\' ); };
# endif
3.
template<class Path>
      inline bool is_separator( typename Path::string_type::value_type c )
      {
        return c == slash<Path>::value
# ifdef BOOST_WINDOWS_PATH
          || c == path_alt_separator<Path>::value
# endif
          ;
      }

But I don't know exactly how. Anybody can help me?

-- 
View this message in context: http://www.nabble.com/path-separator-char-string-tp20820786p20820786.html
Sent from the Boost - Users mailing list archive at Nabble.com.

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