diff options
Diffstat (limited to 'toolsrc/include')
| -rw-r--r-- | toolsrc/include/vcpkg/base/optional.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/toolsrc/include/vcpkg/base/optional.h b/toolsrc/include/vcpkg/base/optional.h index aa9e480fd..af2d297a6 100644 --- a/toolsrc/include/vcpkg/base/optional.h +++ b/toolsrc/include/vcpkg/base/optional.h @@ -53,10 +53,8 @@ namespace vcpkg // Constructors are intentionally implicit constexpr Optional(NullOpt) {} - Optional(const T& t) : m_base(t) {} - - template<class = std::enable_if_t<!std::is_reference<T>::value>> - Optional(T&& t) : m_base(std::move(t)) + template<class U> + Optional(U&& t) : m_base(std::forward<U>(t)) { } |
