diff --git a/test/optional_test_deleted_default_ctor.cpp b/test/optional_test_deleted_default_ctor.cpp index 523908f..e98b381 100644 --- a/test/optional_test_deleted_default_ctor.cpp +++ b/test/optional_test_deleted_default_ctor.cpp @@ -15,25 +15,29 @@ int main() #else #include +#include -template struct pair +class basic_multi_buffer; + +class const_buffers_type { - T1 first; - T2 second; + basic_multi_buffer const* b_; - pair(): first(), second() - { - } -}; + friend class basic_multi_buffer; -struct A -{ - A() = delete; + explicit + const_buffers_type(basic_multi_buffer const& b); + +public: + + const_buffers_type() = delete; + const_buffers_type(const_buffers_type const&) = default; + const_buffers_type& operator=(const_buffers_type const&) = default; }; int main() { - boost::optional< pair > opt, opt2; + boost::optional< std::pair > opt, opt2; opt = opt2; }