Skip to content

Commit

Permalink
Using = default for tag constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
OleErikPeistorpet committed May 26, 2024
1 parent d955753 commit def2962
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ std::unique_ptr<T> make_unique_for_overwrite(size_t count)
//! Tag to select a constructor that allocates storage without filling it with objects
struct reserve_tag
{
explicit constexpr reserve_tag() {}
explicit reserve_tag() = default;
};
inline constexpr reserve_tag reserve; //!< An instance of reserve_tag for convenience

//! Tag to specify default initialization
struct for_overwrite_t
{
explicit constexpr for_overwrite_t() {}
explicit for_overwrite_t() = default;
};
inline constexpr for_overwrite_t for_overwrite; //!< An instance of for_overwrite_t for convenience

Expand Down

0 comments on commit def2962

Please sign in to comment.