[Bug c++/101032] Regression on parser with g++11 using experimental c++20 (compiles under c++17)

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jun 11 16:54:34 GMT 2021


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, the constructors are declared like this in the class body:

    TypedThreadSafeFunction<ContextType, DataType, CallJs>();
    TypedThreadSafeFunction<ContextType, DataType, CallJs>(
        napi_threadsafe_function tsFunctionValue);

This is not valid in C++20.

You shouold simply write them like this, which is valid in all versions of C++
and easier to read anyway:

    TypedThreadSafeFunction();
    TypedThreadSafeFunction(napi_threadsafe_function tsFunctionValue);

*** This bug has been marked as a duplicate of bug 97202 ***


More information about the Gcc-bugs mailing list