|
Boost Users : |
From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2004-03-24 17:09:21
Lorenzo Bolla wrote:
> I'm working with the boost::numeric::ublas library and I'm having some
> problems, but I'm posting here because I think the problem is due to
> the type_traits library. In fact, with Visual C++ 7.0 this piece of
> code does not compile, with the error C2529: "reference to reference
> is illegal".
>
> ------------------------------------
>
> #include <boost/type_traits.hpp>
> #include <complex>
>
> //typedef double value_t;
> typedef std::complex<double> value_t;
>
> int main()
> {
> // reference to reference!!!
> boost::remove_reference<value_t&>::type const &a (value_t (0.));
> return 0;
> }
>
> -----------------------------------
>
> With value_t == double everything works fine.
> Any suggestions?
Adding
BOOST_TT_BROKEN_COMPILER_SPEC(value_t)
after the typedef should take care of it. See the second paragraph in
http://www.boost.org/libs/type_traits/index.html#transformations.
-- Aleksey Gurtovoy MetaCommunications Engineering
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net