boost  

[boost] optional/type_with_alignment.hpp vs. metrowerks 8.3 PPC CFM

Mat Marcus
Tue, 02 Sep 2003 10:43:25 -0700

We're trying to use optional from 1.30.0 (sorry legal hasn't approved our use of 1.30.2 yet). However on one compiler (Metrowerks 8.3 PPC CFM) we're getting static asserts from the alignment calculation metafunctions. Below is an abstracted example of the problem. I'm curious about what's going on and what workarounds might be possible.

Thanks,
Mat

#include <utility>
#include "boost/optional.hpp"


boost::optional<std::pair<double, double> > foo;


/*
Error : illegal use of incomplete struct/union/class 'boost::STATIC_ASSERTION_FAILURE<0>'
(instantiating: 'boost::optional<std::pair<double, double>>')
(instantiating: 'boost::optional_detail::aligned_storage<std::pair<double, double>>')
(instantiating: 'boost::optional_detail::aligned_storage<std::pair<double, double>>::dummy_u')
(instantiating: 'boost::type_with_alignment<8>')
type_with_alignment.hpp line 109 BOOST_STATIC_ASSERT(found >= Align);


Error : illegal use of incomplete struct/union/class 'boost::STATIC_ASSERTION_FAILURE<0>'
(instantiating: 'boost::optional<std::pair<double, double>>')
(instantiating: 'boost::optional_detail::aligned_storage<std::pair<double, double>>')
(instantiating: 'boost::optional_detail::aligned_storage<std::pair<double, double>>::dummy_u')
(instantiating: 'boost::type_with_alignment<8>')
type_with_alignment.hpp line 110 BOOST_STATIC_ASSERT(found % Align == 0);


*/



_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost