Boost logo

Boost Users :

Subject: [Boost-users] Re narrowing conversion warning in boost's regex_traits_defaults.hpp when trying to initialize wregex object
From: Jason) SAD * HI * LAB (sadhilab_at_[hidden])
Date: 2013-01-28 14:15:09


gcc is being used; correct? If the problem is that -Wnarrowing should
not be applied globally, then something called a 'pragma' can be used. A
'pragama' will help by telling gcc not to apply a particualar gcc option
onto an included header. On the other hand, I would have hacked the
BOOST source not knowing that PRAGMA itself could fix the problem. That
gets annoying though every time there is a new source tar ball to hack.
Also, https://svn.boost.org/trac/boost/newticket can be used to leave
bug reports to be read by moderators of the source.

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnarrowing "
#include <boost/regex.hpp>
#pragma GCC diagnostic pop

-- 
Thank you Jason Regards, sadhilab_at_[hidden]

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