Author
anonymous
about 8 years ago
Language
Compiler
Options
Author
anonymous
about 8 years ago
$ In file included from prog.cc:1:
./expected.hpp:598:76: error: exception specification of 'swap' uses itself
std::is_nothrow_move_constructible<T>::value && noexcept( /*std::*/swap( std::declval<T&>(), std::declval<T&>() ) ) &&
^
./expected.hpp:598:76: note: in instantiation of exception specification for 'swap' requested here
./expected.hpp:525:25: note: in instantiation of exception specification for 'swap' requested here
expected( rhs ).swap( *this );
^
prog.cc:9:8: note: in instantiation of member function 'nonstd::expected<int, std::__1::error_code>::operator=' requested here
e2 = e1;
^
In file included from prog.cc:1:
./expected.hpp:598:102: error: too many arguments to function call, expected single argument 'rhs', have 2 arguments
std::is_nothrow_move_constructible<T>::value && noexcept( /*std::*/swap( std::declval<T&>(), std::declval<T&>() ) ) &&
~~~~ ^~~~~~~~~~~~~~~~~~
./expected.hpp:525:25: note: in instantiation of exception specification for 'swap' requested here
expected( rhs ).swap( *this );
^
prog.cc:9:8: note: in instantiation of member function 'nonstd::expected<int, std::__1::error_code>::operator=' requested here
e2 = e1;
^
./expected.hpp:596:5: note: 'swap' declared here
void swap( expected & rhs ) noexcept
^
2 errors generated.
Exit Code:
1