[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: [Bug c++/86000] ICE with requires statement in a non constexpr if
From: "gcc-bugs at oxyware dot com" <gcc-bugzilla () gcc ! gnu ! org>
Date: 2018-05-31 14:53:27
Message-ID: bug-86000-4-9KUebFMwf2 () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86000
--- Comment #2 from Hubert Matthews <gcc-bugs at oxyware dot com> ---
template <typename T>
int f()
{
bool check = requires { 3 > 4; };
if (check) return 1;
else return 2;
}
compiles cleanly and gives the expected result. This is essentially the same
code but with the check performed separately and stored in an intermediate
variable.=
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic