Author
anonymous
over 7 years ago
Language
Compiler
Options
Author
anonymous
over 7 years ago
$ prog.cc:10:16: error: no viable constructor or deduction guide for deduction of template arguments of 'optional'
return std::optional{std::ref(y)};
^
/opt/wandbox/clang-head/include/c++/v1/optional:683:41: note: candidate template ignored: couldn't infer template argument '_Tp'
_LIBCPP_INLINE_VISIBILITY constexpr optional(nullopt_t) noexcept {}
^
/opt/wandbox/clang-head/include/c++/v1/optional:689:24: note: candidate template ignored: couldn't infer template argument '_Tp'
constexpr explicit optional(in_place_t, _Args&&... __args)
^
/opt/wandbox/clang-head/include/c++/v1/optional:703:15: note: candidate template ignored: couldn't infer template argument '_Tp'
constexpr optional(_Up&& __v)
^
/opt/wandbox/clang-head/include/c++/v1/optional:710:24: note: candidate template ignored: couldn't infer template argument '_Tp'
constexpr explicit optional(_Up&& __v)
^
/opt/wandbox/clang-head/include/c++/v1/optional:579:7: note: candidate template ignored: could not match 'optional' against 'reference_wrapper'
class optional
^
/opt/wandbox/clang-head/include/c++/v1/optional:681:41: note: candidate template ignored: could not match 'optional' against 'reference_wrapper'
_LIBCPP_INLINE_VISIBILITY constexpr optional(const optional&) = default;
^
/opt/wandbox/clang-head/include/c++/v1/optional:682:41: note: candidate template ignored: could not match 'optional' against 'reference_wrapper'
_LIBCPP_INLINE_VISIBILITY constexpr optional(optional&&) = default;
^
/opt/wandbox/clang-head/include/c++/v1/optional:718:5: note: candidate template ignored: could not match 'optional' against 'reference_wrapper'
optional(const optional<_Up>& __v)
^
/opt/wandbox/clang-head/include/c++/v1/optional:726:14: note: candidate template ignored: could not match 'optional' against 'reference_wrapper'
explicit optional(const optional<_Up>& __v)
^
/opt/wandbox/clang-head/include/c++/v1/optional:736:5: note: candidate template ignored: could not match 'optional' against 'reference_wrapper'
optional(optional<_Up>&& __v)
^
/opt/wandbox/clang-head/include/c++/v1/optional:744:14: note: candidate template ignored: could not match 'optional' against 'reference_wrapper'
explicit optional(optional<_Up>&& __v)
^
/opt/wandbox/clang-head/include/c++/v1/optional:680:41: note: candidate function template not viable: requires 0 arguments, but 1 was provided
_LIBCPP_INLINE_VISIBILITY constexpr optional() noexcept {}
^
/opt/wandbox/clang-head/include/c++/v1/optional:696:24: note: candidate function template not viable: requires at least 2 arguments, but 1 was provided
constexpr explicit optional(in_place_t, initializer_list<_Up> __il, _Args&&... __args)
^
prog.cc:12:10: error: variable has incomplete type 'void'
auto value = job(x);
^
2 errors generated.
Exit Code:
1