I
Inconnu
In the new standard the literal operator templates are restricted to
have a single non-type template parameter of type char which is a
pack. This restriction makes illegal the following construction for
binary integer literals:
template<char C0, char ...C>
constexpr unsigned long long operatorl "" b ()
{
static_assert (C0 == '0' || C0 == '1');
return sizeof... (C) == 0 ? C0 - '0' : ((C0 - '0') << sizeof...
(C)) + operator "" b<C...> ();
}
I think it would be better to require instead that all template
parameters be non-type parameters of type char, while the last of them
may be a parameter pack.
have a single non-type template parameter of type char which is a
pack. This restriction makes illegal the following construction for
binary integer literals:
template<char C0, char ...C>
constexpr unsigned long long operatorl "" b ()
{
static_assert (C0 == '0' || C0 == '1');
return sizeof... (C) == 0 ? C0 - '0' : ((C0 - '0') << sizeof...
(C)) + operator "" b<C...> ();
}
I think it would be better to require instead that all template
parameters be non-type parameters of type char, while the last of them
may be a parameter pack.