Boost logo

Boost :

From: Niels Dekker - mail address until 2008-12-31 (nd_mail_address_valid_until_2008-12-31_at_[hidden])
Date: 2007-09-15 17:22:11


Ralf W. Grosse-Kunstleve wrote:
> The SVN head of boost/utility/value_init.hpp produces a
> Visual C++ 7.1 ICE (see below) when compiling some of
> our Boost.Python extensions.

Thanks again! I finally got a minimal example of how to reproduce the
"INTERNAL COMPILER ERROR":

  ////////////////////////////////////////////////////////////
  #include <boost/utility/value_init.hpp>

  class Foo { };

  int main() {
    boost::value_initialized<Foo *> i; // VC 7.1 ICE!!!
    return 0;
  }
  ////////////////////////////////////////////////////////////

MSVC 7.1 just doesn't seem to like "get().T::~T()" when T is a pointer
to an instance of a class. Apparently the bug was fixed with MSVC 8.0.
BTW, MSVC 7.1 *does* accept "(&get())->T::~T()". But anyway, the patch
you suggested is fine to me as well.

> The simple patch below works around the problem.
> I've also tested with with VC 8.0. Is this OK to commit?

Please do! :-)

BTW, Fernando Cacciola and I do have some ideas on how to further
improve value_initialized, so I expect that your patch won't be needed
anymore in the future. But at the moment, your patch is still
definitely necessary!

Kind regards, Niels


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk