CVR-Lib last update 20 Sep 2009

cvr::internal::if_t< B, THEN, ELSE > Struct Template Reference

Defines the if_t<B,THEN,ELSE>::type as THEN if B==true and as ELSE if B==false. More...

#include <cvrMetaProgrammingTools.h>

List of all members.


Detailed Description

template<bool B, class THEN, class ELSE = void>
struct cvr::internal::if_t< B, THEN, ELSE >

Defines the if_t<B,THEN,ELSE>::type as THEN if B==true and as ELSE if B==false.

The following example is not from the real world but shows the idea:

 struct container<bool readOnly> {
   typedef typename internal::if_t<readOnly, const_iterator, iterator> iterator_type;
   iterator_type begin();

The documentation for this struct was generated from the following file:

Generated on Sun Sep 20 22:09:12 2009 for CVR-Lib by Doxygen 1.5.8