diff --git a/include/xo/ratio/ratio.hpp b/include/xo/ratio/ratio.hpp index 2c4b0c53..36087e7e 100644 --- a/include/xo/ratio/ratio.hpp +++ b/include/xo/ratio/ratio.hpp @@ -326,7 +326,17 @@ namespace xo { return lhs <=> rhs; } + /* we want ratio to be a structural type, + * so that we can use an instance as a non-type template parameter. + * + * with private members, clang 18 (we believe incorrectly) complains that ratio is not structural. + */ +#ifdef __clang__ + public: +#else private: +#endif + /** @defgroup ratio-instance-variables **/ ///@{ /** @brief numerator **/