mirror of
https://github.com/boostorg/container.git
synced 2025-08-02 14:04:26 +02:00
Update changelog and test function for GitHub #81 ("Vector with custom allocator does not support value types with operator&")
This commit is contained in:
@@ -1254,6 +1254,7 @@ use [*Boost.Container]? There are several reasons for that:
|
|||||||
* Fixed bugs:
|
* Fixed bugs:
|
||||||
* [@https://github.com/boostorg/container/issues/77 GitHub #77: ['"warning: 'sbrk' is deprecated"]].
|
* [@https://github.com/boostorg/container/issues/77 GitHub #77: ['"warning: 'sbrk' is deprecated"]].
|
||||||
* [@https://github.com/boostorg/container/issues/79 GitHub #79: ['"Mark small_vector move operations noexcept"]].
|
* [@https://github.com/boostorg/container/issues/79 GitHub #79: ['"Mark small_vector move operations noexcept"]].
|
||||||
|
* [@https://github.com/boostorg/container/issues/81 GitHub #81: ['"Vector with custom allocator does not support value types with operator&"]].
|
||||||
* [@https://github.com/boostorg/container/issues/82 GitHub #82: ['"Function definition in header file"]].
|
* [@https://github.com/boostorg/container/issues/82 GitHub #82: ['"Function definition in header file"]].
|
||||||
* [@https://github.com/boostorg/container/issues/83 GitHub #83: ['"Iterator zero incrementing leads to assert on empty vector"]].
|
* [@https://github.com/boostorg/container/issues/83 GitHub #83: ['"Iterator zero incrementing leads to assert on empty vector"]].
|
||||||
* [@https://github.com/boostorg/container/pull/84 GitHub #84: ['"Allow vector to be assigned to itself"]].
|
* [@https://github.com/boostorg/container/pull/84 GitHub #84: ['"Allow vector to be assigned to itself"]].
|
||||||
|
@@ -56,6 +56,29 @@ int test_expand_bwd()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct X;
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
struct XRef
|
||||||
|
{
|
||||||
|
explicit XRef(T* ptr) noexcept : ptr(ptr) {}
|
||||||
|
operator T*() const noexcept { return ptr; }
|
||||||
|
T* ptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct X
|
||||||
|
{
|
||||||
|
XRef<X const> operator&() const noexcept { return XRef<X const>(this); }
|
||||||
|
XRef<X> operator&() noexcept { return XRef<X>(this); }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
bool test_smart_ref_type()
|
||||||
|
{
|
||||||
|
boost::container::vector<X> x(5);
|
||||||
|
return x.empty();
|
||||||
|
}
|
||||||
|
|
||||||
class recursive_vector
|
class recursive_vector
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -184,6 +207,9 @@ int main()
|
|||||||
v.push_back(Test());
|
v.push_back(Test());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (test_smart_ref_type())
|
||||||
|
return 1;
|
||||||
|
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
// Backwards expansion test
|
// Backwards expansion test
|
||||||
////////////////////////////////////
|
////////////////////////////////////
|
||||||
|
Reference in New Issue
Block a user