Skip to content
Snippets Groups Projects
Commit 015daf1a authored by Jorrit Fahlke's avatar Jorrit Fahlke
Browse files

[array] Overloaded function make_array() to create initialized arrays.

This is especially useful when an array is needed to initialize a class
member.

This uses a statement like

  array<T, 2> result = { t0, t1 };

to initialize the array.  This is correct and explicitly allowed by the
upcoming standard.  Unfortunately g++ warns about this with -Wmissing-braces
(which is implied by -Wall) because this relies on brace elision.  The report
<http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25137> has been filed more than
five years ago, but so far not much has happened.

[[Imported from SVN: r6328]]
parent 995ea546
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment