The behaviour of gcc is standard compliant, since an assignment in the same statement as a variable declaration is always treated by the copy constructor. The mentioned gcc switch -fno-elide-constructors will work, but on other compilers you'll have the same behaviour again. -- ---> Dirk Jagdmann ----> http://cubic.org/~doj -----> http://llg.cubic.org