X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2Fcml%2Fcore%2Fmeta%2Fcommon.h;fp=src%2FMoof%2Fcml%2Fcore%2Fmeta%2Fcommon.h;h=0000000000000000000000000000000000000000;hp=08c129d295985b6f0af051b46fc8ba55e6c7b450;hb=831f04d4bc19a390415ac0bbac4331c7a65509bc;hpb=299af4f2047e767e5d79501c26444473bda64c64 diff --git a/src/Moof/cml/core/meta/common.h b/src/Moof/cml/core/meta/common.h deleted file mode 100644 index 08c129d..0000000 --- a/src/Moof/cml/core/meta/common.h +++ /dev/null @@ -1,118 +0,0 @@ -/* -*- 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 core_meta_common_h -#define core_meta_common_h - -namespace cml { - -/** Type of a true statement. */ -struct true_type {}; - -/** Type of a false statement. */ -struct false_type {}; - -template struct is_true { - typedef false_type result; -}; - -template<> struct is_true { - typedef true_type result; -}; - -/** A "type pair". */ -template struct type_pair { - typedef T1 first; - typedef T2 second; -}; - -/** A "type quadruple". */ -template -struct type_quad { - typedef T1 first; - typedef T2 second; - typedef T3 third; - typedef T3 fourth; -}; - -/** Match any type (for use with same_type<> and select_switch<>). */ -struct any_type {}; - -/** Determine if two types are the same. - * - * Defaults to false. - */ -template struct same_type { - typedef false_type result; - enum { is_true = false, is_false = true }; -}; - -/** Match the same type for both of same_type's template arguments. */ -template struct same_type { - typedef true_type result; - enum { is_true = true, is_false = false }; -}; - -/** Match a type and any_type. */ -template struct same_type { - typedef true_type result; - enum { is_true = true, is_false = false }; -}; - -/** Match a type and any_type. */ -template struct same_type { - typedef true_type result; - enum { is_true = true, is_false = false }; -}; - -/** Disambiguate pair of any_type's. */ -template<> struct same_type { - typedef true_type result; - enum { is_true = true, is_false = false }; -}; - -/** Remove a reference qualifier from a type. */ -template struct remove_reference { - template struct helper { - typedef Q type; - }; - - template struct helper { - typedef Q type; - }; - - template struct helper { - typedef const Q type; - }; - - typedef typename helper::type type; -}; - -/** Remove a const qualifier from a type. */ -template struct remove_const { - template struct helper { - typedef Q type; - }; - - template struct helper { - typedef Q type; - }; - - typedef typename helper::type type; -}; - -} // namespace cml - -#endif - -// ------------------------------------------------------------------------- -// vim:ft=cpp