Re: [Boost-bugs] [Boost C++ Libraries] #1936: Make basic_path more generic?

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1936: Make basic_path more generic?
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-01-30 17:56:24


#1936: Make basic_path more generic?
------------------------------+---------------------------------------------
 Reporter: bemandawes | Owner: bemandawes
     Type: Feature Requests | Status: new
Milestone: To Be Determined | Component: filesystem
  Version: Boost 1.35.0 | Severity: Problem
 Keywords: |
------------------------------+---------------------------------------------

Comment(by dtrebbien@…):

 I developed a partial work-around for those who, like me, are only
 interested in a "`basic_path_traits` template" for (`char`,
 `std::char_traits<char>`) and (`wchar_t`, `std::char_traits<wchar_t>`):
 {{{
 #!cpp
 namespace detail {

 template <typename char_t_, class traits_ = std::char_traits<char_t_> >
 struct boost_ticket_1936_workaround;

 template <>
 struct boost_ticket_1936_workaround<char>
 {
         typedef boost::filesystem::path_traits
 boost_filesystem_path_traits;
 };

 template <>
 struct boost_ticket_1936_workaround<wchar_t>
 {
         typedef boost::filesystem::wpath_traits
 boost_filesystem_path_traits;
 };

 } // end `namespace detail`
 }}}

 Using this code, the generic path traits type is `BOOST_DEDUCED_TYPENAME
 detail::boost_ticket_1936_workaround<char_t_,
 traits_>::boost_filesystem_path_traits`

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/1936#comment:6>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:02 UTC