Skip to content
Snippets Groups Projects
Commit e88368df authored by Simon Praetorius's avatar Simon Praetorius
Browse files

Merge branch 'issue/copyable-optional-move-constructor' into 'master'

Simplify the move constructor of CopyableOptional

See merge request !1190
parents a26e3374 5ccce993
Branches
Tags
1 merge request!1190Simplify the move constructor of CopyableOptional
Pipeline #55145 passed
Pipeline: Dune Nightly Test

#55150

    ......@@ -91,12 +91,10 @@ public:
    constexpr CopyableOptional (const CopyableOptional&) = default;
    /// \brief Move construct the contained value
    template <class T = Type,
    std::enable_if_t<std::is_move_constructible_v<T>, int> = 0>
    constexpr CopyableOptional (CopyableOptional&& that)
    noexcept(std::is_nothrow_move_constructible<T>::value)
    : Base{std::move(that)}
    {}
    constexpr CopyableOptional (CopyableOptional&&) = default;
    /// \brief Default destructor
    ~CopyableOptional () = default;
    /// \brief Copy assignment in terms of copy constructor
    constexpr CopyableOptional& operator= (const CopyableOptional& that)
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment