Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ACE::If_Then_Else Struct Reference

Compile-time selection of type based on a boolean value. More...

#include <If_Then_Else.h>


Detailed Description

Compile-time selection of type based on a boolean value.

This primary template selects the second or third argument based on the value of the boolean first argument.

Usage example:

   template <typename T>
   class Foo
   {
   public:
     // Set "TheType" to be the larger of "T" and  "int".
     typedef typename If_Then_Else<(sizeof (T) > sizeof (int)),
                                   T,
                                   int>::result_type TheType;
   };

Note:
This merely a forward declaration since we really only care about the partial specializations below.


The documentation for this struct was generated from the following file:
Generated on Wed Jun 8 23:57:01 2005 for ACE by  doxygen 1.3.9.1