X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2Fcml%2Fcore%2Fmeta%2Fif.h;fp=src%2FMoof%2Fcml%2Fcore%2Fmeta%2Fif.h;h=1ea32350f5913f38b176e9b5e44ffaa09d16f867;hp=0000000000000000000000000000000000000000;hb=c2321281bf12a7efaedde930422c7ddbc92080d4;hpb=87bc17e55b0c1dc73ecc66df856d3f08fd7a7724 diff --git a/src/Moof/cml/core/meta/if.h b/src/Moof/cml/core/meta/if.h new file mode 100644 index 0000000..1ea3235 --- /dev/null +++ b/src/Moof/cml/core/meta/if.h @@ -0,0 +1,42 @@ +/* -*- C++ -*- ------------------------------------------------------------ + +Copyright (c) 2007 Jesse Anders and Demian Nave http://cmldev.net/ + +The Configurable Math Library (CML) is distributed under the terms of the +Boost Software License, v1.0 (see cml/LICENSE for details). + + *-----------------------------------------------------------------------*/ +/** @file + * @brief + */ + +#ifndef meta_if_h +#define meta_if_h + +#include + +namespace cml { + +/** Select argument type based upon truth value. */ +template struct select_if; + +/** Result is TrueT if true. */ +template +struct select_if { + typedef TrueT result; + enum { is_true = true }; +}; + +/** Result is FalseT if false. */ +template +struct select_if { + typedef FalseT result; + enum { is_true = false }; +}; + +} // namespace cml + +#endif + +// ------------------------------------------------------------------------- +// vim:ft=cpp