Skip to content

Add "FunctionTraits" to "Reflection" #1680

@HexadigmSystems

Description

@HexadigmSystems

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:

  1. 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).
  2. 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.
  3. 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)
  4. No other similar library is actively maintained (none have been updated in years)
  5. Targets the "big three" compilers (GCC, Clang, Microsoft), as well as Intel (all mainstream compilers are supported)
  6. Comprehensive documentation (see repository link above)

Thank you for your consideration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions