Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 7 years ago

Language

C++

Compiler

gcc HEAD 9.0.0 20180909 (experimental)

Options
Warnings
Boost 1.68.0
C++2a(GNU)
no pedantic
Raw compiler options
Bar.cpp

Author

anonymous

about 7 years ago

Bar.h
Bar.cpp
Foo.h

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.68.0/gcc-head/include -std=gnu++2a Bar.cpp
In file included from /opt/wandbox/gcc-head/include/c++/9.0.0/memory:80,
                 from prog.cc:2:
/opt/wandbox/gcc-head/include/c++/9.0.0/bits/unique_ptr.h: In instantiation of 'void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = Foo]':
/opt/wandbox/gcc-head/include/c++/9.0.0/bits/unique_ptr.h:274:17:   required from 'std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = Foo; _Dp = std::default_delete<Foo>]'
Bar.h:7:9:   required from here
/opt/wandbox/gcc-head/include/c++/9.0.0/bits/unique_ptr.h:79:16: error: invalid application of 'sizeof' to incomplete type 'Foo'
79 |  static_assert(sizeof(_Tp)>0,
   |                ^~~~~~~~~~~
Exit Code:
1