[Bug c++/67704] [concepts] requirements not being applied to aliases

2020-02-05 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67704

--- Comment #6 from CVS Commits  ---
The master branch has been updated by Jonathan Wakely :

https://gcc.gnu.org/g:269e8130b77065452698ab97e5da77d132d00276

commit r10-6453-g269e8130b77065452698ab97e5da77d132d00276
Author: Jonathan Wakely 
Date:   Wed Feb 5 10:35:19 2020 +

libstdc++: Remove workarounds for constraints on alias templates

The G++ bug has been fixed for a couple of months so we can remove these
workarounds that define alias templates in terms of constrained class
templates. We can just apply constraints directly to alias templates as
specified in the C++20 working draft.

* include/bits/iterator_concepts.h (iter_reference_t)
(iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
Remove workarounds for PR c++/67704.
* testsuite/24_iterators/aliases.cc: New test.

[Bug c++/67704] [concepts] requirements not being applied to aliases

2020-02-04 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67704

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||jason at gcc dot gnu.org
 Resolution|--- |FIXED
   Target Milestone|--- |10.0

--- Comment #5 from Jason Merrill  ---
Fixed for GCC 10 (in r278785).

[Bug c++/67704] [concepts] requirements not being applied to aliases

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

Jonathan Wakely  changed:

   What|Removed |Added

 CC||frederik.engels24 at gmail dot 
com

--- Comment #4 from Jonathan Wakely  ---
*** Bug 91487 has been marked as a duplicate of this bug. ***

[Bug c++/67704] [concepts] requirements not being applied to aliases

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

--- Comment #3 from Jonathan Wakely  ---
From Bug 89301:

The following code compiles however it should not:

template
requires(condition)
using enable_if_t = T;

template>
void foo();

void test() {
foo();
}


Slightly changed example also compiles on GCC (but fails to compile on Clang):

template
requires(condition)
using enable_if_t = T;

template
enable_if_t foo();

void test() {
foo();
}

[Bug c++/67704] [concepts] requirements not being applied to aliases

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

Jonathan Wakely  changed:

   What|Removed |Added

 CC||antoshkka at gmail dot com

--- Comment #2 from Jonathan Wakely  ---
*** Bug 89301 has been marked as a duplicate of this bug. ***

[Bug c++/67704] [concepts] requirements not being applied to aliases

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

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-10-15
 Ever confirmed|0   |1
  Known to fail||10.0

[Bug c++/67704] [concepts] requirements not being applied to aliases

2019-09-04 Thread andrew.n.sutton at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67704

Andrew Sutton  changed:

   What|Removed |Added

 CC||andrew.n.sutton at gmail dot 
com

--- Comment #1 from Andrew Sutton  ---
Confirmed. 

Constraints on dependent types aren't checked, but alias templates are always
"transparent". In the requirements on f, the type requirement R is simply
replaced by its instantiation, and the associated constraints are discarded.

There's a smaller version of this bug in the test suite in
g++.dg/cpp2a/concepts-alias.C, which is currently marked as xfail.