https://github.com/amazingmonster/functivore
A C++ template library for inspecting and simplifying function signatures.
https://github.com/amazingmonster/functivore
cpp metaprogramming
Last synced: 11 months ago
JSON representation
A C++ template library for inspecting and simplifying function signatures.
- Host: GitHub
- URL: https://github.com/amazingmonster/functivore
- Owner: AmazingMonster
- License: apache-2.0
- Created: 2025-01-10T15:02:47.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-10T16:01:23.000Z (over 1 year ago)
- Last Synced: 2025-02-10T17:21:46.287Z (over 1 year ago)
- Topics: cpp, metaprogramming
- Language: C++
- Homepage:
- Size: 36.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Functivore
A C++ template library for inspecting and simplifying function signatures.
## Prologue
Functivore is an abridged version of `boost::callable_traits`.
The library keeps the ability to inspect and simplify a function signature while removing the facilities for editing its qualifiers.
The library is implemented based on the same idea as `boost::callable_traits` but is cleaner overall as many metafunctions from `boost::callable_traits` have been removed.
The templates in this library are compatible with the metafunctions in [Conceptrodon](https://github.com/AmazingMonster/conceptrodon).
## [Documentation](./DOCS.md)
## Install
Functivore is a header-only library. After downloading the code, move the directory *./Functivore* to your project, then use it like your own headers.
You can also install Functivore using CMake:
### Windows
1. Download the library.
2. Open Developer Command Prompt that comes with Visual Studio. Redirect to the library folder. Generate a project buildsystem using CMake:
```Shell
cmake -S . -B "Where to build"
```
3. Redirect to the build directory you specified after `-B` earlier. Run command:
```Shell
cmake --install . --prefix "Where to install"
```
After installation, add the install directory you specified after `--prefix` to variable `CMAKE_PREFIX_PATH` in your project's *CMakeCache.txt*. If the variable doesn't exist, you will need to add the following line to your *CMakeCache.txt*:
```CMake
CMAKE_PREFIX_PATH:PATH=Install directory of the library
```
If `CMAKE_PREFIX_PATH` already exists,
append the install directory to the values of the variable(note the added semicolon):
```CMake
CMAKE_PREFIX_PATH:PATH=...; Install directory of the library
```
In the *CMakeList.txt* of your project, Add:
```CMake
find_package(Functivore REQUIRED CONFIG)
target_link_libraries(YourProject PRIVATE Functivore::Facilities)
```
You are good to go.