On 08/01/2012 03:01 PM, Michael Stahl wrote:
commit 8291d41667b1a63d35bf818aaf9d75529e1f12f0
Author: Michael Stahl <mstahl@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
Context
- Re: [Libreoffice-commits] Revert "sorted_vector: turn Find parameter into template" · Stephan Bergmann
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.