Boost logo

Boost Users :

Subject: Re: [Boost-users] A question on switch_statement. Can any one with kindness help me?
From: fmingu (fmingu_at_[hidden])
Date: 2009-07-04 23:59:00


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);

 

 



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