Skip to content

Instantly share code, notes, and snippets.

/clang.log Secret

Created January 15, 2016 11:22
Show Gist options
  • Save anonymous/3e72754a7615162280fb to your computer and use it in GitHub Desktop.
Save anonymous/3e72754a7615162280fb to your computer and use it in GitHub Desktop.
error: no matching constructor for initialization of 'use_arg'
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: in instantiation of function template specialization '__gnu_cxx::new_allocator<use_arg>::construct<use_arg, int, std::scoped_allocator_adaptor<std::allocator<use_arg>> &>' requested here
{ __a.construct(__p, std::forward<_Args>(__args)...); }
^
note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<use_arg> >::construct<use_arg, int, std::scoped_allocator_adaptor<std::allocator<use_arg>> &>' requested here
_O_traits::construct(__outermost(*this), __p,
^
note: in instantiation of function template specialization 'std::scoped_allocator_adaptor<std::allocator<use_arg>>::_M_construct<use_arg, int>' requested here
_M_construct(__use_tag, __p, std::forward<_Args>(__args)...);
^
note: in instantiation of function template specialization 'std::scoped_allocator_adaptor<std::allocator<use_arg>>::construct<use_arg, int>' requested here
sa.construct(p, 4);
^
note: candidate constructor template not viable: requires 3 arguments, but 2 were provided
use_arg(std::allocator_arg_t, Alloc &, int i)
^
note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
struct use_arg {
^
note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided
1 error generated.
In instantiation of ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = use_arg; _Args = {int, std::scoped_allocator_adaptor<std::allocator<use_arg> >&}; _Tp = use_arg]’:
required from ‘static std::_Require<typename std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::type> std::allocator_traits<_Alloc>::_S_construct(_Alloc&, _Tp*, _Args&& ...) [with _Tp = use_arg; _Args = {int, std::scoped_allocator_adaptor<std::allocator<use_arg> >&}; _Alloc = std::allocator<use_arg>; std::_Require<typename std::allocator_traits<_Alloc>::__construct_helper<_Tp, _Args>::type> = void]’
required from ‘static decltype (_S_construct(__a, __p, (forward<_Args>)(std::allocator_traits::construct::__args)...)) std::allocator_traits<_Alloc>::construct(_Alloc&, _Tp*, _Args&& ...) [with _Tp = use_arg; _Args = {int, std::scoped_allocator_adaptor<std::allocator<use_arg> >&}; _Alloc = std::allocator<use_arg>; decltype (_S_construct(__a, __p, (forward<_Args>)(std::allocator_traits::construct::__args)...)) = <type error>]’
required from ‘void std::scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs>::_M_construct(std::scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs>::__uses_alloc2_, _Tp*, _Args&& ...) [with _Tp = use_arg; _Args = {int}; _OuterAlloc = std::allocator<use_arg>; _InnerAllocs = {}; std::scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs>::__uses_alloc2_ = std::__uses_alloc2<std::scoped_allocator_adaptor<std::allocator<use_arg> > >; typename std::__inner_type_impl<_OuterAlloc, _InnerAllocs ...>::__type = std::scoped_allocator_adaptor<std::allocator<use_arg> >]’
required from ‘void std::scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs>::construct(_Tp*, _Args&& ...) [with _Tp = use_arg; _Args = {int}; _OuterAlloc = std::allocator<use_arg>; _InnerAllocs = {}]’
错误:对‘use_arg::use_arg(int, std::scoped_allocator_adaptor<std::allocator<use_arg> >&)’的调用没有匹配的函数
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^
附注:candidate: template<class Alloc> use_arg::use_arg(std::allocator_arg_t, Alloc&, int)
use_arg(std::allocator_arg_t, Alloc &, int i)
^
附注: template argument deduction/substitution failed:
附注: cannot convert ‘std::forward<int>((* & __args#0))’ (type ‘int’) to type ‘std::allocator_arg_t’
{ ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
^
附注:candidate: constexpr use_arg::use_arg(const use_arg&)
struct use_arg {
^
附注: 备选需要 1 实参,但提供了 2 个
附注:candidate: constexpr use_arg::use_arg(use_arg&&)
附注: 备选需要 1 实参,但提供了 2 个
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment