Skip to content

Instantly share code, notes, and snippets.

@smspillaz
Created April 7, 2013 09:51
Show Gist options
  • Save smspillaz/5329830 to your computer and use it in GitHub Desktop.
Save smspillaz/5329830 to your computer and use it in GitHub Desktop.
clang error
smspillaz@interpol:~/Source/Compiz/dev/dev/merges/compiz/proposed/compiz.fix_1024304/build$ clang++ -std=c++11 test.cpp -o test.out
In file included from test.cpp:1:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/memory:64:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/bits/allocator.h:48:
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/x86_64-linux-gnu/c++/4.7/bits/c++allocator.h:34:
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/ext/new_allocator.h:110:23: error:
allocating an object of abstract class type 'Foo'
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/bits/alloc_traits.h:256:8: note:
in instantiation of function template specialization
'__gnu_cxx::new_allocator<Foo>::construct<Foo, >' requested here
{ __a.construct(__p, std::forward<_Args>(__args)...); }
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/bits/alloc_traits.h:395:4: note:
in instantiation of function template specialization
'std::allocator_traits<std::allocator<Foo> >::_S_construct<Foo, >'
requested here
{ _S_construct(__a, __p, std::forward<_Args>(__args)...); }
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/bits/shared_ptr_base.h:402:30: note:
in instantiation of function template specialization
'std::allocator_traits<std::allocator<Foo> >::construct<Foo, >' requested
here
allocator_traits<_Alloc>::construct(__a, _M_impl._M_ptr,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/ext/new_allocator.h:110:23: note:
in instantiation of function template specialization
'std::_Sp_counted_ptr_inplace<Foo, std::allocator<Foo>,
1>::_Sp_counted_ptr_inplace<>' requested here
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/bits/alloc_traits.h:256:8: note:
in instantiation of function template specialization
'__gnu_cxx::new_allocator<std::_Sp_counted_ptr_inplace<Foo,
std::allocator<Foo>, 1> >::construct<std::_Sp_counted_ptr_inplace<Foo,
std::allocator<Foo>, 1>, const std::allocator<Foo> >' requested here
{ __a.construct(__p, std::forward<_Args>(__args)...); }
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/bits/alloc_traits.h:395:4: note:
(skipping 2 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see
all)
{ _S_construct(__a, __p, std::forward<_Args>(__args)...); }
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/bits/shared_ptr_base.h:996:14: note:
in instantiation of function template specialization
'std::__shared_count<1>::__shared_count<Foo, std::allocator<Foo>, >'
requested here
: _M_ptr(), _M_refcount(__tag, (_Tp*)0, __a,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/bits/shared_ptr.h:317:4: note:
in instantiation of function template specialization
'std::__shared_ptr<Foo, 1>::__shared_ptr<std::allocator<Foo>, >' requested
here
: __shared_ptr<_Tp>(__tag, __a, std::forward<_Args>(__args)...)
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/bits/shared_ptr.h:598:14: note:
in instantiation of function template specialization
'std::shared_ptr<Foo>::shared_ptr<std::allocator<Foo>, >' requested here
return shared_ptr<_Tp>(_Sp_make_shared_tag(), __a,
^
/usr/bin/../lib/gcc/x86_64-linux-gnu/4.7/../../../../include/c++/4.7/bits/shared_ptr.h:614:14: note:
in instantiation of function template specialization
'std::allocate_shared<Foo, std::allocator<Foo>, >' requested here
return std::allocate_shared<_Tp>(std::allocator<_Tp_nc>(),
^
test.cpp:12:16: note: in instantiation of function template specialization
'std::make_shared<Foo, >' requested here
auto foo = std::make_shared <Foo> ();
^
test.cpp:7:22: note: unimplemented pure virtual method 'bar' in 'Foo'
virtual void bar () = 0;
^
1 error generated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment