This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/79442] New: GCC 5.4 does not fully support N3652 (Relaxing constraints on constexpr functions)
- From: "zuverliantellabrach at hotmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 09 Feb 2017 14:37:30 +0000
- Subject: [Bug c++/79442] New: GCC 5.4 does not fully support N3652 (Relaxing constraints on constexpr functions)
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79442
Bug ID: 79442
Summary: GCC 5.4 does not fully support N3652 (Relaxing
constraints on constexpr functions)
Product: gcc
Version: 5.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: zuverliantellabrach at hotmail dot com
Target Milestone: ---
GCC 5 is supposed to provide full support for N3652, but the code below does
not compile under GCC 5.4 (it does, however, compile under GCC 6.1).
#include <iostream>
template<class... Ts>
constexpr bool allTrue(Ts... ts) {
const bool bs[]={ts...};
for(size_t i=0; i<sizeof...(Ts); ++i) {if(!bs[i]) {return false;}}
return true;
}
template<bool B>
struct S {S() {std::cout<<std::boolalpha<<B<<std::endl;}};
int main() {
S<allTrue(true,true,true,false)>{};
return 0;
}