Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
8ce75feb
Commit
8ce75feb
authored
Jan 05, 2012
by
laurence
Browse files
BUG: List constructor now uses deref op instead of operator()()- mantis
#219
parent
2b320a54
Changes
2
Hide whitespace changes
Inline
Side-by-side
applications/test/List/Test-List.C
View file @
8ce75feb
...
...
@@ -37,6 +37,8 @@ Description
#include
"vector.H"
#include
"ListOps.H"
#include
<list>
using
namespace
Foam
;
...
...
@@ -117,6 +119,35 @@ int main(int argc, char *argv[])
<<
"-wordList: "
<<
wLst
<<
nl
<<
"-stringList: "
<<
sLst
<<
endl
;
Info
<<
nl
<<
"Test List Iterator Constuctor"
<<
endl
;
List
<
vector
>
initialList
(
IStringStream
(
"((0 1 2) (3 4 5) (6 7 8))"
)());
Info
<<
" Initial List: "
<<
initialList
<<
endl
;
List
<
vector
>
iteratorList
(
initialList
.
begin
(),
initialList
.
end
());
Info
<<
" Foam::List constructed from Foam::List: "
<<
iteratorList
<<
endl
;
std
::
list
<
vector
>
stlList
(
initialList
.
begin
(),
initialList
.
end
());
Info
<<
" std::list constructed from Foam::List: "
;
std
::
list
<
vector
>::
iterator
it
;
for
(
it
=
stlList
.
begin
();
it
!=
stlList
.
end
();
it
++
)
{
Info
<<
*
it
<<
" "
;
}
Info
<<
endl
;
List
<
vector
>
iteratorSTLList
(
stlList
.
begin
(),
stlList
.
end
());
Info
<<
" Foam::List constructed from std::list: "
<<
iteratorList
<<
endl
;
return
0
;
}
...
...
src/OpenFOAM/containers/Lists/List/List.C
View file @
8ce75feb
...
...
@@ -200,7 +200,7 @@ Foam::List<T>::List(InputIterator first, InputIterator last)
++
iter
)
{
this
->
operator
[](
s
++
)
=
iter
()
;
this
->
operator
[](
s
++
)
=
*
iter
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment