Closed hrobeers closed 9 years ago
What I see in the repository line 1006 is
BOOST_EXPECTED_CONSTEXPR_IF_MOVE_ACCESSORS value_type&& value() &&
{
if (!valid()) error::rethrow<error_type>(contained_err());
return std::move(contained_val());
}
``
Hi viboes,
The following piece of code triggers the compilation error on line 54 of unexpected.hpp:
#include <string>
#include "boost/expected/expected.hpp"
using namespace std;
using namespace boost;
int main()
{
expected<string, int> exp = make_unexpected(5);
if (!exp)
return exp.get_unexpected().value();
return 0;
}
Please, could you update with
https://github.com/ptal/expected/commit/d79715f84e5223ca5ee7fb6a6d1b068204e0e350
Thanks for the fast reaction. Issue is fixed!
Thanks to you for catching this error.
GCC comiple error when using int as unexpected type.
commenting out:
in unexpected.hpp fixes the issue, but is not optimal.