https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82249
--- Comment #3 from Benjamin Buch ---
Bug is still present in trunk.
$ g++ --version
g++ (GCC) 8.0.0 20180103 (experimental)
Copyright (C) 2018 Free Software Foundation, Inc.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82152
Benjamin Buch changed:
What|Removed |Added
CC||benni.buch at gmail dot com
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82249
--- Comment #5 from Benjamin Buch ---
The code is accepted by clang since version 4.0. Older versions probably don't
support constexpr lambdas.
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
Older versions of g++ compile this successfully, g++-8 fails with an ICE:
template < typename T >
au
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
struct A{};
template < typename >
struct Test{
static constexpr auto var = []{};
};
int main(){
(void)T
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
struct X{ constexpr operator bool()const{ return true; } };
int main(){
[](auto
Version: 8.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
template
void bar(T&){} // ICE with reference, work
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
This is a very serious regression because it affects Boost.Hana directly.
template < int ... I >
st
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84181
--- Comment #1 from Benjamin Buch ---
Same with:
template < int ... I >
struct A{};
template < typename T >
void f(){
[](auto ... i){
return A< decltype(i)::x ... >{};
};
}
int main(){
f< int >();
}
$ g++ -std=c++14 main
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
template < typename ... T > void sink(T ...){}
template < typename >
void f(){
auto const lam
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84181
Benjamin Buch changed:
What|Removed |Added
Status|RESOLVED|REOPENED
Resolution|FIXED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84126
Benjamin Buch changed:
What|Removed |Added
Status|RESOLVED|REOPENED
Resolution|FIXED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84126
Benjamin Buch changed:
What|Removed |Added
Status|REOPENED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84181
--- Comment #5 from Benjamin Buch ---
I'm not completely sure anymore whether this is related, another version of the
new bug is:
template < typename ... T >
void sink(T ...){}
template < typename T >
auto var = [](auto ... i){ sink(i + 0 ...)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84181
--- Comment #6 from Benjamin Buch ---
Yet another version:
template < typename T >
auto var = [](auto ... i){ [i ...]{}; }();
int main(){
var< int >;
}
$ g++ -std=c++14 main4.cpp
main4.cpp: In instantiation of ' [with auto:1 = {}]':
main
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84036
Benjamin Buch changed:
What|Removed |Added
Status|RESOLVED|REOPENED
Resolution|FIXED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90101
Benjamin Buch changed:
What|Removed |Added
CC||benni.buch at gmail dot com
--- Comment
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
template < typename T > void f(T ...){}
int main(){
f(0);
}
T is not an parameter pack, but expansion is wrongly ac
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
template < typename ... T >
auto f(T ... i){
[](auto ... i){
// // wrongly true in current
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
template < typename ... T >
void sink(T ...){}
template < typename ... T >
void foo(T ... v){
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84368
--- Comment #3 from Benjamin Buch ---
I'm on git commit a5283f322810189a156a0fb080bf6d65e6f7970e which should be
R257627.
I used:
$ git svn find-rev $(git log --max-count 1 --pretty=format:%H)
Migrating from a git-svn v1 layout...
Data from a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84368
--- Comment #4 from Benjamin Buch ---
I can still reproduce it on R257659:
$ g++ -std=c++14 main.cpp
main.cpp: In instantiation of 'foo(T ...) [with T = {int}]:: [with auto:1 = {int}]':
main.cpp:9:6: required from 'void foo(T ...) [with T = {
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
int main(){
int a[1]{};
[&a]{
auto [v] = a;
(void)v;
}();
}
$ g++ -std=c
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84420
--- Comment #1 from Benjamin Buch ---
Same with:
int main(){
[]{
int a[1]{};
auto [v] = a;
(void)v;
}();
}
$ g++ -std=c++17 main.cpp
main.cpp: In lambda fun
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
struct A{
constexpr operator bool()const{ return true; }
};
int main(){
auto f = [](auto v){ if constexpr(v
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
struct A{
template < typename T >
void f()const{}
};
template < typename >
void foo(){
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84469
--- Comment #2 from Benjamin Buch ---
Yes, of course not, sorry! Copy and paste failure, thanks for correcting.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72752
--- Comment #13 from Benjamin Buch ---
I will create a separate bug report in the next hour. (After testing the test
cases against the current trunk.)
++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
This was previously part of the Bug 72752 comment 11.
template< typename >
struct Outer{
template< typename >
struct Inner;
};
template<>
template<
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72752
--- Comment #14 from Benjamin Buch ---
The test case from comment 11 is now bug 84678.
The other 4 test cases are known to successfully compile on GCC 6 and GCC 7
branch and current trunk (GCC 8). They are also known to compile with the
current
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
struct A{
constexpr operator int(){ return 0; }
};
template < typename >
void f(){
[](auto known){
if constexpr(constexpr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85200
--- Comment #1 from Benjamin Buch ---
Another version of the ICE is:
struct B{
constexpr operator bool(){ return 1; }
};
template < typename >
void f(){
[](auto v, auto b){
if constexpr(b){
auto x = [](auto){ return
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85200
Benjamin Buch changed:
What|Removed |Added
Status|RESOLVED|REOPENED
Resolution|FIXED
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
// Example ==
// Convert C-String to int
template < int N >
constexpr int parse_int(char
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71527
--- Comment #1 from Benjamin Buch ---
I simplified the example code:
// Example ==
// A compile time int-type
template < int I >
struct size{};
// The problem:
template < typename T, int N >
void f(size< N >
++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
I ran into a very strange bug:
#include
#include
#include // must include map to trigger the error!!!
template < typename A, typename B >
void apply(A const&
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81507
--- Comment #1 from Benjamin Buch ---
Same with:
$ /home/bebuch/media/programme/gcc-7/bin/g++ --version
g++ (GCC) 7.1.1 20170721
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. The
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80165
Benjamin Buch changed:
What|Removed |Added
CC||benni.buch at gmail dot com
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80165
--- Comment #4 from Benjamin Buch ---
Sorry, wrong thread!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81507
--- Comment #2 from Benjamin Buch ---
Same with clang, and I found the reason:
Since the first argument is std::vector, the function std::apply is called
instead of my apply function …
So it's not a bug. But maybe you can add some kind hint for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81507
Benjamin Buch changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Component|libstdc++
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81507
--- Comment #5 from Benjamin Buch ---
Yes, but in a long list of template heavy calls it is not trivial to see it, if
you don't expect such an error in your code.
It would be nice to have something like the 'did you mean …' hints, if an
argument
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
template < typename T >
int f(T v){
if constexpr(sizeof(T) == sizeof(int)){
return v;
}else{
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81486
Benjamin Buch changed:
What|Removed |Added
CC||benni.buch at gmail dot com
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66639
--- Comment #11 from Benjamin Buch ---
Also test case #3 doesn't work if you declare the function return type auto:
constexpr auto foo ()
{
static_assert (0 == __builtin_strcmp (__func__, "foo"), "#1");
static_assert (0 == __builtin_strcmp (
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71527
Benjamin Buch changed:
What|Removed |Added
CC||benni.buch at gmail dot com
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67371
Benjamin Buch changed:
What|Removed |Added
CC||benni.buch at gmail dot com
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72752
Benjamin Buch changed:
What|Removed |Added
CC||benni.buch at gmail dot com
--- Comment
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
int main(){
int dummy = 0;
[](auto& d, auto ... args){
([](auto ...){}(([&d](){}, args)), ...);
}(dum
++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
template < typename ... Ds >
constexpr auto f(Ds ...)noexcept{
return [](auto ... n){
constexpr auto calc =
[](auto n, auto dim)noexcept{
: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
template < int I > struct int_{};
template < typename T >
struct A{
template < typename U, int I
bstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
#include
int main(){
std::variant v(5);
std::visit([](int&){}, v);
std::visit([](int&&){}, std::move(v));
}
Should be a valid pro
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
struct A{
void get(){}
void f()noexcept(noexcept(get())){}
};
int main(){}
Should be a
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78301
--- Comment #3 from Benjamin Buch ---
No, it isn't.
$ g++ -std=c++11 -o a a.cpp
a.cpp:3:41: error: invalid use of 'this' at top level
void outer() const noexcept( noexcept( this->inner() ) ) {
tested with:
$ g++ --version
g++ (GCC) 7.0.1 20
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66256
Benjamin Buch changed:
What|Removed |Added
CC||benni.buch at gmail dot com
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66256
--- Comment #4 from Benjamin Buch ---
Same with decltype instead of noexcept:
struct test{
// it only works if e is declared before test()
using type = decltype(e);
static const bool e = false;
};
$ g++ -std=c++11 gcc-bug.cpp
gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82249
--- Comment #2 from Benjamin Buch ---
The ICE is fixed in trunk, but the wrong argument pack lengths mismatch does
still exist:
constexpr auto calc = [](auto, auto dim)noexcept{ return dim; };
template < typename ... Ds >
constexpr auto f(Ds .
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81676
--- Comment #2 from Benjamin Buch ---
Does still exist in:
$ g++ --version
g++ (GCC) 8.0.0 20171201 (experimental)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warra
ty: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
constexpr int f(){
if(true) return 0;
throw 0;
}
int main(){
constexpr auto i = f();
}
Probably related to Bug 6
: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
The bug affects all versions of GCC 11 and trunk (upcoming version 12).
The following minimal example causes a crash during memory freeing. However,
the error seems to be
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104872
--- Comment #1 from Benjamin Buch ---
More minimal version:
https://godbolt.org/z/aEv13e38a
```cpp
#include
#include
#include
using namespace std::literals;
class logging_string{
public:
logging_string(std::string_view text) :text_(
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104872
--- Comment #2 from Benjamin Buch ---
To workaround it is enough define the wrapper constructor to build a string.
```cpp
wrapper(std::string text): filename(std::move(text)) {}
```
https://godbolt.org/z/9za7hfjs8
```cpp
#include
#include
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104872
--- Comment #4 from Benjamin Buch ---
Can you please increase the priority? P3 seems too low for the wrong code. With
ICE I could understand that, but here the code seems to be compiled
successfully and then crashes when running the program. Thi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104872
--- Comment #3 from Benjamin Buch ---
Bug is still present in GCC 12.1 and current trunk.
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
I come from this Bug Report to Visual C++:
- https://github.com/microsoft/STL/issues/4417
I think that GCC has
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114076
--- Comment #3 from Benjamin Buch ---
I [created an overview](https://stackoverflow.com/a/78101462/4821621) with all
cases that currently work on StackOverflow. I think that all these cases should
be valid. For a properly formated version with l
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104850
Benjamin Buch changed:
What|Removed |Added
CC||benni.buch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104850
--- Comment #7 from Benjamin Buch ---
Sorry wrong number; Bug 114076
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
```cpp
template
struct Base {};
template
struct Derived: Base {
Derived(Derived::Base obj);
};
```
Accessing Base via Derived works with clang and MSVC, but
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114076
--- Comment #4 from Benjamin Buch ---
I just tried the Compiler Explorer links from my overview and saw that there is
no change in the trunk for GCC.
https://stackoverflow.com/a/78101462/4821621
The fact that all three major compilers behave d
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
I run into this by using googletest with CMake in release mode.
```
#include
static std::wstring foo(std::wstring text
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109299
Benjamin Buch changed:
What|Removed |Added
Version|12.0|12.1.0
--- Comment #3 from Benjamin Buc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104928
Benjamin Buch changed:
What|Removed |Added
CC||benni.buch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104928
--- Comment #10 from Benjamin Buch ---
Okay, I understand this.
https://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#status.iso.2020
defines P1135R6 is implemented since libstdc++ 11.1 and the feature test macro
__cpp_lib_semaphore >= 2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104928
--- Comment #12 from Benjamin Buch ---
The point is that the great majority of users do not read the full
documentation to find the section that mentions the experimental character of
the latest C++ modes. To be explicit about this, by just usin
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104928
--- Comment #13 from Benjamin Buch ---
According to the CLI interface I opened a backwards compatible feature request:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118301
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: benni.buch at gmail dot com
Target Milestone: ---
I'm coming from:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104928
Currently you can set the C++ standard via -std=c++17/
77 matches
Mail list logo