Skip to content

Commit

Permalink
Uncomment static_assert since it works in any case
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Sep 8, 2021
1 parent 0da8cd8 commit 5ad307b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/podio/GenericWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ using remove_cvref_t = typename remove_cvref<T>::type;

// Helper bool to check if the first type is any of the passed other types after
// stripping all const, volatile and references from the first type
// I.e. the following will compile:
// static_assert(isAnyOf<const int&, int>);
template<typename T, typename ...Ts>
constexpr bool isAnyOf = (std::is_same_v<remove_cvref_t<T>, Ts> || ...);
// I.e. the following works
static_assert(isAnyOf<const int&, int>);

// Helper struct to select functions/overloads depending on whether the first
// type is actually one of the other passed types (after removing any const and
Expand Down

0 comments on commit 5ad307b

Please sign in to comment.