Registry / utility / tobias-loew-flags

tobias-loew-flags

JSON →
library2024-09-10vcpkgunverified

Type-safe bitwise operations in C++, to be proposed for Boost.

vcpkg install tobias-loew-flags
INSTALL
IMPORT
SIG · TOBIAS-LOEW-FLAGS
T
tobias-loew-flags
utilitycppv2024-09-10
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

flags/flags.hpp
#include <flags/flags.hpp>

Use type-safe flags with bitwise operators

#include <flags/flags.hpp> #include <iostream> enum class Color { Red = 1, Green = 2, Blue = 4 }; using Colors = flags::flags<Color>; int main() { Colors c = Color::Red | Color::Blue; if (c & Color::Red) std::cout << "Red set" << std::endl; return 0; }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2024-09-10latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
7
Resources

No resource links recorded.

tobias-loew-flags — pip install tobias-loew-flags · libregistry