Boost logo

Boost Users :

Subject: Re: [Boost-users] Compiler crash with Phoenix and PropertyTree.
From: Joel de Guzman (joel_at_[hidden])
Date: 2009-12-15 22:35:09


Surya Kiran Gullapalli wrote:
> Thanks for pointing out the issue. Now the compiler crash is gone. I was
> calling a wrong function (silly me)
>
> What I was trying was to reproduce C4180 warning when using
> phoenix::bind. Here's a small test program to reproduce the warning.
>
> namespace pt = boost::property_tree ;
> pt::ptree tree ;
>
> // The following function translates to
> // tree.put("Temp.Flag", true) ;
>
> boost::phoenix::bind (&pt::ptree::put<bool>, tree, string("Temp.Flag"),
> true) ;
>
> what I wanted to know is whether the warning is harmless or not. Can i
> suppress the warning in compiler flags using /wd4180 without any issues ?
> Gcc compiles fine without any warnings.

What is the warning? BTW, you might want to have a phoenix::ref around
tree if you want to capture by reference. Phoenix always defaults to
capture by value.

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net
http://www.facebook.com/djowel
Meet me at BoostCon
http://www.boostcon.com/home
http://www.facebook.com/boostcon

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