diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2015-10-02 20:38:38 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2015-10-02 20:38:38 +0100 |
commit | 7fcdbdd21d6adc14421bc8de439bf91b58eae6d1 (patch) | |
tree | b5f3384755c093faaa1c510b9ac28d3738c27c76 /libstdc++-v3/include | |
parent | 43222a5ec8d80b39a3731194c2e960be50dde221 (diff) | |
download | gcc-7fcdbdd21d6adc14421bc8de439bf91b58eae6d1.zip gcc-7fcdbdd21d6adc14421bc8de439bf91b58eae6d1.tar.gz gcc-7fcdbdd21d6adc14421bc8de439bf91b58eae6d1.tar.bz2 |
Allow Filesystem TS to compile without wchar_t
* include/bits/locale_conv.h [!_GLIBCXX_USE_WCHAR_T]
(__do_str_codecvt, __str_codecvt_in, __str_codecvt_out): Enable.
* include/experimental/fs_path.h [!_GLIBCXX_USE_WCHAR_T]
(path::wstring, path::generic_wstring): Disable.
* src/filesystem/path.cc (path::_S_convert_loc)
[!_GLIBCXX_USE_WCHAR_T]: Skip conversion.
* testsuite/experimental/filesystem/path/assign/assign.cc: Check for
wchar_t support.
* testsuite/experimental/filesystem/path/concat/strings.cc: Likewise.
* testsuite/experimental/filesystem/path/construct/range.cc: Likewise.
From-SVN: r228417
Diffstat (limited to 'libstdc++-v3/include')
-rw-r--r-- | libstdc++-v3/include/bits/locale_conv.h | 8 | ||||
-rw-r--r-- | libstdc++-v3/include/experimental/fs_path.h | 8 |
2 files changed, 12 insertions, 4 deletions
diff --git a/libstdc++-v3/include/bits/locale_conv.h b/libstdc++-v3/include/bits/locale_conv.h index 146f78b..16b4875 100644 --- a/libstdc++-v3/include/bits/locale_conv.h +++ b/libstdc++-v3/include/bits/locale_conv.h @@ -44,8 +44,6 @@ namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION -#ifdef _GLIBCXX_USE_WCHAR_T - /** * @addtogroup locales * @{ @@ -157,6 +155,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION return __str_codecvt_out(__first, __last, __outstr, __cvt, __state, __n); } +#ifdef _GLIBCXX_USE_WCHAR_T + _GLIBCXX_BEGIN_NAMESPACE_CXX11 /// String conversions @@ -533,10 +533,10 @@ _GLIBCXX_END_NAMESPACE_CXX11 bool _M_always_noconv; }; - /// @} group locales - #endif // _GLIBCXX_USE_WCHAR_T + /// @} group locales + _GLIBCXX_END_NAMESPACE_VERSION } // namespace diff --git a/libstdc++-v3/include/experimental/fs_path.h b/libstdc++-v3/include/experimental/fs_path.h index 5daef12..40462a6 100644 --- a/libstdc++-v3/include/experimental/fs_path.h +++ b/libstdc++-v3/include/experimental/fs_path.h @@ -279,7 +279,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 string(const _Allocator& __a = _Allocator()) const; std::string string() const; +#if _GLIBCXX_USE_WCHAR_T std::wstring wstring() const; +#endif std::string u8string() const; std::u16string u16string() const; std::u32string u32string() const; @@ -291,7 +293,9 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 generic_string(const _Allocator& __a = _Allocator()) const; std::string generic_string() const; +#if _GLIBCXX_USE_WCHAR_T std::wstring generic_wstring() const; +#endif std::string generic_u8string() const; std::u16string generic_u16string() const; std::u32string generic_u32string() const; @@ -828,8 +832,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 inline std::string path::string() const { return string<char>(); } +#if _GLIBCXX_USE_WCHAR_T inline std::wstring path::wstring() const { return string<wchar_t>(); } +#endif inline std::string path::u8string() const @@ -865,8 +871,10 @@ _GLIBCXX_BEGIN_NAMESPACE_CXX11 inline std::string path::generic_string() const { return string(); } +#if _GLIBCXX_USE_WCHAR_T inline std::wstring path::generic_wstring() const { return wstring(); } +#endif inline std::string path::generic_u8string() const { return u8string(); } |