@@ -68,16 +68,16 @@ class ConfigureStoreChunk : protected internal::ConfigureStoreChunkData
6868 /* then*/ ConfigureStoreChunk<void >,
6969 /* else*/ ChildClass>;
7070 template <typename T>
71- using normalize_dataset_type =
72- std::remove_cv_t <std::remove_extent_t <T>> const ;
71+ using normalize_dataset_type = std::remove_cv_t <std::remove_extent_t <T>>;
7372
7473 auto offset (Offset) -> return_type &;
7574 auto extent (Extent) -> return_type &;
7675
7776 // @todo rvalue references..?
7877 template <typename T>
7978 auto fromSharedPtr (std::shared_ptr<T>)
80- -> TypedConfigureStoreChunk<std::shared_ptr<normalize_dataset_type<T>>>;
79+ -> TypedConfigureStoreChunk<
80+ std::shared_ptr<normalize_dataset_type<T> const >>;
8181 template <typename T>
8282 auto fromUniquePtr (UniquePtrWithLambda<T>)
8383 -> TypedConfigureStoreChunk<
@@ -87,13 +87,15 @@ class ConfigureStoreChunk : protected internal::ConfigureStoreChunkData
8787 -> TypedConfigureStoreChunk<
8888 UniquePtrWithLambda<normalize_dataset_type<T>>>;
8989 template <typename T>
90- auto fromRawPtr (T *data) -> TypedConfigureStoreChunk<std::shared_ptr<T>>;
90+ auto
91+ fromRawPtr (T *data) -> TypedConfigureStoreChunk<
92+ std::shared_ptr<normalize_dataset_type<T> const >>;
9193 template <typename T_ContiguousContainer>
9294 auto fromContiguousContainer (T_ContiguousContainer &data) ->
9395 typename std::enable_if_t<
9496 auxiliary::IsContiguousContainer_v<T_ContiguousContainer>,
95- TypedConfigureStoreChunk<
96- std::shared_ptr< typename T_ContiguousContainer::value_type>>>;
97+ TypedConfigureStoreChunk<std::shared_ptr<normalize_dataset_type<
98+ typename T_ContiguousContainer::value_type> const >>>;
9799
98100 template <typename T>
99101 auto enqueue () -> DynamicMemoryView<T>;
@@ -135,15 +137,18 @@ class TypedConfigureStoreChunk
135137template <typename ChildClass>
136138template <typename T>
137139auto ConfigureStoreChunk<ChildClass>::fromSharedPtr(std::shared_ptr<T> data)
138- -> TypedConfigureStoreChunk<std::shared_ptr<normalize_dataset_type<T>>>
140+ -> TypedConfigureStoreChunk<
141+ std::shared_ptr<normalize_dataset_type<T> const >>
139142{
140143 if (!data)
141144 {
142145 throw std::runtime_error (
143146 " Unallocated pointer passed during chunk store." );
144147 }
145- return TypedConfigureStoreChunk<std::shared_ptr<normalize_dataset_type<T>>>(
146- std::static_pointer_cast<normalize_dataset_type<T>>(std::move (data)),
148+ return TypedConfigureStoreChunk<
149+ std::shared_ptr<normalize_dataset_type<T> const >>(
150+ std::static_pointer_cast<normalize_dataset_type<T> const >(
151+ std::move (data)),
147152 {std::move (*this )});
148153}
149154template <typename ChildClass>
@@ -164,14 +169,16 @@ auto ConfigureStoreChunk<ChildClass>::fromUniquePtr(UniquePtrWithLambda<T> data)
164169template <typename ChildClass>
165170template <typename T>
166171auto ConfigureStoreChunk<ChildClass>::fromRawPtr(T *data)
167- -> TypedConfigureStoreChunk<std::shared_ptr<T>>
172+ -> TypedConfigureStoreChunk<
173+ std::shared_ptr<normalize_dataset_type<T> const >>
168174{
169175 if (!data)
170176 {
171177 throw std::runtime_error (
172178 " Unallocated pointer passed during chunk store." );
173179 }
174- return TypedConfigureStoreChunk<std::shared_ptr<T>>(
180+ return TypedConfigureStoreChunk<
181+ std::shared_ptr<normalize_dataset_type<T> const >>(
175182 auxiliary::shareRaw (data), {std::move (*this )});
176183}
177184
@@ -189,8 +196,8 @@ auto ConfigureStoreChunk<ChildClass>::fromContiguousContainer(
189196 T_ContiguousContainer &data) ->
190197 typename std::enable_if_t <
191198 auxiliary::IsContiguousContainer_v<T_ContiguousContainer>,
192- TypedConfigureStoreChunk<
193- std::shared_ptr< typename T_ContiguousContainer::value_type>>>
199+ TypedConfigureStoreChunk<std::shared_ptr<normalize_dataset_type<
200+ typename T_ContiguousContainer::value_type> const >>>
194201{
195202 if (!m_extent.has_value () && dim () == 1 )
196203 {
0 commit comments