|
From: | Carnë Draug |
Subject: | [Octave-patch-tracker] [patch #9030] dim_vector constructor for any number of dimensions |
Date: | Mon, 13 Jun 2016 02:07:11 +0000 (UTC) |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.7.1 |
URL: <http://savannah.gnu.org/patch/?9030> Summary: dim_vector constructor for any number of dimensions Project: GNU Octave Submitted by: carandraug Submitted on: Mon 13 Jun 2016 02:07:09 AM GMT Category: None Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Originator Email: Open/Closed: Open Discussion Lock: Any _______________________________________________________ Details: The attached patch adds a new constructor to dim_vector so it can work with any number of dimensions. This uses C++11 features. This can replace the existing macros that are limited to 7 dimensions. It has the following issues: * throws an exception if less than 2 dimensions are defined. Maybe we should we have liboctave exceptions instead? * it's not container agnostic. Would be nice if it worked for vector but I'm not sure about the best way of doing that. Using a template for the STL sequence containers creates ambiguous constructors for Arrays. _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Mon 13 Jun 2016 02:07:09 AM GMT Name: dim-vector-init_list.cset Size: 2kB By: carandraug <http://savannah.gnu.org/patch/download.php?file_id=37457> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/patch/?9030> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |