Skip to content

Commit a1eff1b

Browse files
committed
Improve compact_optional documentation
1 parent 52bb9a3 commit a1eff1b

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

compact_optional.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ constexpr bool is_enum_value(std::underlying_type_t<T> enum_integral) {
1818
}
1919
return false;
2020
}
21+
/*
22+
A optional for enums that takes the same space as the underlying enum by
23+
using an integer value that doesn't correspond to any enumerator to indicate
24+
the "empty" state.
25+
26+
Requires c++14.
27+
*/
2128

2229
/*
2330
Implementation note: this doesn't exactly implement the subset of the optional

0 commit comments

Comments
 (0)