[Bug c++/69842] [6 Regression] Parameter deduction in polymorphic lambdas

carlphilippreh at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Feb 22 17:02:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69842

Philipp <carlphilippreh at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #4 from Philipp <carlphilippreh at gmail dot com> ---
Thank you for providing a fix for the test case so quickly. However, the issue
resurfaces in a slightly more involved example using a variadic lambda, which I
tested using gcc-6-20160221. Again, this code is accepted by gcc-5.3 and clang. 


#include <type_traits>
#include <utility>

template<typename T>
void sink(T &&)
{
        static_assert(std::is_same<int,T>::value,"");
}

int main()
{
        auto const g([](auto &&...  _var) {
                sink(std::forward<decltype(_var)>(_var)...);
        });

        g(0);
}


More information about the Gcc-bugs mailing list