xtd 0.2.0
literals.h
Go to the documentation of this file.
1 #pragma once
5 #include "time_span.h"
6 #include "types.h"
7 #include "ustring.h"
8 
10 namespace xtd {
21  xtd::byte operator""_b(long double n);
22 
33  xtd::byte operator""_b(unsigned long long n);
34 
45  xtd::byte operator""_b(const char* s, size_t n);
46 
47 #if defined(__cpp_lib_char8_t)
48  xtd::byte operator""_b(const char8* s, size_t n);
59 #endif
60 
71  xtd::byte operator""_b(const char16* s, size_t n);
72 
83  xtd::byte operator""_b(const char32* s, size_t n);
84 
95  xtd::byte operator""_b(const wchar* s, size_t n);
96 
107  double operator""_d(long double n);
108 
119  double operator""_d(unsigned long long n);
120 
131  double operator""_d(const char* s, size_t n);
132 
133 #if defined(__cpp_lib_char8_t)
134  double operator""_d(const char8* s, size_t n);
145 #endif
146 
157  double operator""_d(const char16* s, size_t n);
158 
169  double operator""_d(const char32* s, size_t n);
170 
181  double operator""_d(const wchar* s, size_t n);
182 
193  float operator""_f(long double n);
194 
205  float operator""_f(unsigned long long n);
206 
217  float operator""_f(const char* s, size_t n);
218 
219 #if defined(__cpp_lib_char8_t)
220  float operator""_f(const char8* s, size_t n);
231 #endif
232 
243  float operator""_f(const char16* s, size_t n);
244 
255  float operator""_f(const char32* s, size_t n);
256 
267  float operator""_f(const wchar* s, size_t n);
268 
279  char32 operator""_c(char c);
280 
291  char32 operator""_c(char16 c);
292 
303  char32 operator""_c(char32 c);
304 
315  char32 operator""_c(wchar c);
316 
327  char32 operator""_c(unsigned long long c);
328 
340  xtd::time_span operator""_h(unsigned long long s);
341 
353  xtd::time_span operator""_m(unsigned long long s);
354 
366  xtd::time_span operator""_min(unsigned long long s);
367 
379  xtd::time_span operator""_ms(unsigned long long s);
380 
392  xtd::time_span operator""_ns(unsigned long long s);
393 
405  xtd::ustring operator""_s(const char* s, size_t n);
406 
407 #if defined(__cpp_lib_char8_t)
408  xtd::ustring operator""_s(const char8* s, size_t n);
420 #endif
421 
433  xtd::ustring operator""_s(const char16* s, size_t n);
434 
446  xtd::ustring operator""_s(const char32* s, size_t n);
447 
459  xtd::ustring operator""_s(const wchar* s, size_t n);
460 
472  xtd::time_span operator""_s(unsigned long long s);
473 
485  xtd::ustring operator""_sb(unsigned long long s);
486 
498  xtd::ustring operator""_sb2(unsigned long long s);
499 
511  xtd::ustring operator""_sb4(unsigned long long s);
512 
524  xtd::ustring operator""_sb8(unsigned long long s);
525 
537  xtd::ustring operator""_sb16(unsigned long long s);
538 
550  xtd::ustring operator""_sb32(unsigned long long s);
551 
563  xtd::ustring operator""_sb64(unsigned long long s);
564 
576  xtd::ustring operator""_sd(long double s);
577 
589  xtd::ustring operator""_sd(unsigned long long s);
590 
602  xtd::ustring operator""_sx(unsigned long long s);
603 
615  xtd::ustring operator""_sx2(unsigned long long s);
616 
628  xtd::ustring operator""_sx4(unsigned long long s);
629 
641  xtd::ustring operator""_sx8(unsigned long long s);
642 
654  xtd::ustring operator""_sX(unsigned long long s);
655 
667  xtd::ustring operator""_sX2(unsigned long long s);
668 
680  xtd::ustring operator""_sX4(unsigned long long s);
681 
693  xtd::ustring operator""_sX8(unsigned long long s);
694 
705  sbyte operator""_s8(long double n);
706 
717  sbyte operator""_s8(unsigned long long n);
718 
729  sbyte operator""_s8(const char* s, size_t n);
730 
731 #if defined(__cpp_lib_char8_t)
732  sbyte operator""_s8(const char8* s, size_t n);
743 #endif
744 
755  sbyte operator""_s8(const char16* s, size_t n);
756 
767  sbyte operator""_s8(const char32* s, size_t n);
768 
779  sbyte operator""_s8(const wchar* s, size_t n);
780 
791  int16 operator""_s16(long double n);
792 
803  int16 operator""_s16(unsigned long long n);
804 
815  int16 operator""_s16(const char* s, size_t n);
816 
817 #if defined(__cpp_lib_char8_t)
818  int16 operator""_s16(const char8* s, size_t n);
829 #endif
830 
841  int16 operator""_s16(const char16* s, size_t n);
842 
853  int16 operator""_s16(const char32* s, size_t n);
854 
865  int16 operator""_s16(const wchar* s, size_t n);
866 
877  int32 operator""_s32(long double n);
878 
889  int32 operator""_s32(unsigned long long n);
890 
901  int32 operator""_s32(const char* s, size_t n);
902 
903 #if defined(__cpp_lib_char8_t)
904  int32 operator""_s32(const char8* s, size_t n);
915 #endif
916 
927  int32 operator""_s32(const char16* s, size_t n);
928 
939  int32 operator""_s32(const char32* s, size_t n);
940 
951  int32 operator""_s32(const wchar* s, size_t n);
952 
963  int64 operator""_s64(long double n);
964 
975  int64 operator""_s64(unsigned long long n);
976 
987  int64 operator""_s64(const char* s, size_t n);
988 
989 #if defined(__cpp_lib_char8_t)
990  int64 operator""_s64(const char8* s, size_t n);
1001 #endif
1002 
1013  int64 operator""_s64(const char16* s, size_t n);
1014 
1025  int64 operator""_s64(const char32* s, size_t n);
1026 
1037  int64 operator""_s64(const wchar* s, size_t n);
1038 
1045  const char* operator""_t(const char* s, size_t n) noexcept;
1046 
1057  size_t operator""_sz(long double n);
1058 
1069  size_t operator""_sz(unsigned long long n);
1070 
1081  size_t operator""_sz(const char* s, size_t n);
1082 
1083 #if defined(__cpp_lib_char8_t)
1084  size_t operator""_sz(const char8* s, size_t n);
1095 #endif
1096 
1107  size_t operator""_sz(const char16* s, size_t n);
1108 
1119  size_t operator""_sz(const char32* s, size_t n);
1120 
1131  size_t operator""_sz(const wchar* s, size_t n);
1132 
1133 #if defined(__cpp_lib_char8_t)
1134  xtd::ustring operator""_t(const char8* s, size_t n) noexcept;
1141 #endif
1142 
1149  xtd::ustring operator""_t(const char16* s, size_t n) noexcept;
1150 
1157  xtd::ustring operator""_t(const char32* s, size_t n) noexcept;
1158 
1165  xtd::ustring operator""_t(const wchar* s, size_t n) noexcept;
1166 
1178  xtd::time_span operator""_t(unsigned long long s);
1179 
1190  xtd::byte operator""_u8(long double n);
1191 
1202  xtd::byte operator""_u8(unsigned long long n);
1203 
1214  xtd::byte operator""_u8(const char* s, size_t n);
1215 
1216 #if defined(__cpp_lib_char8_t)
1217  xtd::byte operator""_u8(const char8* s, size_t n);
1228 #endif
1229 
1240  xtd::byte operator""_u8(const char16* s, size_t n);
1241 
1252  xtd::byte operator""_u8(const char32* s, size_t n);
1253 
1264  xtd::byte operator""_u8(const wchar* s, size_t n);
1265 
1276  uint16 operator""_u16(long double n);
1277 
1288  uint16 operator""_u16(unsigned long long n);
1289 
1300  uint16 operator""_u16(const char* s, size_t n);
1301 
1302 #if defined(__cpp_lib_char8_t)
1303  uint16 operator""_u16(const char8* s, size_t n);
1314 #endif
1315 
1326  uint16 operator""_u16(const char16* s, size_t n);
1327 
1338  uint16 operator""_u16(const char32* s, size_t n);
1339 
1350  uint16 operator""_u16(const wchar* s, size_t n);
1351 
1362  uint32 operator""_u32(long double n);
1363 
1374  uint32 operator""_u32(unsigned long long n);
1375 
1386  uint32 operator""_u32(const char* s, size_t n);
1387 
1388 #if defined(__cpp_lib_char8_t)
1389  uint32 operator""_u32(const char8* s, size_t n);
1400 #endif
1401 
1412  uint32 operator""_u32(const char16* s, size_t n);
1413 
1424  uint32 operator""_u32(const char32* s, size_t n);
1425 
1436  uint32 operator""_u32(const wchar* s, size_t n);
1437 
1448  uint64 operator""_u64(long double n);
1449 
1460  uint64 operator""_u64(unsigned long long n);
1461 
1472  uint64 operator""_u64(const char* s, size_t n);
1473 
1474 #if defined(__cpp_lib_char8_t)
1475  uint64 operator""_u64(const char8* s, size_t n);
1486 #endif
1487 
1498  uint64 operator""_u64(const char16* s, size_t n);
1499 
1510  uint64 operator""_u64(const char32* s, size_t n);
1511 
1522  uint64 operator""_u64(const wchar* s, size_t n);
1523 
1535  xtd::time_span operator""_us(unsigned long long s);
1536 }
Contains xtd fundamental types.
int_least8_t sbyte
Represents a 8-bit signed integer.
Definition: types.h:173
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Contains xtd::time_span typedef.
uint_least16_t uint16
Represents a 16-bit unsigned integer.
Definition: types.h:228
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
Contains xtd::ustring class.
int_least16_t int16
Represents a 16-bit signed integer.
Definition: types.h:118
Represents a time interval.
Definition: time_span.h:26
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
char32_t char32
Represents a 32-bit unicode character.
Definition: types.h:85
uint_least64_t uint64
Represents a 64-bit unsigned integer.
Definition: types.h:250
char8_t char8
Represents a 8-bit unicode character.
Definition: types.h:62
int_least64_t int64
Represents a 64-bit signed integer.
Definition: types.h:140
uint_least8_t byte
Represents a 8-bit unsigned integer.
Definition: types.h:39
uint_least32_t uint32
Represents a 32-bit unsigned integer.
Definition: types.h:239
char16_t char16
Represents a 16-bit unicode character.
Definition: types.h:74
wchar_t wchar
Represents a wide character.
Definition: types.h:284