I should probably just add the relevant constexpr's to Boost.System.
https://github.com/boostorg/system/commits/feature/constexpr
The only nontrivial change this entails is changing the member relational operators of error_category: class error_category { public: bool operator==(const error_category& rhs) const noexcept; bool operator!=(const error_category& rhs) const noexcept; bool operator<(const error_category& rhs) const noexcept; }; into nonmembers: constexpr bool operator==(const error_category& lhs, const error_category& rhs) noexcept; constexpr bool operator!=(const error_category& lhs, const error_category& rhs) noexcept; bool operator<(const error_category& lhs, const error_category& rhs) noexcept; For the first two, g++ complained that members of a non-literal class can't be constexpr (whereas clang had no problem with it.) The third one I moved out for consistency. Nonmembers seem more idiomatic in either case; can someone think of an argument against having these out of the class?