[Bug c++/97704] [11 Regression][concepts] Not working with explicit types in function signatures?

2020-12-22 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97704

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |INVALID

--- Comment #4 from Jason Merrill  ---
As mentioned in the commit message, this change is the result of CWG issue
2369:

http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#2369

Which moved checking of non-dependent conversions after checking the
constraints for satisfaction.  The rationale is that checking non-dependent
conversions can also cause unwanted instantiations, and unwanted instantiations
from satisfaction checking can be worked around by adding additional
constraints, but constraints can only prevent unwanted instantiations from
conversion checking if the constraints are checked first.

Probably the standard library needs to add some constraints.

[Bug c++/97704] [11 Regression][concepts] Not working with explicit types in function signatures?

2020-12-17 Thread gcc-bugs at marehr dot dialup.fu-berlin.de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97704

--- Comment #3 from gcc-bugs at marehr dot dialup.fu-berlin.de ---
Thank you, Marek Polacek for finding that revision.

I checked out the master branch and reverted the commit
f1612b8ae8a60f62cf5456b3357a341550534a7e and now everything compiles again.

So that, regression is definitely coming from that commit.

[Bug c++/97704] [11 Regression][concepts] Not working with explicit types in function signatures?

2020-11-19 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97704

Marek Polacek  changed:

   What|Removed |Added

   Priority|P3  |P1

[Bug c++/97704] [11 Regression][concepts] Not working with explicit types in function signatures?

2020-11-19 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97704

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2020-11-19
 Ever confirmed|0   |1
 CC||jason at gcc dot gnu.org,
   ||mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek  ---
Started with r11-2774, before that we compiled the code.  clang++ compiles it
fine too.

[Bug c++/97704] [11 Regression][concepts] Not working with explicit types in function signatures?

2020-11-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97704

Richard Biener  changed:

   What|Removed |Added

   Keywords||rejects-valid
   Target Milestone|--- |11.0

[Bug c++/97704] [11 Regression][concepts] Not working with explicit types in function signatures?

2020-11-03 Thread gcc-bugs at marehr dot dialup.fu-berlin.de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97704

--- Comment #1 from gcc-bugs at marehr dot dialup.fu-berlin.de ---
I forgot to add the error message:

```
: In instantiation of 'auto hard_error(t) [with t = int]':

:11:35:   required by substitution of 'template  requires
requires{hard_error({});} constexpr auto foo(t, non_exisiting) [with t = int]'

:19:17:   required from here
:6:19: error: non-constant condition for static assertion
6 | static_assert(in, "Failure");
  |   ^~

:6:19: error: 'in' is not a constant expression
```

(For some reasons godbolt shows everything in the compliance view as green,
this link https://godbolt.org/z/Go8Mc5 should also show the compiler error)