Boost logo

Boost-Commit :

From: john_at_[hidden]
Date: 2007-10-27 07:27:20


Author: johnmaddock
Date: 2007-10-27 07:27:19 EDT (Sat, 27 Oct 2007)
New Revision: 40499
URL: http://svn.boost.org/trac/boost/changeset/40499

Log:
Changed concept code so there are no null-references any more (the code breaks on EDG based compilers otherwise).
Text files modified:
   trunk/boost/math/concepts/distributions.hpp | 3 ++-
   1 files changed, 2 insertions(+), 1 deletions(-)

Modified: trunk/boost/math/concepts/distributions.hpp
==============================================================================
--- trunk/boost/math/concepts/distributions.hpp (original)
+++ trunk/boost/math/concepts/distributions.hpp 2007-10-27 07:27:19 EDT (Sat, 27 Oct 2007)
@@ -191,7 +191,8 @@
    static Distribution& get_object()
    {
       // will never get called:
- return * reinterpret_cast<Distribution*>(0);
+ static char buf[sizeof(Distribution)];
+ return * reinterpret_cast<Distribution*>(buf);
    }
 }; // struct DistributionConcept
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk