We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85b131c commit a597970Copy full SHA for a597970
include/common/result.hpp
@@ -14,6 +14,7 @@ namespace zest {
14
* @tparam E "error" type
15
*/
16
template<typename T, typename E>
17
+ requires(!std::convertible_to<T, E>) && (!std::convertible_to<E, T>)
18
class Result {
19
public:
20
using ErrorT = E;
@@ -56,6 +57,7 @@ class Result {
56
57
* - T must be default initializable
58
59
template<typename F>
60
+ requires std::constructible_from<E, F&&>
61
constexpr Result(F&& error)
62
requires std::default_initializable<T>
63
: error(std::forward<F>(error)) {}
0 commit comments