From 237b03b3724df7137e82512cd7ad758e20b8e6b6 Mon Sep 17 00:00:00 2001 From: David Tellenbach Date: Wed, 23 Jan 2019 00:07:19 +0100 Subject: PR 574: use variadic template instead of initializer_list to implement fixed-size vector ctor from coefficients. --- doc/TutorialMatrixClass.dox | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'doc/TutorialMatrixClass.dox') diff --git a/doc/TutorialMatrixClass.dox b/doc/TutorialMatrixClass.dox index c44c8f24f..2c452220f 100644 --- a/doc/TutorialMatrixClass.dox +++ b/doc/TutorialMatrixClass.dox @@ -109,11 +109,11 @@ Vector3d b(5.0, 6.0, 7.0); Vector4d c(5.0, 6.0, 7.0, 8.0); \endcode -If C++11 is enabled, fixed-size column or row vectors of arbitrary size can be initialized through a single initializer list (\link Matrix::Matrix(const std::initializer_list&) details \endlink): +If C++11 is enabled, fixed-size column or row vectors of arbitrary size can be initialized by passing an arbitrary number of coefficients: \code -Vector2i a {1, 2}; // A column vector containing the elements {1, 2} +Vector2i a(1, 2); // A column vector containing the elements {1, 2} Matrix b {1, 2, 3, 4, 5}; // A row-vector containing the elements {1, 2, 3, 4, 5} -Matrix c {1, 2, 3, 4, 5}; // A column vector containing the elements {1, 2, 3, 4, 5} +Matrix c = {1, 2, 3, 4, 5}; // A column vector containing the elements {1, 2, 3, 4, 5} \endcode In the general case of matrices and vectors with either fixed or runtime sizes, -- cgit v1.2.3