Subject: Re: [boost] Review Request: Algorithm.Sorting
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2009-05-08 13:45:07
On Fri, May 8, 2009 at 13:33, Ross Levine <ross.levine_at_[hidden]> wrote:
> Also, couldn't you just use reinterpret_cast instead of memcpy? Or is there
> a problem with that?
See the archives. In short, the reinterpret-cast runs afoul of
aliasing rules, and in practice, compilers can optimize the memcpy
down to a bitcast anyways (http://llvm.org/demo will demonstrate), so
it's no slower than the non-standard way.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk