Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

over 6 years ago

Language

C++

Compiler

clang HEAD 9.0.0 (https://github.com/llvm-mirror/clang.git 5739ad37a8f1e406ba84e7b80a2815029de5e507) (https://github.com/llvm-mirror/llvm.git 48aefa8877713616802d9c90b63f86fe50b9a101)

Options
Warnings
Boost 1.68.0
Compiler Default
no pedantic
Raw compiler options
unit.cpp

Author

anonymous

over 6 years ago

unit.cpp
unit.h

$ clang++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/clang-head/include unit.cpp
In file included from prog.cc:1:
In file included from ./unit.h:3:
/opt/wandbox/clang-head/include/c++/v1/memory:2334:19: error: invalid application of 'sizeof' to an incomplete type 'S'
    static_assert(sizeof(_Tp) > 0,
                  ^~~~~~~~~~~
/opt/wandbox/clang-head/include/c++/v1/memory:2651:7: note: in instantiation of member function 'std::__1::default_delete<S>::operator()' requested here
      __ptr_.second()(__tmp);
      ^
/opt/wandbox/clang-head/include/c++/v1/memory:2605:19: note: in instantiation of member function 'std::__1::unique_ptr<S, std::__1::default_delete<S> >::reset' requested here
  ~unique_ptr() { reset(); }
                  ^
./unit.h:13:13: note: in instantiation of member function 'std::__1::unique_ptr<S, std::__1::default_delete<S> >::~unique_ptr' requested here
   using B::B;
            ^
./unit.h:5:8: note: forward declaration of 'S'
struct S;
       ^
1 error generated.
Exit Code:
1