Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Plumed AlphaFold
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Kurečka
Plumed AlphaFold
Commits
4718e4ab
There was an error fetching the commit references. Please try again later.
Commit
4718e4ab
authored
6 years ago
by
Giovanni Bussi
Browse files
Options
Downloads
Patches
Plain Diff
Added test for move semantics
parent
2b46b05e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
regtest/basic/rt-make-wrappers/COLVAR.reference
+4
-0
4 additions, 0 deletions
regtest/basic/rt-make-wrappers/COLVAR.reference
regtest/basic/rt-make-wrappers/main.cpp
+15
-2
15 additions, 2 deletions
regtest/basic/rt-make-wrappers/main.cpp
with
19 additions
and
2 deletions
regtest/basic/rt-make-wrappers/COLVAR.reference
+
4
−
0
View file @
4718e4ab
...
...
@@ -54,3 +54,7 @@
0.000000 0.000000
#! FIELDS time d
0.000000 0.000000
#! FIELDS time d
0.000000 0.000000
#! FIELDS time d
0.000000 0.000000
This diff is collapsed.
Click to expand it.
regtest/basic/rt-make-wrappers/main.cpp
+
15
−
2
View file @
4718e4ab
...
...
@@ -137,13 +137,26 @@ int main(){
testmecpp
(
p
);
}
{
// test move semantics
PLMD
::
Plumed
p
;
PLMD
::
Plumed
q
(
std
::
move
(
p
));
testmecpp
(
q
);
}
{
PLMD
::
Plumed
p
,
q
;
q
=
std
::
move
(
p
);
testmecpp
(
q
);
}
if
(
PLMD
::
Plumed
::
ginitialized
())
return
0
;
PLMD
::
Plumed
::
gcreate
();
if
(
!
PLMD
::
Plumed
::
ginitialized
())
return
0
;
// this requires move semantics and only works with C++11
//
PLMD::Plumed fromglobal(PLMD::Plumed::global());
PLMD
::
Plumed
fromglobal
(
PLMD
::
Plumed
::
global
());
// here's a workaround for plumed 2.3:
PLMD
::
Plumed
fromglobal
(
plumed_global
());
//
PLMD::Plumed fromglobal(plumed_global());
testmecpp
(
fromglobal
);
PLMD
::
Plumed
::
gfinalize
();
if
(
PLMD
::
Plumed
::
ginitialized
())
return
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment