The following code produces a C4714 warning in Visual Studio 2010 with
Boost 1.49 but not 1.48:
------------------------------------------------------------------------
----------------------------------------
#include "stdafx.h"
#include
void main()
{
using namespace boost::xpressive;
sregex pat1 = "foo" >> +space >> "bar"; // OK in 1.48,
C4714 in 1.49
sregex pat2 = "foo" >> +space >> "bar" >> +space; // OK in
1.48, C4714 in 1.49
sregex pat3 = "foo" >> +space; // OK in
1.48, OK in 1.49
sregex pat4 = "foo" >> +space >> +digit; // OK in
1.48, OK in 1.49
sregex pat5 = +space >> "foo" >> +space; // OK in
1.48, C4714 in 1.49
}
------------------------------------------------------------------------
----------------------------------------
System:
Compiler: Visual Studio 2010 SP1
[Microsoft (R) 32-bit C/C++ Optimizing Compiler Version
16.00.40219.01 for 80x86]
Compiler warning level: /W4
OS: Windows 7 Professional 32-bit
I would be OK with suppressing the warning, but I haven't been able to
do so. Putting
"#pragma warning(disable : 4714)" in my source file and in
boost/xpressive/detail/core/
sub_match_vector.hpp and in boost/proto/transform/call.hpp does not
suppress the
warning. Using the "disable specific warnings" compiler switch /wd4714
also does not work.
Complete warning text:
------------------------------------------------------------------------
----------------------------------------
1>c:\Boost\include\boost-1_49\boost/xpressive/detail/core/sub_match_vect
or.hpp(115): warning C4714: function
'boost::xpressive::detail::static_xpression
boost::proto::call<PrimitiveTransform>::impl2::operat
or ()(const boost::proto::exprns_::expr &,const
boost::xpressive::detail::static_xpression,boost::xpressive::detail::static_xpression>>
&,boost::xpressive::detail::xpression_visitor &)
const' marked as __forceinline not inlined
1> with
1> [
1>
Matcher=boost::xpressive::detail::simple_repeat_matcher,boost::xpressive::detail::true_xpression>,boost::mpl::tr
ue_>,
1>
Next=boost::xpressive::detail::static_xpression,boost::xpressive::detai
l::static_xpression,boost::xpressive::detail::true_xpression>,bo
ost::mpl::true_>,boost::xpressive::detail::static_xpression>>,
1> PrimitiveTransform=boost::xpressive::Grammar<char>
(boost::xpressive::grammar_detail::as_repeat),
1> Expr=const
boost::proto::exprns_::exprboost::xpressive::detail::posix_charset_placeholder
,0> &>,1> &,
1>
State=boost::xpressive::detail::static_xpression,boost::xpressive::deta
il::static_xpression,boost::xpressive::detail::true_xpression>,b
oost::mpl::true_>,boost::xpressive::detail::static_xpression>>,
1>
Data=boost::xpressive::detail::xpression_visitor,boost::mpl::false
_,traits_type> ,
1> B=true,
1> Tag=boost::proto::tagns_::tag::unary_plus,
1> Args=boost::proto::argsns_::list1boost::xpressive::detail::posix_charset_placeholder
,0> &>,
1> Arity=1,
1> Traits=traits_type,
1> ICase=boost::mpl::false_,
1>
BidiIter=std::_String_const_iterator
1> ]
1>
c:\Boost\include\boost-1_49\boost/proto/transform/call.hpp(168) : see
declaration of
'boost::proto::call<PrimitiveTransform>::impl2::opera
tor ()'
1> with
1> [
1> PrimitiveTransform=boost::xpressive::Grammar<char>
(boost::xpressive::grammar_detail::as_repeat),
1> Expr=const
boost::proto::exprns_::exprboost::xpressive::detail::posix_charset_placeholder
,0> &>,1> &,
1>
State=boost::xpressive::detail::static_xpression,boost::xpressive::deta
il::static_xpression,boost::xpressive::detail::true_xpression>,b
oost::mpl::true_>,boost::xpressive::detail::static_xpression>>,
1>
Data=boost::xpressive::detail::xpression_visitor,boost::mpl::false
_,traits_type> ,
1> B=true
1> ]
------------------------------------------------------------------------
----------------------------------------
Thanks in advance for any assistance.
Brian Lawry
blawry@cccglobal.com
Compressor Controls Corp
Manufacturing Software Engineer
/"\ ASCII Ribbon Campaign
\ / no HTML in email & vCards
X no proprietary attachments
/ \ use open standards