diff --git a/src/vt/context/runnable_context/collection.h b/src/vt/context/runnable_context/collection.h index 8b1abd67ae..dcee9d1bc2 100644 --- a/src/vt/context/runnable_context/collection.h +++ b/src/vt/context/runnable_context/collection.h @@ -87,9 +87,9 @@ struct Collection { void resume(); private: - std::function set_; /**< Set context function */ + std::function set_; /**< Set context function */ std::function clear_; /**< Clear context function */ - void* elm_ = nullptr; /**< The element (untyped) */ + std::byte* elm_ = nullptr; /**< The element (untyped) */ }; }} /* end namespace vt::ctx */ diff --git a/src/vt/context/runnable_context/collection.impl.h b/src/vt/context/runnable_context/collection.impl.h index 403cc960f8..ebb8daccb9 100644 --- a/src/vt/context/runnable_context/collection.impl.h +++ b/src/vt/context/runnable_context/collection.impl.h @@ -54,9 +54,9 @@ template /*explicit*/ Collection::Collection( vrt::collection::Indexable* elm ) { - elm_ = elm; - set_ = [](void* in_elm){ - auto e = static_cast*>(in_elm); + elm_ = reinterpret_cast(elm); + set_ = [](std::byte* in_elm){ + auto e = reinterpret_cast*>(in_elm); auto& idx_ = e->getIndex(); auto proxy_ = e->getProxy(); vrt::collection::CollectionContextHolder::set(&idx_, proxy_);