Skip to content

Commit

Permalink
add optional class default ctor
Browse files Browse the repository at this point in the history
  • Loading branch information
mguludag committed Jul 16, 2023
1 parent 8c9bf9f commit d36c5b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/enum_name.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ class optional {
public:
MG_ENUM_NAME_CNSTXPR inline optional(nullopt_t&)
: dummy_{0}, has_value_{false} {}
MG_ENUM_NAME_CNSTXPR inline optional()
: dummy_{0}, has_value_{false} {}
template <typename... Args>
MG_ENUM_NAME_CNSTXPR inline optional(Args&&... args)
: value_{T{std::forward<Args>(args)...}}, has_value_{true} {}
Expand Down

0 comments on commit d36c5b2

Please sign in to comment.