Skip to content
This repository was archived by the owner on May 3, 2026. It is now read-only.

Commit 465e118

Browse files
committed
add lambda overload
1 parent a567f25 commit 465e118

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

include/common/result.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212

1313
namespace zest {
1414

15+
template<class... Ts>
16+
struct overload : Ts... {
17+
using Ts::operator()...;
18+
19+
consteval void operator()(auto) const {
20+
static_assert(false, "Unsupported type");
21+
}
22+
};
23+
1524
/**
1625
* @brief Base class for custom error types used in the Result class.
1726
*

0 commit comments

Comments
 (0)