Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 2 years ago

Language

C++

Compiler

clang 14.0.0

Options
Warnings
Boost 1.79.0
C++2a
no pedantic

Author

anonymous

over 2 years ago

testclass.h
testclass.cpp

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.79.0-clang-14.0.0/include -std=c++2a
In file included from prog.cc:1:
In file included from ./testclass.h:1:
In file included from /opt/wandbox/clang-14.0.0/include/c++/v1/experimental/propagate_const:110:
In file included from /opt/wandbox/clang-14.0.0/include/c++/v1/functional:506:
In file included from /opt/wandbox/clang-14.0.0/include/c++/v1/__functional/function.h:22:
In file included from /opt/wandbox/clang-14.0.0/include/c++/v1/__memory/shared_ptr.h:25:
/opt/wandbox/clang-14.0.0/include/c++/v1/__memory/unique_ptr.h:50:19: error: invalid application of 'sizeof' to an incomplete type 'Main::impl'
    static_assert(sizeof(_Tp) > 0,
                  ^~~~~~~~~~~
/opt/wandbox/clang-14.0.0/include/c++/v1/__memory/unique_ptr.h:315:7: note: in instantiation of member function 'std::default_delete<Main::impl>::operator()' requested here
      __ptr_.second()(__tmp);
      ^
/opt/wandbox/clang-14.0.0/include/c++/v1/__memory/unique_ptr.h:269:19: note: in instantiation of member function 'std::unique_ptr<Main::impl>::reset' requested here
  ~unique_ptr() { reset(); }
                  ^
/opt/wandbox/clang-14.0.0/include/c++/v1/experimental/propagate_const:134:7: note: in instantiation of member function 'std::unique_ptr<Main::impl>::~unique_ptr' requested here
class propagate_const
      ^
./testclass.h:9:11: note: forward declaration of 'Main::impl'
    class impl;
          ^
1 error generated.
Exit Code:
1