mirror of
https://git.busybox.net/uClibc++
synced 2025-12-20 01:00:37 +08:00
tests: tweak utilitytest
in c++-11 and later, pair's move constructor makes d deleted so cannot be used. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
This commit is contained in:
@@ -191,15 +191,17 @@ bool checkpair_opsCopyConstructor(){
|
||||
b = std::pair<char, int>('b', 61473);
|
||||
|
||||
std::pair<char, int> c(b);
|
||||
|
||||
|
||||
return c.first == 'b' && c.second == 61473;
|
||||
}
|
||||
bool checkpair_opsReplacementAssignment(){
|
||||
std::pair<Foo, Foo> d = std::pair<Foo, Foo>(5, 18);
|
||||
std::pair<Foo, Foo> e(d);
|
||||
|
||||
#if __cplusplus < 201103L
|
||||
/* no move, so not deleted */
|
||||
e = d;
|
||||
|
||||
#endif
|
||||
return e.first == 5 && e.second == 18;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user