Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Language

C++

Compiler

gcc 11.1.0

Options
Warnings
Boost 1.78.0
C++2b(GNU)
no pedantic
Raw compiler options
A.cpp

A.hpp
A.cpp

$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.78.0-gcc-11.1.0/include -std=gnu++2b A.cpp
In file included from /opt/wandbox/gcc-11.1.0/include/c++/11.1.0/memory:76,
                 from A.hpp:3,
                 from prog.cc:1:
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/bits/unique_ptr.h: In instantiation of 'void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = A::B]':
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/bits/unique_ptr.h:361:17:   required from 'std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = A::B; _Dp = std::default_delete<A::B>]'
A.hpp:12:28:   required from here
/opt/wandbox/gcc-11.1.0/include/c++/11.1.0/bits/unique_ptr.h:83:23: error: invalid application of 'sizeof' to incomplete type 'A::B'
   83 |         static_assert(sizeof(_Tp)>0,
      |                       ^~~~~~~~~~~
Exit Code:
1