diff --git a/NOTES.txt b/NOTES.txt index 9766179c5..cbbc977d0 100644 --- a/NOTES.txt +++ b/NOTES.txt @@ -1044,3 +1044,31 @@ Compilation time and Memory usage: MSVC2019 9.9GB 1:27 MSVC2022 8.0GB 1:25 clang-cl MSVC2022 5.5GB 1:35 + + +bugs: +----- + +- BUG std::unordered_map can not be instantiated with the incomplete value type, reproducible only on the Linux GCC/Clang, MSYS2 and msvc don't have any problem with the incomplete type ✨🚀 + +add this to the testforplay.cpp + +#include +#include +#include +#include + +#include + +namespace Models { +class Torrent; +} + +struct Test1 +{ + std::unordered_map m_a {}; +}; + +#include + +#include diff --git a/include/orm/tiny/concerns/hasrelationships.hpp b/include/orm/tiny/concerns/hasrelationships.hpp index 9b600a9de..eb8d4f2a5 100644 --- a/include/orm/tiny/concerns/hasrelationships.hpp +++ b/include/orm/tiny/concerns/hasrelationships.hpp @@ -225,7 +225,7 @@ namespace Concerns /*! Map of relation names to methods. */ QHash u_relations; - // BUG 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 + // BUG std::unordered_map can not be instantiated with the incomplete value type, reproducible only on the Linux GCC/Clang, 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 loaded relationships for the model. */ #ifdef __GNUG__ std::map> m_relations;