[Bug 75757] remove inheritance to std::map and std::vector

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Feb 24 12:11:19 PST 2015


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

--- Comment #56 from Matteo Casalin <matteo.casalin at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20150224/1a61fc32/attachment.html>


More information about the LibreOffice mailing list