8#if !defined(ALIB_C20_MODULES) || ((ALIB_C20_MODULES != 0) && (ALIB_C20_MODULES != 1))
9# error "Symbol ALIB_C20_MODULES has to be given to the compiler as either 0 or 1"
31template<
typename TChar>
34 struct lconv * lc=localeconv();
36 DecimalPointChar=
static_cast<TChar
>( *(lc->decimal_point) );
37 ThousandsGroupChar=
static_cast<TChar
>( *(lc->thousands_sep) );
40template<
typename TChar>
43 if ( other ==
nullptr )
51 template<
typename TChar>
52 void setComputational( TNumberFormat<TChar>& nf )
54 nf.Flags = NumberFormatFlags::ForceDecimalPoint;
55 nf.DecimalPointChar =
'.';
56 nf.Whitespaces = CStringConstantsTraits<TChar>::DefaultWhitespaces();
60 nf.DecMinimumFieldWidth=
64 nf.IntegralPartMinimumWidth=
65 nf.FractionalPartWidth= -1;
68 nf.LeadingGroupCharReplacement=
' ';
70 nf.ThousandsGroupChar=
',';
72 nf.BinNibbleGroupChar=
74 nf.HexWord32GroupChar=
75 nf.OctGroupChar=
'\'';
77 nf.HexByteGroupChar=
'\0';
78 nf.BinByteGroupChar=
'-';
79 nf.BinWordGroupChar=
'=';
80 nf.BinWord32GroupChar=
'#';
88 setComputational( *
this );
90 ExponentSeparator =
"E" ;
93 BinLiteralPrefix =
"0b" ;
94 HexLiteralPrefix =
"0x" ;
95 OctLiteralPrefix =
"0o" ;
101 setComputational( *
this );
103 ExponentSeparator =
A_WCHAR(
"E" ) ;
104 INFLiteral =
A_WCHAR(
"INF" ) ;
105 NANLiteral =
A_WCHAR(
"NAN" ) ;
106 BinLiteralPrefix =
A_WCHAR(
"0b" ) ;
107 HexLiteralPrefix =
A_WCHAR(
"0x" ) ;
108 OctLiteralPrefix =
A_WCHAR(
"0o" ) ;
114 setComputational( *
this );
116 ExponentSeparator =
A_XCHAR(
"E" ) ;
117 INFLiteral =
A_XCHAR(
"INF" ) ;
118 NANLiteral =
A_XCHAR(
"NAN" ) ;
119 BinLiteralPrefix =
A_XCHAR(
"0b" ) ;
120 HexLiteralPrefix =
A_XCHAR(
"0x" ) ;
121 OctLiteralPrefix =
A_XCHAR(
"0o" ) ;
@ Global
Denotes the global (singleton) scope.