boostorg / leaf

Lightweight Error Augmentation Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should leaf::result::value_type be public?

Snarpix opened this issue · comments

Currently I have to use
std::remove_reference_t<decltype(std::declval<Result>().value())>
which is not ideal.

result<int &>::value_type is int. Would this be correct in your use case, or should it be int &?

It should be int&, exactly as type parameter of result template.
In my workaround it will be handled incorrectly, because I don't care about cv/ref.