List initialize default integer types because I think it looks better
This commit is contained in:
parent
3c9b318218
commit
d4ab8fb401
@ -76,16 +76,19 @@ namespace rexy::fmt::detail{
|
|||||||
constexpr auto operator()(T) -> typename basic_format_arg<Context>::handle;
|
constexpr auto operator()(T) -> typename basic_format_arg<Context>::handle;
|
||||||
constexpr auto operator()(std::unsigned_integral auto i){
|
constexpr auto operator()(std::unsigned_integral auto i){
|
||||||
if constexpr(sizeof(i) <= sizeof(unsigned int)){
|
if constexpr(sizeof(i) <= sizeof(unsigned int)){
|
||||||
return (unsigned int)(0);
|
using uint = unsigned int;
|
||||||
|
return uint{};
|
||||||
}else{
|
}else{
|
||||||
return (unsigned long long)(0);
|
using ull = unsigned long long;
|
||||||
|
return ull{};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
constexpr auto operator()(std::signed_integral auto i){
|
constexpr auto operator()(std::signed_integral auto i){
|
||||||
if constexpr(sizeof(i) <= sizeof(int)){
|
if constexpr(sizeof(i) <= sizeof(int)){
|
||||||
return int(0);
|
return int{};
|
||||||
}else{
|
}else{
|
||||||
return (long long)(0);
|
using ll = long long;
|
||||||
|
return ll{};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
template<std::floating_point T>
|
template<std::floating_point T>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user