LLCalcParser did confuse newer version and let to std::bind being picked instead of phoenix::bind.

Wed, 06 Apr 2016 13:00:24 +0200

author
Nicky
date
Wed, 06 Apr 2016 13:00:24 +0200
changeset 48941
3ea6d53806d3
parent 48940
c268654db1ee
child 48942
b2ad5901ecf8

LLCalcParser did confuse newer version and let to std::bind being picked instead of phoenix::bind.

indra/llmath/llcalcparser.h file | annotate | diff | revisions
     1.1 --- a/indra/llmath/llcalcparser.h	Wed Apr 06 12:59:30 2016 +0200
     1.2 +++ b/indra/llmath/llcalcparser.h	Wed Apr 06 13:00:24 2016 +0200
     1.3 @@ -83,36 +83,36 @@
     1.4  			;
     1.5  
     1.6  			unary_func =
     1.7 -				((str_p("SIN") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_sin)(self,arg1)]) |
     1.8 -				 (str_p("COS") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_cos)(self,arg1)]) |
     1.9 -				 (str_p("TAN") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_tan)(self,arg1)]) |
    1.10 -				 (str_p("ASIN") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_asin)(self,arg1)]) |
    1.11 -				 (str_p("ACOS") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_acos)(self,arg1)]) |
    1.12 -				 (str_p("ATAN") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_atan)(self,arg1)]) |
    1.13 +				((str_p("SIN") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_sin)(self,arg1)]) |
    1.14 +				 (str_p("COS") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_cos)(self,arg1)]) |
    1.15 +				 (str_p("TAN") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_tan)(self,arg1)]) |
    1.16 +				 (str_p("ASIN") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_asin)(self,arg1)]) |
    1.17 +				 (str_p("ACOS") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_acos)(self,arg1)]) |
    1.18 +				 (str_p("ATAN") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_atan)(self,arg1)]) |
    1.19  				 // <FS:Ansariel> FIRE-14618: Provide radian-based functions
    1.20 -				 (str_p("SINR") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_sinr)(self,arg1)]) |
    1.21 -				 (str_p("COSR") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_cosr)(self,arg1)]) |
    1.22 -				 (str_p("TANR") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_tanr)(self,arg1)]) |
    1.23 -				 (str_p("ASINR") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_asinr)(self,arg1)]) |
    1.24 -				 (str_p("ACOSR") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_acosr)(self,arg1)]) |
    1.25 -				 (str_p("ATANR") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_atanr)(self,arg1)]) |
    1.26 +				 (str_p("SINR") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_sinr)(self,arg1)]) |
    1.27 +				 (str_p("COSR") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_cosr)(self,arg1)]) |
    1.28 +				 (str_p("TANR") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_tanr)(self,arg1)]) |
    1.29 +				 (str_p("ASINR") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_asinr)(self,arg1)]) |
    1.30 +				 (str_p("ACOSR") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_acosr)(self,arg1)]) |
    1.31 +				 (str_p("ATANR") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_atanr)(self,arg1)]) |
    1.32  				 // </FS:Ansariel>
    1.33 -				 (str_p("SQRT") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_sqrt)(self,arg1)]) |
    1.34 -				 (str_p("LOG") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_log)(self,arg1)]) |
    1.35 -				 (str_p("EXP") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_exp)(self,arg1)]) |
    1.36 -				 (str_p("ABS") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_fabs)(self,arg1)]) |
    1.37 -				 (str_p("FLR") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_floor)(self,arg1)]) |
    1.38 -				 (str_p("CEIL") >> '(' >> expression[unary_func.value = bind(&LLCalcParser::_ceil)(self,arg1)])
    1.39 +				 (str_p("SQRT") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_sqrt)(self,arg1)]) |
    1.40 +				 (str_p("LOG") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_log)(self,arg1)]) |
    1.41 +				 (str_p("EXP") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_exp)(self,arg1)]) |
    1.42 +				 (str_p("ABS") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_fabs)(self,arg1)]) |
    1.43 +				 (str_p("FLR") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_floor)(self,arg1)]) |
    1.44 +				 (str_p("CEIL") >> '(' >> expression[unary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_ceil)(self,arg1)])
    1.45  				) >> assert_syntax(ch_p(')'))
    1.46  			;
    1.47  			
    1.48  			binary_func =
    1.49  				((str_p("ATAN2") >> '(' >> expression[binary_func.value = arg1] >> ',' >>
    1.50 -				  expression[binary_func.value = bind(&LLCalcParser::_atan2)(self, binary_func.value, arg1)]) |
    1.51 +				  expression[binary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_atan2)(self, binary_func.value, arg1)]) |
    1.52  				 (str_p("MIN") >> '(' >> expression[binary_func.value = arg1] >> ',' >> 
    1.53 -				  expression[binary_func.value = bind(&LLCalcParser::_min)(self, binary_func.value, arg1)]) |
    1.54 +				  expression[binary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_min)(self, binary_func.value, arg1)]) |
    1.55  				 (str_p("MAX") >> '(' >> expression[binary_func.value = arg1] >> ',' >> 
    1.56 -				  expression[binary_func.value = bind(&LLCalcParser::_max)(self, binary_func.value, arg1)])
    1.57 +				  expression[binary_func.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::_max)(self, binary_func.value, arg1)])
    1.58  				) >> assert_syntax(ch_p(')'))
    1.59  			;
    1.60  			
    1.61 @@ -128,10 +128,10 @@
    1.62  				 // Lookup throws an Unknown Symbol error if it is unknown, while this works fine,
    1.63  				 // would be "neater" to handle symbol lookup from here with an assertive parser.
    1.64  //				 constants_p[factor.value = arg1]|
    1.65 -				 identifier[factor.value = bind(&LLCalcParser::lookup)(self, arg1, arg2)]
    1.66 +				 identifier[factor.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::lookup)(self, arg1, arg2)]
    1.67  				) >>
    1.68  				// Detect and throw math errors.
    1.69 -				assert_domain(eps_p(bind(&LLCalcParser::checkNaN)(self, factor.value)))
    1.70 +				assert_domain(eps_p(/*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&LLCalcParser::checkNaN)(self, factor.value)))
    1.71  			;
    1.72  
    1.73  			unary_expr =
    1.74 @@ -141,14 +141,14 @@
    1.75  			
    1.76  			power =
    1.77  				unary_expr[power.value = arg1] >>
    1.78 -				*('^' >> assert_syntax(unary_expr[power.value = bind(&powf)(power.value, arg1)]))
    1.79 +				*('^' >> assert_syntax(unary_expr[power.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&powf)(power.value, arg1)]))
    1.80  			;
    1.81  			
    1.82  			term =
    1.83  				power[term.value = arg1] >>
    1.84  				*(('*' >> assert_syntax(power[term.value *= arg1])) |
    1.85  				  ('/' >> assert_syntax(power[term.value /= arg1])) |
    1.86 -				  ('%' >> assert_syntax(power[term.value = bind(&fmodf)(term.value, arg1)]))
    1.87 +				  ('%' >> assert_syntax(power[term.value = /*<FS:ND/> Replace bind with phoenix::bind to make GCC happy*/ phoenix::bind(&fmodf)(term.value, arg1)]))
    1.88  				)
    1.89  			;
    1.90  			

mercurial