: major
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ytj000 at gmail dot com
Created attachment 30824
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30824&action=edit
broken code
OS: Archlinux x64
Kernel: 3.10.1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64977
--- Comment #2 from ytj000 at gmail dot com ---
(In reply to Martin Sebor from comment #1)
> I'm not 100% sure this example is valid. It seems to me that the rejected
> initializer "e" is invalid because it's not
&g
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ytj000 at gmail dot com
Target Milestone: ---
// The following code compiles in gcc (http://goo.gl/gFGc9K), but not clang
(http://goo.gl/woxdi1).
#include
template struct Foo { Foo(T
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ytj000 at gmail dot com
struct A {};
int main() {
A a;
constexpr A b = a;
}
Compiles with clang++ 3.7.0 (trunk 228104). FYI
http://llvm.org/bugs/show_bug.cgi?id=22474
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: ytj000 at gmail dot com
struct A {
constexpr operator int() const { return 0; }
};
int main() {
A a{};
constexpr int b = a; // ok
[a]() { constexpr int b = a; }; // ok
// error: the