Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
atlas
athena
Commits
1ca6b90c
Commit
1ca6b90c
authored
Jun 17, 2021
by
Frank Winklmeier
Browse files
Merge branch 'DataVector_move_assignCopy_II_test' into 'master'
Data vector move assignment noexcept Part II See merge request
!44426
parents
4655ccae
bc11e09a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Control/AthContainers/AthContainers/DataVector.h
View file @
1ca6b90c
...
...
@@ -2156,7 +2156,7 @@ public:
*
* Any auxiliary data will be moved along with the container contents.
*/
DataVector
&
operator
=
(
DataVector
&&
rhs
);
DataVector
&
operator
=
(
DataVector
&&
rhs
)
noexcept
;
/**
...
...
Control/AthContainers/AthContainers/DataVector.icc
View file @
1ca6b90c
...
...
@@ -2158,7 +2158,7 @@ DATAVECTOR& DATAVECTOR::operator= (const DataVector& rhs)
* Any auxiliary data will be moved along with the container contents.
*/
template
<
class
T
>
DATAVECTOR
&
DATAVECTOR
::
operator
=
(
DATAVECTOR
&&
rhs
)
DATAVECTOR
&
DATAVECTOR
::
operator
=
(
DATAVECTOR
&&
rhs
)
noexcept
{
if
(
this
!=
&
rhs
)
{
// Ensure we're not being called via a base class.
...
...
Control/AthContainers/CMakeLists.txt
View file @
1ca6b90c
...
...
@@ -90,6 +90,7 @@ if( NOT XAOD_STANDALONE )
_add_test
(
DataVector_d_test
)
_add_test
(
DataVector_e_test
)
_add_test
(
DataVector_f_test
)
_add_test
(
DataVector_rule5_test
)
_add_test
(
copyAuxStoreThinned_test
)
_add_test
(
copyThinned_test
)
_add_test
(
dataVectorAsELV_test
)
...
...
Control/AthContainers/test/DataVector_rule5_test.cxx
0 → 100644
View file @
1ca6b90c
/*
Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
*/
/*
* Check if DataVector of a dummy type
* is
* - default_constructible
* - copy_constructible
* - copy_assignable
* - nothrow_move_constructible
* - nothrow_move_assignable
* - is_destructible
*/
#include
"AthContainers/DataVector.h"
struct
apple
{
int
size
=
0
;
int
colour
=
0
;
};
using
apples
=
DataVector
<
const
apple
>
;
struct
applePie
{
static_assert
(
std
::
is_default_constructible
<
apples
>::
value
,
"DataVector fails is_default_constructible"
);
static_assert
(
std
::
is_copy_constructible
<
apples
>::
value
,
"DataVector fails is_copy_constructible"
);
static_assert
(
std
::
is_copy_assignable
<
apples
>::
value
,
"DataVector fails is_copy_assignable"
);
static_assert
(
std
::
is_nothrow_move_constructible
<
apples
>::
value
,
"DataVector fails is_nothrow_move_constructible"
);
static_assert
(
std
::
is_nothrow_move_assignable
<
apples
>::
value
,
"DataVector fails is_nothrow_move_assignable "
);
static_assert
(
std
::
is_destructible
<
apples
>::
value
,
"DataVector fails is_destructible"
);
};
int
main
()
{
[[
maybe_unused
]]
applePie
myPie
;
return
0
;
}
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