mirror of git://gcc.gnu.org/git/gcc.git
2.cc: Add test for non-transparent comparison function.
* testsuite/23_containers/set/operations/2.cc: Add test for non-transparent comparison function. From-SVN: r220107
This commit is contained in:
parent
04385d25c2
commit
c7ac7ddaa9
|
|
@ -1,3 +1,8 @@
|
||||||
|
2015-01-26 Jonathan Wakely <jwakely@redhat.com>
|
||||||
|
|
||||||
|
* testsuite/23_containers/set/operations/2.cc: Add test for
|
||||||
|
non-transparent comparison function.
|
||||||
|
|
||||||
2015-01-25 Oleg Endo <olegendo@gcc.gnu.org>
|
2015-01-25 Oleg Endo <olegendo@gcc.gnu.org>
|
||||||
|
|
||||||
PR target/29366
|
PR target/29366
|
||||||
|
|
|
||||||
|
|
@ -128,6 +128,22 @@ test05()
|
||||||
VERIFY( Cmp::count == 0);
|
VERIFY( Cmp::count == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
test06()
|
||||||
|
{
|
||||||
|
// https://gcc.gnu.org/ml/libstdc++/2015-01/msg00176.html
|
||||||
|
// Verify the new function template overloads do not cause problems
|
||||||
|
// when the comparison function is not transparent.
|
||||||
|
struct I
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
operator int() const { return i; }
|
||||||
|
};
|
||||||
|
|
||||||
|
std::set<int> s;
|
||||||
|
I i = { };
|
||||||
|
s.find(i);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main()
|
main()
|
||||||
|
|
@ -137,4 +153,5 @@ main()
|
||||||
test03();
|
test03();
|
||||||
test04();
|
test04();
|
||||||
test05();
|
test05();
|
||||||
|
test06();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue