Author
anonymous
almost 8 years ago
Language
Compiler
Options
Author
anonymous
almost 8 years ago
$
prog.cc: In function 'int main()':
prog.cc:5:41: error: no matching function for call to 'std::unique_ptr<int, void (*)(int*)>::unique_ptr()'
std::unique_ptr<int, void(*)(int*)> empty;
^~~~~
In file included from /opt/wandbox/gcc-head/include/c++/8.0.0/memory:80:0,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/8.0.0/bits/unique_ptr.h:265:2: note: candidate: 'template<class _Up, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(std::auto_ptr<_Up>&&)'
unique_ptr(auto_ptr<_Up>&& __u) noexcept;
^~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.0/bits/unique_ptr.h:265:2: note: template argument deduction/substitution failed:
prog.cc:5:41: note: candidate expects 1 argument, 0 provided
std::unique_ptr<int, void(*)(int*)> empty;
^~~~~
In file included from /opt/wandbox/gcc-head/include/c++/8.0.0/memory:80:0,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/8.0.0/bits/unique_ptr.h:255:2: note: candidate: 'template<class _Up, class _Ep, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Up, _Ep>&&)'
unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
^~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.0/bits/unique_ptr.h:255:2: note: template argument deduction/substitution failed:
prog.cc:5:41: note: candidate expects 1 argument, 0 provided
std::unique_ptr<int, void(*)(int*)> empty;
^~~~~
In file included from /opt/wandbox/gcc-head/include/c++/8.0.0/memory:80:0,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/8.0.0/bits/unique_ptr.h:241:7: note: candidate: 'std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Tp, _Dp>&&) [with _Tp = int; _Dp = void (*)(int*)]'
unique_ptr(unique_ptr&& __u) noexcept
^~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.0/bits/unique_ptr.h:241:7: note: candidate expects 1 argument, 0 provided
/opt/wandbox/gcc-head/include/c++/8.0.0/bits/unique_ptr.h:236:12: note: candidate: 'template<class _Up, class> constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr(std::nullptr_t)'
constexpr unique_ptr(nullptr_t) noexcept : unique_ptr() { }
^~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.0/bits/unique_ptr.h:236:12: note: template argument deduction/substitution failed:
prog.cc:5:41: note: candidate expects 1 argument, 0 provided
std::unique_ptr<int, void(*)(int*)> empty;
^~~~~
In file included from /opt/wandbox/gcc-head/include/c++/8.0.0/memory:80:0,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/8.0.0/bits/unique_ptr.h:227:7: note: candidate: 'std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Tp, _Dp>::pointer, typename std::remove_reference<_Dp>::type&&) [with _Tp = int; _Dp = void (*)(int*); std::unique_ptr<_Tp, _Dp>::pointer = int*; typename std::remove_reference<_Dp>::type = void (*)(int*)]'
unique_ptr(pointer __p,
^~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.0/bits/unique_ptr.h:227:7: note: candidate expects 2 arguments, 0 provided
/opt/wandbox/gcc-head/include/c++/8.0.0/bits/unique_ptr.h:215:7: note: candidate: 'std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Tp, _Dp>::pointer, typename std::conditional<std::is_reference<_Dp>::value, _Dp, const _Dp&>::type) [with _Tp = int; _Dp = void (*)(int*); std::unique_ptr<_Tp, _Dp>::pointer = int*; typename std::conditional<std::is_reference<_Dp>::value, _Dp, const _Dp&>::type = void (* const&)(int*)]'
unique_ptr(pointer __p,
^~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.0/bits/unique_ptr.h:215:7: note: candidate expects 2 arguments, 0 provided
/opt/wandbox/gcc-head/include/c++/8.0.0/bits/unique_ptr.h:204:2: note: candidate: 'template<class _Up, class> std::unique_ptr<_Tp, _Dp>::unique_ptr(std::unique_ptr<_Tp, _Dp>::pointer)'
unique_ptr(pointer __p) noexcept
^~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.0/bits/unique_ptr.h:204:2: note: template argument deduction/substitution failed:
prog.cc:5:41: note: candidate expects 1 argument, 0 provided
std::unique_ptr<int, void(*)(int*)> empty;
^~~~~
In file included from /opt/wandbox/gcc-head/include/c++/8.0.0/memory:80:0,
from prog.cc:1:
/opt/wandbox/gcc-head/include/c++/8.0.0/bits/unique_ptr.h:191:12: note: candidate: 'template<class _Up, class> constexpr std::unique_ptr<_Tp, _Dp>::unique_ptr()'
constexpr unique_ptr() noexcept
^~~~~~~~~~
/opt/wandbox/gcc-head/include/c++/8.0.0/bits/unique_ptr.h:191:12: note: template argument deduction/substitution failed:
Exit Code:
1