]>
Dogcows Code - chaz/yoink/blob - src/cml/core/meta/if.h
1 /* -*- C++ -*- ------------------------------------------------------------
3 Copyright (c) 2007 Jesse Anders and Demian Nave http://cmldev.net/
5 The Configurable Math Library (CML) is distributed under the terms of the
6 Boost Software License, v1.0 (see cml/LICENSE for details).
8 *-----------------------------------------------------------------------*/
16 #include <cml/core/meta/common.h>
20 /** Select argument type based upon truth value. */
21 template<bool yn
, typename TrueT
, typename FalseT
> struct select_if
;
23 /** Result is TrueT if true. */
24 template<typename TrueT
, typename FalseT
>
25 struct select_if
<true,TrueT
,FalseT
> {
27 enum { is_true
= true };
30 /** Result is FalseT if false. */
31 template<typename TrueT
, typename FalseT
>
32 struct select_if
<false,TrueT
,FalseT
> {
33 typedef FalseT result
;
34 enum { is_true
= false };
41 // -------------------------------------------------------------------------
This page took 0.035649 seconds and 5 git commands to generate.