53 lines · cpp
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9// <codecvt>10 11// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT12 13// template <class Elem, unsigned long Maxcode = 0x10ffff,14// codecvt_mode Mode = (codecvt_mode)0>15// class codecvt_utf816// : public codecvt<Elem, char, mbstate_t>17// {18// // unspecified19// };20 21// bool always_noconv() const throw();22 23#include <codecvt>24#include <cassert>25 26#include "test_macros.h"27 28int main(int, char**)29{30#ifndef TEST_HAS_NO_WIDE_CHARACTERS31 {32 typedef std::codecvt_utf8<wchar_t> C;33 C c;34 bool r = c.always_noconv();35 assert(r == false);36 }37#endif38 {39 typedef std::codecvt_utf8<char16_t> C;40 C c;41 bool r = c.always_noconv();42 assert(r == false);43 }44 {45 typedef std::codecvt_utf8<char32_t> C;46 C c;47 bool r = c.always_noconv();48 assert(r == false);49 }50 51 return 0;52}53