A Non-Obvious Feature in the Syntax of Variable Declaration

Written by Maxim Razin

Take a look at this innocent looking piece of code in C++. There are no templates, no virtual functions or inheritance, but the creators of this beautiful language hid a gift right in front of us. struct A { A (int i) {} }; struct B { B (A a) {} }; int main () { int i = 1; B...