Boost logo

Boost Users :

Subject: Re: [Boost-users] [Fusion] Adapting template nested structure
From: Joel de Guzman (joel_at_[hidden])
Date: 2011-02-20 18:34:54


On 2/20/2011 12:05 AM, Kamil Renczewski wrote:
> Hello
> I have a compilation error when using BOOST_FUSION_ADAPT_TPL_STRUCT on nested structure.
>
> namespace nsp
> {
> template< class T>
> struct Outer
> {
> struct Inner
> {
> int mint;
> };
> };
> }
>
> BOOST_FUSION_ADAPT_TPL_STRUCT(
> (T),
> (nsp::Outer::Inner) (T),
> (int, mint)
> )
>
> Above code generates compiler errors on g++ 4.4.5.
> Am I doing something wrong?
> Or maybe BOOST_FUSION_ADAPT_TPL_STRUCT can't adapt nested structures? If so, how can I workaround this?

Your guess is right. Fusion can't adapt nested structures. I'm not sure
if there is a workaround. Feel free to add a feature request to trac.

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://boost-spirit.com

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