From: Mikko Rasa Date: Wed, 27 Dec 2023 11:17:46 +0000 (+0200) Subject: Add std:: qualifier to nullptr_t X-Git-Url: https://git.tdb.fi/?a=commitdiff_plain;h=d97f9d9bf2d44faf1b48d91f911b71d5bb1a1084;p=libs%2Fdatafile.git Add std:: qualifier to nullptr_t --- diff --git a/source/loader.h b/source/loader.h index 5b7b442..abad2f1 100644 --- a/source/loader.h +++ b/source/loader.h @@ -48,7 +48,7 @@ protected: public: using ObjType = typename L::Object; using LoadResult = std::conditional_t, - std::conditional_t, std::unique_ptr, P>, + std::conditional_t, std::unique_ptr, P>, ObjType *>; private: @@ -136,7 +136,7 @@ protected: given. The load call will return a raw pointer if the object was stored in a collection, or a unique pointer otherwise.*/ template - SubOps dyn_sub() + SubOps dyn_sub() { return { *this, nullptr }; } /** Sets the actions to be used when loading. If the map is empty, @@ -211,7 +211,7 @@ template typename Loader::SubOps::LoadResult Loader::SubOps::load(Args &&... args) { std::optional ldr; - if constexpr(std::is_same_v) + if constexpr(std::is_same_v) { if constexpr(!std::is_same_v && NeedsCollection::value) ldr.emplace(*coll, std::forward(args)...); @@ -226,7 +226,7 @@ typename Loader::SubOps::LoadResult Loader::SubOps::load(Args ldr->context = name_; parent.load_sub_with(*ldr); - if constexpr(std::is_same_v) + if constexpr(std::is_same_v) { if constexpr(std::is_same_v) return ldr->get_object();