7#ifndef KISLAZYSTORAGE_H
8#define KISLAZYSTORAGE_H
23template <
typename T,
typename... Args>
57 *
this = std::move(rhs);
61 std::scoped_lock lock(
m_mutex, rhs.m_mutex);
65 m_data.store(rhs.m_data.load());
95 return new T(std::forward<Args>(args)...);
float value(const T *src, size_t ch)
KisLazyStorage & operator=(const KisLazyStorage &rhs)=delete
std::atomic< T * > m_data
static T * constructObject(Args... args)
std::tuple< Args... > m_constructionArgs
KisLazyStorage(KisLazyStorage &&rhs)
KisLazyStorage(Args... args)
KisLazyStorage(init_value_tag, T &&value)
KisLazyStorage(const KisLazyStorage &rhs)=delete
KisLazyStorage & operator=(KisLazyStorage &&rhs)