nt: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This program:
auto f = []{ return 0; };
static_assert(requires { f(); });
Fails to compile on trunk (https://godbolt.org/z/DEuoVM), with the error:
:2:15:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90415
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
In this program (note the typo in the call to f):
struct A {
int width, height;
};
void f(A);
void g() {
f(A{.width
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from StackOverflow (https://stackoverflow.com/q/61941173/2069064):
template int f() { return 0; }
template requires
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Here is a complete example:
struct nullopt_t {} inline constexpr nullopt{};
template
struct Optional {
struct Empty { };
union {
Empty _;
T
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Following up on #95383:
struct nullopt_t {} inline constexpr nullopt{};
template
struct OptionalStorage
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95384
--- Comment #1 from Barry Revzin ---
Here's a simpler example: https://godbolt.org/z/FD7uEQ
If the engaged member is an int instead of a bool (to remove the tail padding),
gcc generates better code.
This follows up on "PR 95383"
ent: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from Twitter user @feder_and_ink:
#include
struct B {
B(int i) : i(i) {}
VIRTUAL std::strong_ordering operator<=>(B const& other) const =
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95567
--- Comment #1 from Barry Revzin ---
To follow up on this, it's not the operator<=> being virtual that's significant
but rather the class itself being polymorphic. This exhibits the same behavior:
#include
struct B {
B(int i) : i(i) {}
VIR
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider the following heavily reduced, and incorrect, attempt at an iterator:
#include
template
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Couldn't find a dupe for this one. The example from what is now
[expr.prim.id.unqual]/2 (http://eel.is/c++draft/expr.prim.id.unq
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from StackOverflow (https://stackoverflow.com/q/62822725/2069064), this
program:
#include
int main() {
int
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96142
Barry Revzin changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
y: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider the erroneous program:
#include
#include
template F>
void call_with_ints(F);
void foo() {
call_with_ints([](std::string const& s){
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96333
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
NCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from StackOverflow (https://stackoverflow.com/q/63202619/2069064):
template constexpr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96497
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
ormal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider:
struct X {
char storage[100] = {};
char const* head = storage;
};
void f() {
constexpr X x = {};
}
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from StackOverflow (https://stackoverflow.com/q/63390165/2069064):
template
constexpr int foo(int=0){
return 0;
}
template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53610
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
erity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
From StackOverflow (https://stackoverflow.com/q/59163716/2069064):
struct A {};
template
struct B {
v
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Here's the best reduction I was able to come up with thanks to creduce:
# 1 "" 3
typedef unsigned char a;
typedef unsigned b;
enum {
c
};
class d {
public:
te
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
From Peter Dimov on Slack:
#include
struct X
{
int x, y, z;
int operator[]( std::size_t i ) const noexcept
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from SO (https://stackoverflow.com/q/59414654/2069064):
#include
int f()
{
int n = -1;
try {
int *p = new(std::nothrow) int[n];
if
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced a bit from Jonathan Müller's example on Slack:
using size_t = decltype(sizeof(0));
template
struct string_literal
{
constexpr string_literal(const
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93107
--- Comment #1 from Barry Revzin ---
Meant to add the StackOverflow link:
https://stackoverflow.com/q/59517774/2069064
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from StackOverflow:
#include
template
void Task() {}
auto a = &Task;
auto b = { &Task };
std::initializer_list c = { &
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This program:
#include
bool check(int(&x)[4], int(&y)[4]) {
return std::compare_three_way{}(x, y) == 0;
}
Successfully compiles, with check() doing an
omponent: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This example should be valid:
#include
struct C {
int x[4];
auto operator<=>(C const&) const = default;
};
bool check(C const& a, C const&
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91847
--- Comment #2 from Barry Revzin ---
In the Prague meeting, this paper
(https://brevzin.github.io/cpp_proposals/2095_lambda_pack_cwg/p2095r0.html) was
adopted into what will become the C++20 standard, which moves the & in the
grammar to the left
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Example:
struct X {
X();
X(X const&);
X(X&&) = delete;
};
X make() {
X a;
retur
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This holds for gcc 8.x, 9.x, and trunk. The following program (thanks,
creduce):
using uint16_t = unsigned short;
struct a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93940
--- Comment #1 from Barry Revzin ---
gcc 7.x has the same behavior. gcc 6.x work fine.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93940
--- Comment #2 from Barry Revzin ---
Slightly more reduced: https://godbolt.org/z/5R9A5g
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93983
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93983
--- Comment #2 from Barry Revzin ---
(From Tim) This is LWG 3244.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56428
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Shorter repro from StackOverflow https://stackoverflow.com/q/54202462/2069064:
struct B {
template B(T t);
};
template
B::B(T t
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This program should be valid:
#include
#include
#include
[[gnu::noinline]]
double prepare(int a, int b)
{
__m128i is = _mm_setr_epi32(a, b, 0, 0);
__m128d
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This program is rejected by gcc:
template struct X { };
template constexpr auto f(F f) -> X { return {}; }
with:
source>:3:53: error: template argumen
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89048
--- Comment #1 from Barry Revzin ---
Actually, now I'm really not sure if this is a gcc bug, but then I really don't
know what the language rule is that rejects this. Sorry for the spam, this
needs some more thought.
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from StackOverflow https://stackoverflow.com/q/54369677/2069064:
template
struct Foo {
Foo(T) {}
};
template
struct Bar
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89062
--- Comment #2 from Barry Revzin ---
This may or may not be the same bug as
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87709, I do not know.
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider (from https://stackoverflow.com/q/54498610/2069064):
#include
struct X {
X() = default;
X(const X&) = de
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider the following example:
#include
// DUMB PAIR
struct dumb_pair {
alignas(2*sizeof(__m256i)) __m256i x[2];
};
void
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Hopefully-minimal example:
#ifdef WORKS
template
R foo(T&&...) {
return 0;
}
#else
template
decltype(aut
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Slightly reduced from https://stackoverflow.com/q/50478019/2069064:
template
struct Bar
{
Bar(T1, T2) { }
};
int main()
{
auto x
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced example from https://stackoverflow.com/q/51053280/2069064:
int global = 0;
constexpr int f(bool arg) {
if (arg
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from StackOverflow (https://stackoverflow.com/q/57206006/2069064), this
short example:
struct Wrapper {
template
using type = T;
};
template
void foobar
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from StackOverflow (https://stackoverflow.com/q/57281641/2069064):
int f();
void g()
{
if ([[maybe_unused]] int i
ormal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This currently fails to compile on trunk:
struct X {
explicit X() { }
};
struct Aggr {
X x;
};
Aggr f() {
return Ag
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
We just had an example in our codebase which did the moral equivalent of:
#include ""
gcc's diagnostic for this is:
:1:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91380
--- Comment #3 from Barry Revzin ---
In case it's at all helpful, here's the clang review that Tim found for this
diagnostic: https://reviews.llvm.org/D51333
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
A very common user error with std::is_constant_evaluated is to write this:
#include
constexpr int foo(int i) {
if constexpr (std
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from StackOverflow (https://stackoverflow.com/q/57467490/2069064):
using size_t = decltype(sizeof(0));
struct Str
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider:
struct X {
int const& var;
};
void foo() {
constexpr int i = 42;
constexpr X x{i};
}
This is
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
The following compiles on gcc 9.2 -std=c+=2a but fails on gcc trunk. This
example is based on the implementation of std::array:
using size_t = decltype(sizeof(0
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from StackOverflow (https://stackoverflow.com/q/57730286/2069064):
template void f(T);
struct A {
friend void
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
gcc implements the letter of the standard and allows this:
template
void foo(T&... ts) {
[...&us=ts]{};
}
While that is valid
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
>From StackOverflow (https://stackoverflow.com/q/58204296/2069064), reduced:
extern void call(int);
void a(int) {
call(0);
}
void b(int) {
call(1);
}
int m
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91974
--- Comment #2 from Barry Revzin ---
C++17 does change this rule. expr.call/8:
The postfix-expression is sequenced before each expression in the
expression-list and any default argument. The initialization of a parameter,
including every associa
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91974
--- Comment #4 from Barry Revzin ---
Yes, sorry if that wasn't clear, this is with -std=c++17.
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This example compiles:
template
void foo(Args..., T ) { }
int main() {
foo(0);
}
with Args deducing as empty
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This example fails to compile:
template
struct list { };
template
void foo(list, list, void(*)(T..., U
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83542
--- Comment #1 from Barry Revzin ---
This slightly different example:
template
struct list { };
template
void foo(list, list, void(*)(T..., U))
{ }
void f(int, int) { }
int main()
{
foo(list{}, list{}, &f);
}
fails with a different
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Here's a short example:
template
struct X
{ };
template class A, typename T>
struct Y
{ };
templat
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This program:
template
bool equals(X x, Y y) {
return (x == y);
}
int main() {
const char* p = nullptr;
equals(p, nullptr);
}
When compiled as:
$ g++ -std
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Short repro:
struct Y { };
bool operator<(Y a, Y b) { return false; }
constexpr bool operator>(Y a, Y b) { return false; }
static_assert(!noexcept(Y
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Vittorio, the wizard of lambda+pack bugs, is at it again:
https://stackoverflow.com/questions/55127906/lambda-pack-capture-with-ellipsis-on-both-sides-what-is-the-meaning
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Example:
struct Base {
virtual int foo() { return 0; }
int bar() { return foo(); }
};
struct Derived : Base {
int foo() override final { return 1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61414
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78010
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Here's a short repro:
template
struct Bar {
Bar() {}
Bar(const Bar&) {
static_assert(sizeof(T) == 1, "");
}
};
template
s
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90413
--- Comment #1 from Barry Revzin ---
clang also doesn't do this well: https://bugs.llvm.org/show_bug.cgi?id=41819
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78010
--- Comment #13 from Barry Revzin ---
Thanks Marek!
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
gcc 8 and 9 have made dramatic improvements in diagnostics, but here's a case
where it could be a lot better: the "oops, I
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced slightly from https://stackoverflow.com/q/56470126/2069064:
#include
enum E {A, B};
template
struct X
{
template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90769
--- Comment #1 from Barry Revzin ---
Sorry, more reduced:
#include
enum E {A, B};
struct X
{
template = 0>
constexpr X(int v);
template = 0>
operator OUT() const;
};
#ifdef WORKS
bool operator!=(X const& lhs, int) {
return st
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Here's a short repro:
#include
struct V : std::variant {
using std::variant::variant;
};
namespace std {
template <>
struct v
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90943
--- Comment #2 from Barry Revzin ---
What if we did something like (using pretty names for a sec):
template
struct _Extra_visit_slot_needed
{
template
static bool_constant<__never_valueless<_Types...>()>
__impl(const variant<_Types...>&)
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from StackOverflow (https://stackoverflow.com/q/56779605/2069064):
#include
#include
int main() {
using V = std::vector;
std::vector conns{
V{0,2
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from: https://stackoverflow.com/q/51244047/2069064
struct NC {
NC() = default;
NC(NC const&) = de
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced example from https://stackoverflow.com/q/51561232/2069064:
struct false_type {
static constexpr bool value = false
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
From https://stackoverflow.com/q/51621560/2069064:
template using void_t = void;
template
struct X {
static constexpr bool value
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from: https://stackoverflow.com/q/51643222/2069064
template auto zero(T) { return 0; }
template void deduce(F);
void ex() {
#ifdef VAR
auto x = &
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from StackOverflow (https://stackoverflow.com/q/52472000/2069064):
template
struct X
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This static assert fires on gcc, it does not on clang:
#include
struct base {
void operator()(int ) { }
};
struct a : base
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
On latest trunk (8.0.1), the following compiles. But with -DBUG it doesn't:
template struct is_void { static constexpr bool value =
IRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Example from StackOverflow (https://stackoverflow.com/q/52662407/2069064):
struct Base { };
template
str
: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Found by Edgar Rokjān (https://stackoverflow.com/q/52673235/2069064). The
noexcept specifier for _Not_fn currently only checks the noexcept-ness of
applying the ! operator
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced from https://stackoverflow.com/q/52950967/2069064:
template
struct lit {
lit(T );
};
template
void operator+(lit, int
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87712
--- Comment #3 from Barry Revzin ---
Didn't realize the OP had filed a bug report already.
erity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
The following fragment compiles on g++ 5.3.0:
struct X { };
namespace foo {
template
void bar() { T{
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
The following code fails to compile, with an error about y not being in scope:
struct X {
X() noexcept(noexcept(y+1)) { }
int y;
};
int main() { }
However
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70141
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41437
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
gcc 5.3.0 compiles this code:
struct B {
B() = default;
explicit B(B const& ) { }
};
struct D : B { };
int main() {
try {
thr
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This may not be totally minimal, but the following code:
#include
struct A {};
template
struct B : A { };
template struct typelist {};
template struct tag { using type = T
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this example, simplified from
https://stackoverflow.com/q/45195890/2069064:
template
struct C {
C(T );
};
template
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this reduced example taken from StackOverflow
(https://stackoverflow.com/questions/45602368/correct-behavior-of-built-in-operator-candidates-of-the-overload-resolution-in-t):
struct
1 - 100 of 292 matches
Mail list logo