Registry / utility / boost-pfr

boost-pfr

JSON →
library1.90.0vcpkgunverified

Boost pfr module provides a way to access fields of a struct by index without macro or boilerplate.

vcpkg install boost-pfr
INSTALL
IMPORT
SIG · BOOST-PFR
B
boost-pfr
utilitycppv1.90.0
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.

boost/pfr.hpp
#include <boost/pfr.hpp>

Access struct fields by index using Boost.PFR

#include <boost/pfr.hpp> #include <iostream> struct Person { std::string name; int age; }; int main() { Person p{"Alice", 30}; std::cout << boost::pfr::get<0>(p) << " is " << boost::pfr::get<1>(p) << " years old.\n"; return 0; }
Debug
Known issues
gotchaBoost.PFR is header-only but requires C++14 or later.
fix
Ensure your compiler supports C++14 or newer.
affects: all
Upgrade
Version history
1.90.0latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
3 hits · last 30 days
node
2
Meta
1
Resources

No resource links recorded.

boost-pfr — pip install boost-pfr · libregistry