@@ -332,11 +332,11 @@ namespace filesystem
332332
333333 void clear () { m_pathname.clear (); }
334334 path& make_preferred ()
335- # ifdef BOOST_POSIX_API
335+ # ifdef BOOST_POSIX_API
336336 { return *this ; } // POSIX no effect
337- # else // BOOST_WINDOWS_API
337+ # else // BOOST_WINDOWS_API
338338 ; // change slashes to backslashes
339- # endif
339+ # endif
340340 path& remove_filename ();
341341 path& replace_filename (const path& replacement)
342342 {
@@ -374,9 +374,13 @@ namespace filesystem
374374 template <class String >
375375 String string (const codecvt_type& cvt) const ;
376376
377- // Prototype the SG3 requested templated string() function. The real thing will have
377+ // TODO Prototype the SG3 requested templated string() function. The real thing will have
378378 // defaulted traits and Allocator template parameters, and will be named string().
379- // Will have to enable_it current Boost version of string() template.
379+ // Will have to enable_if current Boost version of string() template.
380+ // Also must rename function, uncomment: //CHECK(p0.string() == (p0.basic_string<char,
381+ // // std::char_traits<char>, std::allocator<char> >()));
382+ // in path_unit_test.cpp
383+ #if 0
380384 template <class charT, class traits, class Allocator >
381385 std::basic_string<charT, traits, Allocator>
382386 basic_string(const Allocator& a = Allocator()) const
@@ -385,21 +389,27 @@ namespace filesystem
385389 typename boost::interop::select_codec<charT>::type, boost::interop::default_codec,
386390 std::basic_string<charT, traits, Allocator> >(m_pathname);
387391 }
392+ #endif
388393
389- boost::u16string u16string () const
394+ # ifndef BOOST_NO_CXX11_CHAR16_T
395+ std::u16string u16string () const
390396 {
391397 return boost::interop::make_string<boost::interop::utf16,
392398 boost::interop::select_codec<value_type>::type,
393399 boost::u16string>(m_pathname);
394400 }
395- boost::u32string u32string () const
401+ # endif
402+
403+ # ifndef BOOST_NO_CXX11_CHAR32_T
404+ std::u32string u32string () const
396405 {
397406 return boost::interop::make_string<boost::interop::utf32,
398407 boost::interop::select_codec<value_type>::type,
399408 boost::u32string>(m_pathname);
400409 }
410+ # endif
401411
402- # ifdef BOOST_WINDOWS_API
412+ # ifdef BOOST_WINDOWS_API
403413 std::string string () const { return string (codecvt ()); }
404414 std::string string (const codecvt_type& cvt) const
405415 {
@@ -414,7 +424,7 @@ namespace filesystem
414424 std::wstring wstring () const { return m_pathname; }
415425 std::wstring wstring (const codecvt_type&) const { return m_pathname; }
416426
417- # else // BOOST_POSIX_API
427+ # else // BOOST_POSIX_API
418428 // string_type is std::string, so there is no conversion
419429 std::string string () const { return m_pathname; }
420430 std::string string (const codecvt_type&) const { return m_pathname; }
@@ -429,7 +439,7 @@ namespace filesystem
429439 return tmp;
430440 }
431441
432- # endif
442+ # endif
433443
434444 // ----- generic format observers -----
435445
@@ -439,23 +449,27 @@ namespace filesystem
439449 template <class String >
440450 String generic_string (const codecvt_type& cvt) const ;
441451
442- # ifdef BOOST_WINDOWS_API
452+ # ifdef BOOST_WINDOWS_API
443453 std::string generic_string () const { return generic_string (codecvt ()); }
444454 std::string generic_string (const codecvt_type& cvt) const ;
445455 std::wstring generic_wstring () const ;
446456 std::wstring generic_wstring (const codecvt_type&) const { return generic_wstring (); };
457+ # ifndef BOOST_NO_CXX11_CHAR16_T
447458 boost::u16string generic_u16string () const
448459 {
449460 return interop::make_string<interop::utf16, interop::wide,
450461 boost::u16string>(generic_wstring ());
451462 }
463+ # endif
464+ # ifndef BOOST_NO_CXX11_CHAR32_T
452465 boost::u32string generic_u32string () const
453466 {
454467 return interop::make_string<interop::utf32, interop::wide,
455468 boost::u32string>(generic_wstring ());
456469 }
470+ # endif
457471
458- # else // BOOST_POSIX_API
472+ # else // BOOST_POSIX_API
459473 // On POSIX-like systems, the generic format is the same as the native format
460474 std::string generic_string () const { return m_pathname; }
461475 std::string generic_string (const codecvt_type&) const { return m_pathname; }
@@ -464,7 +478,7 @@ namespace filesystem
464478 boost::u16string generic_u16string () const {return u16string ();}
465479 boost::u32string generic_u32string () const {return u32string ();}
466480
467- # endif
481+ # endif
468482
469483 // ----- compare -----
470484
@@ -497,11 +511,11 @@ namespace filesystem
497511 bool has_extension () const { return !extension ().empty (); }
498512 bool is_absolute () const
499513 {
500- # ifdef BOOST_WINDOWS_API
514+ # ifdef BOOST_WINDOWS_API
501515 return has_root_name () && has_root_directory ();
502- # else
516+ # else
503517 return has_root_directory ();
504- # endif
518+ # endif
505519 }
506520 bool is_relative () const { return !is_absolute (); }
507521
0 commit comments