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

            Bug ID: 97876
           Summary: stop_token header doesn't compile on clang-8 with
                    -std=c++20
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eric.niebler at gmail dot com
  Target Milestone: ---

Compiling <stop_token> header with clang-8 in C++20 mode results in this:

In file included from
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/condition_variable:50:
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/stop_token:404:7:
error: default member initializer for '_M_ptr' needed within definition of
enclosing class 'stop_token' outside of member functions
      _Stop_state_ref() = default;
      ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/stop_token:478:21:
note: in evaluation of exception specification for
'std::stop_token::_Stop_state_ref::_Stop_state_ref' needed here
    _Stop_state_ref _M_state;
                    ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/stop_token:58:5:
note: in evaluation of exception specification for
'std::stop_token::stop_token' needed here
    stop_token() noexcept = default;
    ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/stop_token:475:22:
note: default member initializer declared here
      _Stop_state_t* _M_ptr = nullptr;
                     ^
1 error generated.

Reply via email to