This revision was automatically updated to reflect the committed changes. Closed by commit rG3ee9a50a146c: [libc++] Implement P0618R0 (Deprecating <codecvt>) (authored by philnik).
Changed prior to commit: https://reviews.llvm.org/D127313?vs=441353&id=441398#toc Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127313/new/ https://reviews.llvm.org/D127313 Files: libcxx/docs/ReleaseNotes.rst libcxx/docs/Status/Cxx17Papers.csv libcxx/include/codecvt libcxx/include/locale libcxx/src/locale.cpp libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_mode.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf16.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf8.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp libcxx/test/std/localization/locale.stdcvt/depr.verify.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/depr.verify.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/rdbuf.pass.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.pass.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/test.pass.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt_state.pass.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/depr.verify.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/types.pass.cpp libcxx/test/support/platform_support.h
Index: libcxx/test/support/platform_support.h =================================================================== --- libcxx/test/support/platform_support.h +++ libcxx/test/support/platform_support.h @@ -14,6 +14,8 @@ #ifndef PLATFORM_SUPPORT_H #define PLATFORM_SUPPORT_H +#include "test_macros.h" + // locale names #define LOCALE_en_US "en_US" #define LOCALE_en_US_UTF_8 "en_US.UTF-8" @@ -88,6 +90,7 @@ #endif } +_LIBCPP_SUPPRESS_DEPRECATED_PUSH #ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR inline std::wstring get_wide_temp_file_name() @@ -96,6 +99,7 @@ get_temp_file_name()); } #endif // _LIBCPP_HAS_OPEN_WITH_WCHAR +_LIBCPP_SUPPRESS_DEPRECATED_POP #if defined(_CS_GNU_LIBC_VERSION) inline bool glibc_version_less_than(char const* version) { Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/types.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/types.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/types.pass.cpp @@ -8,6 +8,8 @@ // <locale> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template<class Codecvt, class Elem = wchar_t, // class Wide_alloc = allocator<Elem>, // class Byte_alloc = allocator<char>> Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp @@ -8,6 +8,8 @@ // <locale> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc> // byte_string to_bytes(Elem wchar); Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp @@ -8,6 +8,8 @@ // <locale> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc> // state_type state() const; Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp @@ -8,6 +8,8 @@ // <locale> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc> // wide_string from_bytes(char byte); Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/depr.verify.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/depr.verify.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/depr.verify.cpp @@ -6,29 +6,15 @@ // //===----------------------------------------------------------------------===// -// <locale> +// UNSUPPORTED: c++03, c++11, c++14 +// UNSUPPORTED: no-wide-characters -// wbuffer_convert<Codecvt, Elem, Tr> +// <codecvt> -// state_type state() const; +// ensure that wstring_convert is marked as deprecated -// XFAIL: no-wide-characters - -#include <locale> #include <codecvt> -#include <sstream> -#include <cassert> - -#include "test_macros.h" - -int main(int, char**) -{ - typedef std::wbuffer_convert<std::codecvt_utf8<wchar_t> > B; - { - B b; - std::mbstate_t s = b.state(); - ((void)s); - } +#include <locale> - return 0; -} +std::wstring_convert<std::codecvt_utf8<wchar_t>> c1; // expected-warning {{'wstring_convert<std::codecvt_utf8<wchar_t, 1114111, 0>>' is deprecated}} +// expected-warning@-1 {{'codecvt_utf8<wchar_t, 1114111, 0>' is deprecated}} Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp @@ -8,6 +8,8 @@ // <locale> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc> // wstring_convert(const byte_string& byte_err, Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp @@ -12,6 +12,8 @@ // <locale> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc> // wstring_convert(wstring_convert const&) = delete; Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt_state.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt_state.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt_state.pass.cpp @@ -8,6 +8,8 @@ // <locale> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc> // wstring_convert(Codecvt* pcvt, state_type state); Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp @@ -8,6 +8,8 @@ // <locale> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc> // wstring_convert(Codecvt* pcvt = new Codecvt); // before C++14 Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp @@ -8,6 +8,8 @@ // <locale> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc> // size_t converted() const; Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp @@ -10,6 +10,8 @@ // <locale> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // wbuffer_convert<Codecvt, Elem, Tr> // int_type underflow(); Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/test.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/test.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/test.pass.cpp @@ -8,6 +8,8 @@ // <locale> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // wbuffer_convert<Codecvt, Elem, Tr> // XFAIL: no-wide-characters Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.pass.cpp @@ -8,6 +8,8 @@ // <locale> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // wbuffer_convert<Codecvt, Elem, Tr> // pos_type seekoff(off_type off, ios_base::seekdir way, Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/rdbuf.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/rdbuf.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/rdbuf.pass.cpp @@ -8,6 +8,8 @@ // <locale> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // wbuffer_convert<Codecvt, Elem, Tr> // streambuf *rdbuf(streambuf *bytebuf); Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp @@ -10,6 +10,8 @@ // <locale> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // wbuffer_convert<Codecvt, Elem, Tr> // int_type pbackfail(int_type c = traits::eof()); Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp @@ -8,6 +8,8 @@ // <locale> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // wbuffer_convert<Codecvt, Elem, Tr> // int_type overflow(int_type c = traits::eof()); Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp @@ -8,6 +8,8 @@ // <locale> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // wbuffer_convert<Codecvt, Elem, Tr> // state_type state() const; Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/depr.verify.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/depr.verify.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/depr.verify.cpp @@ -6,29 +6,16 @@ // //===----------------------------------------------------------------------===// -// <locale> - -// wbuffer_convert<Codecvt, Elem, Tr> - -// state_type state() const; +// UNSUPPORTED: c++03, c++11, c++14 // XFAIL: no-wide-characters -#include <locale> -#include <codecvt> -#include <sstream> -#include <cassert> +// <codecvt> -#include "test_macros.h" +// ensure that wbuffer_convert is marked as deprecated -int main(int, char**) -{ - typedef std::wbuffer_convert<std::codecvt_utf8<wchar_t> > B; - { - B b; - std::mbstate_t s = b.state(); - ((void)s); - } +#include <codecvt> +#include <locale> - return 0; -} +std::wbuffer_convert<std::codecvt_utf8<wchar_t>> c1; // expected-warning {{'wbuffer_convert<std::codecvt_utf8<wchar_t, 1114111, 0>>' is deprecated}} +// expected-warning@-1 {{'codecvt_utf8<wchar_t, 1114111, 0>' is deprecated}} Index: libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp =================================================================== --- libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp +++ libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp @@ -8,6 +8,8 @@ // <locale> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // wbuffer_convert<Codecvt, Elem, Tr> // wbuffer_convert(streambuf* bytebuf = 0, Codecvt* pcvt = new Codecvt, Index: libcxx/test/std/localization/locale.stdcvt/depr.verify.cpp =================================================================== --- /dev/null +++ libcxx/test/std/localization/locale.stdcvt/depr.verify.cpp @@ -0,0 +1,21 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// UNSUPPORTED: c++03, c++11, c++14 +// UNSUPPORTED: no-wide-characters + +// <codecvt> + +// ensure that codecvt content is marked as deprecated + +#include <codecvt> + +std::codecvt_mode c1; // expected-warning {{'codecvt_mode' is deprecated}} +std::codecvt_utf8<wchar_t> c2; // expected-warning {{'codecvt_utf8<wchar_t, 1114111, 0>' is deprecated}} +std::codecvt_utf16<wchar_t> c3; // expected-warning {{'codecvt_utf16<wchar_t, 1114111, 0>' is deprecated}} +std::codecvt_utf8_utf16<wchar_t> c4; // expected-warning {{'codecvt_utf8_utf16<wchar_t, 1114111, 0>' is deprecated}} Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf8_utf16 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf8_utf16 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf8_utf16 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf8_utf16 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf8_utf16 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf8_utf16 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf8_utf16 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf8 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf8 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf8 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf8 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf8 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf8 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf8 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf8.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf8.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf8.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf8 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf16 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf16 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf16 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf16 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf16 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf16 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf16 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_utf16.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_utf16.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_utf16.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // template <class Elem, unsigned long Maxcode = 0x10ffff, // codecvt_mode Mode = (codecvt_mode)0> // class codecvt_utf16 Index: libcxx/test/std/localization/locale.stdcvt/codecvt_mode.pass.cpp =================================================================== --- libcxx/test/std/localization/locale.stdcvt/codecvt_mode.pass.cpp +++ libcxx/test/std/localization/locale.stdcvt/codecvt_mode.pass.cpp @@ -8,6 +8,8 @@ // <codecvt> +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // enum codecvt_mode // { // consume_header = 4, Index: libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp =================================================================== --- libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp +++ libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp @@ -10,6 +10,8 @@ // UNSUPPORTED: c++03 +// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS + // <locale> // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc> Index: libcxx/src/locale.cpp =================================================================== --- libcxx/src/locale.cpp +++ libcxx/src/locale.cpp @@ -1831,6 +1831,7 @@ // 040000 - 0FFFFF D8C0 - DBBF, DC00 - DFFF F1 - F3, 80 - BF, 80 - BF, 80 - BF 786432 // 100000 - 10FFFF DBC0 - DBFF, DC00 - DFFF F4 - F4, 80 - 8F, 80 - BF, 80 - BF 65536 +_LIBCPP_SUPPRESS_DEPRECATED_PUSH static codecvt_base::result utf16_to_utf8(const uint16_t* frm, const uint16_t* frm_end, const uint16_t*& frm_nxt, @@ -3204,6 +3205,8 @@ return static_cast<int>(frm_nxt - frm); } +_LIBCPP_SUPPRESS_DEPRECATED_POP + // template <> class codecvt<char16_t, char, mbstate_t> locale::id codecvt<char16_t, char, mbstate_t>::id; @@ -3611,6 +3614,7 @@ #endif } +_LIBCPP_SUPPRESS_DEPRECATED_PUSH int __codecvt_utf8<wchar_t>::do_max_length() const noexcept { @@ -3693,6 +3697,7 @@ return utf8_to_ucs2_length(_frm, _frm_end, mx, _Maxcode_, _Mode_); } +_LIBCPP_SUPPRESS_DEPRECATED_PUSH int __codecvt_utf8<char16_t>::do_max_length() const noexcept { @@ -3700,6 +3705,7 @@ return 6; return 3; } +_LIBCPP_SUPPRESS_DEPRECATED_POP // __codecvt_utf8<char32_t> @@ -3768,6 +3774,7 @@ return utf8_to_ucs4_length(_frm, _frm_end, mx, _Maxcode_, _Mode_); } +_LIBCPP_SUPPRESS_DEPRECATED_PUSH int __codecvt_utf8<char32_t>::do_max_length() const noexcept { @@ -3775,6 +3782,7 @@ return 7; return 4; } +_LIBCPP_SUPPRESS_DEPRECATED_POP // __codecvt_utf16<wchar_t, false> @@ -4053,6 +4061,7 @@ return utf16be_to_ucs2_length(_frm, _frm_end, mx, _Maxcode_, _Mode_); } +_LIBCPP_SUPPRESS_DEPRECATED_PUSH int __codecvt_utf16<char16_t, false>::do_max_length() const noexcept { @@ -4060,6 +4069,7 @@ return 4; return 2; } +_LIBCPP_SUPPRESS_DEPRECATED_POP // __codecvt_utf16<char16_t, true> @@ -4128,6 +4138,7 @@ return utf16le_to_ucs2_length(_frm, _frm_end, mx, _Maxcode_, _Mode_); } +_LIBCPP_SUPPRESS_DEPRECATED_PUSH int __codecvt_utf16<char16_t, true>::do_max_length() const noexcept { @@ -4135,6 +4146,7 @@ return 4; return 2; } +_LIBCPP_SUPPRESS_DEPRECATED_POP // __codecvt_utf16<char32_t, false> @@ -4203,6 +4215,7 @@ return utf16be_to_ucs4_length(_frm, _frm_end, mx, _Maxcode_, _Mode_); } +_LIBCPP_SUPPRESS_DEPRECATED_PUSH int __codecvt_utf16<char32_t, false>::do_max_length() const noexcept { @@ -4210,6 +4223,7 @@ return 6; return 4; } +_LIBCPP_SUPPRESS_DEPRECATED_POP // __codecvt_utf16<char32_t, true> @@ -4278,6 +4292,7 @@ return utf16le_to_ucs4_length(_frm, _frm_end, mx, _Maxcode_, _Mode_); } +_LIBCPP_SUPPRESS_DEPRECATED_PUSH int __codecvt_utf16<char32_t, true>::do_max_length() const noexcept { @@ -4285,6 +4300,7 @@ return 6; return 4; } +_LIBCPP_SUPPRESS_DEPRECATED_POP // __codecvt_utf8_utf16<wchar_t> @@ -4442,6 +4458,7 @@ return utf8_to_utf16_length(_frm, _frm_end, mx, _Maxcode_, _Mode_); } +_LIBCPP_SUPPRESS_DEPRECATED_PUSH int __codecvt_utf8_utf16<char16_t>::do_max_length() const noexcept { @@ -4449,6 +4466,7 @@ return 7; return 4; } +_LIBCPP_SUPPRESS_DEPRECATED_POP // __codecvt_utf8_utf16<char32_t> @@ -4517,6 +4535,7 @@ return utf8_to_utf16_length(_frm, _frm_end, mx, _Maxcode_, _Mode_); } +_LIBCPP_SUPPRESS_DEPRECATED_PUSH int __codecvt_utf8_utf16<char32_t>::do_max_length() const noexcept { @@ -4524,6 +4543,7 @@ return 7; return 4; } +_LIBCPP_SUPPRESS_DEPRECATED_POP // __narrow_to_utf8<16> Index: libcxx/include/locale =================================================================== --- libcxx/include/locale +++ libcxx/include/locale @@ -3618,7 +3618,7 @@ template<class _Codecvt, class _Elem = wchar_t, class _Wide_alloc = allocator<_Elem>, class _Byte_alloc = allocator<char> > -class _LIBCPP_TEMPLATE_VIS wstring_convert +class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert { public: typedef basic_string<char, char_traits<char>, _Byte_alloc> byte_string; @@ -3685,6 +3685,7 @@ state_type state() const {return __cvtstate_;} }; +_LIBCPP_SUPPRESS_DEPRECATED_PUSH template<class _Codecvt, class _Elem, class _Wide_alloc, class _Byte_alloc> inline wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>:: @@ -3692,6 +3693,7 @@ : __cvtptr_(__pcvt), __cvtstate_(), __cvtcount_(0) { } +_LIBCPP_SUPPRESS_DEPRECATED_POP template<class _Codecvt, class _Elem, class _Wide_alloc, class _Byte_alloc> inline @@ -3726,6 +3728,7 @@ #endif // _LIBCPP_CXX03_LANG +_LIBCPP_SUPPRESS_DEPRECATED_PUSH template<class _Codecvt, class _Elem, class _Wide_alloc, class _Byte_alloc> wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::~wstring_convert() { @@ -3737,6 +3740,7 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>:: from_bytes(const char* __frm, const char* __frm_end) { +_LIBCPP_SUPPRESS_DEPRECATED_POP __cvtcount_ = 0; if (__cvtptr_ != nullptr) { @@ -3883,7 +3887,7 @@ } template <class _Codecvt, class _Elem = wchar_t, class _Tr = char_traits<_Elem> > -class _LIBCPP_TEMPLATE_VIS wbuffer_convert +class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wbuffer_convert : public basic_streambuf<_Elem, _Tr> { public: @@ -3960,6 +3964,7 @@ wbuffer_convert* __close(); }; +_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _Codecvt, class _Elem, class _Tr> wbuffer_convert<_Codecvt, _Elem, _Tr>:: wbuffer_convert(streambuf* __bytebuf, _Codecvt* __pcvt, state_type __state) @@ -3995,6 +4000,7 @@ typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type wbuffer_convert<_Codecvt, _Elem, _Tr>::underflow() { +_LIBCPP_SUPPRESS_DEPRECATED_POP if (__cv_ == 0 || __bufptr_ == 0) return traits_type::eof(); bool __initial = __read_mode(); @@ -4059,10 +4065,12 @@ return __c; } +_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _Codecvt, class _Elem, class _Tr> typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type wbuffer_convert<_Codecvt, _Elem, _Tr>::pbackfail(int_type __c) { +_LIBCPP_SUPPRESS_DEPRECATED_POP if (__cv_ != 0 && __bufptr_ != 0 && this->eback() < this->gptr()) { if (traits_type::eq_int_type(__c, traits_type::eof())) @@ -4080,10 +4088,12 @@ return traits_type::eof(); } +_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _Codecvt, class _Elem, class _Tr> typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type wbuffer_convert<_Codecvt, _Elem, _Tr>::overflow(int_type __c) { +_LIBCPP_SUPPRESS_DEPRECATED_POP if (__cv_ == 0 || __bufptr_ == 0) return traits_type::eof(); __write_mode(); @@ -4142,10 +4152,12 @@ return traits_type::not_eof(__c); } +_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _Codecvt, class _Elem, class _Tr> basic_streambuf<_Elem, _Tr>* wbuffer_convert<_Codecvt, _Elem, _Tr>::setbuf(char_type* __s, streamsize __n) { +_LIBCPP_SUPPRESS_DEPRECATED_POP this->setg(0, 0, 0); this->setp(0, 0); if (__owns_eb_) @@ -4195,6 +4207,7 @@ return this; } +_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _Codecvt, class _Elem, class _Tr> typename wbuffer_convert<_Codecvt, _Elem, _Tr>::pos_type wbuffer_convert<_Codecvt, _Elem, _Tr>::seekoff(off_type __off, ios_base::seekdir __way, @@ -4226,6 +4239,7 @@ int wbuffer_convert<_Codecvt, _Elem, _Tr>::sync() { +_LIBCPP_SUPPRESS_DEPRECATED_POP if (__cv_ == 0 || __bufptr_ == 0) return 0; if (__cm_ & ios_base::out) @@ -4294,6 +4308,7 @@ return 0; } +_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _Codecvt, class _Elem, class _Tr> bool wbuffer_convert<_Codecvt, _Elem, _Tr>::__read_mode() @@ -4348,6 +4363,8 @@ return __rt; } +_LIBCPP_SUPPRESS_DEPRECATED_POP + _LIBCPP_END_NAMESPACE_STD _LIBCPP_POP_MACROS Index: libcxx/include/codecvt =================================================================== --- libcxx/include/codecvt +++ libcxx/include/codecvt @@ -65,7 +65,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD -enum codecvt_mode +enum _LIBCPP_DEPRECATED_IN_CXX17 codecvt_mode { consume_header = 4, generate_header = 2, @@ -82,17 +82,21 @@ : public codecvt<wchar_t, char, mbstate_t> { unsigned long _Maxcode_; +_LIBCPP_SUPPRESS_DEPRECATED_PUSH codecvt_mode _Mode_; +_LIBCPP_SUPPRESS_DEPRECATED_POP public: typedef wchar_t intern_type; typedef char extern_type; typedef mbstate_t state_type; +_LIBCPP_SUPPRESS_DEPRECATED_PUSH _LIBCPP_INLINE_VISIBILITY explicit __codecvt_utf8(size_t __refs, unsigned long _Maxcode, codecvt_mode _Mode) : codecvt<wchar_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), _Mode_(_Mode) {} +_LIBCPP_SUPPRESS_DEPRECATED_POP protected: virtual result do_out(state_type& __st, @@ -189,9 +193,10 @@ virtual int do_max_length() const _NOEXCEPT; }; +_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _Elem, unsigned long _Maxcode = 0x10ffff, codecvt_mode _Mode = (codecvt_mode)0> -class _LIBCPP_TEMPLATE_VIS codecvt_utf8 +class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8 : public __codecvt_utf8<_Elem> { public: @@ -202,6 +207,7 @@ _LIBCPP_INLINE_VISIBILITY ~codecvt_utf8() {} }; +_LIBCPP_SUPPRESS_DEPRECATED_POP // codecvt_utf16 @@ -213,17 +219,21 @@ : public codecvt<wchar_t, char, mbstate_t> { unsigned long _Maxcode_; +_LIBCPP_SUPPRESS_DEPRECATED_PUSH codecvt_mode _Mode_; +_LIBCPP_SUPPRESS_DEPRECATED_POP public: typedef wchar_t intern_type; typedef char extern_type; typedef mbstate_t state_type; +_LIBCPP_SUPPRESS_DEPRECATED_PUSH _LIBCPP_INLINE_VISIBILITY explicit __codecvt_utf16(size_t __refs, unsigned long _Maxcode, codecvt_mode _Mode) : codecvt<wchar_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), _Mode_(_Mode) {} +_LIBCPP_SUPPRESS_DEPRECATED_POP protected: virtual result do_out(state_type& __st, @@ -248,17 +258,21 @@ : public codecvt<wchar_t, char, mbstate_t> { unsigned long _Maxcode_; +_LIBCPP_SUPPRESS_DEPRECATED_PUSH codecvt_mode _Mode_; +_LIBCPP_SUPPRESS_DEPRECATED_POP public: typedef wchar_t intern_type; typedef char extern_type; typedef mbstate_t state_type; +_LIBCPP_SUPPRESS_DEPRECATED_PUSH _LIBCPP_INLINE_VISIBILITY explicit __codecvt_utf16(size_t __refs, unsigned long _Maxcode, codecvt_mode _Mode) : codecvt<wchar_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), _Mode_(_Mode) {} +_LIBCPP_SUPPRESS_DEPRECATED_POP protected: virtual result do_out(state_type& __st, @@ -431,9 +445,10 @@ virtual int do_max_length() const _NOEXCEPT; }; +_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _Elem, unsigned long _Maxcode = 0x10ffff, codecvt_mode _Mode = (codecvt_mode)0> -class _LIBCPP_TEMPLATE_VIS codecvt_utf16 +class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf16 : public __codecvt_utf16<_Elem, _Mode & little_endian> { public: @@ -444,6 +459,7 @@ _LIBCPP_INLINE_VISIBILITY ~codecvt_utf16() {} }; +_LIBCPP_SUPPRESS_DEPRECATED_POP // codecvt_utf8_utf16 @@ -455,17 +471,21 @@ : public codecvt<wchar_t, char, mbstate_t> { unsigned long _Maxcode_; +_LIBCPP_SUPPRESS_DEPRECATED_PUSH codecvt_mode _Mode_; +_LIBCPP_SUPPRESS_DEPRECATED_POP public: typedef wchar_t intern_type; typedef char extern_type; typedef mbstate_t state_type; +_LIBCPP_SUPPRESS_DEPRECATED_PUSH _LIBCPP_INLINE_VISIBILITY explicit __codecvt_utf8_utf16(size_t __refs, unsigned long _Maxcode, codecvt_mode _Mode) : codecvt<wchar_t, char, mbstate_t>(__refs), _Maxcode_(_Maxcode), _Mode_(_Mode) {} +_LIBCPP_SUPPRESS_DEPRECATED_POP protected: virtual result do_out(state_type& __st, @@ -562,9 +582,10 @@ virtual int do_max_length() const _NOEXCEPT; }; +_LIBCPP_SUPPRESS_DEPRECATED_PUSH template <class _Elem, unsigned long _Maxcode = 0x10ffff, codecvt_mode _Mode = (codecvt_mode)0> -class _LIBCPP_TEMPLATE_VIS codecvt_utf8_utf16 +class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8_utf16 : public __codecvt_utf8_utf16<_Elem> { public: @@ -575,6 +596,7 @@ _LIBCPP_INLINE_VISIBILITY ~codecvt_utf8_utf16() {} }; +_LIBCPP_SUPPRESS_DEPRECATED_POP _LIBCPP_END_NAMESPACE_STD Index: libcxx/docs/Status/Cxx17Papers.csv =================================================================== --- libcxx/docs/Status/Cxx17Papers.csv +++ libcxx/docs/Status/Cxx17Papers.csv @@ -106,7 +106,7 @@ "`P0599R1 <https://wg21.link/P0599R1>`__","LWG","noexcept for hash functions","Kona","|Complete|","5.0" "`P0604R0 <https://wg21.link/P0604R0>`__","LWG","Resolving GB 55, US 84, US 85, US 86","Kona","|Complete|","" "`P0607R0 <https://wg21.link/P0607R0>`__","LWG","Inline Variables for the Standard Library","Kona","|In Progress| [#note-P0607]_","6.0" -"`P0618R0 <https://wg21.link/P0618R0>`__","LWG","Deprecating <codecvt>","Kona","","" +"`P0618R0 <https://wg21.link/P0618R0>`__","LWG","Deprecating <codecvt>","Kona","|Complete|","15.0" "`P0623R0 <https://wg21.link/P0623R0>`__","LWG","Final C++17 Parallel Algorithms Fixes","Kona","","" "","","","","","" "`P0682R1 <https://wg21.link/P0682R1>`__","LWG","Repairing elementary string conversions","Toronto","","" Index: libcxx/docs/ReleaseNotes.rst =================================================================== --- libcxx/docs/ReleaseNotes.rst +++ libcxx/docs/ReleaseNotes.rst @@ -46,6 +46,7 @@ - P0174R2 (Deprecating Vestigial Library Parts in C++17) - N4190 (Removing auto_ptr, random_shuffle(), And Old <functional> Stuff) - P0154R1 (Hardware inference size) +- P0618R0 (Deprecating <codecvt>) - Marked the following papers as "Complete" (note that some of those might have been implemented in a previous release but not marked as such): @@ -155,6 +156,10 @@ you have to define ``_LIBCPP_DISABLE_DEPRECATION_WARNINGS``. Note that this disables all deprecation warnings. +- The contents of ``<codecvt>``, ``wstring_convert`` and ``wbuffer_convert`` have been marked as deprecated. + To disable deprecation warnings you have to define ``_LIBCPP_DISABLE_DEPRECATION_WARNINGS``. Note that this + disables all deprecation warnings. + ABI Changes -----------
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits