Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-03 08:14:08

0001 // -*- C++ -*-
0002 //===----------------------------------------------------------------------===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 
0010 #ifndef _LIBCPP_UCHAR_H
0011 #define _LIBCPP_UCHAR_H
0012 
0013 /*
0014     uchar.h synopsis // since C++11
0015 
0016 Macros:
0017 
0018     __STDC_UTF_16__
0019     __STDC_UTF_32__
0020 
0021 Types:
0022 
0023   mbstate_t
0024   size_t
0025 
0026 size_t mbrtoc8(char8_t* pc8, const char* s, size_t n, mbstate_t* ps);     // since C++20
0027 size_t c8rtomb(char* s, char8_t c8, mbstate_t* ps);                       // since C++20
0028 size_t mbrtoc16(char16_t* pc16, const char* s, size_t n, mbstate_t* ps);
0029 size_t c16rtomb(char* s, char16_t c16, mbstate_t* ps);
0030 size_t mbrtoc32(char32_t* pc32, const char* s, size_t n, mbstate_t* ps);
0031 size_t c32rtomb(char* s, char32_t c32, mbstate_t* ps);
0032 
0033 */
0034 
0035 #if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
0036 #  include <__cxx03/uchar.h>
0037 #else
0038 #  include <__config>
0039 
0040 #  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
0041 #    pragma GCC system_header
0042 #  endif
0043 
0044 #  if !defined(_LIBCPP_CXX03_LANG)
0045 
0046 // Some platforms don't implement <uchar.h> and we don't want to give a hard
0047 // error on those platforms. When the platform doesn't provide <uchar.h>, at
0048 // least include <stddef.h> so we get the declaration for size_t, and try to
0049 // get the declaration of mbstate_t too.
0050 #    if __has_include_next(<uchar.h>)
0051 #      include_next <uchar.h>
0052 #    else
0053 #      include <__mbstate_t.h>
0054 #      include <stddef.h>
0055 #    endif
0056 
0057 #  endif // _LIBCPP_CXX03_LANG
0058 #endif   // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
0059 
0060 #endif // _LIBCPP_UCHAR_H