Boost logo

Boost Users :

From: Jens Theisen (jens-theisen-tmp01_at_[hidden])
Date: 2006-08-22 05:14:09


chun ping wang wrote:
> Is there a nice work around this?

Yes:

if(boost::is_floating_point<T>::value)
   return &glVertex2d;
else
   return &glVertex2i;

and the same goes for the other ternary. This has nothing to do with
boost. The two options in a ternary have to be of the same type. You
could also cast them, but that would only be shorter with appropriate
typedefs.

Jens


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