-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Open
Description
https://github.com/HexadigmSystems/FunctionTraits
This is an (effectively) single-header only template library for determining the traits of any C++ function at compile-time (return type, argument types, cv-qualifiers, noexcept specification, etc. - all components comprising a C++ function can be read or modified, and other highly useful features also exist, such as the ability to detect whether a member function exists by name in an arbitrary class based on the function's type or traits). Effectively an extension of the C++ standard itself, which has almost no built-in features for handling function traits in the standard <type_traits> header.
Reasons to add:
- No built-in functionality to read/write a function's traits exist in the C++ standard itself, forcing developers to roll their own (a non-trivial task compelling developers to seek out a library like "FunctionTraits" instead). The library therefore closes a gap in the C++ standard (beneficial to developers requiring this functionality).
- Likely the most comprehensive library of its kind available based on attempts to find a similar library with as many features (only 2 or 3 other similar libraries exist). More complete than Boost CallableTraits for instance, which doesn't support calling conventions for example (no other library does, a major limitation), and has other shortcomings. See Why choose this library.
- Supports modern day C++ features such as concepts and modules (module version of "FunctionTraits" optional and experimental only for now however due to still-evolving support for modules in all major compilers - see Module support in C++20 or later)
- No other similar library is actively maintained (none have been updated in years)
- Targets the "big three" compilers (GCC, Clang, Microsoft), as well as Intel (all mainstream compilers are supported)
- Comprehensive documentation (see repository link above)
Thank you for your consideration.
tocic and HexadigmSystems
Metadata
Metadata
Assignees
Labels
No labels