]> git.tdb.fi Git - libs/datafile.git/commitdiff
Add std:: qualifier to nullptr_t
authorMikko Rasa <tdb@tdb.fi>
Wed, 27 Dec 2023 11:17:46 +0000 (13:17 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 27 Dec 2023 22:10:07 +0000 (00:10 +0200)
source/loader.h

index 5b7b4422ad5ea646e4c0aa5f8f15c5b883fd5e4e..abad2f1c4b1cffe023b60aaab06674ce41725e1b 100644 (file)
@@ -48,7 +48,7 @@ protected:
        public:
                using ObjType = typename L::Object;
                using LoadResult = std::conditional_t<std::is_same_v<C, void>,
-                       std::conditional_t<std::is_same_v<P, nullptr_t>, std::unique_ptr<ObjType>, P>,
+                       std::conditional_t<std::is_same_v<P, std::nullptr_t>, std::unique_ptr<ObjType>, 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<typename L>
-       SubOps<nullptr_t, L> dyn_sub()
+       SubOps<std::nullptr_t, L> dyn_sub()
        { return { *this, nullptr }; }
 
        /** Sets the actions to be used when loading.  If the map is empty,
@@ -211,7 +211,7 @@ template<typename... Args>
 typename Loader::SubOps<P, L, C>::LoadResult Loader::SubOps<P, L, C>::load(Args &&... args)
 {
        std::optional<L> ldr;
-       if constexpr(std::is_same_v<P, nullptr_t>)
+       if constexpr(std::is_same_v<P, std::nullptr_t>)
        {
                if constexpr(!std::is_same_v<C, void> && NeedsCollection<L>::value)
                        ldr.emplace(*coll, std::forward<Args>(args)...);
@@ -226,7 +226,7 @@ typename Loader::SubOps<P, L, C>::LoadResult Loader::SubOps<P, L, C>::load(Args
        ldr->context = name_;
        parent.load_sub_with(*ldr);
 
-       if constexpr(std::is_same_v<P, nullptr_t>)
+       if constexpr(std::is_same_v<P, std::nullptr_t>)
        {
                if constexpr(std::is_same_v<C, void>)
                        return ldr->get_object();