- namespace internal
- {
- /**
- * @internal
- *
- * Construct a pointer to non-member function based on the template
- * arguments, and whether the second argument is a const or non-const
- * class, depending on which the member function will also me const or
- * non-const. There are specializations of this class for each number of
- * arguments.
- */
- template <typename RT, typename ArgList,
- int length = std::tuple_size<ArgList>::value>
- struct fun_ptr_helper;
-
-
- /**
- * @internal
- *
- * Construct a pointer to non-member function based on the template
- * arguments. This is the specialization for 0 arguments.
- */
- template <typename RT, typename ArgList>
- struct fun_ptr_helper<RT, ArgList, 0>
- {
- typedef RT (type) ();
- };
-
-
- /**
- * @internal
- *
- * Construct a pointer to non-member function based on the template
- * arguments. This is the specialization for 1 argument.
- */
- template <typename RT, typename ArgList>
- struct fun_ptr_helper<RT, ArgList, 1>
- {
- typedef RT (type) (typename std::tuple_element<0,ArgList>::type);
- };
-
-
- /**
- * @internal
- *
- * Construct a pointer to non-member function based on the template
- * arguments. This is the specialization for 2 arguments.
- */
- template <typename RT, typename ArgList>
- struct fun_ptr_helper<RT, ArgList, 2>
- {
- typedef RT (type) (typename std::tuple_element<0,ArgList>::type,
- typename std::tuple_element<1,ArgList>::type);
- };
-
-
- /**
- * @internal
- *
- * Construct a pointer to non-member function based on the template
- * arguments. This is the specialization for 3 arguments.
- */
- template <typename RT, typename ArgList>
- struct fun_ptr_helper<RT, ArgList, 3>
- {
- typedef RT (type) (typename std::tuple_element<0,ArgList>::type,
- typename std::tuple_element<1,ArgList>::type,
- typename std::tuple_element<2,ArgList>::type);
- };
-
-
- /**
- * @internal
- *
- * Construct a pointer to non-member function based on the template
- * arguments. This is the specialization for 4 arguments.
- */
- template <typename RT, typename ArgList>
- struct fun_ptr_helper<RT, ArgList, 4>
- {
- typedef RT (type) (typename std::tuple_element<0,ArgList>::type,
- typename std::tuple_element<1,ArgList>::type,
- typename std::tuple_element<2,ArgList>::type,
- typename std::tuple_element<3,ArgList>::type);
- };
-
-
- /**
- * @internal
- *
- * Construct a pointer to non-member function based on the template
- * arguments. This is the specialization for 5 arguments.
- */
- template <typename RT, typename ArgList>
- struct fun_ptr_helper<RT, ArgList, 5>
- {
- typedef RT (type) (typename std::tuple_element<0,ArgList>::type,
- typename std::tuple_element<1,ArgList>::type,
- typename std::tuple_element<2,ArgList>::type,
- typename std::tuple_element<3,ArgList>::type,
- typename std::tuple_element<4,ArgList>::type);
- };
-
-
- /**
- * @internal
- *
- * Construct a pointer to non-member function based on the template
- * arguments. This is the specialization for 6 arguments.
- */
- template <typename RT, typename ArgList>
- struct fun_ptr_helper<RT, ArgList, 6>
- {
- typedef RT (type) (typename std::tuple_element<0,ArgList>::type,
- typename std::tuple_element<1,ArgList>::type,
- typename std::tuple_element<2,ArgList>::type,
- typename std::tuple_element<3,ArgList>::type,
- typename std::tuple_element<4,ArgList>::type,
- typename std::tuple_element<5,ArgList>::type);
- };
-
-
- /**
- * @internal
- *
- * Construct a pointer to non-member function based on the template
- * arguments. This is the specialization for 7 arguments.
- */
- template <typename RT, typename ArgList>
- struct fun_ptr_helper<RT, ArgList, 7>
- {
- typedef RT (type) (typename std::tuple_element<0,ArgList>::type,
- typename std::tuple_element<1,ArgList>::type,
- typename std::tuple_element<2,ArgList>::type,
- typename std::tuple_element<3,ArgList>::type,
- typename std::tuple_element<4,ArgList>::type,
- typename std::tuple_element<5,ArgList>::type,
- typename std::tuple_element<6,ArgList>::type);
- };
-
-
- /**
- * @internal
- *
- * Construct a pointer to non-member function based on the template
- * arguments. This is the specialization for 8 arguments.
- */
- template <typename RT, typename ArgList>
- struct fun_ptr_helper<RT, ArgList, 8>
- {
- typedef RT (type) (typename std::tuple_element<0,ArgList>::type,
- typename std::tuple_element<1,ArgList>::type,
- typename std::tuple_element<2,ArgList>::type,
- typename std::tuple_element<3,ArgList>::type,
- typename std::tuple_element<4,ArgList>::type,
- typename std::tuple_element<5,ArgList>::type,
- typename std::tuple_element<6,ArgList>::type,
- typename std::tuple_element<7,ArgList>::type);
- };
-
-
- /**
- * @internal
- *
- * Construct a pointer to non-member function based on the template
- * arguments. This is the specialization for 9 arguments.
- */
- template <typename RT, typename ArgList>
- struct fun_ptr_helper<RT, ArgList, 9>
- {
- typedef RT (type) (typename std::tuple_element<0,ArgList>::type,
- typename std::tuple_element<1,ArgList>::type,
- typename std::tuple_element<2,ArgList>::type,
- typename std::tuple_element<3,ArgList>::type,
- typename std::tuple_element<4,ArgList>::type,
- typename std::tuple_element<5,ArgList>::type,
- typename std::tuple_element<6,ArgList>::type,
- typename std::tuple_element<7,ArgList>::type,
- typename std::tuple_element<8,ArgList>::type);
- };
-
-
-
- /**
- * @internal
- *
- * Construct a pointer to non-member function based on the template
- * arguments. This is the specialization for 10 arguments.
- */
- template <typename RT, typename ArgList>
- struct fun_ptr_helper<RT, ArgList, 10>
- {
- typedef RT (type) (typename std::tuple_element<0,ArgList>::type,
- typename std::tuple_element<1,ArgList>::type,
- typename std::tuple_element<2,ArgList>::type,
- typename std::tuple_element<3,ArgList>::type,
- typename std::tuple_element<4,ArgList>::type,
- typename std::tuple_element<5,ArgList>::type,
- typename std::tuple_element<6,ArgList>::type,
- typename std::tuple_element<7,ArgList>::type,
- typename std::tuple_element<8,ArgList>::type,
- typename std::tuple_element<9,ArgList>::type);
- };
-
-
-
- /**
- * @internal
- *
- * Construct a pointer to non-member function based on the template
- * arguments. We do this by dispatching to the fun_ptr_helper classes that
- * are overloaded on the number of elements.
- *
- * Note that the last template argument for the fun_ptr_helper class is
- * automatically computed in the default argument to the general template.
- */
- template <typename RT, typename ArgList>
- struct fun_ptr
- {
- typedef typename fun_ptr_helper<RT,ArgList>::type type;
- };
- }
-
-
-
namespace internal
{
#ifdef DEAL_II_WITH_THREADS