#1 patch for "SuperSubclass"

closed
nobody
None
5
2005-07-27
2002-10-30
Anonymous
No

Hi. I would like to submit a two-line Loki patch, to be appended to the definition of "SuperSubclass" in file "TypeManip.h" for all platforms:

// Dummy data member to make sure that both classes are fully defined.

char dummy[sizeof (T) + sizeof (U)];

Thanks very much.

Mark Stevans
mls@cesinst.com

Discussion

  • Peter Kuemmel
    Peter Kuemmel
    2005-07-27

    • summary: patch for "SuperSubclass" --> patch for "SuperSubclass"
     
  • Peter Kuemmel
    Peter Kuemmel
    2005-07-27

    Logged In: YES
    user_id=1159765

    done.
    test it with:

    #include "loki/TypeManip.h"

    class Fred1;
    class Harry1;

    class Fred2{};
    class Harry2{};

    void myMethod()
    {
    const int sven = Loki::SuperSubclass<Fred1, Harry1>::value;
    const int sven = Loki::SuperSubclass<Fred2, Harry2>::value;
    }

     
  • Peter Kuemmel
    Peter Kuemmel
    2005-07-27

    • status: open --> closed