[Bug c++/114564] New: Accessing template Base via template Derived fails

2024-04-02 Thread benni.buch at gmail dot com via Gcc-bugs
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

[Bug c++/104850] Instantiating a destructor for a template class too early, before the calling destructor is seen - rejects valid code

2024-03-05 Thread benni.buch at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104850 --- Comment #7 from Benjamin Buch --- Sorry wrong number; Bug 114076

[Bug c++/104850] Instantiating a destructor for a template class too early, before the calling destructor is seen - rejects valid code

2024-03-05 Thread benni.buch at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104850 Benjamin Buch changed: What|Removed |Added CC||benni.buch at gmail dot com

[Bug c++/114076] list-initialization with assignment expression triggers wrong template instanciation

2024-03-05 Thread benni.buch at gmail dot com via Gcc-bugs
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

[Bug c++/114076] New: list-initialization with assignment expression triggers wrong template instanciation

2024-02-23 Thread benni.buch at gmail dot com via Gcc-bugs
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

[Bug tree-optimization/109299] wrong warning on std::wstring with -O2 -std=c++20 -D_FORTIFY_SOURCE=2

2023-03-27 Thread benni.buch at gmail dot com via Gcc-bugs
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

[Bug libstdc++/109299] New: wrong warning on std::wstring with -O2 -std=c++20 -D_FORTIFY_SOURCE=2

2023-03-27 Thread benni.buch at gmail dot com via Gcc-bugs
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

[Bug c++/104872] Memory corruption in Coroutine with POD type

2022-11-02 Thread benni.buch at gmail dot com via Gcc-bugs
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.

[Bug c++/104872] Memory corruption in Coroutine with POD type

2022-06-21 Thread benni.buch at gmail dot com via Gcc-bugs
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.

[Bug c++/104872] Memory corruption in Coroutine with POD type

2022-03-11 Thread benni.buch at gmail dot com via Gcc-bugs
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

[Bug c++/104872] Memory corruption in Coroutine with POD type

2022-03-11 Thread benni.buch at gmail dot com via Gcc-bugs
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)

[Bug c++/104872] New: Memory corruption in Coroutine with POD type

2022-03-10 Thread benni.buch at gmail dot com via Gcc-bugs
: 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

[Bug c++/90101] [P0732] Error using non-type template parameter in a template template argument

2019-04-23 Thread benni.buch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90101 Benjamin Buch changed: What|Removed |Added CC||benni.buch at gmail dot com --- Comment

[Bug c++/85200] [8 Regression] ICE in constexpr-if in lambda in template

2018-04-05 Thread benni.buch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85200 Benjamin Buch changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED

[Bug c++/85200] [8 Regression] ICE in constexpr-if in lambda in template

2018-04-04 Thread benni.buch at gmail dot com
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

[Bug c++/85200] New: [8 Regression] ICE in constexpr-if in lambda in template

2018-04-04 Thread benni.buch at gmail dot com
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

[Bug c++/72752] [6 Regression] ICE: in retrieve_specialization, at cp/pt.c:1183

2018-03-02 Thread benni.buch at gmail dot com
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

[Bug c++/84678] New: ICE on invalid code with nested templates

2018-03-02 Thread benni.buch at gmail dot com
++ 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<

[Bug c++/72752] [6 Regression] ICE: in retrieve_specialization, at cp/pt.c:1183

2018-03-02 Thread benni.buch at gmail dot com
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.)

[Bug c++/84469] GCC rejects valid code in structured binding in range-based-for in template

2018-02-20 Thread benni.buch at gmail dot com
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.

[Bug c++/84469] New: [7/8 Regression] GCC rejects valid code in structured binding in range-based-for in template

2018-02-19 Thread benni.buch at gmail dot com
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(){

[Bug c++/84421] New: [8 Regression] Lambda parameter is no longer a core constant expressions

2018-02-16 Thread benni.buch at gmail dot com
: 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

[Bug c++/84420] [8 Regression] ICE when accessing a structured binding in a lambda

2018-02-16 Thread benni.buch at gmail dot com
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

[Bug c++/84420] New: [8 Regression] ICE when accessing a structured binding to a captured variable in a template

2018-02-16 Thread benni.buch at gmail dot com
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]{}; []{ auto [v] = a; (void)v; }(); } $ g++ -std=c++17

