Changeset View
Changeset View
Standalone View
Standalone View
test/std/re/re.results/re.results.const/move_assign.pass.cpp
Show All 21 Lines | |||||
void | void | ||||
test(const Allocator& a) | test(const Allocator& a) | ||||
{ | { | ||||
typedef std::match_results<const CharT*, Allocator> SM; | typedef std::match_results<const CharT*, Allocator> SM; | ||||
SM m0(a); | SM m0(a); | ||||
SM m1; | SM m1; | ||||
m1 = std::move(m0); | m1 = std::move(m0); | ||||
assert(m1.size() == 0); | assert(m1.size() == 0); | ||||
assert(m1.str() == std::basic_string<CharT>()); | assert(!m1.ready() || m1.str() == std::basic_string<CharT>()); | ||||
if (std::allocator_traits<Allocator>::propagate_on_container_move_assignment::value) | if (std::allocator_traits<Allocator>::propagate_on_container_move_assignment::value) | ||||
assert(m1.get_allocator() == a); | assert(m1.get_allocator() == a); | ||||
else | else | ||||
assert(m1.get_allocator() == Allocator()); | assert(m1.get_allocator() == Allocator()); | ||||
} | } | ||||
int main(int, char**) | int main(int, char**) | ||||
{ | { | ||||
Show All 13 Lines |