Make numeric alignment optional

This commit is contained in:
Victor Zverovich
2019-09-06 07:12:35 -07:00
parent 611cf0b3c6
commit f7a4b4ab91
5 changed files with 28 additions and 21 deletions

View File

@@ -185,6 +185,10 @@ inline uint32_t clzll(uint64_t x) {
FMT_END_NAMESPACE
#endif
#ifndef FMT_NUMERIC_ALIGN
# define FMT_NUMERIC_ALIGN 1
#endif
FMT_BEGIN_NAMESPACE
namespace internal {
@@ -2300,9 +2304,11 @@ FMT_CONSTEXPR const Char* parse_align(const Char* begin, const Char* end,
case '>':
align = align::right;
break;
#if FMT_NUMERIC_ALIGN
case '=':
align = align::numeric;
break;
#endif
case '^':
align = align::center;
break;