Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
>From StackOverflow (https://stackoverflow.com/q/45843428/2069064), a reduced
example:
#include
template
struct opt {
opt() { }
opt(opt const&
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Example slightly reduced from http://lists.isocpp.org/core/2017/08/2827.php:
template
struct is_same;
struct
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
struct B { };
struct D : B { int i; };
int main() {
auto [i] = D{};
}
On gcc 7.2, this fails with:
sb.cxx:5:10: error: cannot decompose class type āDā: both it and
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This example fails with all versions of gcc currently:
struct X {
X() = delete;
};
template
concept bool C
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This example compiles:
template class P> struct X { };
template struct A { };
int main() {
X();
}
But here, A is m
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
>From this StackOverflow question: http://stackoverflow.com/q/43894619/2069064
This example fails:
#include
struct Point { int x, y; };
int main()
{
const auto [x
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Here's a simplifed example of overloading taking from StackOverflow question
http://stackoverflow.com/q/43982799/2069064:
template
s
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
>From StackOverflow (http://stackoverflow.com/q/44015848/2069064), this code:
#include
#include
struct S {
S() { std::printf("DEF "); } /
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this example:
#ifdef VARIADIC
template
constexpr int foo(Us... ) { return 1
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 S;
struct T {
T() = default;
T(S const& ) { std::cout << "1\n&q
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80943
--- Comment #1 from Barry Revzin ---
Sorry, it's a bug, but not for the reasons I cited. Both T t(s) and T t{s}
should consider constructors - which should find T(S const& ) and T(T&& ) by
way of the conversion function. But the former is an exac
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
In the following example:
struct S;
struct T {
#ifdef BUG
T(S const& );
#else
T(S& );
#endif
};
struct S {
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/44698195/2069064), this static
assert trips:
#include
#include
int main() {
a
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 on the marked line - gcc requires me to write
result.template foo(), which
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
In this example:
template struct pack { };
// (1)
template
void foo(pack ) { }
// (2)
template
void foo(pack
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
The following example:
#include
#include
#include
template
struct value { };
template
struct value_sequence { };
template
constexpr value_sequence operator+(value_sequence
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Minimal example:
template struct is_same { static constexpr bool value =
false; };
template struct is_same { static constexpr bool value = true;
};
int main() {
int i = 0
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
If we try to make the template-name of the deduction guide a type-parameter,
courtesy of W.F. on SO (https://stackoverflow.com/q/46624005/2069064):
template
struct Foo {
Foo(T
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71205
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: ---
Minimal example courtesy of STL from
https://bugs.llvm.org/show_bug.cgi?id=34970:
template struct IsSame {
static constexpr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82632
--- Comment #1 from Barry Revzin ---
Actually, I'm pretty sure that gcc is correct here while this is a clang bug
for rejecting. The copy deduction candidate is more specialized, which is
preferred first over the deduction-guide.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80985
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this example:
struct Foo {
int n;
};
struct Bar {
double n;
bool b;
};
template
struct Baz : public T {
char pad[8 - sizeof(T)];
};
int main
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this example (reduced from SO:
https://stackoverflow.com/q/47261553/2069064)
template
struct
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/47606810/2069064):
template struct A{};
int main()
{
constexpr auto
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Can't come up with a more reduced example, but consider this code that makes a
Y combinator version of factorial and calls it:
#include
#include
template
struct y_combi
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
#include
int main() {
std::unique_ptr p;
p.reset(new char[1]);
}
fails to compile with due to reset invoking swap on two different types.
However, this code
: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
#include
struct comp {
bool operator()(int i, int j) const {
return i < j;
}
using is_transpar
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 complete benchmark comparing a bunch of simple operations on a
std::array vs a int64_t[128]. I'm
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78180
--- Comment #1 from Barry Revzin ---
Upon further investigation, all of the difference is in benchmark comes from
the initialization of the raw array versus std::array. For some reason, in the
two examples, the two containers are initialized diff
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78180
--- Comment #8 from Barry Revzin ---
-D_GLIBCXX_USE_CXX11_ABI=0 doesn't matter. It's just that I'd compiled google
benchmark with 4.8, and then wanted to test this behavior with 5.4 and 6.2. It
has no impact on the generated assembly as far as I
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
This example:
struct A {
template
void operator==(T const& ) const;
template
fr
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
The following fails to compile on any version of gcc (or clang) I tried:
#include
template struct X;
template struct X { };
template struct Y { X x; };
template
std
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
>From StackOverflow question: http://stackoverflow.com/q/30007692/2069064
Consider the following:
struct Foo{};
int main()
{
Foo a;
auto b{a};
a
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this code (taken from SO question)
#include
struct A {
template operator T***()
{
static_assert(std::is_same
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66108
--- Comment #1 from Barry Revzin ---
Forgot to add link:
http://stackoverflow.com/questions/30172533/template-argument-type-deduction-by-conversion-operator
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this attempt at implementing fmap for optionals in C++:
#include
#include
template
auto fmap(Func f)
{
return [=](auto arg) -> boost::optional { // **
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
The following code fails to compile on gcc 5.1:
#include
template
struct X {
std::map* storage = new std::map;
};
int
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
gcc 5.2 compiles the following:
struct Base { };
struct Derived : protected Base { };
struct Derived2 : public
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67943
--- Comment #1 from Barry Revzin ---
Actually, according to [class.base.access], this is valid code. Unless CWG 472
gets adopted I guess. In any case, disregard - my bad.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58740
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 code, courtesy of Belloc
(http://stackoverflow.com/q/31348475/2069064):
struct Outer {
void f() { }
class C { };
class Inner
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider the following:
struct B {};
struct S { explicit operator B(); };
int main() {
B const &t(S{});
}
Accor
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
The following code:
#include
template
struct A {
template
void operator+(T const
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
In the following code:
#include
template
struct A {};
template
void f(A, std::tuple) {} // (1)
template
void f(A<0>, std::tuple) {} // (2)
int main()
{
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
The following code:
struct Value
{
template
static constexpr T value = 0;
};
template
struct Something
{
void foo() {
static_assert(TValue
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
In the following code, A is neither movable nor copyable, and B has an A:
#include
struct A {
A() { }
A(A const&) = de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67342
--- Comment #3 from Barry Revzin ---
Thanks! I was pretty sure I was wrong but couldn't figure out why.
Barry
On Mon, Aug 24, 2015, 2:29 PM redi at gcc dot gnu.org <
gcc-bugzi...@gcc.gnu.org> wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this example (also in SO question
http://stackoverflow.com/q/32335523/2069064):
#include
template
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
The following compiles on gcc (and clang), across all versions I've tried:
template
void foo() { }
int main() {
foo();
}
But void isn't a valid non-typ
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72842
--- Comment #2 from Barry Revzin ---
This non-dependent version:
template void bar() { }
fails to compile, even if we never call bar(), even if we wanted to call it
with an empty pack.
foo in the original example is this same thing with an ex
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72842
--- Comment #4 from Barry Revzin ---
I'll just email. Instantiating foo creates a function template with a
non-type template parameter of type void. That's not an allowed type of a
non-type template parameter, so I think it should be ill-formed.
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
In this example:
#include
struct X {
X(std::initializer_list) { std::cout << '1'; }
X(X const&
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/66606143/2069064):
struct A {
explicit A(int);
};
struct B {
A a;
};
A a{10}; // ok
B b{.a{10
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/66674463/2069064):
#include
struct S {};
int operator<=>(S, int) {
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79070
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Issue title is a mouthful, but it's a very n
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced with creduce and then by hand:
template
struct C {
void find() {
struct H {
C c{};
};
(void)[](auto){ return H{}; };
}
};
void f() {
C().find
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100054
--- Comment #2 from Barry Revzin ---
In case it helps, here's a different example which on trunk ICEs in get_nsdmi,
but on gcc 10.2 and 10.3 ICEs on "unexpected expression '(F)()' of kind implicit_conv_expr" (and is accepted by 10.1)
struct F {
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/67081354/2069064), a user was
benchmarking code that
nt: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
>From Stack Avarflaw (https://stackoverflow.com/q/67096550/2069064):
namespace A { enum A {}; };
using namespace A;
using enum A;
gcc trunk rejects this lookup as ambiguous,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100084
--- Comment #1 from Barry Revzin ---
Also gcc accepts:
namespace A { enum A {}; };
using namespace A;
using enum A::A;
Which, apparently, this one should actually be ambiguous.
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider the following:
template struct is_same { static constexpr bool value
= false; };
template struct is_same { static constexpr bool value =
true; };
template using
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider the following (where T is just some type that is trivially copyable
but large enough):
struct T {
char _[24
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97562
--- Comment #2 from Barry Revzin ---
Yep, looks like the same issue to me.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51242
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
ent: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Reduced example:
#include
struct X
{
auto operator<=>(X const&) const = default;
auto operator==(int i) const;
};
bool f(X x) {
return x ==
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Simple example:
struct A {
int x;
char y;
};
template
struct B {
[[no_unique_address]] T t;
bool u;
};
static_assert(sizeof(B) == sizeof(A));
The data
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98071
--- Comment #1 from Barry Revzin ---
On further discussion, since the ABI disallows reusing the tail padding of
PODs, sizeof(B) cannot be 8. This is more likely a clang bug.
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider this simple example
namespace N4 {
enum E {
A, B, C, D
};
bool compare_logical(E x) { return (x
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98142
--- Comment #2 from Barry Revzin ---
That is a great point.
I guess in general this is kind of a scary optimization, since it doesn't seem
like it's really a global thing? Perhaps this calls for an attribute?
[[gnu::i_promise_on_penalty_of_ub_t
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
In trying to test adding more constexpr support to std::optional:
#include
union S {
int i;
};
constexpr int f() {
S s;
std
: 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/64195712/2069064):
#include
struct Empty {};
struct A : public Em
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Short test case:
template
constexpr auto f(T... ts) {
auto id = [](auto x){ return x; };
return (id(ts) + ... + 0
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85428
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider the following (link to compiler explorer:
https://godbolt.org/z/jWsxsK)
#include
static constexpr auto doy = []{
std::array month_offset{};
for (int m=1; m<
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100322
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100322
--- Comment #5 from Barry Revzin ---
Sorry meant to actually copy the reduction:
#include
bool compare_count(int a, int b)
{
return a > b;
}
bool compare(int a, int b)
{
return (a <=> b) > 0;
}
which generates:
compare_count(int,
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Short example (from https://stackoverflow.com/q/67573305/2069064):
#include
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Short example:
struct B {
int i;
CONSTEXPR bool operator==(B const&) const = default;
};
struct D : B {
CONSTEXPR bool operator==(D const&
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: barry.revzin at gmail dot com
Target Milestone: ---
Consider the following:
template
concept Thing = true;
template
concept MemberThing = requires (T t) {
t.member() -> Thing;// #1
!requi
: 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=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).
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
++
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68350
Barry Revzin changed:
What|Removed |Added
CC||barry.revzin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71283
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 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=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
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 #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=88061
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=95153
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=92396
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: ---
Similar to other "if constexpr" related warnings, gcc warns on this example:
void g();
void h();
template
void f(
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
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
: 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
101 - 200 of 292 matches
Mail list logo