LList, SLList: Added construction from and assignment to initializer_list

SLList: now a C++11 template alias rather than a wrapper-class.
This commit is contained in:
Henry Weller
2016-08-12 10:01:41 +01:00
parent f846706229
commit 659076c0fa
8 changed files with 67 additions and 68 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -39,7 +39,8 @@ using namespace Foam;
int main(int argc, char *argv[])
{
SLList<scalar> myList;
SLList<scalar> myList{2.1, 3.4};
myList = {2.1, 3.4, 4.3};
for (int i = 0; i<10; i++)
{