https://github.com/jfalcou/spy
SPY - C++ Information Broker
https://github.com/jfalcou/spy
concepts constexpr cpp17 cpp20 predef
Last synced: 9 months ago
JSON representation
SPY - C++ Information Broker
- Host: GitHub
- URL: https://github.com/jfalcou/spy
- Owner: jfalcou
- License: bsl-1.0
- Created: 2018-05-03T19:27:00.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2025-07-01T16:27:29.000Z (9 months ago)
- Last Synced: 2025-07-01T17:38:16.217Z (9 months ago)
- Topics: concepts, constexpr, cpp17, cpp20, predef
- Language: C++
- Homepage: https://jfalcou.github.io/spy/
- Size: 736 KB
- Stars: 154
- Watchers: 12
- Forks: 11
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-cpp - spy - A C++17 constexpr library for detecting OS, compiler, architecture, and SIMD at compile time. [MIT] (Miscellaneous)
- fucking-awesome-cpp - spy - A C++17 constexpr library for detecting OS, compiler, architecture, and SIMD at compile time. [MIT] (Miscellaneous)
- awesome-cpp-with-stars - spy - 02-25 | (Miscellaneous)
README

# C++ Informations Broker
[](https://circleci.com/gh/jfalcou/spy) [](https://ci.appveyor.com/project/jfalcou/spy/branch/main)
[](https://img.shields.io/github/license/jfalcou/spy?style=plastic)
[](https://discord.gg/a9qVaEMeXd8)
# Purpose
Detection and versioning of operating systems, compilers, architecture and other element are
traditionally done using preprocessor macros. Library like
[Boost.Predef](https://www.boost.org/doc/libs/release/doc/html/predef.html) provides a sanitized
interface on top of those but still live in a world where the preprocessor is king.
SPY is a C++17 (and onward) library that gathers similar informations and provides a `constexpr`
compatible interface to access those information, thus making their exploitation within `constexpr`
context possible.
The complete [documentation can be found here](https://jfalcou.github.io/spy).
# Useful Links
- [Our CppCon 2019 Ligthning talk slides](https://docs.google.com/presentation/d/1nSBhU4pr5EWznni0MYsyDkMCr3O3q2XS-KQdz2_BRRI/edit?usp=sharing)
- [Our CppCon 2019 Ligthning talk video](https://www.youtube.com/watch?v=t406o2EhG-A)
- [Boost.Predef](https://www.boost.org/doc/libs/release/doc/html/predef.html)