Sacado Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Sacado_dummy_arg.hpp
Go to the documentation of this file.
1// ***********************************************************************
2//
3// Sacado Package
4// Copyright (2006) Sandia Corporation
5//
6// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
7// the U.S. Government retains certain rights in this software.
8//
9// This library is free software; you can redistribute it and/or modify
10// it under the terms of the GNU Lesser General Public License as
11// published by the Free Software Foundation; either version 2.1 of the
12// License, or (at your option) any later version.
13//
14// This library is distributed in the hope that it will be useful, but
15// WITHOUT ANY WARRANTY; without even the implied warranty of
16// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17// Lesser General Public License for more details.
18//
19// You should have received a copy of the GNU Lesser General Public
20// License along with this library; if not, write to the Free Software
21// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
22// USA
23// Questions? Contact David M. Gay (dmgay@sandia.gov) or Eric T. Phipps
24// (etphipp@sandia.gov).
25//
26// ***********************************************************************
27// @HEADER
28
29#ifndef SACADO_DUMMY_ARG_HPP
30#define SACADO_DUMMY_ARG_HPP
31
32namespace Sacado {
33
35 template <class T> struct dummy_arg {
36 operator T() const { return T(0.0); }
37 };
38
40 template <class T, class U> struct dummy {
41 typedef U type;
42 };
43
45 template <class T> struct dummy<T,T> {
47 };
48
49} // namespace Sacado
50
51#endif // SACADO_DUMMY_ARG_HPP
#define T
A dummy argument that can be converted to any scalar type.
A meta-function that defines U as its type.