📄 variable.h
字号:
/****************************************************************************
* Copyright (C) 2001 Piece Wise Functions
* Carlo Galotto
* Italy
* Email: carlo.galotto@libero.it
* cgalotto@hotmail.com
*
*
* This framework is free software; you can redistribute it and/or modify
* it. This framework 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.
* The proposed framework is based upon the paper "Expression Templates" by
* Todd Veldhuizen.
****************************************************************************/
// Class: Variable
#ifndef __VARIABLE_H //Required for current class
#define __VARIABLE_H
#ifndef __EXPR_H //Required for base classes
#include "Expr.h"
#endif
#ifndef __IDNTTEXP_H //Required for base classes
#include "IdentityExpr.h"
#endif
// A shortcut for e.g. Expr< IdentityExpr<float> > x;
template <class T>
class Variable : public Expr< IdentityExpr<T> >
{
public:
typedef typename IdentityExpr<T>::argument_type argument_type;
typedef typename IdentityExpr<T>::result_type result_type;
public:
// Default constructor
Variable() : Expr< IdentityExpr<T> >( IdentityExpr<T>() ) {}
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -