Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

about 3 years ago

Language

C++

Compiler

gcc 11.1.0

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

Author

anonymous

about 3 years ago

A.hpp
A.cpp
uptr.hpp

$ 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 A.hpp:3,
                 from prog.cc:1:
uptr.hpp: In instantiation of 'uptr<T>::~uptr() [with T = A::B]':
A.hpp:12:17:   required from here
uptr.hpp:6:17: error: invalid use of incomplete type 'class A::B'
    6 |         delete (new T);
      |                ~^~~~~~
In file included from prog.cc:1:
A.hpp:11:9: note: forward declaration of 'class A::B'
   11 |   class B;
      |         ^
Exit Code:
1