#include <iostream>
#include <string>

#define TYPE_INIT_(_Number, _Line, _Type,...) struct ln_##_Line##_number_##_Number : public _Type\
{\
  ln_##_Line##_number_##_Number()\
    :_Type(__VA_ARGS__){}\
\
  ln_##_Line##_number_##_Number(const _Type& _val)\
    :_Type(_val){}\
\
  const _Type& operator=(const _Type& _val)\
  {\
    ((_Type)(*this)) = _val;\
    return (*this);\
  }\
}
#define TYPE_INIT(_Number, _Line, _Type,...)  TYPE_INIT_(_Number, _Line, _Type, __VA_ARGS__)
#define INIT(_Type, ...) TYPE_INIT(__COUNTER__, __LINE__, _Type, __VA_ARGS__)

// использование

struct ABC
{
  int A,B,C;
  
  ABC(int _A,int _B,int _C)
    :A(_A),
    B(_B),
    C(_C)
  {}
};


struct TestClass
{
  INIT( std::string, "Ololo" ) lv_String;
  INIT( ABC, 1, 2, 3 ) lv_ABC;
};

std::ostream & operator << (std::ostream &out, const TestClass &t) {
    std::cout << t.lv_String << " " << t.lv_ABC.A << " " <<
        t.lv_ABC.B << " " << t.lv_ABC.C;
    return out;
}

int main() {

    TestClass t;
    std::cout << t << std::endl;
    t.lv_String = "Hui";
    t.lv_ABC = ABC(4,5,6);
    std::cout << t << std::endl;
}
