@@ -238,33 +238,32 @@ OPENPMD_FOREACH_DATASET_DATATYPE(INSTANTIATE_METHOD_TEMPLATES_FOR_BASE)
238238
239239#undef INSTANTIATE_METHOD_TEMPLATES_FOR_BASE
240240
241- /*
242- * In the following macro, we replace `dtype` with `std::remove_cv_t<dtype
243- * const>` since otherwise clang-tidy won't understand it's a type and we cannot
244- * surround it with parentheses. The type names are surrounded with angle
245- * brackets, so the warning is useless.
246- */
247-
241+ /* clang-format would destroy the NOLINT comments */
242+ // clang-format off
248243#define INSTANTIATE_STORE_CHUNK_FROM_BUFFER (dtype ) \
249- template class ConfigureLoadStoreFromBuffer < \
250- std::shared_ptr<std:: remove_cv_t < dtype const >>>; \
244+ /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \
245+ template class ConfigureLoadStoreFromBuffer < std::shared_ptr<dtype>>; \
251246 template class ConfigureStoreChunkFromBuffer < \
252247 std::shared_ptr<dtype>, \
253- ConfigureLoadStoreFromBuffer< \
254- std::shared_ptr<std::remove_cv_t <dtype const >>>>; \
255- template class ConfigureLoadStore <ConfigureLoadStoreFromBuffer< \
256- std::shared_ptr<std::remove_cv_t <dtype const >>>>; \
248+ /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \
249+ ConfigureLoadStoreFromBuffer<std::shared_ptr<dtype>>>; \
250+ template class ConfigureLoadStore < \
251+ /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \
252+ ConfigureLoadStoreFromBuffer<std::shared_ptr<dtype>>>; \
257253 INSTANTIATE_METHOD_TEMPLATES ( \
258- ConfigureLoadStore<ConfigureLoadStoreFromBuffer< \
259- std::shared_ptr<std::remove_cv_t <dtype const >>>>, \
254+ ConfigureLoadStore< \
255+ /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \
256+ ConfigureLoadStoreFromBuffer<std::shared_ptr<dtype>>>, \
260257 dtype) \
261- template class ConfigureStoreChunkFromBuffer < \
262- UniquePtrWithLambda<std::remove_cv_t <dtype const >>>; \
263- template class ConfigureLoadStore <ConfigureStoreChunkFromBuffer< \
264- UniquePtrWithLambda<std::remove_cv_t <dtype const >>>>; \
258+ /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \
259+ template class ConfigureStoreChunkFromBuffer <UniquePtrWithLambda<dtype>>; \
260+ template class ConfigureLoadStore < \
261+ /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \
262+ ConfigureStoreChunkFromBuffer<UniquePtrWithLambda<dtype>>>; \
265263 INSTANTIATE_METHOD_TEMPLATES ( \
266- ConfigureLoadStore<ConfigureStoreChunkFromBuffer< \
267- UniquePtrWithLambda<std::remove_cv_t <dtype const >>>>, \
264+ ConfigureLoadStore< \
265+ /* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \
266+ ConfigureStoreChunkFromBuffer<UniquePtrWithLambda<dtype>>>, \
268267 dtype) \
269268 template class ConfigureStoreChunkFromBuffer < \
270269 std::shared_ptr<dtype const >>; \
@@ -274,6 +273,7 @@ OPENPMD_FOREACH_DATASET_DATATYPE(INSTANTIATE_METHOD_TEMPLATES_FOR_BASE)
274273 ConfigureLoadStore< \
275274 ConfigureStoreChunkFromBuffer<std::shared_ptr<dtype const >>>, \
276275 dtype)
276+ // clang-format on
277277
278278OPENPMD_FOREACH_DATASET_DATATYPE (INSTANTIATE_STORE_CHUNK_FROM_BUFFER)
279279
0 commit comments