(ref.doc)ass-in-mbr-init

Prev: subobjects Up: cppR 5/3

C++ Report
March/April 93 - Vol 5/No 3

p 72
The C++ puzzle, by Rob Murray
Assertion on parameter before use in member initialization, with the
comma operator
	T::T(char* _p): p(p_), u((assert(_p), p[0])) {}
The extra parentheses are necessary to tell the compiler that we are
initializing u with a single with a single expression, using the comma
operator.


automatically generated by info2www version 1.2.2.8