Boost logo

Boost Users :

Subject: Re: [Boost-users] Compiler crash with Phoenix and PropertyTree.
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2009-12-16 05:13:38

From: boost-users-bounces_at_[hidden] [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Surya Kiran Gullapalli
Sent: Wednesday, December 16, 2009 2:35 AM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] Compiler crash with Phoenix and PropertyTree.


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.


I’m sure you can ignore this warning.


More significant (to me) is the Fear Uncertainty and Doubt that this spurious warning has caused you.


If you had not been distracted by this warning(s), you might yourself have focussed on the real cause more quickly?


(Saved yourself much time - and perhaps not bothered the busy author and cluttered the mailing list ;-)


This is why I believe it is important to keep nagging to get Boost code free of warnings to the end user.


(I’m aware that part of the trouble is that compilers vary, so if the author doesn’t use the most paranoid compiler, he doesn’t feel the pain, but surely it still isn’t too much trouble to cure or suppress warnings like this?)




Paul A. Bristow
Prizet Farmhouse
Kendal, UK   LA8 8AB
+44 1539 561830, mobile +44 7714330204

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at