From d4ad5f4d8b4430583356d6ae1f4c75bffe1e34bd Mon Sep 17 00:00:00 2001 From: silverqx Date: Mon, 11 Jul 2022 23:43:23 +0200 Subject: [PATCH] renamed macro --- include/orm/config.hpp | 2 +- .../orm/tiny/concerns/hasrelationships.hpp | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/orm/config.hpp b/include/orm/config.hpp index c83fe23da..c6e5bb887 100644 --- a/include/orm/config.hpp +++ b/include/orm/config.hpp @@ -43,7 +43,7 @@ TINY_SYSTEM_HEADER mapped_type (value) in the std::unordered_map. */ #if defined(__GNUG__) && defined(_GLIBCXX_RELEASE) && defined(__GLIBCXX__) && \ _GLIBCXX_RELEASE < 12 && __GLIBCXX__ < 20220513 -# define _TINYORM_NO_INCOMPLETE_UNORDERED_MAP +# define TINY_NO_INCOMPLETE_UNORDERED_MAP #endif #endif // ORM_CONFIG_HPP diff --git a/include/orm/tiny/concerns/hasrelationships.hpp b/include/orm/tiny/concerns/hasrelationships.hpp index ebb302b13..e6d161d10 100644 --- a/include/orm/tiny/concerns/hasrelationships.hpp +++ b/include/orm/tiny/concerns/hasrelationships.hpp @@ -5,7 +5,7 @@ #include "orm/macros/systemheader.hpp" TINY_SYSTEM_HEADER -#ifdef _TINYORM_NO_INCOMPLETE_UNORDERED_MAP +#ifdef TINY_NO_INCOMPLETE_UNORDERED_MAP # include #else # include @@ -131,7 +131,7 @@ namespace Concerns /*! Get all the loaded relations for the instance. */ inline -#ifdef _TINYORM_NO_INCOMPLETE_UNORDERED_MAP +#ifdef TINY_NO_INCOMPLETE_UNORDERED_MAP const std::map> & #else const std::unordered_map> & @@ -139,7 +139,7 @@ namespace Concerns getRelations() const; /*! Get all the loaded relations for the instance. */ inline -#ifdef _TINYORM_NO_INCOMPLETE_UNORDERED_MAP +#ifdef TINY_NO_INCOMPLETE_UNORDERED_MAP std::map> & #else std::unordered_map> & @@ -169,7 +169,7 @@ namespace Concerns /*! Set the entire relations hash on the model. */ Derived &setRelations( -#ifdef _TINYORM_NO_INCOMPLETE_UNORDERED_MAP +#ifdef TINY_NO_INCOMPLETE_UNORDERED_MAP const std::map> &relations); #else const std::unordered_map> &&relations); #else std::unordered_map> &&relations); @@ -229,7 +229,7 @@ namespace Concerns // BUG std::unordered_map can not be instantiated with the incomplete value type, reproducible only on the Linux GCC/Clang (GCC >=12.1 fixed, Clang 14 don't), MSYS2 and msvc don't have any problem with the incomplete type ✨🚀 ; added section to the NOTES.txt how to reproduce ; OLD - std::unordered_map prevents to compile on GCC, if I comment out std::optional... in the RelationsType, or I change it to the QHash, then it compile, I'm absolutelly lost why this is happening 😞😭, I can't change to the QHash because of 25734deb, I have created simple test project gcc_trivial_bug_test in merydeye-gentoo, but std::map works so it is a big win, because now I can compile whole project on gcc silverqx /* The libstdc++ shipped with the GCC <12.1 doesn't allow an incomplete mapped_type (value) in the std::unordered_map. */ -#ifdef _TINYORM_NO_INCOMPLETE_UNORDERED_MAP +#ifdef TINY_NO_INCOMPLETE_UNORDERED_MAP /*! The loaded relationships for the model. */ std::map> m_relations; #else @@ -329,7 +329,7 @@ namespace Concerns /*! Replace relations in the m_relation. */ void replaceRelations( -#ifdef _TINYORM_NO_INCOMPLETE_UNORDERED_MAP +#ifdef TINY_NO_INCOMPLETE_UNORDERED_MAP std::map> &relations, #else std::unordered_map> &relations, @@ -635,7 +635,7 @@ namespace Concerns } template -#ifdef _TINYORM_NO_INCOMPLETE_UNORDERED_MAP +#ifdef TINY_NO_INCOMPLETE_UNORDERED_MAP const std::map> & #else const std::unordered_map> & @@ -646,7 +646,7 @@ namespace Concerns } template -#ifdef _TINYORM_NO_INCOMPLETE_UNORDERED_MAP +#ifdef TINY_NO_INCOMPLETE_UNORDERED_MAP std::map> & #else std::unordered_map> & @@ -710,7 +710,7 @@ namespace Concerns template Derived & HasRelationships::setRelations( -#ifdef _TINYORM_NO_INCOMPLETE_UNORDERED_MAP +#ifdef TINY_NO_INCOMPLETE_UNORDERED_MAP const std::map> &relations) #else const std::unordered_map> &relations) @@ -724,7 +724,7 @@ namespace Concerns template Derived & HasRelationships::setRelations( -#ifdef _TINYORM_NO_INCOMPLETE_UNORDERED_MAP +#ifdef TINY_NO_INCOMPLETE_UNORDERED_MAP std::map> &&relations) #else std::unordered_map> &&relations) @@ -1191,7 +1191,7 @@ namespace Concerns template void HasRelationships::replaceRelations( -#ifdef _TINYORM_NO_INCOMPLETE_UNORDERED_MAP +#ifdef TINY_NO_INCOMPLETE_UNORDERED_MAP std::map> &relations, #else std::unordered_map> &relations,