Skip to content

Commit

Permalink
Add in_place constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanley Pinchak committed Apr 2, 2022
1 parent 020be1e commit 33cc288
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion include/NamedType/named_type_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ class FLUENT_EBCO NamedType : public Skills<NamedType<T, Parameter, Skills...>>.
{
return value_;
}

template <typename... Args>
constexpr NamedType(in_place_t tag, Args&&... args) noexcept(std::is_nothrow_constructible<T>::value): value_(std::forward<Args>(args)...)
{
}
FLUENT_NODISCARD constexpr std::remove_reference_t<T> const& get() const noexcept
{
return value_;
Expand Down

0 comments on commit 33cc288

Please sign in to comment.