runtime.hpp string_view span cstdint src/include/serif/dimensions/runtime/concepts.hpp serif::dimensions::runtime::ThermodynamicQuantityID serif::dimensions::runtime::RuntimeQuantityValue serif::dimensions::runtime::RuntimeRelationDescriptor serif serif::dimensions serif::dimensions::runtime runtime usable types representing the compile time dimension type system. Note that generally this is not a dimensional analysis library. Though perhaps in the future it will grow to something like that. Rather, this system is intended to ensure that developers are explicit which what numeric values mean. There is more detail on this in the file comment for dimensions.hpp and quantities.hpp Emily M. Boudreaux #pragmaonce #include<string_view> #include<span> #include<cstdint> namespaceserif::dimensions::runtime{ classThermodynamicQuantityIDfinal{ public: explicitconstexprThermodynamicQuantityID(conststd::string_viewname)noexcept:m_name(name){}; [[nodiscard]]constexprstd::string_viewname()constnoexcept{ returnm_name; } [[nodiscard]]friendconstexprbooloperator==(constThermodynamicQuantityID&,constThermodynamicQuantityID&)noexcept=default; private: std::string_viewm_name;//Wecanuseastringviewheresincetheconstructorisconstexprandthestringviewwillbevalidforthelifetimeoftheprogram. }; structRuntimeQuantityValuefinal{ ThermodynamicQuantityIDid; doublevalue{}; }; //TODO:Thisshouldberefactoredintotheeosmoduleratherthanthedimensionsmodule structRuntimeRelationDescriptorfinal{ ThermodynamicQuantityIDoutputQuantity; std::span<constThermodynamicQuantityID>inputQuantities; std::uint64_tpartialDerivativeMask; [[nodiscard]]constexprboolhasPartialDerivative(conststd::size_tinputIndex)constnoexcept{ returninputIndex<inputQuantities.size()&&(partialDerivativeMask&(std::uint64_t{1}<<inputIndex))!=0; } }; }