xo-ratio: deal: clang requires public structural-type members

This commit is contained in:
Roland Conybeare 2024-04-27 11:52:29 -04:00
commit f860e231f5

View file

@ -326,7 +326,17 @@ namespace xo {
return lhs <=> rhs;
}
/* we want ratio<T> 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<T> is not structural.
*/
#ifdef __clang__
public:
#else
private:
#endif
/** @defgroup ratio-instance-variables **/
///@{
/** @brief numerator **/