Skip to content

Commit

Permalink
Add a static_assert for getParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Sep 17, 2024
1 parent f411e01 commit 7a22860
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/podio/Frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,9 @@ class Frame {
/// @param key The key under which the value is stored
///
/// @returns An optional holding the value if it is present
template <typename T, typename = podio::EnableIfValidGenericDataType<T>>
template <typename T>
inline auto getParameter(const std::string& key) const {
static_assert(podio::isSupportedGenericDataType<T>, "The type is not supported by the GenericParameters");
return m_self->parameters().get<T>(key);
}

Expand Down

0 comments on commit 7a22860

Please sign in to comment.