Language
C++
Compiler
gcc 4.9.1
Options
Warnings
Boost 1.64.0
C++14(GNU)
no pedantic
Raw compiler options
Foo.cpp
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.64.0/gcc-4.9.1/include -std=gnu++14 Foo.cpp
Exit Code:
1
Author
anonymous
over 6 years ago
C++
gcc 4.9.1
Author
anonymous
over 6 years ago
$ g++ prog.cc -Wall -Wextra -I/opt/wandbox/boost-1.64.0/gcc-4.9.1/include -std=gnu++14 Foo.cpp
In file included from /opt/wandbox/gcc-4.9.1/include/c++/4.9.1/memory:81:0,
from Foo.h:1,
from prog.cc:2:
/opt/wandbox/gcc-4.9.1/include/c++/4.9.1/bits/unique_ptr.h: In instantiation of 'void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = FooImpl]':
/opt/wandbox/gcc-4.9.1/include/c++/4.9.1/bits/unique_ptr.h:236:16: required from 'std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = FooImpl; _Dp = std::default_delete<FooImpl>]'
Foo.h:6:1: required from here
/opt/wandbox/gcc-4.9.1/include/c++/4.9.1/bits/unique_ptr.h:74:22: error: invalid application of 'sizeof' to incomplete type 'FooImpl'
static_assert(sizeof(_Tp)>0,
^