FixedList: Add constructors from iterators and C++11 initializer_list using C++11 constructor delegation

This commit is contained in:
Henry Weller
2016-08-05 16:25:18 +01:00
parent 438c9b901b
commit 42e6cf574d
3 changed files with 52 additions and 12 deletions

View File

@ -71,6 +71,17 @@ int main(int argc, char *argv[])
Info<< "list: " << list << nl
<< "list2: " << list2 << endl;
List<label> list3{0, 1, 2, 3};
FixedList<label, 4> list4(list3.begin(), list3.end());
Info<< "list3: " << list3 << nl
<< "list4: " << list4 << endl;
FixedList<label, 5> list5{0, 1, 2, 3, 4};
Info<< "list5: " << list5 << endl;
List<FixedList<label, 2>> list6{{0, 1}, {2, 3}};
Info<< "list6: " << list6 << endl;
if (Pstream::parRun())
{
if (Pstream::myProcNo() != Pstream::masterNo())