| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 
 |  
/* Allez, profitons que nous somme en C++11 :D */
class Derivee1 :public Base{
    public:
        Derivee1(int i):i(i){}
        Derivee1(int i, Color const & color):i(i),color(color){}
        Derivee1(OnlyIntParam const & pl):Derivee1(pl.i){}
        Derivee1(IntAndColorParam const & pl):Derivee1(pl.i, pl.color){}
    private:
        int i;
        Color color;
};
class Derivee2 : public Base{
    public:
        Derivee2(std::string const & str):str(str){}
        Derivee2(std::string const & str, Color const & color):str(str),color(color){}
        Derivee2(OnlyStringParam const & pl):Derivee2(pl.str){}
        Derivee2(StringAndColorParam const & pl):Derivee2(pl.str, pl.color){}
    private:
        std::string str;
        Color color;
};
class Derivee3 : public Base{
        Derivee3(int i):i(i){}
        Derivee3(int i, Color const & color):i(i),color(color){}
        Derivee3(OnlyIntParam const & pl):Derivee3(pl.i){}
        Derivee3(IntAndColorParam const & pl):Derivee3(pl.i, pl.color){}
    private:
        int i;
        Color color;
};
class Derivee4 : public Base{
    public:
        Derivee4(std::string const & str):str(str){}
        Derivee4(std::string const & str, Color const & color):str(str),color(color){}
        Derivee4(OnlyStringParam const & pl):Derivee4(pl.str){}
        Derivee4(StringAndColorParam const & pl):Derivee4(pl.str, pl.color){}
    private:
        std::string str;
        Color color;
}; | 
Partager