Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This example:
struct X {
template
operator T() const;
#if BOOL
operator bool() const;
#endif
};
bool check(X
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119866
--- Comment #9 from Barry Revzin ---
> I think it was never intentionally supported in constexpr (it just happened
> to work) and so such code was never correct.
Can it just be made to work in constexpr? Is there a reason not to? It already
mo
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119866
--- Comment #3 from Barry Revzin ---
Well even gcc 4.7.1 accepted this
int main() {
static_assert(__builtin_strlen("hi") == 2, "!");
}
At this point lots of code relies on that working.
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Not sure how to exactly title this bug.
This is a reproduction while trying to understand a compile failure with a
recent upgrade to {fmt}:
using size_t = decltype
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119747
--- Comment #1 from Barry Revzin ---
Clang's diagnostic is equivalent to gcc's for this example:
:9:5: error: expected expression
9 | CALL_F(1, 2);
| ^
:6:40: note: expanded from macro 'CALL_F'
6 | #define CALL_F(v, ...) f
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Here is a reduced example of a problem I just spent a while debugging:
template
void f(int, Args...) {
}
#define
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117849
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
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 reduction of a problem we ran into:
struct Base {
virtual auto operator==(Base const&) cons
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider the following simple program which tries to figure out what situations
get dangling reference warnings:
#include
#include
template
struct X {
T t;
};
template
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118323
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118249
--- Comment #1 from Barry Revzin ---
Pretend the example had declared outer as
extern array<10>& outer;
Since otherwise the usage has nothing to do with P2280. gcc does correctly
allow that case too.
NCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Short example:
template
void f() { }
template
struct array {
constexpr int size() const
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106631
--- Comment #1 from Barry Revzin ---
I tried to open this bug report again today (although this time I ran into it
due to a missing #include for the primary definition, rather than typoing the
name).
Still took me a while to parse the error me
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117509
--- Comment #2 from Barry Revzin ---
The warning is correct! I don't want to suppress the warning from the function
that gives it to me, I want to get a warning out of the function that doesn't.
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Here's another Optional-related example:
template
struct Optional {
union { T v; };
bool flag;
[[nodiscard]] auto value() && -> T&a
erity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Here's a simple, broken program:
#include
template
auto make() {
T t;
return t;
}
struct A {
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This is similar to #99631, but this example deals with scalars and still fails
on trunk. Attempted
ty: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this example (https://godbolt.org/z/66sjx78ej):
#include
std::strong_ordering wat(int const& lhs, int const& rhs) {
#ifdef MANUAL
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116696
--- Comment #5 from Barry Revzin ---
Thanks!
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
I was trying to implement constexpr std::format as cheaply as possible — by
using -fimplicit-constexpr instead of
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Here's a simple program:
struct C {
explicit C(int);
};
int main() {
C c = 42;
}
gcc's error for this right now
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112490
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: ---
Consider the following example:
template
struct simple_optional {
bool has_val;
T val;
auto begin() const -> T const* { return &val; }
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71962
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: ---
This is an example using Ranges:
#include
#include
using namespace std;
int main() {
auto rng = views::iota(0, 3);
const auto [a, b] = * ranges
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104255
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
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:
template
struct Constant {
constexpr operator int() const noexcept
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49974
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This is related to bugs PR96645 and PR88165.
Consider this:
#include
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112591
--- Comment #1 from Barry Revzin ---
Basically, in C++17, Sub looks like this:
struct Sub17 : Empty {
aligned_membuf storage;
unsigned char index;
};
But in C++20 it turns into:
struct Sub20 : Empty {
union { Empty storage; };
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider:
#include
#include
struct Empty { ~Empty() {} };
struct Sub : Empty { std::variant e; };
int main() {
Sub
ormal
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:
using size_t = decltype(sizeof(0));
struct Span {
int const* ptr;
size_t len;
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111854
--- Comment #4 from Barry Revzin ---
The standard says this should be ill-formed.
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
gcc accepts this program (copied from the MSVC documentation for
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-2/compiler-error-c2956?view=msvc-170)
without
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider:
auto f(bool c) {
if (c) {
return 2;
} else {
return {};
}
}
This code is ill
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/77136297/2069064):
template constexpr bool regular = true;
template concept C = regular;
template
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider the following reduced example:
using size_t = decltype(sizeof(0));
template
struct array {
T elems[N];
auto data() -> T* { return el
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this broken example:
#include
template
struct Optional { };
auto f() -> Optional;
auto g()
#ifdef CONCEPTS
-> std::same_as> auto
#else
-&
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102609
--- Comment #14 from Barry Revzin ---
> I am finding myself realizing that implementing this as a member function and
> turning off member function bits seems to be more difficult than implementing
> it as a static function and implementing me
mal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this [broken] program:
template
struct Outer {
struct Inner {
template
void wait(F f);
};
str
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this reduced, silly-looking example:
#include
inline int zero(std::string const& = {}) { return 0; }
int main() {
return zero();
}
In several versions of
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109642
--- Comment #10 from Barry Revzin ---
Check out the report I opened for an example where the #pragma around the whole
class isn't really enough anyway - since you might want to disable the warning
for specializations of class/function templates.
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
As everyone is already aware, Wdangling-reference gives false positives for
reference-semantic classes. The compiler has special cases for the ones it
knows about
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this example:
#include
struct Point {
int first;
int second;
};
struct Inner {
Inner(std::initializer_list
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This program (reduced from StackOverflow:
https://stackoverflow.com/q/76375145/2069064):
struct B { };
struct D : B {
int x;
int y;
};
int main(int
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
>From StackOverflow (https://stackoverflow.com/q/76269606/2069064), clang
rejects this code when c
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this example:
#include
template
struct Array {
};
#ifdef USE_TEMPLATE
template
#endif
struct Foo
{
static
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Given:
template
[[gnu::abi_tag("ABI")]] inline int value = 0;
int get() {
return value;
}
gcc mangles the variable value as _Z5valueIiE,
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this example:
struct div_t {
int quot;
int rem;
};
auto div(int, int) -> div_t;
int main() {
auto [
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109474
--- Comment #2 from Barry Revzin ---
Serves me right for only checking vector (which worked) and vector
(which didn't) and not bothering to check vector const (which also doesn't
work) and thus overly complicating the bug report.
I got too exci
y: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced example from Conor's tweet
(https://twitter.com/code_report/status/1645831980473282560):
#include
#include
void f(std::vector v) {
au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88061
--- Comment #6 from Barry Revzin ---
Any action on this one?
A workaround right now is to change code that would ideally look like (which is
pretty clean in my opinion):
template
void foo() {
[[gnu::section(".meow")]] static int value = 0;
nt: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
In this example:
#include
struct A {
int i_;
A(int i) : i_(i_) { }
};
struct B {
int i_;
B(int i) : i_(std::move(i_)) { }
};
Compiling on gcc trunk
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109362
--- Comment #4 from Barry Revzin ---
Awesome!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109362
--- Comment #1 from Barry Revzin ---
Sorry, in this reduced example, it doesn't actually consume an extra register -
only rdi is used.
In this slightly less reduced example:
#include
struct S {
std::atomic size;
std::atomic read_ptr
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This program:
#include
struct S {
long size;
std::atomic read_ptr;
auto peek() const -> const char* {
ret
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This program:
struct X {
constexpr X() { }
constexpr ~X() { }
};
int main()
{
static constinit X data;
}
compiled on gcc
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This program fails to compile (as it should, since the first line is commented
out):
// using i32 = int;
enum class E : i32 { red
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this example:
#include
#include
#include
struct C
{
uint8_t a;
uint8_t b;
uint8_t c;
uint8_t d;
uint16_t e;
uint16_t f;
int32_t g;
bool
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
>From StackOverflow (https://stackoverflow.com/q/75464599/2069064):
#include
#include
#include
#include
#include
#include
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108744
--- Comment #3 from Barry Revzin ---
Yeah, they're banned in non-static data members also. But there, we just can't
have any "auto" non-static data members, whereas you can have "auto" static
data members (just not structured bindings).
: UNCONFIRMED
Severity: 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 i, j;
};
struct C {
static auto [a, b] = X{1, 2};
};
This is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105200
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: ---
Consider the following example using std::generator from P2502 (sorry the
example isn't super reduced, https://godbolt.org/z/b4vj7E7d1):
int main() {
int lo
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Short example:
template
constexpr bool trait = true;
template <>
constexpr bool triat = false;
Note the typo on
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this example:
template concept C = true;
template
struct Widget {
void foo() requires C noexcept
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider:
#include
struct A {
uint64_t x : 32;
};
struct B {
uint32_t x;
};
void f() {
auto a = A{.x = 1};
auto b = B{.x = a.x};
}
gcc currently
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider:
template
constexpr bool some_check() {
return true;
}
struct C { };
static_assert(some_check::value);
This is (obviously) wrong: some_check is a function
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider the following program, carefully reduced from real code:
#include
// template using which = std::map;
templ
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106151
--- Comment #2 from Barry Revzin ---
I guess that's like:
C++11/14: neither is an aggregate (base class).
C++17: both are aggregates.
C++20: Bar is an aggregate, but Foo is not (user-declared constructor).
But that really shouldn't affect the
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this example:
using size_t = decltype(sizeof(0));
struct string_view {
// string_view() : ptr(nullptr), len(0
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this example:
#include
#include
inline constexpr auto synth3way = std::__detail::__synth3way;
struct Iterator {
std::vector::iterator it;
constexpr bool
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105840
--- Comment #2 from Barry Revzin ---
I think something to this effect maybe?
:9:7: error: attempting to declare constructor for unrelated class 'A';
did you mean to use 'B'?
9 | A(int i);
| ^~
| B
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
In this code:
template struct X { };
struct A {
A(int i);
A(X x);
};
struct B {
A(int i);
A(X x);
};
I was
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53281
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105672
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102774
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: ---
>From StackOverflow (https://stackoverflow.com/q/71864544/2069064):
template concept C_one = true;
template concept C_many = true;
template struct S { };
templ
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Similar to other "if constexpr" related warnings, gcc warns on this example:
void g();
void h();
template
void f(
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92396
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
union U {
struct {
int x;
int y;
};
long all;
};
constexpr long parens() {
U
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95153
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
In
https://github.com/gcc-mirror/gcc/blob/bded0d549fdfdc1328b2c0189dc5f8593b4cbe42/libstdc%2B%2B-v3/include/bits/ranges_algo.h#L3087:
the initial result is constructed as
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88061
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104803
--- Comment #6 from Barry Revzin ---
Ugh, sorry. You guys are right. gcc is correct to reject the example. Bad bug
report.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104803
--- Comment #4 from Barry Revzin ---
For instance, clang accepts this version:
consteval int p(int i) {
return i > 2;
}
constexpr auto none_of(int const* f, int const* l) -> bool {
for (; f != l; ++f) {
int i = *f;
if c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104803
--- Comment #3 from Barry Revzin ---
clang is also wrong. p(i) doesn't have to be a constant expression there. The
rule (http://eel.is/c++draft/expr.const#13) is "An immediate invocation shall
be a constant expression." but an expression is only
ormal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this example. Yes, the body of none_of here looks... extremely
bizarre. Just bear with me.
template
constexpr auto none_of(
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71283
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68350
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
RMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
>From StackOverflow (https://stackoverflow.com/q/70591571/2069064), with a clear
description of the
Severity: 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/70429541/2069064):
template
struct s {
void f() co
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/70342678/2069064):
struct selfref {
selfref* next
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
I'm sorry for how not-remotely-reduced these examples are, but I'm not sure how
to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100795
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101263
--- Comment #6 from Barry Revzin ---
The "real" answer is allowing constexpr placement new, but that obviously
doesn't help you right now.
But I think the helpful answer is that you can add a constructor to your
storage like storage(init_from_i
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95384
--- Comment #4 from Barry Revzin ---
Here's another example of the same kind of issue
(https://godbolt.org/z/KWr9rMssj):
template
struct tagged_union {
tagged_union(T t) : index(0), a(t) { }
tagged_union(U u) : index(1), b(u) { }
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
gcc trunk with -std=c++20 rejects this example as having no matching function
call:
template
struct s
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Here's an example:
template
struct C {
template
C(U);
};
template
C(U) -> C;
template
requires true
using A = C;
C ok(1); // ok, a
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
gcc trunk accepts this:
template
template
concept C = true;
I'm not sure exactly what gcc does with it, but C does become a
1 - 100 of 286 matches
Mail list logo