Changeset View
Changeset View
Standalone View
Standalone View
test/std/re/re.results/re.results.const/copy_assign.pass.cpp
Show All 20 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 = m0; | m1 = m0; | ||||
assert(m1.size() == m0.size()); | assert(m1.size() == m0.size()); | ||||
assert(m1.str() == m0.str()); | assert(!m1.ready() || !m0.ready() || m1.str() == m0.str()); | ||||
if (std::allocator_traits<Allocator>::propagate_on_container_copy_assignment::value) | if (std::allocator_traits<Allocator>::propagate_on_container_copy_assignment::value) | ||||
assert(m1.get_allocator() == m0.get_allocator()); | assert(m1.get_allocator() == m0.get_allocator()); | ||||
else | else | ||||
assert(m1.get_allocator() == Allocator()); | assert(m1.get_allocator() == Allocator()); | ||||
} | } | ||||
int main(int, char**) | int main(int, char**) | ||||
{ | { | ||||
Show All 13 Lines |