[dune-functions] [Dune-functions-commit] [Commit] dune-functions - ec8a83b: [signature] add general infrastructure to deduce the signature of a callable
Carsten Gräser
graeser at mi.fu-berlin.de
Thu Apr 2 14:28:01 CEST 2015
Am 02.04.2015 um 13:12 schrieb Christian Engwer:
> New commit, appeared at Thu Apr 2 13:12:15 2015 +0200
> as part of the following ref changes:
>
> branch refs/heads/master updated from 778389c -> ec8a83b
>
> Browsable version: http://cgit.dune-project.org/repositories/dune-functions/commit/?id=ec8a83b41f59f421c86d3ab201035babd42f6884
>
> ======================================================================
>
> commit ec8a83b41f59f421c86d3ab201035babd42f6884
> Author: Christian Engwer <christi at dune-project.org>
> Date: Thu Apr 2 13:11:46 2015 +0200
>
> [signature] add general infrastructure to deduce the signature of a callable
>
> dune/functions/common/signature.hh | 27 ++++++++++++++++++++++++---
> 1 file changed, 24 insertions(+), 3 deletions(-)
[...]
> +/** \brief deduce the signature of the operator() of a class T */
> +template<class T>
> +struct SignatureTraits
> + : public SignatureTraits<decltype(&T::operator())>
> +{};
> +
> +/** \brief deduce the signature of an arbitrary const member function of class C */
> +template <typename C, typename R, typename D>
> +struct SignatureTraits<R(C::*)(D) const>
> + : public SignatureTraits<R(D)>
> +{};
> +
> +/** \brief deduce the signature of an arbitrary member function of class C */
> +template <typename C, typename R, typename D>
> +struct SignatureTraits<R(C::*)(D)>
> + : public SignatureTraits<R(D)>
> +{};
Nice idea!
C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune-functions/attachments/20150402/9554405e/attachment.sig>
More information about the dune-functions
mailing list