/
usr
/
include
/
unicode
/
/usr/include/unicode
mkdir
upload
Name
Size
Mode
Actions
alphaindex.h
27158
0644
edit
dl
rm
appendable.h
8739
0644
edit
dl
rm
basictz.h
10163
0644
edit
dl
rm
brkiter.h
28478
0644
edit
dl
rm
bytestream.h
11013
0644
edit
dl
rm
bytestrie.h
21268
0644
edit
dl
rm
bytestriebuilder.h
7640
0644
edit
dl
rm
calendar.h
108424
0644
edit
dl
rm
caniter.h
7621
0644
edit
dl
rm
casemap.h
25933
0644
edit
dl
rm
char16ptr.h
7393
0644
edit
dl
rm
chariter.h
24638
0644
edit
dl
rm
choicfmt.h
24544
0644
edit
dl
rm
coleitr.h
14102
0644
edit
dl
rm
coll.h
57615
0644
edit
dl
rm
compactdecimalformat.h
7047
0644
edit
dl
rm
curramt.h
3869
0644
edit
dl
rm
currpinf.h
7479
0644
edit
dl
rm
currunit.h
4112
0644
edit
dl
rm
datefmt.h
41690
0644
edit
dl
rm
dbbi.h
1223
0644
edit
dl
rm
dcfmtsym.h
21101
0644
edit
dl
rm
decimfmt.h
89676
0644
edit
dl
rm
docmain.h
7380
0644
edit
dl
rm
dtfmtsym.h
39126
0644
edit
dl
rm
dtintrv.h
3935
0644
edit
dl
rm
dtitvfmt.h
50448
0644
edit
dl
rm
dtitvinf.h
19072
0644
edit
dl
rm
dtptngen.h
26692
0644
edit
dl
rm
dtrule.h
8898
0644
edit
dl
rm
edits.h
21237
0644
edit
dl
rm
enumset.h
2130
0644
edit
dl
rm
errorcode.h
4956
0644
edit
dl
rm
fieldpos.h
8906
0644
edit
dl
rm
filteredbrk.h
5501
0644
edit
dl
rm
fmtable.h
25020
0644
edit
dl
rm
format.h
12802
0644
edit
dl
rm
formattedvalue.h
9987
0644
edit
dl
rm
fpositer.h
3107
0644
edit
dl
rm
gender.h
3408
0644
edit
dl
rm
gregocal.h
32642
0644
edit
dl
rm
icudataver.h
1049
0644
edit
dl
rm
icuplug.h
12109
0644
edit
dl
rm
idna.h
13000
0644
edit
dl
rm
listformatter.h
9004
0644
edit
dl
rm
localebuilder.h
11350
0644
edit
dl
rm
localematcher.h
27467
0644
edit
dl
rm
localpointer.h
19825
0644
edit
dl
rm
locdspnm.h
7292
0644
edit
dl
rm
locid.h
48804
0644
edit
dl
rm
measfmt.h
11690
0644
edit
dl
rm
measunit.h
107613
0644
edit
dl
rm
measure.h
4431
0644
edit
dl
rm
messagepattern.h
34517
0644
edit
dl
rm
msgfmt.h
45278
0644
edit
dl
rm
normalizer2.h
34466
0644
edit
dl
rm
normlzr.h
31690
0644
edit
dl
rm
nounit.h
2305
0644
edit
dl
rm
numberformatter.h
94505
0644
edit
dl
rm
numberrangeformatter.h
25790
0644
edit
dl
rm
numfmt.h
51034
0644
edit
dl
rm
numsys.h
7509
0644
edit
dl
rm
parseerr.h
3155
0644
edit
dl
rm
parsepos.h
5699
0644
edit
dl
rm
platform.h
28768
0644
edit
dl
rm
plurfmt.h
25847
0644
edit
dl
rm
plurrule.h
21316
0644
edit
dl
rm
ptypes.h
3577
0644
edit
dl
rm
putil.h
6471
0644
edit
dl
rm
rbbi.h
28413
0644
edit
dl
rm
rbnf.h
50021
0644
edit
dl
rm
rbtz.h
16210
0644
edit
dl
rm
regex.h
86385
0644
edit
dl
rm
region.h
9402
0644
edit
dl
rm
reldatefmt.h
22751
0644
edit
dl
rm
rep.h
9599
0644
edit
dl
rm
resbund.h
18513
0644
edit
dl
rm
schriter.h
6511
0644
edit
dl
rm
scientificnumberformatter.h
6589
0644
edit
dl
rm
search.h
22755
0644
edit
dl
rm
selfmt.h
14686
0644
edit
dl
rm
simpleformatter.h
12888
0644
edit
dl
rm
simpletz.h
46798
0644
edit
dl
rm
smpdtfmt.h
72778
0644
edit
dl
rm
sortkey.h
11452
0644
edit
dl
rm
std_string.h
1076
0644
edit
dl
rm
strenum.h
10157
0644
edit
dl
rm
stringoptions.h
5926
0644
edit
dl
rm
stringpiece.h
10287
0644
edit
dl
rm
stringtriebuilder.h
15842
0644
edit
dl
rm
stsearch.h
21926
0644
edit
dl
rm
symtable.h
4374
0644
edit
dl
rm
tblcoll.h
37801
0644
edit
dl
rm
timezone.h
44858
0644
edit
dl
rm
tmunit.h
3479
0644
edit
dl
rm
tmutamt.h
5029
0644
edit
dl
rm
tmutfmt.h
7602
0644
edit
dl
rm
translit.h
67397
0644
edit
dl
rm
tzfmt.h
43961
0644
edit
dl
rm
tznames.h
17251
0644
edit
dl
rm
tzrule.h
36450
0644
edit
dl
rm
tztrans.h
6278
0644
edit
dl
rm
ubidi.h
91759
0644
edit
dl
rm
ubiditransform.h
13003
0644
edit
dl
rm
ubrk.h
25043
0644
edit
dl
rm
ucal.h
62463
0644
edit
dl
rm
ucasemap.h
15579
0644
edit
dl
rm
ucat.h
5478
0644
edit
dl
rm
uchar.h
148111
0644
edit
dl
rm
ucharstrie.h
23066
0644
edit
dl
rm
ucharstriebuilder.h
7645
0644
edit
dl
rm
uchriter.h
13747
0644
edit
dl
rm
uclean.h
11468
0644
edit
dl
rm
ucnv.h
85051
0644
edit
dl
rm
ucnvsel.h
6339
0644
edit
dl
rm
ucnv_cb.h
6738
0644
edit
dl
rm
ucnv_err.h
21481
0644
edit
dl
rm
ucol.h
62987
0644
edit
dl
rm
ucoleitr.h
10056
0644
edit
dl
rm
uconfig.h
12356
0644
edit
dl
rm
ucpmap.h
5663
0644
edit
dl
rm
ucptrie.h
23044
0644
edit
dl
rm
ucsdet.h
15043
0644
edit
dl
rm
ucurr.h
17122
0644
edit
dl
rm
udat.h
63902
0644
edit
dl
rm
udata.h
16004
0644
edit
dl
rm
udateintervalformat.h
12218
0644
edit
dl
rm
udatpg.h
27405
0644
edit
dl
rm
udisplaycontext.h
6084
0644
edit
dl
rm
uenum.h
7981
0644
edit
dl
rm
ufieldpositer.h
4513
0644
edit
dl
rm
uformattable.h
11233
0644
edit
dl
rm
uformattedvalue.h
12600
0644
edit
dl
rm
ugender.h
2106
0644
edit
dl
rm
uidna.h
34229
0644
edit
dl
rm
uiter.h
23299
0644
edit
dl
rm
uldnames.h
10733
0644
edit
dl
rm
ulistformatter.h
11043
0644
edit
dl
rm
uloc.h
55936
0644
edit
dl
rm
ulocdata.h
11572
0644
edit
dl
rm
umachine.h
16439
0644
edit
dl
rm
umisc.h
1365
0644
edit
dl
rm
umsg.h
24832
0644
edit
dl
rm
umutablecptrie.h
8490
0644
edit
dl
rm
unifilt.h
4091
0644
edit
dl
rm
unifunct.h
4151
0644
edit
dl
rm
unimatch.h
6244
0644
edit
dl
rm
unirepl.h
3464
0644
edit
dl
rm
uniset.h
68108
0644
edit
dl
rm
unistr.h
174627
0644
edit
dl
rm
unorm.h
21042
0644
edit
dl
rm
unorm2.h
25269
0644
edit
dl
rm
unum.h
56269
0644
edit
dl
rm
unumberformatter.h
31177
0644
edit
dl
rm
unumberrangeformatter.h
15737
0644
edit
dl
rm
unumsys.h
7430
0644
edit
dl
rm
uobject.h
10934
0644
edit
dl
rm
upluralrules.h
8997
0644
edit
dl
rm
uregex.h
73719
0644
edit
dl
rm
uregion.h
10047
0644
edit
dl
rm
ureldatefmt.h
17448
0644
edit
dl
rm
urename.h
137853
0644
edit
dl
rm
urep.h
5507
0644
edit
dl
rm
ures.h
37418
0644
edit
dl
rm
uscript.h
28291
0644
edit
dl
rm
usearch.h
40153
0644
edit
dl
rm
uset.h
45503
0644
edit
dl
rm
usetiter.h
9910
0644
edit
dl
rm
ushape.h
18430
0644
edit
dl
rm
uspoof.h
67425
0644
edit
dl
rm
usprep.h
8382
0644
edit
dl
rm
ustdio.h
39482
0644
edit
dl
rm
ustream.h
1934
0644
edit
dl
rm
ustring.h
74096
0644
edit
dl
rm
ustringtrie.h
3224
0644
edit
dl
rm
utext.h
59471
0644
edit
dl
rm
utf.h
8057
0644
edit
dl
rm
utf8.h
31572
0644
edit
dl
rm
utf16.h
23910
0644
edit
dl
rm
utf32.h
763
0644
edit
dl
rm
utf_old.h
46929
0644
edit
dl
rm
utmscale.h
14107
0644
edit
dl
rm
utrace.h
17595
0644
edit
dl
rm
utrans.h
26157
0644
edit
dl
rm
utypes.h
31807
0644
edit
dl
rm
uvernum.h
6839
0644
edit
dl
rm
uversion.h
6137
0644
edit
dl
rm
vtzone.h
21303
0644
edit
dl
rm
Edit:
/usr/include/unicode/char16ptr.h
(7393B)
// © 2017 and later: Unicode, Inc. and others. // License & terms of use: http://www.unicode.org/copyright.html // char16ptr.h // created: 2017feb28 Markus W. Scherer #ifndef __CHAR16PTR_H__ #define __CHAR16PTR_H__ #include "unicode/utypes.h" #if U_SHOW_CPLUSPLUS_API #include <cstddef> /** * \file * \brief C++ API: char16_t pointer wrappers with * implicit conversion from bit-compatible raw pointer types. * Also conversion functions from char16_t * to UChar * and OldUChar *. */ U_NAMESPACE_BEGIN /** * \def U_ALIASING_BARRIER * Barrier for pointer anti-aliasing optimizations even across function boundaries. * @internal */ #ifdef U_ALIASING_BARRIER // Use the predefined value. #elif (defined(__clang__) || defined(__GNUC__)) && U_PLATFORM != U_PF_BROWSER_NATIVE_CLIENT # define U_ALIASING_BARRIER(ptr) asm volatile("" : : "rm"(ptr) : "memory") #elif defined(U_IN_DOXYGEN) # define U_ALIASING_BARRIER(ptr) #endif /** * char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types. * @stable ICU 59 */ class U_COMMON_API Char16Ptr U_FINAL { public: /** * Copies the pointer. * @param p pointer * @stable ICU 59 */ inline Char16Ptr(char16_t *p); #if !U_CHAR16_IS_TYPEDEF /** * Converts the pointer to char16_t *. * @param p pointer to be converted * @stable ICU 59 */ inline Char16Ptr(uint16_t *p); #endif #if U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN) /** * Converts the pointer to char16_t *. * (Only defined if U_SIZEOF_WCHAR_T==2.) * @param p pointer to be converted * @stable ICU 59 */ inline Char16Ptr(wchar_t *p); #endif /** * nullptr constructor. * @param p nullptr * @stable ICU 59 */ inline Char16Ptr(std::nullptr_t p); /** * Destructor. * @stable ICU 59 */ inline ~Char16Ptr(); /** * Pointer access. * @return the wrapped pointer * @stable ICU 59 */ inline char16_t *get() const; /** * char16_t pointer access via type conversion (e.g., static_cast). * @return the wrapped pointer * @stable ICU 59 */ inline operator char16_t *() const { return get(); } private: Char16Ptr() = delete; #ifdef U_ALIASING_BARRIER template<typename T> static char16_t *cast(T *t) { U_ALIASING_BARRIER(t); return reinterpret_cast<char16_t *>(t); } char16_t *p_; #else union { char16_t *cp; uint16_t *up; wchar_t *wp; } u_; #endif }; /// \cond #ifdef U_ALIASING_BARRIER Char16Ptr::Char16Ptr(char16_t *p) : p_(p) {} #if !U_CHAR16_IS_TYPEDEF Char16Ptr::Char16Ptr(uint16_t *p) : p_(cast(p)) {} #endif #if U_SIZEOF_WCHAR_T==2 Char16Ptr::Char16Ptr(wchar_t *p) : p_(cast(p)) {} #endif Char16Ptr::Char16Ptr(std::nullptr_t p) : p_(p) {} Char16Ptr::~Char16Ptr() { U_ALIASING_BARRIER(p_); } char16_t *Char16Ptr::get() const { return p_; } #else Char16Ptr::Char16Ptr(char16_t *p) { u_.cp = p; } #if !U_CHAR16_IS_TYPEDEF Char16Ptr::Char16Ptr(uint16_t *p) { u_.up = p; } #endif #if U_SIZEOF_WCHAR_T==2 Char16Ptr::Char16Ptr(wchar_t *p) { u_.wp = p; } #endif Char16Ptr::Char16Ptr(std::nullptr_t p) { u_.cp = p; } Char16Ptr::~Char16Ptr() {} char16_t *Char16Ptr::get() const { return u_.cp; } #endif /// \endcond /** * const char16_t * wrapper with implicit conversion from distinct but bit-compatible pointer types. * @stable ICU 59 */ class U_COMMON_API ConstChar16Ptr U_FINAL { public: /** * Copies the pointer. * @param p pointer * @stable ICU 59 */ inline ConstChar16Ptr(const char16_t *p); #if !U_CHAR16_IS_TYPEDEF /** * Converts the pointer to char16_t *. * @param p pointer to be converted * @stable ICU 59 */ inline ConstChar16Ptr(const uint16_t *p); #endif #if U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN) /** * Converts the pointer to char16_t *. * (Only defined if U_SIZEOF_WCHAR_T==2.) * @param p pointer to be converted * @stable ICU 59 */ inline ConstChar16Ptr(const wchar_t *p); #endif /** * nullptr constructor. * @param p nullptr * @stable ICU 59 */ inline ConstChar16Ptr(const std::nullptr_t p); /** * Destructor. * @stable ICU 59 */ inline ~ConstChar16Ptr(); /** * Pointer access. * @return the wrapped pointer * @stable ICU 59 */ inline const char16_t *get() const; /** * char16_t pointer access via type conversion (e.g., static_cast). * @return the wrapped pointer * @stable ICU 59 */ inline operator const char16_t *() const { return get(); } private: ConstChar16Ptr() = delete; #ifdef U_ALIASING_BARRIER template<typename T> static const char16_t *cast(const T *t) { U_ALIASING_BARRIER(t); return reinterpret_cast<const char16_t *>(t); } const char16_t *p_; #else union { const char16_t *cp; const uint16_t *up; const wchar_t *wp; } u_; #endif }; /// \cond #ifdef U_ALIASING_BARRIER ConstChar16Ptr::ConstChar16Ptr(const char16_t *p) : p_(p) {} #if !U_CHAR16_IS_TYPEDEF ConstChar16Ptr::ConstChar16Ptr(const uint16_t *p) : p_(cast(p)) {} #endif #if U_SIZEOF_WCHAR_T==2 ConstChar16Ptr::ConstChar16Ptr(const wchar_t *p) : p_(cast(p)) {} #endif ConstChar16Ptr::ConstChar16Ptr(const std::nullptr_t p) : p_(p) {} ConstChar16Ptr::~ConstChar16Ptr() { U_ALIASING_BARRIER(p_); } const char16_t *ConstChar16Ptr::get() const { return p_; } #else ConstChar16Ptr::ConstChar16Ptr(const char16_t *p) { u_.cp = p; } #if !U_CHAR16_IS_TYPEDEF ConstChar16Ptr::ConstChar16Ptr(const uint16_t *p) { u_.up = p; } #endif #if U_SIZEOF_WCHAR_T==2 ConstChar16Ptr::ConstChar16Ptr(const wchar_t *p) { u_.wp = p; } #endif ConstChar16Ptr::ConstChar16Ptr(const std::nullptr_t p) { u_.cp = p; } ConstChar16Ptr::~ConstChar16Ptr() {} const char16_t *ConstChar16Ptr::get() const { return u_.cp; } #endif /// \endcond /** * Converts from const char16_t * to const UChar *. * Includes an aliasing barrier if available. * @param p pointer * @return p as const UChar * * @stable ICU 59 */ inline const UChar *toUCharPtr(const char16_t *p) { #ifdef U_ALIASING_BARRIER U_ALIASING_BARRIER(p); #endif return reinterpret_cast<const UChar *>(p); } /** * Converts from char16_t * to UChar *. * Includes an aliasing barrier if available. * @param p pointer * @return p as UChar * * @stable ICU 59 */ inline UChar *toUCharPtr(char16_t *p) { #ifdef U_ALIASING_BARRIER U_ALIASING_BARRIER(p); #endif return reinterpret_cast<UChar *>(p); } /** * Converts from const char16_t * to const OldUChar *. * Includes an aliasing barrier if available. * @param p pointer * @return p as const OldUChar * * @stable ICU 59 */ inline const OldUChar *toOldUCharPtr(const char16_t *p) { #ifdef U_ALIASING_BARRIER U_ALIASING_BARRIER(p); #endif return reinterpret_cast<const OldUChar *>(p); } /** * Converts from char16_t * to OldUChar *. * Includes an aliasing barrier if available. * @param p pointer * @return p as OldUChar * * @stable ICU 59 */ inline OldUChar *toOldUCharPtr(char16_t *p) { #ifdef U_ALIASING_BARRIER U_ALIASING_BARRIER(p); #endif return reinterpret_cast<OldUChar *>(p); } U_NAMESPACE_END #endif /* U_SHOW_CPLUSPLUS_API */ #endif // __CHAR16PTR_H__
Save
cmd:
run