⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 promote-old.h

📁 A C++ class library for scientific computing
💻 H
📖 第 1 页 / 共 2 页
字号:
/*********************************************************************** * promote.h   Arithmetic type promotion trait class * Author: Todd Veldhuizen         (tveldhui@oonumerics.org) * * Copyright (C) 1997-2001 Todd Veldhuizen <tveldhui@oonumerics.org> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * Suggestions:          blitz-dev@oonumerics.org * Bugs:                 blitz-bugs@oonumerics.org * * For more information, please see the Blitz++ Home Page: *    http://oonumerics.org/blitz/ * *************************************************************************** */// Generated: genpromote.cpp Dec 10 2003 17:58:28template<typename A, typename B>class promote_trait {public:        typedef A   T_promote;};template<>class promote_trait<char, char> {public:	typedef int T_promote;};template<>class promote_trait<char, unsigned char> {public:	typedef int T_promote;};template<>class promote_trait<char, short int> {public:	typedef int T_promote;};template<>class promote_trait<char, short unsigned int> {public:	typedef unsigned int T_promote;};template<>class promote_trait<char, int> {public:	typedef int T_promote;};template<>class promote_trait<char, unsigned int> {public:	typedef unsigned int T_promote;};template<>class promote_trait<char, long> {public:	typedef long T_promote;};template<>class promote_trait<char, unsigned long> {public:	typedef unsigned long T_promote;};template<>class promote_trait<char, float> {public:	typedef float T_promote;};template<>class promote_trait<char, double> {public:	typedef double T_promote;};template<>class promote_trait<char, long double> {public:	typedef long double T_promote;};#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<char, complex<float> > {public:	typedef complex<float>  T_promote;};#endif#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<char, complex<double> > {public:	typedef complex<double>  T_promote;};#endif#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<char, complex<long double> > {public:	typedef complex<long double>  T_promote;};#endiftemplate<>class promote_trait<unsigned char, char> {public:	typedef int T_promote;};template<>class promote_trait<unsigned char, unsigned char> {public:	typedef int T_promote;};template<>class promote_trait<unsigned char, short int> {public:	typedef int T_promote;};template<>class promote_trait<unsigned char, short unsigned int> {public:	typedef unsigned int T_promote;};template<>class promote_trait<unsigned char, int> {public:	typedef int T_promote;};template<>class promote_trait<unsigned char, unsigned int> {public:	typedef unsigned int T_promote;};template<>class promote_trait<unsigned char, long> {public:	typedef long T_promote;};template<>class promote_trait<unsigned char, unsigned long> {public:	typedef unsigned long T_promote;};template<>class promote_trait<unsigned char, float> {public:	typedef float T_promote;};template<>class promote_trait<unsigned char, double> {public:	typedef double T_promote;};template<>class promote_trait<unsigned char, long double> {public:	typedef long double T_promote;};#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<unsigned char, complex<float> > {public:	typedef complex<float>  T_promote;};#endif#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<unsigned char, complex<double> > {public:	typedef complex<double>  T_promote;};#endif#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<unsigned char, complex<long double> > {public:	typedef complex<long double>  T_promote;};#endiftemplate<>class promote_trait<short int, char> {public:	typedef int T_promote;};template<>class promote_trait<short int, unsigned char> {public:	typedef int T_promote;};template<>class promote_trait<short int, short int> {public:	typedef int T_promote;};template<>class promote_trait<short int, short unsigned int> {public:	typedef unsigned int T_promote;};template<>class promote_trait<short int, int> {public:	typedef int T_promote;};template<>class promote_trait<short int, unsigned int> {public:	typedef unsigned int T_promote;};template<>class promote_trait<short int, long> {public:	typedef long T_promote;};template<>class promote_trait<short int, unsigned long> {public:	typedef unsigned long T_promote;};template<>class promote_trait<short int, float> {public:	typedef float T_promote;};template<>class promote_trait<short int, double> {public:	typedef double T_promote;};template<>class promote_trait<short int, long double> {public:	typedef long double T_promote;};#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<short int, complex<float> > {public:	typedef complex<float>  T_promote;};#endif#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<short int, complex<double> > {public:	typedef complex<double>  T_promote;};#endif#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<short int, complex<long double> > {public:	typedef complex<long double>  T_promote;};#endiftemplate<>class promote_trait<short unsigned int, char> {public:	typedef unsigned int T_promote;};template<>class promote_trait<short unsigned int, unsigned char> {public:	typedef unsigned int T_promote;};template<>class promote_trait<short unsigned int, short int> {public:	typedef unsigned int T_promote;};template<>class promote_trait<short unsigned int, short unsigned int> {public:	typedef unsigned int T_promote;};template<>class promote_trait<short unsigned int, int> {public:	typedef unsigned int T_promote;};template<>class promote_trait<short unsigned int, unsigned int> {public:	typedef unsigned int T_promote;};template<>class promote_trait<short unsigned int, long> {public:	typedef long T_promote;};template<>class promote_trait<short unsigned int, unsigned long> {public:	typedef unsigned long T_promote;};template<>class promote_trait<short unsigned int, float> {public:	typedef float T_promote;};template<>class promote_trait<short unsigned int, double> {public:	typedef double T_promote;};template<>class promote_trait<short unsigned int, long double> {public:	typedef long double T_promote;};#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<short unsigned int, complex<float> > {public:	typedef complex<float>  T_promote;};#endif#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<short unsigned int, complex<double> > {public:	typedef complex<double>  T_promote;};#endif#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<short unsigned int, complex<long double> > {public:	typedef complex<long double>  T_promote;};#endiftemplate<>class promote_trait<int, char> {public:	typedef int T_promote;};template<>class promote_trait<int, unsigned char> {public:	typedef int T_promote;};template<>class promote_trait<int, short int> {public:	typedef int T_promote;};template<>class promote_trait<int, short unsigned int> {public:	typedef unsigned int T_promote;};template<>class promote_trait<int, int> {public:	typedef int T_promote;};template<>class promote_trait<int, unsigned int> {public:	typedef unsigned int T_promote;};template<>class promote_trait<int, long> {public:	typedef long T_promote;};template<>class promote_trait<int, unsigned long> {public:	typedef unsigned long T_promote;};template<>class promote_trait<int, float> {public:	typedef float T_promote;};template<>class promote_trait<int, double> {public:	typedef double T_promote;};template<>class promote_trait<int, long double> {public:	typedef long double T_promote;};#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<int, complex<float> > {public:	typedef complex<float>  T_promote;};#endif#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<int, complex<double> > {public:	typedef complex<double>  T_promote;};#endif#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<int, complex<long double> > {public:	typedef complex<long double>  T_promote;};#endiftemplate<>class promote_trait<unsigned int, char> {public:	typedef unsigned int T_promote;};template<>class promote_trait<unsigned int, unsigned char> {public:	typedef unsigned int T_promote;};template<>class promote_trait<unsigned int, short int> {public:	typedef unsigned int T_promote;};template<>class promote_trait<unsigned int, short unsigned int> {public:	typedef unsigned int T_promote;};template<>class promote_trait<unsigned int, int> {public:	typedef unsigned int T_promote;};template<>class promote_trait<unsigned int, unsigned int> {public:	typedef unsigned int T_promote;};template<>class promote_trait<unsigned int, long> {public:	typedef long T_promote;};template<>class promote_trait<unsigned int, unsigned long> {public:	typedef unsigned long T_promote;};template<>class promote_trait<unsigned int, float> {public:	typedef float T_promote;};template<>class promote_trait<unsigned int, double> {public:	typedef double T_promote;};template<>class promote_trait<unsigned int, long double> {public:	typedef long double T_promote;};#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<unsigned int, complex<float> > {public:	typedef complex<float>  T_promote;};#endif#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<unsigned int, complex<double> > {public:	typedef complex<double>  T_promote;};#endif#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<unsigned int, complex<long double> > {public:	typedef complex<long double>  T_promote;};#endiftemplate<>class promote_trait<long, char> {public:	typedef long T_promote;};template<>class promote_trait<long, unsigned char> {public:	typedef long T_promote;};template<>class promote_trait<long, short int> {public:	typedef long T_promote;};template<>class promote_trait<long, short unsigned int> {public:	typedef long T_promote;};template<>class promote_trait<long, int> {public:	typedef long T_promote;};template<>class promote_trait<long, unsigned int> {public:	typedef long T_promote;};template<>class promote_trait<long, long> {public:	typedef long T_promote;};template<>class promote_trait<long, unsigned long> {public:	typedef unsigned long T_promote;};template<>class promote_trait<long, float> {public:	typedef float T_promote;};template<>class promote_trait<long, double> {public:	typedef double T_promote;};template<>class promote_trait<long, long double> {public:	typedef long double T_promote;};#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<long, complex<float> > {public:	typedef complex<float>  T_promote;};#endif#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<long, complex<double> > {public:	typedef complex<double>  T_promote;};#endif#ifdef BZ_HAVE_COMPLEXtemplate<>class promote_trait<long, complex<long double> > {public:	typedef complex<long double>  T_promote;};#endiftemplate<>class promote_trait<unsigned long, char> {public:	typedef unsigned long T_promote;};template<>class promote_trait<unsigned long, unsigned char> {public:	typedef unsigned long T_promote;};template<>class promote_trait<unsigned long, short int> {public:	typedef unsigned long T_promote;};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -