"Vladimir 'Yu' Stepanov" <[EMAIL PROTECTED]> writes: > Current syntax C/C++: > > load_ptr = typeof(load_ptr)(((char *)init_ptr) - \ > offsetof(typeof(init_ptr), field); > > The offered syntax: > > &load_ptr->field = init_ptr;
Interesting idea, but C/C++ programmers expect that an assignment sets the entire expression on the left of the '='. So I don't think this is a good syntax. In fact you can already write what you want with a macro, one quite similar to offsetof, so I don't think we need any new syntactic sugar here. > C++: > struct some_struct &link = other; This already means something in C++: it means to create a reference. Ian