[Bug c++/84368] [8 Regression] return type of generic lambda in variadic lambda in template is not deduced

2018-02-14 Thread benni.buch at gmail dot com
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

[Bug c++/84368] [8 Regression] return type of generic lambda in variadic lambda in template is not deduced

2018-02-14 Thread benni.buch at gmail dot com
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

[Bug c++/84368] New: [8 Regression] return type of generic lambda in variadic lambda in template is not deduced

2018-02-13 Thread benni.buch at gmail dot com
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){

[Bug c++/84338] New: [8 Regression] sizeof...() returns always 1 in variadic lambda inside a template

2018-02-12 Thread benni.buch at gmail dot com
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

[Bug c++/84337] New: Variadic expansion is accepted on not parameter pack template argument

2018-02-12 Thread benni.buch at gmail dot com
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

[Bug c++/84036] [8 Regression] ICE on valid code in C++14, variadic lambda capture in a template function

2018-02-02 Thread benni.buch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84036 Benjamin Buch changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED

[Bug c++/84181] [8 Regression] ICE in variadic lambda inside a template when accessing any member after decltype

2018-02-02 Thread benni.buch at gmail dot com
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 '

[Bug c++/84181] [8 Regression] ICE in variadic lambda inside a template when accessing any member after decltype

2018-02-02 Thread benni.buch at gmail dot com
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

[Bug c++/84126] [8 Regression] ICE in variadic generic lambda inside a template function calling a function with arguments by reference

2018-02-02 Thread benni.buch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84126 Benjamin Buch changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|---

[Bug c++/84126] [8 Regression] ICE in variadic generic lambda inside a template function calling a function with arguments by reference

2018-02-02 Thread benni.buch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84126 Benjamin Buch changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED

[Bug c++/84181] [8 Regression] ICE in variadic lambda inside a template when accessing any member after decltype

2018-02-02 Thread benni.buch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84181 Benjamin Buch changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED

[Bug c++/84182] New: [8 Regression] ICE in variadic lambda inside a template when calling a captured lambda

2018-02-02 Thread benni.buch at gmail dot com
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

[Bug c++/84181] [8 Regression] ICE in variadic lambda inside a template when accessing any member after decltype

2018-02-02 Thread benni.buch at gmail dot com
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

[Bug c++/84181] New: [8 Regression] ICE in variadic lambda inside a template when constructing a decltype type

2018-02-02 Thread benni.buch at gmail dot com
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 >

[Bug c++/84126] New: [8 Regression] ICE in variadic generic lambda inside a template function calling a function with arguments by reference

2018-01-30 Thread benni.buch at gmail dot com
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,

[Bug c++/84125] New: [8 Regression] ICE in generic lambda when static_assert argument is implicitly converted to bool

2018-01-30 Thread benni.buch at gmail dot com
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

[Bug c++/84098] New: [8 Regression] ICE when using a lambda in a in-class static member initialization

2018-01-29 Thread benni.buch at gmail dot com
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(){ (voi

[Bug c++/84036] New: [8 Regression] ICE on valid code in C++14, variadic lambda capture in a template function

2018-01-25 Thread benni.buch at gmail dot com
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

[Bug c++/82249] [8 Regression] wrong mismatched argument pack lengths

2018-01-10 Thread benni.buch at gmail dot com
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.

[Bug c++/82152] [7/8 Regression] ICE on invalid code in C++17 mode if inheriting constructors are used

2018-01-03 Thread benni.buch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82152 Benjamin Buch changed: What|Removed |Added CC||benni.buch at gmail dot com --- Comment

[Bug c++/82249] [8 Regression] wrong mismatched argument pack lengths

2018-01-03 Thread benni.buch at gmail dot com
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.

[Bug c++/83242] New: Never executed "throw" in constexpr function fails to compile

2017-12-01 Thread benni.buch at gmail dot com
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

[Bug c++/81676] Wrong warning with unused-but-set-parameter within 'if constexpr'

2017-12-01 Thread benni.buch at gmail dot com
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

[Bug c++/82249] [8 Regression] wrong mismatched argument pack lengths + ICE

2017-12-01 Thread benni.buch at gmail dot com
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

[Bug c++/82249] New: mismatched argument pack lengths leads to ICE

2017-09-19 Thread benni.buch at gmail dot com
++ 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{

[Bug c++/82222] New: wrong uninitialized reference in lambda capture in fold expression

2017-09-15 Thread benni.buch at gmail dot com
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 ...){}(([](){}, args)), ...); }(dummy,

[Bug c++/72752] [6 Regression] ICE: in retrieve_specialization, at cp/pt.c:1183

2017-09-11 Thread benni.buch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72752 Benjamin Buch changed: What|Removed |Added CC||benni.buch at gmail dot com --- Comment

[Bug c++/67371] Never executed "throw" in constexpr function fails to compile

2017-08-25 Thread benni.buch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67371 Benjamin Buch changed: What|Removed |Added CC||benni.buch at gmail dot com --- Comment

[Bug c++/71527] wrong type mismatch while template argument deduction/substitution

2017-08-18 Thread benni.buch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71527 Benjamin Buch changed: What|Removed |Added CC||benni.buch at gmail dot com --- Comment

[Bug c++/66639] declare __func__ , __FUNCTION__ & __PRETTY_FUNCTION__ as constexpr

2017-08-18 Thread benni.buch at gmail dot com
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

[Bug c++/81486] Class template argument deduction fails with (), succeeds with {}

2017-08-11 Thread benni.buch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81486 Benjamin Buch changed: What|Removed |Added CC||benni.buch at gmail dot com --- Comment

[Bug c++/81676] New: Wrong warning with unused-but-set-parameter within 'if constexpr'

2017-08-02 Thread benni.buch at gmail dot com
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{ re

[Bug c++/81507] map header kills variant of vectors

2017-07-21 Thread benni.buch at gmail dot com
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

[Bug c++/81507] map header kills variant of vectors

2017-07-21 Thread benni.buch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81507 Benjamin Buch changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Component|libstdc++

[Bug libstdc++/81507] map header kills variant of vectors

2017-07-21 Thread benni.buch at gmail dot com
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

[Bug libstdc++/80165] Constexpr tuple of variant doesn't work

2017-07-21 Thread benni.buch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80165 --- Comment #4 from Benjamin Buch --- Sorry, wrong thread!

[Bug libstdc++/80165] Constexpr tuple of variant doesn't work

2017-07-21 Thread benni.buch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80165 Benjamin Buch changed: What|Removed |Added CC||benni.buch at gmail dot com --- Comment

[Bug libstdc++/81507] map header kills variant of vectors

2017-07-21 Thread benni.buch at gmail dot com
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.

[Bug libstdc++/81507] New: map header kills variant of vectors

2017-07-21 Thread benni.buch at gmail dot com
++ 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&

[Bug c++/81180] New: internal compiler error with class template deduction in nested template class

2017-06-22 Thread benni.buch at gmail dot com
: 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

[Bug c++/66256] noexcept evaluation done before end of class

2017-03-09 Thread benni.buch at gmail dot com
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

[Bug c++/66256] noexcept evaluation done before end of class

2017-03-09 Thread benni.buch at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66256 Benjamin Buch changed: What|Removed |Added CC||benni.buch at gmail dot com --- Comment

[Bug c++/78301] noexcept() operator rejects sibling method call without object

2017-02-22 Thread benni.buch at gmail dot com
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

[Bug c++/79670] New: [c++1z] cannot call member function without object in noexcept declarator of a member function

2017-02-22 Thread benni.buch at gmail dot com
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

[Bug libstdc++/79513] New: std::visit doesn't handle references

2017-02-14 Thread benni.buch at gmail dot com
++ 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 program,

[Bug c++/71527] wrong type mismatch while template argument deduction/substitution

2016-06-15 Thread benni.buch at gmail dot com
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

[Bug c++/71527] New: wrong type mismatch while template argument deduction/substitution

2016-06-14 Thread benni.buch at gmail dot com
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 con