2626#include " openPMD/IO/AbstractIOHandler.hpp"
2727#include " openPMD/IterationEncoding.hpp"
2828#include " openPMD/auxiliary/Environment.hpp"
29+ #include " openPMD/auxiliary/Memory_internal.hpp"
2930#include " openPMD/auxiliary/StringManip.hpp"
3031
3132#include < cstdint>
@@ -114,7 +115,7 @@ void WriteDataset::call(ADIOS2File &ba, detail::BufferedPut &bp)
114115 }
115116 else if constexpr (std::is_same_v<
116117 ptr_type,
117- UniquePtrWithLambda<void >>)
118+ std::shared_ptr< UniquePtrWithLambda<void > >>)
118119 {
119120 BufferedUniquePtrPut bput;
120121 bput.name = std::move (bp.name );
@@ -128,7 +129,7 @@ void WriteDataset::call(ADIOS2File &ba, detail::BufferedPut &bp)
128129 * (ptr_type does not work for this case).
129130 */
130131 // clang-format off
131- bput.data = std::move (arg); // NOLINT(bugprone-move-forwarding-reference)
132+ bput.data = std::move (* arg); // NOLINT(bugprone-move-forwarding-reference)
132133 // clang-format on
133134 bput.dtype = bp.param .dtype ;
134135 ba.m_uniquePtrPuts .push_back (std::move (bput));
@@ -139,7 +140,7 @@ void WriteDataset::call(ADIOS2File &ba, detail::BufferedPut &bp)
139140 always_false_v<ptr_type>, " Unhandled std::variant branch" );
140141 }
141142 },
142- bp.param .data .m_buffer );
143+ bp.param .data .as_variant <auxiliary::WriteBufferTypes>() );
143144}
144145
145146template <int n, typename ... Params>
0 commit comments