Run Code  | API  | Code Wall  | Misc  | Feedback  | Login  | Theme  | Privacy  | Patreon 

gcc 4.9.3 enable_shared_from_this

Language: Layout:
+ ] Compiler args + ] Show input
Compilation time: 0.32 sec, absolute service time: 0,43 sec 
fork mode |  history
Error(s):
In file included from /usr/include/c++/4.9/bits/shared_ptr.h:52:0,
                 from /usr/include/c++/4.9/memory:82,
                 from source_file.cpp:4:
/usr/include/c++/4.9/bits/shared_ptr_base.h: In instantiation of ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<Derived>; _Args = {}; _Tp = Derived; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2u]’:
/usr/include/c++/4.9/bits/shared_ptr.h:316:64:   required from ‘std::shared_ptr<_Tp>::shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...) [with _Alloc = std::allocator<Derived>; _Args = {}; _Tp = Derived]’
/usr/include/c++/4.9/bits/shared_ptr.h:588:39:   required from ‘std::shared_ptr<_Tp1> std::allocate_shared(const _Alloc&, _Args&& ...) [with _Tp = Derived; _Alloc = std::allocator<Derived>; _Args = {}]’
/usr/include/c++/4.9/bits/shared_ptr.h:604:42:   required from ‘std::shared_ptr<_Tp1> std::make_shared(_Args&& ...) [with _Tp = Derived; _Args = {}]’
source_file.cpp:25:44:   required from here
/usr/include/c++/4.9/bits/shared_ptr_base.h:1096:64: error: call of overloaded ‘__enable_shared_from_this_helper(std::__shared_count<>&, Derived*&, Derived*&)’ is ambiguous
    __enable_shared_from_this_helper(_M_refcount, _M_ptr, _M_ptr);
                                                                ^
/usr/include/c++/4.9/bits/shared_ptr_base.h:1096:64: note: candidates are:
/usr/include/c++/4.9/bits/shared_ptr_base.h:855:5: note: void std::__enable_shared_from_this_helper(const std::__shared_count<_Lp>&, ...) [with __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2u]
     __enable_shared_from_this_helper(const __shared_count<_Lp>&, ...) noexcept
     ^
In file included from /usr/include/c++/4.9/memory:82:0,
                 from source_file.cpp:4:
/usr/include/c++/4.9/bits/shared_ptr.h:561:2: note: void std::__enable_shared_from_this_helper(const std::__shared_count<>&, const std::enable_shared_from_this<_Tp>*, const _Tp1*) [with _Tp1 = Derived; _Tp = Base2]
  __enable_shared_from_this_helper(const __shared_count<>& __pn,
  ^
/usr/include/c++/4.9/bits/shared_ptr.h:561:2: note: void std::__enable_shared_from_this_helper(const std::__shared_count<>&, const std::enable_shared_from_this<_Tp>*, const _Tp1*) [with _Tp1 = Derived; _Tp = Base1]

        

    
                
λ
.NET NoSQL database for rapid development