I am currently looking for a data-structure that encapsulates data for compile-time access. Thereby, the accessed values should returned as constexpr.
While a tuple does have a constexpr constructor, the get
function of the tuple does not return a constexpr.
Does such a data structure exist or is it possible to manually define such a data structure?
The final goal is to pack compile time known values within some kind of object, pass it (via template) to a function, access the elements there and have the compile time known values directly pasted inplace in the binary as constants. For my purpose the encapsulation part is crucial.