Oh,I made a mistake.value is a double.And I need to round it to int .
And I still want to know whether I can
use make_const(switchvalue) or constant(switchvalue)
instead of switchvalue? Even var(switchvalue)? in :
int result,switchvalue;
...............
 (switch_statement(_1,
   case_statement<1>
   (var(result)=0),
   case_statement<2>
   (var(result)=1),
   case_statement<3>
     (var(result)=constant(value)),
   default_statement
            (var(std::cout)<<"wrong")
   ))(switchvalue);
 

 




200万种商品,最低价格,疯狂诱惑你