[Libreoffice-commits] Revert "sorted_vector: turn Find parameter into template"
Stephan Bergmann
sbergman at redhat.com
Wed Aug 1 23:17:03 PDT 2012
On 08/01/2012 03:01 PM, Michael Stahl wrote:
> commit 8291d41667b1a63d35bf818aaf9d75529e1f12f0
> Author: Michael Stahl <mstahl at redhat.com>
> Date: Wed Aug 1 14:41:43 2012 +0200
>
> 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.
The way to refer to the find_unique template from within the class
definition itself is with o3tl::find_unique. So much for "language design."
Stephan
More information about the LibreOffice
mailing list