synaps/arithm/Cst.h

00001 /********************************************************************
00002  *   This file is part of the source code of the SYNAPS kernel.
00003  *   Author(s): B. Mourrain, GALAAD, INRIA
00004  *   $Id: Cst.h,v 1.1 2005/07/11 10:39:47 mourrain Exp $
00005  ********************************************************************/
00006 #ifndef synaps_arithm_Cst_H
00007 #define synaps_arithm_Cst_H
00008 /********************************************************************/
00009 #include <synaps/init.h>
00010 __BEGIN_NAMESPACE_SYNAPS
00011 /********************************************************************/
00016 template<class R>
00017 struct CST {
00018   R  _rep;
00019 
00020   const R & rep() const { return _rep;}
00021   
00022   CST() {}
00023   CST(const R & r): _rep(r){}
00024   CST(const CST<R> & r): _rep(r._rep){ }
00025 
00026 };
00027 //----------------------------------------------------------------------
00028 template<class R> inline
00029 CST<R> Cst (const R & r)   {return CST<R>(r);}
00030 //----------------------------------------------------------------------
00031 template<class R> inline
00032 CST<R> Cst (const CST<R> & r)  {return r;}
00033 //--------------------------------------------------------------------
00034 __END_NAMESPACE_SYNAPS
00035 /********************************************************************/
00036 #endif //

SYNAPS DOCUMENTATION
logo