Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
drexlerd committed Aug 27, 2024
1 parent c39b4c4 commit 92424d8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions include/flatmemory/details/types/optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,22 @@ struct Optional : public NonTrivialType
Optional(const Optional& other) {}
};

template<IsTriviallyCopyable T>
struct Optional<T> : public NonTrivialType
{
/// @brief Non-trivial copy-constructor
/// @param other
Optional(const Optional& other) {}
};

template<IsNonTrivialType T>
struct Optional<T> : public NonTrivialType
{
/// @brief Non-trivial copy-constructor
/// @param other
Optional(const Optional& other) {}
};

/**
* Layout
*/
Expand Down

0 comments on commit 92424d8

Please sign in to comment.