That's what I said? "The compiler is free to elide (remove) the temporary+copying whenever it can, but copy constructor must still be accessible"
On Fri, 2015-06-05 at 23:34 +0000, Gavin Swanson wrote: > http://stackoverflow.com/a/4470763 > > > On Fri, Jun 5, 2015, 7:21 PM Owen Williams <owilli...@mixxx.org> > wrote: > Since CSAMPLE is a simple type, assignment is best -- and when > it works, > assignment is the way to go (hurray for smart compilers > eliding copies). > With the form sample(0.0), it gives the impression that > CSAMPLE is a > complex type with a constructor. > > On Fri, 2015-06-05 at 22:16 +0000, Gavin Swanson wrote: > > CSAMPLE sample(0.0); > > > > > > On Fri, Jun 5, 2015, 4:45 PM Owen Williams > <owilli...@mixxx.org> > > wrote: > > On Fri, 2015-06-05 at 22:30 +0200, Daniel Schürmann > wrote: > > > > > CSAMPLE sample = 0.0; > > > > This one. auto should really only be used when > assigning from > > a > > function whose return value is obvious. > > > > > > > > > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > > Get Mixxx, the #1 Free MP3 DJ Mixing software Today > > http://mixxx.org > > > > > > Mixxx-devel mailing list > > Mixxx-devel@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/mixxx-devel > > ------------------------------------------------------------------------------ _______________________________________________ Get Mixxx, the #1 Free MP3 DJ Mixing software Today http://mixxx.org Mixxx-devel mailing list Mixxx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mixxx-devel