Skip to content

Commit

Permalink
use always_false template to avoid compilation error in
Browse files Browse the repository at this point in the history
`else static_assert(false)`
  • Loading branch information
m-fila committed Feb 14, 2025
1 parent 2d81c4c commit cef53a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion include/podio/detail/Link.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class LinkT {
!detail::isInterfaceInitializableFrom<FromT, T>) {
setTo(std::move(value));
} else {
static_assert(false, "Argument type is ambiguous, can't determine link direction");
static_assert(detail::always_false<T>, "Argument type is ambiguous, can't determine link direction");
}
}

Expand Down
3 changes: 3 additions & 0 deletions include/podio/utilities/TypeHelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ namespace det {

namespace detail {

template <typename T>
constexpr bool always_false = false;

/// Helper struct to determine whether a given type T is in a tuple of types
/// that act as a type list in this case
template <typename T, typename>
Expand Down

0 comments on commit cef53a8

Please sign in to comment.