This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of Resolved status.
constexprSection: 21.5.3 [ratio.ratio] Status: Resolved Submitter: Alisdair Meredith Opened: 2009-05-25 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [ratio.ratio].
View all issues with Resolved status.
Discussion:
The values num and den in the ratio template
should be declared constexpr.
[ 2009-10 Santa Cruz: ]
NAD EditorialResolved. Solved by N2994.
Proposed resolution:
21.5.3 [ratio.ratio]
namespace std {
template <intmax_t N, intmax_t D = 1>
class ratio {
public:
static constexpr intmax_t num;
static constexpr intmax_t den;
};
}