Concept declaration requiring another concept fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-8 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
template<typename T>
concept bool Addable = requires (T x, T y) {
{ x + y } -> T;
{ x += y } -> T&;
};
template<typename T>
concept bool SSemiring = requires(typename T::element_t& a, typename T::element_t& b, const Addable* vptr) {
{ a + b } -> typename T::element_t;
{ a * b } -> typename T::element_t;
{ T::zero() } -> typename T::element_t;
{ T::one() } -> typename T::element_t;
{ typename T::element_t{vptr} };
};
produces:
gcc_bug.hpp:10:93: internal compiler error: in synthesize_
concept bool SSemiring = requires(typename T::element_t& a, typename T::element_t& b, const Addable* vptr) {