[Documentation] [TitleIndex] [WordIndex

(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

The 'Is A' Traits

Description: Temporary fillers for the 'is a xxx' fundamental type traits till C++0x is widespread.

Keywords: ecl type traits

Tutorial Level: INTERMEDIATE

These are in the upcoming C++0x standard, so are only a temporary feature in the ecl. They are a subset and work just like boosts type traits. More will be added as needed. The code snippet below is for runtime code, but they're actually more useful with enable_if in determining which compile time template specialisations to instantiate.

   1 if ( is_float<double>::value ) {
   2   // take some action
   3 }

The current list include:


2020-01-25 12:37