summaryrefslogtreecommitdiff
path: root/src/compat/option.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/compat/option.hpp')
-rw-r--r--src/compat/option.hpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compat/option.hpp b/src/compat/option.hpp
index b6e7655..b462261 100644
--- a/src/compat/option.hpp
+++ b/src/compat/option.hpp
@@ -425,7 +425,7 @@ namespace option
#define OMATCH_BEGIN(expr) \
{ \
auto&& _omatch_var = (expr); \
- switch (_omatch_var.is_some()) \
+ switch (_omatch_var.is_some() ? 1 : 0) \
{ \
{ \
{ \
@@ -448,7 +448,7 @@ namespace option
break; \
} \
{ \
- case true: \
+ case 1: \
{ \
auto&& var = *_omatch_var.ptr_or(nullptr); \
/*}}}}*/
@@ -458,7 +458,7 @@ namespace option
break; \
} \
{ \
- case false: \
+ case 0: \
{ \
/*}}}}*/
} // namespace option