Comments (3)
This is effectively https://www.boost.org/doc/libs/1_84_0/libs/type_traits/doc/html/boost_typetraits/reference/is_integral.html, yes I realise you have a slightly different definition of what constitutes an integer, but was never our intention to provide super-fine grained categorisation.
from type_traits.
That's exactly my point.
You haven't thought about it, it doesn't exist in the standard.
There are various use cases for this.
please open this issues
from type_traits.
The concept "integer type" does exist in the standard (but not with the above definition which is incorrect). See https://eel.is/c++draft/basic.fundamental#1 and https://eel.is/c++draft/basic.fundamental#2.
Then https://eel.is/c++draft/basic.fundamental#11 muddies the water somewhat, but I think that "signed integer type" + "unsigned integer type" is a better definition for "integer type".
Currently the best approximation of the above is `std::numeric_limits::is_integer", e.g. https://github.com/boostorg/core/blob/0a35bb6a20bd13e85ff492a5be01b3894807a0d1/include/boost/core/bit.hpp#L299.
from type_traits.
Related Issues (20)
- Operator traits documentation does not mention C++11 implementation
- `-Wconversion` warning in `type_traits/is_complete.hpp` HOT 1
- `-Wundef` warnings in `is_mem_fun_pointer_impl.hpp` HOT 1
- Boost\libs\type_traits failed to build due to error C2338 on MSVC HOT 2
- -Wconversion warning with is_signed for enums HOT 1
- __has_trivial_assign etc. deprecated under clang 15 HOT 1
- boost::is_integral<char8_t>::value is false HOT 1
- type_traits: Deprecation warnings with clang 15 HOT 1
- more classification/traits
- is_floating_point does not contain any C++23 types HOT 1
- add/rename remove_cv_ref to (C++20 compatible) remove_cvref HOT 1
- add is_character HOT 1
- add is_number HOT 3
- add remove_cvptr HOT 1
- add is_bool HOT 3
- add is_quotrem_order HOT 2
- add is_logic HOT 2
- add is_function_pointer
- add dependent_false HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from type_traits.