------------------------------------------------- -----------------
``__cpp_lib_bounded_array_traits`` ``201902L``
------------------------------------------------- -----------------
- ``__cpp_lib_char8_t`` ``201811L``
+ ``__cpp_lib_char8_t`` ``201907L``
------------------------------------------------- -----------------
``__cpp_lib_concepts`` ``202002L``
------------------------------------------------- -----------------
- P0618R0 (Deprecating <codecvt>)
- P2418R2 (Add support for ``std::generator``-like types to ``std::format``)
- LWG3659 (Consider ``ATOMIC_FLAG_INIT`` undeprecation)
+- P1423R3 (char8_t backward compatibility remediation)
- Marked the following papers as "Complete" (note that some of those might have
been implemented in a previous release but not marked as such):
"`P1208R6 <https://wg21.link/P1208R6>`__","LWG","Adopt source_location for C++20","Cologne","",""
"`P1355R2 <https://wg21.link/P1355R2>`__","LWG","Exposing a narrow contract for ceil2","Cologne","|Complete|","9.0"
"`P1361R2 <https://wg21.link/P1361R2>`__","LWG","Integration of chrono with text formatting","Cologne","",""
-"`P1423R3 <https://wg21.link/P1423R3>`__","LWG","char8_t backward compatibility remediation","Cologne","|In Progress|",""
+"`P1423R3 <https://wg21.link/P1423R3>`__","LWG","char8_t backward compatibility remediation","Cologne","|Complete|","15.0"
"`P1424R1 <https://wg21.link/P1424R1>`__","LWG","'constexpr' feature macro concerns","Cologne","Superseded by `P1902 <https://wg21.link/P1902>`__",""
"`P1466R3 <https://wg21.link/P1466R3>`__","LWG","Miscellaneous minor fixes for chrono","Cologne","",""
"`P1474R1 <https://wg21.link/P1474R1>`__","LWG","Helpful pointers for ContiguousIterator","Cologne","|Complete|","15.0"
template <class Stream, class T>
Stream&& operator<<(Stream&& os, const T& x);
+template<class traits>
+basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, wchar_t) = delete; // since C++20
+template<class traits>
+basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, char8_t) = delete; // since C++20
+template<class traits>
+basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, char16_t) = delete; // since C++20
+template<class traits>
+basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, char32_t) = delete; // since C++20
+template<class traits>
+basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, char8_t) = delete; // since C++20
+template<class traits>
+basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, char16_t) = delete; // since C++20
+template<class traits>
+basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, char32_t) = delete; // since C++20
+template<class traits>
+basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const wchar_t*) = delete; // since C++20
+template<class traits>
+basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const char8_t*) = delete; // since C++20
+template<class traits>
+basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const char16_t*) = delete; // since C++20
+template<class traits>
+basic_ostream<char, traits>& operator<<(basic_ostream<char, traits>&, const char32_t*) = delete; // since C++20
+template<class traits>
+basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, const char8_t*) = delete; // since C++20
+template<class traits>
+basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, const char16_t*) = delete; // since C++20
+template<class traits>
+basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, const char32_t*) = delete; // since C++20
+
} // std
*/
use_facet<ctype<_CharT> >(__os.getloc()).widen('1'));
}
+#if _LIBCPP_STD_VER > 17
+
+#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+template <class _Traits>
+basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, wchar_t) = delete;
+
+template <class _Traits>
+basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const wchar_t*) = delete;
+
+template <class _Traits>
+basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, char16_t) = delete;
+
+template <class _Traits>
+basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, char32_t) = delete;
+
+template <class _Traits>
+basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, const char16_t*) = delete;
+
+template <class _Traits>
+basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, const char32_t*) = delete;
+
+#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+
+#ifndef _LIBCPP_HAS_NO_CHAR8_T
+template <class _Traits>
+basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, char8_t) = delete;
+
+template <class _Traits>
+basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, char8_t) = delete;
+
+template <class _Traits>
+basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const char8_t*) = delete;
+
+template <class _Traits>
+basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, const char8_t*) = delete;
+#endif
+
+template <class _Traits>
+basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, char16_t) = delete;
+
+template <class _Traits>
+basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, char32_t) = delete;
+
+template <class _Traits>
+basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const char16_t*) = delete;
+
+template <class _Traits>
+basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const char32_t*) = delete;
+
+#endif // _LIBCPP_STD_VER > 17
+
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<char>;
#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<wchar_t>;
__cpp_lib_boyer_moore_searcher 201603L <functional>
__cpp_lib_byte 201603L <cstddef>
__cpp_lib_byteswap 202110L <bit>
-__cpp_lib_char8_t 201811L <atomic> <filesystem> <istream>
+__cpp_lib_char8_t 201907L <atomic> <filesystem> <istream>
<limits> <locale> <ostream>
<string> <string_view>
__cpp_lib_chrono 201611L <chrono>
// # define __cpp_lib_bitops 201907L
# define __cpp_lib_bounded_array_traits 201902L
# if !defined(_LIBCPP_HAS_NO_CHAR8_T)
-# define __cpp_lib_char8_t 201811L
+# define __cpp_lib_char8_t 201907L
# endif
# define __cpp_lib_concepts 202002L
# define __cpp_lib_constexpr_algorithms 201806L
--- /dev/null
+//===----------------------------------------------------------------------===//
+//
+// 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, c++17
+
+// <ostream>
+
+#include <ostream>
+#include <sstream>
+#include <utility>
+
+#include "test_macros.h"
+
+int main() {
+ std::ostringstream s;
+
+#ifndef TEST_HAS_NO_WIDE_CHARACTERS
+
+ s << wchar_t(); // expected-error {{overload resolution selected deleted operator '<<'}}
+ s << std::declval<wchar_t*>(); // expected-error {{overload resolution selected deleted operator '<<'}}
+ s << std::declval<const wchar_t*>(); // expected-error {{overload resolution selected deleted operator '<<'}}
+
+ std::wostringstream sw;
+# ifndef TEST_HAS_NO_CHAR8_T
+ sw << char8_t(); // expected-error {{overload resolution selected deleted operator '<<'}}
+ sw << std::declval<char8_t*>(); // expected-error {{overload resolution selected deleted operator '<<'}}
+ sw << std::declval<const char8_t*>(); // expected-error {{overload resolution selected deleted operator '<<'}}
+# endif
+
+ sw << char16_t(); // expected-error {{overload resolution selected deleted operator '<<'}}
+ sw << std::declval<char16_t*>(); // expected-error {{overload resolution selected deleted operator '<<'}}
+ sw << std::declval<const char16_t*>(); // expected-error {{overload resolution selected deleted operator '<<'}}
+ sw << char32_t(); // expected-error {{overload resolution selected deleted operator '<<'}}
+ sw << std::declval<char32_t*>(); // expected-error {{overload resolution selected deleted operator '<<'}}
+ sw << std::declval<const char32_t*>(); // expected-error {{overload resolution selected deleted operator '<<'}}
+
+#endif // TEST_HAS_NO_WIDE_CHARACTERS
+
+#ifndef TEST_HAS_NO_CHAR8_T
+ s << char8_t(); // expected-error {{overload resolution selected deleted operator '<<'}}
+ s << std::declval<char8_t*>(); // expected-error {{overload resolution selected deleted operator '<<'}}
+ s << std::declval<const char8_t*>(); // expected-error {{overload resolution selected deleted operator '<<'}}
+#endif
+ s << char16_t(); // expected-error {{overload resolution selected deleted operator '<<'}}
+ s << std::declval<char16_t*>(); // expected-error {{overload resolution selected deleted operator '<<'}}
+ s << std::declval<const char16_t*>(); // expected-error {{overload resolution selected deleted operator '<<'}}
+ s << char32_t(); // expected-error {{overload resolution selected deleted operator '<<'}}
+ s << std::declval<char32_t*>(); // expected-error {{overload resolution selected deleted operator '<<'}}
+ s << std::declval<const char32_t*>(); // expected-error {{overload resolution selected deleted operator '<<'}}
+}
__cpp_lib_atomic_shared_ptr 201711L [C++20]
__cpp_lib_atomic_value_initialization 201911L [C++20]
__cpp_lib_atomic_wait 201907L [C++20]
- __cpp_lib_char8_t 201811L [C++20]
+ __cpp_lib_char8_t 201907L [C++20]
*/
#include <atomic>
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++20"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++20"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++20"
# endif
# else
# ifdef __cpp_lib_char8_t
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++2b"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++2b"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++2b"
# endif
# else
# ifdef __cpp_lib_char8_t
// Test the feature test macros defined by <filesystem>
/* Constant Value
- __cpp_lib_char8_t 201811L [C++20]
+ __cpp_lib_char8_t 201907L [C++20]
__cpp_lib_filesystem 201703L [C++17]
*/
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++20"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++20"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++20"
# endif
# else
# ifdef __cpp_lib_char8_t
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++2b"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++2b"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++2b"
# endif
# else
# ifdef __cpp_lib_char8_t
// Test the feature test macros defined by <istream>
/* Constant Value
- __cpp_lib_char8_t 201811L [C++20]
+ __cpp_lib_char8_t 201907L [C++20]
*/
#include <istream>
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++20"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++20"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++20"
# endif
# else
# ifdef __cpp_lib_char8_t
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++2b"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++2b"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++2b"
# endif
# else
# ifdef __cpp_lib_char8_t
// Test the feature test macros defined by <limits>
/* Constant Value
- __cpp_lib_char8_t 201811L [C++20]
+ __cpp_lib_char8_t 201907L [C++20]
*/
#include <limits>
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++20"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++20"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++20"
# endif
# else
# ifdef __cpp_lib_char8_t
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++2b"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++2b"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++2b"
# endif
# else
# ifdef __cpp_lib_char8_t
// Test the feature test macros defined by <locale>
/* Constant Value
- __cpp_lib_char8_t 201811L [C++20]
+ __cpp_lib_char8_t 201907L [C++20]
*/
#include <locale>
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++20"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++20"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++20"
# endif
# else
# ifdef __cpp_lib_char8_t
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++2b"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++2b"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++2b"
# endif
# else
# ifdef __cpp_lib_char8_t
// Test the feature test macros defined by <ostream>
/* Constant Value
- __cpp_lib_char8_t 201811L [C++20]
+ __cpp_lib_char8_t 201907L [C++20]
*/
#include <ostream>
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++20"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++20"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++20"
# endif
# else
# ifdef __cpp_lib_char8_t
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++2b"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++2b"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++2b"
# endif
# else
# ifdef __cpp_lib_char8_t
/* Constant Value
__cpp_lib_allocator_traits_is_always_equal 201411L [C++17]
- __cpp_lib_char8_t 201811L [C++20]
+ __cpp_lib_char8_t 201907L [C++20]
__cpp_lib_constexpr_string 201907L [C++20]
__cpp_lib_erase_if 202002L [C++20]
__cpp_lib_nonmember_container_access 201411L [C++17]
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++20"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++20"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++20"
# endif
# else
# ifdef __cpp_lib_char8_t
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++2b"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++2b"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++2b"
# endif
# else
# ifdef __cpp_lib_char8_t
// Test the feature test macros defined by <string_view>
/* Constant Value
- __cpp_lib_char8_t 201811L [C++20]
+ __cpp_lib_char8_t 201907L [C++20]
__cpp_lib_constexpr_string_view 201811L [C++20]
__cpp_lib_starts_ends_with 201711L [C++20]
__cpp_lib_string_contains 202011L [C++2b]
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++20"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++20"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++20"
# endif
# else
# ifdef __cpp_lib_char8_t
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++2b"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++2b"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++2b"
# endif
# else
# ifdef __cpp_lib_char8_t
__cpp_lib_boyer_moore_searcher 201603L [C++17]
__cpp_lib_byte 201603L [C++17]
__cpp_lib_byteswap 202110L [C++2b]
- __cpp_lib_char8_t 201811L [C++20]
+ __cpp_lib_char8_t 201907L [C++20]
__cpp_lib_chrono 201611L [C++17]
__cpp_lib_chrono_udls 201304L [C++14]
__cpp_lib_clamp 201603L [C++17]
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++20"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++20"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++20"
# endif
# else
# ifdef __cpp_lib_char8_t
# ifndef __cpp_lib_char8_t
# error "__cpp_lib_char8_t should be defined in c++2b"
# endif
-# if __cpp_lib_char8_t != 201811L
-# error "__cpp_lib_char8_t should have the value 201811L in c++2b"
+# if __cpp_lib_char8_t != 201907L
+# error "__cpp_lib_char8_t should have the value 201907L in c++2b"
# endif
# else
# ifdef __cpp_lib_char8_t
"headers": ["bit"],
}, {
"name": "__cpp_lib_char8_t",
- "values": { "c++20": 201811 },
+ "values": { "c++20": 201907 },
"headers": ["atomic", "filesystem", "istream", "limits", "locale", "ostream", "string", "string_view"],
"test_suite_guard": "defined(__cpp_char8_t)",
"libcxx_guard": "!defined(_LIBCPP_HAS_NO_CHAR8_T)",