Boost logo

Boost Users :

Subject: Re: [Boost-users] boost::variant: Wrapping C-struct inside C++ class
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2010-06-01 12:15:31


AMDG

Mathieu Malaterre wrote:
> Did anyone write up a small C++ wrapper class when one want to use
> C-struct as part of boost::variant. When using C-struct boost::variant
> fails with:
>
> /usr/include/boost/variant/variant.hpp:294: error: request for member
> ‘~__mpfr_struct [1]’ in ‘operand’, which is of non-class type
> ‘__mpfr_struct [1]’
> make[2]: *** [CMakeFiles/variant_mpfr.dir/variant_mpfr.cxx.o] Error 1
>

The problem isn't that it's a struct. structs should
work fine, since there is no fundamental difference
between a struct and a class. The problem is that
it's an array.

In Christ,
Steven Watanabe


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