[Bug c++/91466] [concepts] indicates "used in its own initializer" when not, constraint order change passes compilation.

2020-01-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91466

Jonathan Wakely  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Jonathan Wakely  ---
Yes, this was also fixed at r276764

[Bug c++/91466] [concepts] indicates "used in its own initializer" when not, constraint order change passes compilation.

2020-01-29 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91466

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2020-01-29
 CC||marxin at gcc dot gnu.org,
   ||redi at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Martin Liška  ---
@Jonathan: Can we close this?

[Bug c++/91466] [concepts] indicates "used in its own initializer" when not, constraint order change passes compilation.

2019-10-29 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91466

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||10.0
 Blocks||67491

--- Comment #1 from Jonathan Wakely  ---
Compiles on current trunk after changing the return type constraint:

#include 
#include 

template
concept integral_constant_ = std::is_empty_v && std::is_trivial_v &&
requires
{
typename T::value_type;
requires std::is_integral_v;
{ T::value } -> std::same_as;
};

struct sz_fn
{
template requires requires(R&& r) { {static_cast(r).size()} ->
integral_constant_; }
constexpr auto operator()(R&& r) {
return static_cast(r).size();
}
};

constexpr auto sz = sz_fn{};


int main()
{
auto arr = std::array{1, 2, 3, 4, 5};

return !std::is_invocable_v;
}


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
[Bug 67491] [meta-bug] concepts issues