mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-09 23:24:02 +00:00
[test][util][range] Fix compilation errors on some platforms.
This commit is contained in:
parent
daf32ffbfe
commit
0ecda93787
@ -65,7 +65,7 @@ struct NonMovable
|
||||
NonMovable(int ii = 0) : i(ii) {}
|
||||
NonMovable(NonMovable const& ii) : i(ii.i) {}
|
||||
NonMovable & operator=(NonMovable const& ii) { i = ii.i; return *this; }
|
||||
operator int() { return i; }
|
||||
bool operator==(NonMovable const& ii) const { return i == ii.i; }
|
||||
int i;
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
private:
|
||||
@ -79,7 +79,7 @@ struct CopyableAndMovable
|
||||
CopyableAndMovable(int ii = 0) : i(ii) {}
|
||||
CopyableAndMovable(CopyableAndMovable const& ii) : i(ii.i) {}
|
||||
CopyableAndMovable & operator=(CopyableAndMovable const& ii) { i = ii.i; return *this; }
|
||||
operator int() { return i; }
|
||||
bool operator==(CopyableAndMovable const& ii) const { return i == ii.i; }
|
||||
int i;
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
CopyableAndMovable(CopyableAndMovable && ii) : i(std::move(ii.i)) {}
|
||||
@ -197,7 +197,7 @@ void test_detail()
|
||||
|
||||
// Storing pointers in a std::vector is not possible in MinGW C++98
|
||||
#if __cplusplus >= 201103L
|
||||
std::vector<bgt::NonMovable*> v2(10, 0);
|
||||
std::vector<bgt::NonMovable*> v2(10, (bgt::NonMovable*)NULL);
|
||||
bgr::detail::copy_or_move(v2.begin() + 1, v2.begin() + 10, v2.begin());
|
||||
BOOST_CHECK(boost::size(v2) == 10);
|
||||
bgr::erase(v2, v2.begin() + 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user