forked from boostorg/optional
Try to make the test closer to the failing case in Beast
This commit is contained in:
committed by
Andrzej Krzemienski
parent
9e0726cee1
commit
ebef3ed6f7
@ -15,25 +15,29 @@ int main()
|
|||||||
#else
|
#else
|
||||||
|
|
||||||
#include <boost/optional.hpp>
|
#include <boost/optional.hpp>
|
||||||
|
#include <utility>
|
||||||
|
|
||||||
template<class T1, class T2> struct pair
|
class basic_multi_buffer;
|
||||||
|
|
||||||
|
class const_buffers_type
|
||||||
{
|
{
|
||||||
T1 first;
|
basic_multi_buffer const* b_;
|
||||||
T2 second;
|
|
||||||
|
|
||||||
pair(): first(), second()
|
friend class basic_multi_buffer;
|
||||||
{
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
struct A
|
explicit
|
||||||
{
|
const_buffers_type(basic_multi_buffer const& b);
|
||||||
A() = delete;
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
const_buffers_type() = delete;
|
||||||
|
const_buffers_type(const_buffers_type const&) = default;
|
||||||
|
const_buffers_type& operator=(const_buffers_type const&) = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
boost::optional< pair<A, int> > opt, opt2;
|
boost::optional< std::pair<const_buffers_type, int> > opt, opt2;
|
||||||
opt = opt2;
|
opt = opt2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user