Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
the following valid code crashes gcc-14 and gcc-trunk. clang accepts it, as
does gcc-13. see https://godbolt.org/z/s9frvq3Pv
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
I believe the following is valid C++20:
struct get_answer {};
template
struct with : Query {
Value value
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Compile the following with -c++=2b:
```
namespace std {
template
T&& declval() noexcept requires true;
template
void
: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Starting in gcc 12, transitive friendship is extended to friend functions that
are defined
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
The following valid C++20 code causes gcc trunk to erroneously warn about a
missing return statement.
template
constexpr auto y = X;
template
using C
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
The following valid C++20 is rejected by gcc trunk:
template
struct S {
auto f() { return X; }
};
template
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Created attachment 55469
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55469=edit
self-contained source file
Compile the attached source with -std=c++20. Res
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Compile the following with -O3 -std=c++17 -Wall
<<<<<
#include
#include
template
std::vector
make_type_param_vector(std::initializer_list c
: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
The following should work since C++17, when C++ got guaranteed copy elision.
#include
struct immovable {
immovable() = default;
immovable(immovable
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
struct immovable {
immovable() = default;
immovable(immovable &&) = delete;
};
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109790
--- Comment #1 from Eric Niebler ---
Possible dupe of https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100632
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Created attachment 55032
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55032=edit
the result of -freport-bug
Comp
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
template
struct C {};
...compiled with `-std=c++20` results in:
:1:23: error: 'auto'
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
template
struct C {};
... on trunk with `-std=c++20` results in:
: In lambda funct
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105667
Eric Niebler changed:
What|Removed |Added
CC||eric.niebler at gmail dot com
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Created attachment 55012
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55012=edit
result of -freport-bug includ
: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Clang accepts the following, gcc thinks the expression in the line
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97876
--- Comment #5 from Eric Niebler ---
> Github's poor life choices should not be our problem ;-)
I thought you'd say that. :-)
> If clang-8 doesn't ship and doesn't work with GCC's
> , I would interpret that as you can't test with
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97876
--- Comment #3 from Eric Niebler ---
It seems like GitHub actions uses the latest libstdc++ by default when testing
even with old (e.g., clang-4) toolsets. That seems busted, but regardless, this
is now breaking _all_ my Linux clang tests for
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Compiling header with clang-8 in C++20 mode results in this:
In file included from
/usr/bin/../lib/gcc/x86_64-linux-gnu/10
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Try the following code with -std=c++2a
template
void foo(T) {}
The result:
:20:44: internal compiler error: tree check: accessed elt 1
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Created attachment 48385
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48385=edit
Unreduced, preprocessed sou
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70790
--- Comment #1 from Eric Niebler ---
Still present on trunk, four years later.
ion: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
The following program fails to compile with -std=c++2a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93895
--- Comment #1 from Eric Niebler ---
Here is the error:
repro.cpp.i: In instantiation of ‘bool bf::{anonymous}::bb, false> >’:
repro.cpp.i:158:67: required from ‘df::operator Container() [with
Container = view_facade,
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Created attachment 47892
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=47892=edit
result of creduce on the error
Happ
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
The following (very invalid) code fragment causes gcc-trunk to ICE:
template struct a { b({
concept c =
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93667
--- Comment #3 from Eric Niebler ---
> Is this a duplicate / variant of
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93516?
Bug 93516 is not triggered by [[no_unique_addresss]] and the ICE is not on the
same line. That's why I created a new
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Compile with: -std=c++2a -O2
struct a {};
struct b { [[no_unique_address]] a aq; };
struct c {
int d
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
The following code fails to compile with trunk with -std=c++2a
template
concept different_than = !__is_same_as(A, B
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
The following valid code is rejected by g++ -std=c++XY for any XY >= 11:
inline namespace {
inline namespace {}
}
inl
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Compile with -std=c++2a -O3 -fconcepts
namespace std {
template class future;
template class promise;
}
template
T&& declval() requires true;
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
The following code declares a C++20 lambda with a constraint. The invocation of
the lambda should be ill
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68093
--- Comment #1 from Eric Niebler ---
Still happens on trunk, 2 years later:
template
concept bool True = true;
template
struct S {
friend bool operator==(S, int) requires True { return true; }
friend bool operator==(S, int) requires
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
According to Andrew Sutton, the following code should compile:
template
concept bool True = true;
template
concept
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71187
--- Comment #3 from Eric Niebler ---
I suppose, but I doubt it would matter much. add_rvalue_reference is not used
nearly as frequently as declval (except in the current implementation of
declval).
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Compile with -std=gnu++1z:
template using x = void;
using Y = x<+[]{}>;
The above code creates a lambda and then applie
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78231
Eric Niebler changed:
What|Removed |Added
CC||eric.niebler at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78003
Eric Niebler changed:
What|Removed |Added
CC||eric.niebler at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78137
Eric Niebler changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
With -std=gnu++1z, the following code ICEs the compiler:
```
struct S {};
template
void foo(T t = {}) {}
int main() {
foo
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77537
--- Comment #12 from Eric Niebler ---
Likewise
: enhancement
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
declval gets used *everywhere*. It doesn't need to instantiate a template.
Rather than:
template
inline
Version: 6.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Casey Carter recently posted this to the committee
++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
#include
template
void oops(Fn) {
static_assert(!std::is_literal_type::value, "oops");
}
int main() {
oops([]{});
}
Yields:
test.cpp: In instantiation of ‘vo
++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
#include
template
void foo(T, typename std::enable_if<noexcept(T(std::declval())), int>::type)
{
}
int main() {
foo(0,0);
}
Results in:
Test.cpp: In instantiation of ‘void
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68434
Eric Niebler changed:
What|Removed |Added
CC||eric.niebler at gmail dot com
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
I've reduced this as much as I can. Test case below. The two static asserts are
testing the same thing, AFAICT. One
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
template class F, class I1, class I2 = I1
concept bool IndirectCallableRelation() {
return true;
}
template class, class
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67148
--- Comment #1 from Eric Niebler eric.niebler at gmail dot com ---
If I replace the variadic Same concept with the binary one below, the problem
goes away.
templateclass T, class U
concept bool Same() {
return __is_same_as(T,U);
}
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
The error happens on constrained partial specializations of a template that has
already been instantiated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67139
Eric Niebler eric.niebler at gmail dot com changed:
What|Removed |Added
Summary|[concepts] ICE on checking |[concepts
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
template class T
concept bool _Auto = true;
template _Auto T
struct test {};
template _Auto T
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67139
--- Comment #2 from Eric Niebler eric.niebler at gmail dot com ---
Thanks, except that that is invalid code, and this bug is an ICE-on-valid.
Here's the equivalent valid repro case:
template class T
constexpr typename T::type::value_type _v = T
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Created attachment 36141
-- https://gcc.gnu.org/bugzilla/attachment.cgi?id=36141action=edit
preprocessed source archive
Compile the attached code with -std=gnu++1z
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Created attachment 36093
-- https://gcc.gnu.org/bugzilla/attachment.cgi?id=36093action=edit
preprocessed source archive
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Pretty sure the static assert in the program below should not fire, but it
does.
#include type_traits
template
: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Code:
template template class... class T, class... U
concept bool _Valid = requires
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66988
--- Comment #2 from Eric Niebler eric.niebler at gmail dot com ---
I thought that, too. But this program has the same problem:
#include type_traits
template template class class T, class U
concept bool _Valid = requires { typename TU
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66962
--- Comment #11 from Eric Niebler eric.niebler at gmail dot com ---
Removing the disjunction in the Constructible concept causes memory usage and
compile time to drop to zero. The word from Andrew is that this is simply a
quadratic algorithm
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66962
--- Comment #3 from Eric Niebler eric.niebler at gmail dot com ---
I can't make sense of that error, or understand why you get that and I don't.
You tried the command line I gave above, with the latest concept-gcc built from
source?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66962
--- Comment #9 from Eric Niebler eric.niebler at gmail dot com ---
Jason, is there anything I can do in my code to avoid the quadratic explosion
while we wait for Andrew to fix the bug?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66962
Eric Niebler eric.niebler at gmail dot com changed:
What|Removed |Added
Attachment #36028|0 |1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66962
--- Comment #1 from Eric Niebler eric.niebler at gmail dot com ---
This is a blocker for STL2.
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Created attachment 36028
-- https://gcc.gnu.org/bugzilla/attachment.cgi?id=36028action=edit
preprocessed source
Compile with: g
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66841
--- Comment #2 from Eric Niebler eric.niebler at gmail dot com ---
This answer is deeply unsatisfying. I want valid expressions, not traits. And
if std::is_constructible doesn't do *exactly* what I want (and it doesn't) I
have to author my own
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66834
--- Comment #3 from Eric Niebler eric.niebler at gmail dot com ---
I was thinking that overloading the Constructible concept would be a conforming
way to express this, but it doesn't seems to work. Any clue why?
template class T, class U
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66834
--- Comment #6 from Eric Niebler eric.niebler at gmail dot com ---
Exhaustively overloading Constructible to avoid the kind mismatch and the
ambiguity runs into a different problem:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66841
I haven't
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66834
--- Comment #5 from Eric Niebler eric.niebler at gmail dot com ---
I would expect a partial ordering to prefer the two-parameter overload in that
case. But yeah, it's a separate issue.
: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
This is related to the discussion in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66834
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66758
--- Comment #9 from Eric Niebler eric.niebler at gmail dot com ---
Created attachment 35950
-- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35950action=edit
Bug number 4
ICE ICE baby
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66758
Eric Niebler eric.niebler at gmail dot com changed:
What|Removed |Added
Status|RESOLVED|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66758
Eric Niebler eric.niebler at gmail dot com changed:
What|Removed |Added
Status|RESOLVED|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66758
--- Comment #4 from Eric Niebler eric.niebler at gmail dot com ---
Created attachment 35948
-- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35948action=edit
Preprocessed source, bug the third
The previous fix caused the code in attachment #3
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
template class T, class U, unsigned N
requires requires (T t, U u) { t.foo(); u.foo(); }
void foo_all( T (t)[N
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Before rev 225651 (the fix for #66758), the following worked. It no longer
does. Not sure if it's legit.
template class From
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
Created attachment 35906
-- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35906action=edit
preprocessed source
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66758
--- Comment #1 from Eric Niebler eric.niebler at gmail dot com ---
Created attachment 35907
-- https://gcc.gnu.org/bugzilla/attachment.cgi?id=35907action=edit
preprocessed source, bug #2(?)
This might be the same bug, but the error
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
template class T, class...Args
concept bool _Constructible_ =
requires (Args...args)
{
T{ ((Args)(args))... };
};
template class T, class...Args
constexpr bool
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
The following code gives a hard error. I believe it should not.
templatetypename T
T declval();
templatetypename T
struct void_ { using type = void
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
In the following code, gcc seems to be getting the value category wrong for the
return type of the generic lambda:
#include utility
int main
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64892
--- Comment #1 from Eric Niebler eric.niebler at gmail dot com ---
I think this is user error. I was confused between the difference between
decltype(x.y) and decltype((x.y)). It seems the decltype(auto) is semantically
the same as decltype((x.y
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Compile this:
template class T
using identity_t = T;
template template class class It
void test() {
}
int main() {
testidentity_t
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target: i686-pc-cygwin
Problem is with the following code:
int i = 0;
const int j = 0;
static_assert(std::is_samedecltype(true? i : j), int const ::value, );
I expect
: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
This code:
template class = void
struct S
{
friend void foo( S
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Created attachment 33083
-- https://gcc.gnu.org/bugzilla/attachment.cgi?id=33083action=edit
preprocessed source
The attached preprocessed code, compiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60803
--- Comment #3 from Eric Niebler eric.niebler at gmail dot com ---
B
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
The following compiles with clang, but not with gcc-4.8.2
templatetypename Derived
using base_t = typename Derived
: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
The following compiles with clang, but not with gcc-4.8.2
/
templatetypename
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
The following very simple code fails to compile:
///
templatetypename Ts
struct refines
: Ts
{};
struct A
{};
struct B
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59361
--- Comment #1 from Eric Niebler eric.niebler at gmail dot com ---
Anybody?
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
This code compiles with clang 3.3 but doesn't compile with gcc 4.8.2 with
-std=gnu++11:
#include vector
#include functional
#include
++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
The following compiles with clang but doesn't with g++ 4.8.2 with -std=gnu++11:
templatebool ...Bs
struct and_
{
constexpr static bool value{true};
};
templatetypename T
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
The following code fails to compile:
struct S
{
constexpr int foo() const { return 0; }
constexpr int foo() const { return 42; }
};
int main()
{
constexpr int i = S{}.foo
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
I believe the following should compile:
```
templatetypename T
struct U;
templatetypename S, typename T
struct US (T
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Clang accepts the following. I think it's legal. g++ 4.8.1 rejects it:
// Fwd-declarations
struct S;
extern const S s;
// (... later) definitions
struct S
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
constexpr int x = 42;
struct S
{
static constexpr int const y = x;
};
constexpr int const S::y;
... gives:
$ /usr/local/gcc-4.8/bin/g++ -std=gnu++11 -c main.cpp
main.cpp
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
I believe all of the following 4 test cases should pass:
templatetypename ...Ts
struct list
{};
templatetypename ...Ts
struct
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57384
--- Comment #3 from Eric Niebler eric.niebler at gmail dot com ---
Interesting. I filed a similar bug against clang
(http://llvm.org/bugs/show_bug.cgi?id=16118), where Richard Smith seems to feel
the test cases should be:
templatetypename ...Ts
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54440
Bug #: 54440
Summary: [c++11] g++ prematurely applying rule that a template
parameter pack cannot be followed by a template
parameter
Classification: Unclassified
1 - 100 of 103 matches
Mail list logo