Skip to content

Commit

Permalink
updated todo task and updated NOTES.txt
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
silverqx committed Jul 11, 2022
1 parent 69dfa9e commit c280a61
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
28 changes: 28 additions & 0 deletions NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 <filesystem>
#include <iostream>
#include <typeindex>
#include <typeinfo>

#include <unordered_map>

namespace Models {
class Torrent;
}

struct Test1
{
std::unordered_map<QString, Models::Torrent> m_a {};
};

#include <range/v3/all.hpp>

#include <orm/db.hpp>
2 changes: 1 addition & 1 deletion include/orm/tiny/concerns/hasrelationships.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ namespace Concerns
/*! Map of relation names to methods. */
QHash<QString, RelationVisitor> u_relations;

// BUG std::unordered_map prevents to compile on GCC, if I comment out std::optional<AllRelations>... in the RelationsType<AllRelations...>, 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<AllRelations>... in the RelationsType<AllRelations...>, 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<QString, RelationsType<AllRelations...>> m_relations;
Expand Down

0 comments on commit c280a61

Please sign in to comment.