Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 8 years ago

Language

Compiler

Options

Author

anonymous

almost 8 years ago

$
prog.cc:5:41: error: no matching constructor for initialization of 'std::unique_ptr<int, void (*)(int *)>'
    std::unique_ptr<int, void(*)(int*)> empty;
                                        ^
/opt/wandbox/clang-head/include/c++/v1/memory:2327:26: note: candidate template ignored: disabled by 'enable_if' [with _Dummy = true]
      typename enable_if<is_default_constructible<_Deleter>::value &&
                         ^
/opt/wandbox/clang-head/include/c++/v1/memory:2360:13: note: candidate constructor template not viable: requires 1 argument, but 0 were provided
  constexpr unique_ptr(nullptr_t) noexcept : __ptr_(pointer()) {}
            ^
/opt/wandbox/clang-head/include/c++/v1/memory:2365:12: note: candidate constructor template not viable: requires single argument '__p', but no arguments were provided
  explicit unique_ptr(pointer __p) noexcept : __ptr_(__p) {}
           ^
/opt/wandbox/clang-head/include/c++/v1/memory:2370:3: note: candidate constructor template not viable: requires 2 arguments, but 0 were provided
  unique_ptr(pointer __p, _LValRefType<_Dummy> __d) noexcept
  ^
/opt/wandbox/clang-head/include/c++/v1/memory:2376:3: note: candidate constructor template not viable: requires 2 arguments, but 0 were provided
  unique_ptr(pointer __p, _GoodRValRefType<_Dummy> __d) noexcept
  ^
/opt/wandbox/clang-head/include/c++/v1/memory:2385:3: note: candidate constructor template not viable: requires 2 arguments, but 0 were provided
  unique_ptr(pointer __p, _BadRValRefType<_Dummy> __d) = delete;
  ^
/opt/wandbox/clang-head/include/c++/v1/memory:2397:3: note: candidate constructor template not viable: requires single argument '__u', but no arguments were provided
  unique_ptr(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT
  ^
/opt/wandbox/clang-head/include/c++/v1/memory:2388:3: note: candidate constructor not viable: requires single argument '__u', but no arguments were provided
  unique_ptr(unique_ptr&& __u) noexcept
  ^
/opt/wandbox/clang-head/include/c++/v1/memory:2295:28: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided
class _LIBCPP_TEMPLATE_VIS unique_ptr {
                           ^
1 error generated.
Exit Code:
1