@@ -108,14 +108,14 @@ auto ConfigureLoadStore<ChildClass>::storeChunkConfig()
108108template <typename ChildClass>
109109auto ConfigureLoadStore<ChildClass>::extent(Extent extent) -> return_type &
110110{
111- m_extent = std::move (extent);
111+ m_extent = std::make_optional<Extent>( std:: move (extent) );
112112 return *static_cast <return_type *>(this );
113113}
114114
115115template <typename ChildClass>
116116auto ConfigureLoadStore<ChildClass>::offset(Offset offset) -> return_type &
117117{
118- m_offset = std::move (offset);
118+ m_offset = std::make_optional<Offset>( std:: move (offset) );
119119 return *static_cast <return_type *>(this );
120120}
121121
@@ -215,23 +215,33 @@ OPENPMD_FOREACH_DATASET_DATATYPE(INSTANTIATE_METHOD_TEMPLATES_FOR_BASE)
215215
216216#undef INSTANTIATE_METHOD_TEMPLATES_FOR_BASE
217217
218+ /*
219+ * In the following macro, we replace `dtype` with `std::remove_cv_t<dtype
220+ * const>` since otherwise clang-tidy won't understand it's a type and we cannot
221+ * surround it with parentheses. The type names are surrounded with angle
222+ * brackets, so the warning is useless.
223+ */
224+
218225#define INSTANTIATE_STORE_CHUNK_FROM_BUFFER (dtype ) \
219- template class ConfigureLoadStoreFromBuffer <std::shared_ptr<dtype>>; \
226+ template class ConfigureLoadStoreFromBuffer < \
227+ std::shared_ptr<std::remove_cv_t <dtype const >>>; \
220228 template class ConfigureStoreChunkFromBuffer < \
221229 std::shared_ptr<dtype>, \
222- ConfigureLoadStoreFromBuffer<std::shared_ptr<dtype>>>; \
223- template class ConfigureLoadStore < \
224- ConfigureLoadStoreFromBuffer<std::shared_ptr<dtype>>>; \
230+ ConfigureLoadStoreFromBuffer< \
231+ std::shared_ptr<std::remove_cv_t <dtype const >>>>; \
232+ template class ConfigureLoadStore <ConfigureLoadStoreFromBuffer< \
233+ std::shared_ptr<std::remove_cv_t <dtype const >>>>; \
225234 INSTANTIATE_METHOD_TEMPLATES ( \
226- ConfigureLoadStore< \
227- ConfigureLoadStoreFromBuffer< std::shared_ptr<dtype>>>, \
235+ ConfigureLoadStore<ConfigureLoadStoreFromBuffer< \
236+ std::shared_ptr<std:: remove_cv_t < dtype const >>>>, \
228237 dtype) \
229- template class ConfigureStoreChunkFromBuffer <UniquePtrWithLambda<dtype>>; \
230- template class ConfigureLoadStore < \
231- ConfigureStoreChunkFromBuffer<UniquePtrWithLambda<dtype>>>; \
238+ template class ConfigureStoreChunkFromBuffer < \
239+ UniquePtrWithLambda<std::remove_cv_t <dtype const >>>; \
240+ template class ConfigureLoadStore <ConfigureStoreChunkFromBuffer< \
241+ UniquePtrWithLambda<std::remove_cv_t <dtype const >>>>; \
232242 INSTANTIATE_METHOD_TEMPLATES ( \
233- ConfigureLoadStore< \
234- ConfigureStoreChunkFromBuffer< UniquePtrWithLambda<dtype>>>, \
243+ ConfigureLoadStore<ConfigureStoreChunkFromBuffer< \
244+ UniquePtrWithLambda<std:: remove_cv_t < dtype const >>>>, \
235245 dtype) \
236246 template class ConfigureStoreChunkFromBuffer < \
237247 std::shared_ptr<dtype const >>; \
0 commit comments