Consider dropping the specializations for the type traits, given that it's undefined behavior: https://en.cppreference.com/w/cpp/types/is_fundamental https://en.cppreference.com/w/cpp/types/is_floating_point https://en.cppreference.com/w/cpp/types/is_arithmetic https://en.cppreference.com/w/cpp/types/is_scalar https://en.cppreference.com/w/cpp/types/is_object
Show HN: Floating point arithmetic types in C++ for any size and any base
21–30 of 42 posts
Re: Show HN: Floating point arithmetic types in C++ for any size and any base
#22Earlier quoted context omitted.
Technically, you're not supposed to add your own specialisations to the `std` namespace
In general this isn’t true (i guess it is in this specific context). For example I believe it’s totally expected to specialize std hash
Re: Show HN: Floating point arithmetic types in C++ for any size and any base
#23https://www.boost.org/doc/libs/1_86_0/libs/multiprecision/do...
https://www.boost.org/doc/libs/1_86_0/libs/multiprecision/do...
Re: Show HN: Floating point arithmetic types in C++ for any size and any base
#24It's copyrighted so I should not even look at it, and therefore not comment on it.
Re: Show HN: Floating point arithmetic types in C++ for any size and any base
#25Re: Show HN: Floating point arithmetic types in C++ for any size and any base
#26It's copyrighted so I should not even look at it, and therefore not comment on it.
Re: Show HN: Floating point arithmetic types in C++ for any size and any base
#27Earlier quoted context omitted.
In general this isn’t true (i guess it is in this specific context). For example I believe it’s totally expected to specialize std hash
I’ve also done this with hash… though given the footguns scattered about, I wouldn’t be surprised if it broke the spec.
Re: Show HN: Floating point arithmetic types in C++ for any size and any base
#28It's copyrighted so I should not even look at it, and therefore not comment on it.
Re: Show HN: Floating point arithmetic types in C++ for any size and any base
#29No LICENSE. Have you thought about adding one?
Re: Show HN: Floating point arithmetic types in C++ for any size and any base
#30It's copyrighted so I should not even look at it, and therefore not comment on it.