{"id":61393,"library":"tobias-loew-flags","title":"flags","description":"Type-safe bitwise operations in C++, to be proposed for Boost.","status":"active","version":"2024-09-10","language":"cpp","source_language":null,"source_url":null,"tags":["bitwise","flags","type-safe","header-only","boost-proposal"],"install":[{"cmd":"vcpkg install tobias-loew-flags","lang":"bash","label":"vcpkg"},{"cmd":"# CMakeLists.txt\nfind_package(tobias_loew_flags CONFIG REQUIRED)\ntarget_link_libraries(main PRIVATE flags::flags)","lang":"cmake","label":"CMake"}],"dependencies":[],"imports":[{"symbol":"flags/flags.hpp","correct":"#include <flags/flags.hpp>"}],"quickstart":{"code":"#include <flags/flags.hpp>\n#include <iostream>\n\nenum class Color { Red = 1, Green = 2, Blue = 4 };\nusing Colors = flags::flags<Color>;\n\nint main() {\n    Colors c = Color::Red | Color::Blue;\n    if (c & Color::Red) std::cout << \"Red set\" << std::endl;\n    return 0;\n}","lang":"cpp","description":"Use type-safe flags with bitwise operators"},"warnings":[],"env_vars":null,"search_vec":"'bitwis':5,14 'boost':13,23 'boost-propos':22 'c':8 'flag':1,15 'header':20 'header-on':19 'oper':6 'propos':11,24 'safe':4,18 'type':3,17 'type-saf':2,16","created_at":"2026-06-17T04:48:46.150667+00:00","updated_at":"2026-06-17T04:48:46.150667+00:00","problems":[],"ecosystem":"vcpkg","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}