From 28ec91b43470e011ed624b9f95ea00d3a755e425 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20Gr=C3=A4ser?= <graeser@dune-project.org> Date: Fri, 8 Jan 2010 14:16:04 +0000 Subject: [PATCH] Export types as Traits class You might sometimes need them im the Function<D,R> is used as template argument. [[Imported from SVN: r5803]] --- dune/common/function.hh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/dune/common/function.hh b/dune/common/function.hh index 1dfcbf99e..4ee575866 100644 --- a/dune/common/function.hh +++ b/dune/common/function.hh @@ -26,13 +26,23 @@ namespace Dune { template <class Domain, class Range> class Function { + typedef typename ConstantVolatileTraits<typename TypeTraits< Domain >::ReferredType >::UnqualifiedType RawDomainType; + typedef typename ConstantVolatileTraits<typename TypeTraits< Range >::ReferredType >::UnqualifiedType RawRangeType; + public: //! Raw type of input variable with removed reference and constness - typedef typename ConstantVolatileTraits<typename TypeTraits< Domain >::ReferredType >::UnqualifiedType DomainType; + typedef RawRangeType RangeType; //! Raw type of output variable with removed reference and constness - typedef typename ConstantVolatileTraits<typename TypeTraits< Range >::ReferredType >::UnqualifiedType RangeType; + typedef RawDomainType DomainType; + + //! Traits class containing raw types + struct Traits + { + typedef RawDomainType DomainType; + typedef RawRangeType RangeType; + }; /** * \brief Function evaluation. -- GitLab