Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SFINAE bug in container base type #890

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions core/include/traccc/edm/details/container_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,11 @@ class container_base {
/**
* @brief Constructor from a pair of "view type" objects
*/
template <typename header_vector_tp, typename item_vector_tp,
typename = std::enable_if<
std::is_same<header_vector_tp, header_vector>::value>,
typename = std::enable_if<
std::is_same<item_vector_tp, item_vector>::value>>
TRACCC_HOST_DEVICE container_base(const header_vector_tp& hv,
const item_vector_tp& iv)
template <typename header_vector_tp, typename item_vector_tp>
requires(std::constructible_from<header_vector, const header_vector_tp&>&&
std::constructible_from<item_vector, const item_vector_tp&>)
TRACCC_HOST_DEVICE
container_base(const header_vector_tp& hv, const item_vector_tp& iv)
: m_headers(hv), m_items(iv) {

assert(m_headers.size() == m_items.size());
Expand Down
Loading