[Bug 1831222] [NEW] Concept declaration requiring another concept fails
Piotr Mikołajczyk
1831222 at bugs.launchpad.net
Fri May 31 09:50:17 UTC 2019
Public bug reported:
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_implicit_template_parm, at cp/parser.c:39065
concept bool SSemiring = requires(typename T::element_t& a, typename T::element_t& b, const Addable* vptr) {
^~~~~~~
** Affects: gcc-8 (Ubuntu)
Importance: Undecided
Status: New
** Tags: concepts
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-8 in Ubuntu.
https://bugs.launchpad.net/bugs/1831222
Title:
Concept declaration requiring another concept fails
Status in gcc-8 package in Ubuntu:
New
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_implicit_template_parm, at cp/parser.c:39065
concept bool SSemiring = requires(typename T::element_t& a, typename T::element_t& b, const Addable* vptr) {
^~~~~~~
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-8/+bug/1831222/+subscriptions
More information about the foundations-bugs
mailing list