31#ifndef ETL_BASIC_FORMAT_SPEC_INCLUDED
32#define ETL_BASIC_FORMAT_SPEC_INCLUDED
38#include "static_assert.h"
42 namespace private_basic_format_spec
69 template <
typename TChar>
84 : precision(precision_)
95 : upper_case(upper_case_)
99 const bool upper_case;
106 : boolalpha(boolalpha_)
110 const bool boolalpha;
117 : show_base(show_base_)
121 const bool show_base;
144 static ETL_CONSTEXPR private_basic_format_spec::width_spec setw(uint32_t width)
146 return private_basic_format_spec::width_spec(width);
150 template <
typename TChar>
151 static ETL_CONSTEXPR private_basic_format_spec::fill_spec<TChar> setfill(TChar fill)
153 return private_basic_format_spec::fill_spec<TChar>(fill);
157 static ETL_CONSTEXPR private_basic_format_spec::precision_spec setprecision(uint32_t precision)
159 return private_basic_format_spec::precision_spec(precision);
163 static ETL_CONSTANT private_basic_format_spec::base_spec bin(2U);
166 static ETL_CONSTANT private_basic_format_spec::base_spec oct(8U);
169 static ETL_CONSTANT private_basic_format_spec::base_spec dec(10U);
172 static ETL_CONSTANT private_basic_format_spec::base_spec hex(16U);
175 static ETL_CONSTANT private_basic_format_spec::left_spec left = private_basic_format_spec::left_spec();
178 static ETL_CONSTANT private_basic_format_spec::right_spec right = private_basic_format_spec::right_spec();
181 static ETL_CONSTANT private_basic_format_spec::boolalpha_spec boolalpha(
true);
184 static ETL_CONSTANT private_basic_format_spec::boolalpha_spec noboolalpha(
false);
187 static ETL_CONSTANT private_basic_format_spec::uppercase_spec uppercase(
true);
190 static ETL_CONSTANT private_basic_format_spec::uppercase_spec nouppercase(
false);
193 static ETL_CONSTANT private_basic_format_spec::showbase_spec showbase(
true);
196 static ETL_CONSTANT private_basic_format_spec::showbase_spec noshowbase(
false);
201 template <
typename TString>
214 , left_justified_(false)
231 typename TString::value_type
fill__)
252 left_justified_ =
false;
255 fill_ =
typename TString::value_type(
' ');
401 ETL_CONSTEXPR
typename TString::value_type
get_fill()
const
412 left_justified_ =
true;
421 return left_justified_;
430 left_justified_ =
false;
439 return !left_justified_;
465 return (
lhs.base_ ==
rhs.base_) &&
466 (
lhs.width_ ==
rhs.width_) &&
467 (
lhs.precision_ ==
rhs.precision_) &&
468 (
lhs.upper_case_ ==
rhs.upper_case_) &&
469 (
lhs.left_justified_ ==
rhs.left_justified_) &&
470 (
lhs.boolalpha_ ==
rhs.boolalpha_) &&
471 (
lhs.show_base_ ==
rhs.show_base_) &&
489 bool left_justified_;
492 typename TString::value_type fill_;
bitset_ext
Definition absolute.h:38
pair holds two objects of arbitrary type
Definition utility.h:164