From ea6d7eb32f009bb6357555f81ea5851d01349b66 Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Fri, 12 Jul 2019 19:46:37 +0200 Subject: Move variadic constructors outside `#ifndef EIGEN_PARSED_BY_DOXYGEN` block, to make it actually appear in the generated documentation. --- Eigen/src/Core/Matrix.h | 51 +++++++++++++++++++++++++------------------------ 1 file changed, 26 insertions(+), 25 deletions(-) (limited to 'Eigen/src/Core/Matrix.h') diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index 4b714328c..64138d316 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -283,27 +283,8 @@ class Matrix } #endif - #ifndef EIGEN_PARSED_BY_DOXYGEN - - // This constructor is for both 1x1 matrices and dynamic vectors - template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE - explicit Matrix(const T& x) - { - Base::_check_template_params(); - Base::template _init1(x); - } - - template - EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE - Matrix(const T0& x, const T1& y) - { - Base::_check_template_params(); - Base::template _init2(x, y); - } - - #if EIGEN_HAS_CXX11 - /** \copydoc PlainObjectBase(const Scalar&, const Scalar&, const Scalar&, const Scalar&, const ArgTypes&...) +#if EIGEN_HAS_CXX11 + /** \copydoc PlainObjectBase(const Scalar&, const Scalar&, const Scalar&, const Scalar&, const ArgTypes&... args) * * Example: \include Matrix_variadic_ctor_cxx11.cpp * Output: \verbinclude Matrix_variadic_ctor_cxx11.out @@ -334,13 +315,33 @@ class Matrix * In the case of fixed-sized matrices, the initializer list sizes must exactly match the matrix sizes, * and implicit transposition is allowed for compile-time vectors only. * - * \sa Matrix(const Scalar&, const Scalar&, const Scalar&, const Scalar&, const ArgTypes&...) + * \sa {@ref Matrix(const Scalar& a0, const Scalar& a1, const Scalar& a2, const Scalar& a3, const ArgTypes&... args)} */ - EIGEN_DEVICE_FUNC + EIGEN_DEVICE_FUNC explicit EIGEN_STRONG_INLINE Matrix(const std::initializer_list>& list) : Base(list) {} - #endif // end EIGEN_HAS_CXX11 +#endif // end EIGEN_HAS_CXX11 + +#ifndef EIGEN_PARSED_BY_DOXYGEN + + // This constructor is for both 1x1 matrices and dynamic vectors + template + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE + explicit Matrix(const T& x) + { + Base::_check_template_params(); + Base::template _init1(x); + } + + template + EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE + Matrix(const T0& x, const T1& y) + { + Base::_check_template_params(); + Base::template _init2(x, y); + } + - #else +#else /** \brief Constructs a fixed-sized matrix initialized with coefficients starting at \a data */ EIGEN_DEVICE_FUNC explicit Matrix(const Scalar *data); -- cgit v1.2.3