|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2007-06-23 18:20:02
on Fri Jun 15 2007, shunsuke <pstade.mb-AT-gmail.com> wrote:
> Eric Niebler wrote:
>> Compiles and links just fine, crashes and burns even before entering main().
>
> Understood. Thanks a lot.
> My next concern is how to forbid such usage
> with the shortest words.
> If msvc can't static-initialize the solution using 'static_const<>',
> the upcoming <boost/numeric/functional.hpp> seems
> to have to document the dangerous usage.
If the types you're initializing really don't have any useful content
(like boost/parameter/keyword's, which are just initialized with ={}),
you can probably ignore MSVC's bug. On the platforms targeted by that
compiler, the undefined behavior will express itself as the program
working perfectly.
-- Dave Abrahams Boost Consulting http://www.boost-consulting.com The Astoria Seminar ==> http://www.astoriaseminar.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk