Bugzilla – Attachment 961 Details for
Bug 1768
Use enable_if to hide methods
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
This bugzilla service is closed. All entries have been migrated to
https://gitlab.com/libeigen/eigen
[patch]
Possible patch for Matrix<>
bug1768.diff (text/plain), 1.86 KB, created by
Gael Guennebaud
on 2019-11-14 16:03:25 UTC
(
hide
)
Description:
Possible patch for Matrix<>
Filename:
MIME Type:
Creator:
Gael Guennebaud
Created:
2019-11-14 16:03:25 UTC
Size:
1.86 KB
patch
obsolete
>diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h >--- a/Eigen/src/Core/Matrix.h >+++ b/Eigen/src/Core/Matrix.h >@@ -380,28 +380,36 @@ class Matrix > /** \brief Constructs an initialized 2D vector with given coefficients > * \sa Matrix(const Scalar&, const Scalar&, const Scalar&, const Scalar&, const ArgTypes&...) */ > Matrix(const Scalar& x, const Scalar& y); > #endif // end EIGEN_PARSED_BY_DOXYGEN > > /** \brief Constructs an initialized 3D vector with given coefficients > * \sa Matrix(const Scalar&, const Scalar&, const Scalar&, const Scalar&, const ArgTypes&...) > */ >+ #if EIGEN_HAS_CXX11 && !defined(EIGEN_PARSED_BY_DOXYGEN) >+ template< unsigned Size = SizeAtCompileTime, >+ typename Enable = typename internal::enable_if< IsVectorAtCompileTime && Size == 3 >::type > >+ #endif > EIGEN_DEVICE_FUNC > EIGEN_STRONG_INLINE Matrix(const Scalar& x, const Scalar& y, const Scalar& z) > { > Base::_check_template_params(); > EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Matrix, 3) > m_storage.data()[0] = x; > m_storage.data()[1] = y; > m_storage.data()[2] = z; > } > /** \brief Constructs an initialized 4D vector with given coefficients > * \sa Matrix(const Scalar&, const Scalar&, const Scalar&, const Scalar&, const ArgTypes&...) > */ >+ #if EIGEN_HAS_CXX11 && !defined(EIGEN_PARSED_BY_DOXYGEN) >+ template< int Size = SizeAtCompileTime, >+ typename Enable = typename internal::enable_if< IsVectorAtCompileTime && Size == 4>::type > >+ #endif > EIGEN_DEVICE_FUNC > EIGEN_STRONG_INLINE Matrix(const Scalar& x, const Scalar& y, const Scalar& z, const Scalar& w) > { > Base::_check_template_params(); > EIGEN_STATIC_ASSERT_VECTOR_SPECIFIC_SIZE(Matrix, 4) > m_storage.data()[0] = x; > m_storage.data()[1] = y; > m_storage.data()[2] = z;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1768
:
961
|
962