Skip to content
Snippets Groups Projects
Commit bd498e0d authored by Markus Blatt's avatar Markus Blatt
Browse files

[g++-4.4] Fixes missing std::initializer_list::const_iterator for g++-4.4.

With g++-4.4 I got the following errors:

fmatrix.hh:106: error: no type named ‘const_iterator’ in ‘class std::initializer_list<std::initializer_list<int> >’

Looking into the header there is indeed the const_iterator (demanded by the standard)
missing. Therefore I refactored the code to use std::copy_n and thus am omitting the iterator
type.

At the same time I made the actual copying safer for the case that the initializer_list
is of different size and people compile with -DNDEBUG. The assertion for the size is still
left in there. Remove the assert or the size computation at your discretion.
parent 7faf61fe
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment