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>
33 struct lconv * lc=localeconv();
35 DecimalPointChar=
static_cast<TChar
>( *(lc->decimal_point) );
36 ThousandsGroupChar=
static_cast<TChar
>( *(lc->thousands_sep) );
39template<
typename TChar>
41 if ( other ==
nullptr )
49 template<
typename TChar>
50void setComputational( TNumberFormat<TChar>& nf ) {
51 nf.Flags = NumberFormatFlags::ForceDecimalPoint;
52 nf.DecimalPointChar =
'.';
53 nf.Whitespaces = CStringConstantsTraits<TChar>::DefaultWhitespaces();
57 nf.DecMinimumFieldWidth=
61 nf.IntegralPartMinimumWidth=
62 nf.FractionalPartWidth= -1;
65 nf.LeadingGroupCharReplacement=
' ';
67 nf.ThousandsGroupChar=
',';
69 nf.BinNibbleGroupChar=
71 nf.HexWord32GroupChar=
72 nf.OctGroupChar=
'\'';
74 nf.HexByteGroupChar=
'\0';
75 nf.BinByteGroupChar=
'-';
76 nf.BinWordGroupChar=
'=';
77 nf.BinWord32GroupChar=
'#';
84 setComputational( *
this );
86 ExponentSeparator =
"E" ;
89 BinLiteralPrefix =
"0b" ;
90 HexLiteralPrefix =
"0x" ;
91 OctLiteralPrefix =
"0o" ;
96 setComputational( *
this );
98 ExponentSeparator =
A_WCHAR(
"E" ) ;
100 NANLiteral =
A_WCHAR(
"NAN" ) ;
101 BinLiteralPrefix =
A_WCHAR(
"0b" ) ;
102 HexLiteralPrefix =
A_WCHAR(
"0x" ) ;
103 OctLiteralPrefix =
A_WCHAR(
"0o" ) ;
108 setComputational( *
this );
110 ExponentSeparator =
A_XCHAR(
"E" ) ;
111 INFLiteral =
A_XCHAR(
"INF" ) ;
112 NANLiteral =
A_XCHAR(
"NAN" ) ;
113 BinLiteralPrefix =
A_XCHAR(
"0b" ) ;
114 HexLiteralPrefix =
A_XCHAR(
"0x" ) ;
115 OctLiteralPrefix =
A_XCHAR(
"0o" ) ;
@ Global
Denotes the global (singleton) scope.