summaryrefslogtreecommitdiff
path: root/o3tl/qa
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-08-01 14:41:43 +0200
committerMichael Stahl <mstahl@redhat.com>2012-08-01 14:59:10 +0200
commit8291d41667b1a63d35bf818aaf9d75529e1f12f0 (patch)
treef1464de3451cd79a5cc5837a5b028e580fe1b3b1 /o3tl/qa
parent7e579295c8c07998d7e077fa7e1db24745726e5f (diff)
Revert "sorted_vector: turn Find parameter into template"
This reverts commit 3e3acee762fac71f7356ed1305a64e0278278081. It was a nice idea, but C++ is not yet ready for it; with the travesty of parametric polymorphism in C++ the find_unique inside the definition of find_unique actually refers to find_unique<Value, Compare>, so there is no way to actually refer to template<Value, Compare> find_unique inside its definition. Thanks to Luboš Luňák for explaining the problem to me. Somehow this does work in GCC 4.7 even with -std=c++98, likely by accident.
Diffstat (limited to 'o3tl/qa')
-rw-r--r--o3tl/qa/test-sorted_vector.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/o3tl/qa/test-sorted_vector.cxx b/o3tl/qa/test-sorted_vector.cxx
index 8e9e719f2c1d..1b321c91a2a4 100644
--- a/o3tl/qa/test-sorted_vector.cxx
+++ b/o3tl/qa/test-sorted_vector.cxx
@@ -136,7 +136,8 @@ public:
void testBasics_FindPtr()
{
o3tl::sorted_vector<SwContent*, o3tl::less_ptr_to<SwContent>,
- o3tl::find_partialorder_ptrequals> aVec;
+ o3tl::find_partialorder_ptrequals<SwContent*,
+ o3tl::less_ptr_to<SwContent> > > aVec;
SwContent *p1 = new SwContent(1);
SwContent *p2 = new SwContent(2);
SwContent *p2_2 = new SwContent(2);
@@ -194,7 +195,8 @@ public:
void testErase_FindPtr()
{
o3tl::sorted_vector<SwContent*, o3tl::less_ptr_to<SwContent>,
- o3tl::find_partialorder_ptrequals> aVec;
+ o3tl::find_partialorder_ptrequals<SwContent*,
+ o3tl::less_ptr_to<SwContent> > > aVec;
SwContent *p1 = new SwContent(1);
SwContent *p1_2 = new SwContent(1);
SwContent *p1_3 = new SwContent(1);