Wandbox
SettingsLog
SettingsLog
Language
GitHubLogin
Ran/Viewed Log

Author

anonymous

almost 9 years ago

Language

Compiler

Options

Author

anonymous

almost 9 years ago

$
prog.cc: In function 'int main()':
prog.cc:12:28: error: no match for 'operator=' (operand types are 'boost::optional<main()::s>' and '<brace-enclosed initializer list>')
     o = { "hello", "there" };
                            ^
In file included from /opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional.hpp:15:0,
                 from prog.cc:2:
/opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional/optional.hpp:902:5: note: candidate: template<class Expr> typename boost::enable_if<boost::optional_detail::is_optional_val_init_candidate<T, Expr>, boost::optional<T>&>::type boost::optional<T>::operator=(Expr&&) [with Expr = Expr; T = main()::s]
     operator= ( Expr&& expr )
     ^~~~~~~~
/opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional/optional.hpp:902:5: note:   template argument deduction/substitution failed:
prog.cc:12:28: note:   couldn't deduce template parameter 'Expr'
     o = { "hello", "there" };
                            ^
In file included from /opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional.hpp:15:0,
                 from prog.cc:2:
/opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional/optional.hpp:922:15: note: candidate: template<class U> boost::optional<T>& boost::optional<T>::operator=(const boost::optional<U>&) [with U = U; T = main()::s]
     optional& operator= ( optional<U> const& rhs )
               ^~~~~~~~
/opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional/optional.hpp:922:15: note:   template argument deduction/substitution failed:
prog.cc:12:28: note:   couldn't deduce template parameter 'U'
     o = { "hello", "there" };
                            ^
In file included from /opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional.hpp:15:0,
                 from prog.cc:2:
/opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional/optional.hpp:933:15: note: candidate: template<class U> boost::optional<T>& boost::optional<T>::operator=(boost::optional<U>&&) [with U = U; T = main()::s]
     optional& operator= ( optional<U> && rhs )
               ^~~~~~~~
/opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional/optional.hpp:933:15: note:   template argument deduction/substitution failed:
prog.cc:12:28: note:   couldn't deduce template parameter 'U'
     o = { "hello", "there" };
                            ^
In file included from /opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional.hpp:15:0,
                 from prog.cc:2:
/opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional/optional.hpp:943:15: note: candidate: boost::optional<T>& boost::optional<T>::operator=(const boost::optional<T>&) [with T = main()::s]
     optional& operator= ( optional const& rhs )
               ^~~~~~~~
/opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional/optional.hpp:943:15: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const boost::optional<main()::s>&'
/opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional/optional.hpp:951:15: note: candidate: boost::optional<T>& boost::optional<T>::operator=(boost::optional<T>&&) [with T = main()::s]
     optional& operator= ( optional && rhs )
               ^~~~~~~~
/opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional/optional.hpp:951:15: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'boost::optional<main()::s>&&'
/opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional/optional.hpp:964:5: note: candidate: template<class T_> typename boost::enable_if<boost::is_same<T, typename boost::decay<T_>::type>, boost::optional<T>&>::type boost::optional<T>::operator=(T_&&) [with T_ = T_; T = main()::s]
     operator= ( T_&& val )
     ^~~~~~~~
/opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional/optional.hpp:964:5: note:   template argument deduction/substitution failed:
prog.cc:12:28: note:   couldn't deduce template parameter 'T_'
     o = { "hello", "there" };
                            ^
In file included from /opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional.hpp:15:0,
                 from prog.cc:2:
/opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional/optional.hpp:994:15: note: candidate: boost::optional<T>& boost::optional<T>::operator=(boost::none_t) [with T = main()::s]
     optional& operator= ( none_t none_ ) BOOST_NOEXCEPT
               ^~~~~~~~
/opt/wandbox/boost-1.63.0/gcc-head/include/boost/optional/optional.hpp:994:15: note:   no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'boost::none_t'
Exit Code:
1