Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


https://bugs.documentfoundation.org/show_bug.cgi?id=75757

--- Comment #56 from Matteo Casalin <matteo.casalin@yahoo.com> ---
I was wondering: would private inheritance at the same time limit the public
interface and allow us to use C++11 aliases, saving some coding?

From example (sw/inc/swregion.hxx):


typedef std::vector<SwRect> SwRects;

class SwRegionRects : public SwRects


could become


typedef std::vector<SwRect> SwRects;

class SwRegionRects : private SwRects
{
...
public:

    // only use a limited interface from SwRects
    using SwRects::size_type;
    using SwRects::operator[];
    using SwRects::size;
    using SwRects::empty;
    using SwRects::assign;
    using SwRects::begin;
    using SwRects::end;

...

Would this work?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Context


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.