Skip to content

Commit

Permalink
Merge pull request #239 from krasznaa/BoolAssert-main-20230925
Browse files Browse the repository at this point in the history
Bool Containers, main branch (2023.09.25.)
  • Loading branch information
krasznaa authored Sep 25, 2023
2 parents a47377e + 066cf9a commit e91f798
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions core/include/vecmem/containers/data/jagged_vector_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ namespace data {
template <typename T>
class jagged_vector_view {

/// We cannot use boolean types.
static_assert(!std::is_same<typename std::remove_cv<T>::type, bool>::value,
"bool is not supported in VecMem containers");

public:
/// Size type used in the class
typedef std::size_t size_type;
Expand Down
7 changes: 6 additions & 1 deletion core/include/vecmem/containers/data/vector_view.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* VecMem project, part of the ACTS project (R&D line)
*
* (c) 2021 CERN for the benefit of the ACTS project
* (c) 2021-2023 CERN for the benefit of the ACTS project
*
* Mozilla Public License Version 2.0
*/
Expand Down Expand Up @@ -37,6 +37,11 @@ namespace data {
template <typename TYPE>
class vector_view {

/// We cannot use boolean types.
static_assert(
!std::is_same<typename std::remove_cv<TYPE>::type, bool>::value,
"bool is not supported in VecMem containers");

public:
/// Size type used in the class
typedef unsigned int size_type;
Expand Down

0 comments on commit e91f798

Please sign in to comment.