Skip to content

Commit 95ae6b2

Browse files
committed
unordered_*set: Include std::hash also for reading
Otherwise there may be errors with newer compilers and libstdc++.
1 parent 9430191 commit 95ae6b2

6 files changed

Lines changed: 7 additions & 8 deletions

File tree

types/unordered_multiset/nested/NestedUnorderedMultiset.hxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ struct std::hash<std::unordered_multiset<std::int32_t>> {
1414
return h;
1515
}
1616
};
17+
18+
using UnorderedMultiset =
19+
std::unordered_multiset<std::unordered_multiset<std::int32_t>>;

types/unordered_multiset/nested/read.C

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
#include <string_view>
1212
#include <unordered_set>
1313

14-
using UnorderedMultiset =
15-
std::unordered_multiset<std::unordered_multiset<std::int32_t>>;
14+
#include "NestedUnorderedMultiset.hxx"
1615

1716
static void PrintNestedUnorderedMultisetValue(const ROOT::REntry &entry,
1817
std::string_view name,

types/unordered_multiset/nested/write.C

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818

1919
#include "NestedUnorderedMultiset.hxx"
2020

21-
using UnorderedMultiset =
22-
std::unordered_multiset<std::unordered_multiset<std::int32_t>>;
23-
2421
static std::shared_ptr<UnorderedMultiset>
2522
MakeUnorderedMultisetField(ROOT::RNTupleModel &model, std::string_view name,
2623
ROOT::ENTupleColumnType indexType) {

types/unordered_set/nested/NestedUnorderedSet.hxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ template <> struct std::hash<std::unordered_set<std::int32_t>> {
1313
return h;
1414
}
1515
};
16+
17+
using UnorderedSet = std::unordered_set<std::unordered_set<std::int32_t>>;

types/unordered_set/nested/read.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <string_view>
1212
#include <unordered_set>
1313

14-
using UnorderedSet = std::unordered_set<std::unordered_set<std::int32_t>>;
14+
#include "NestedUnorderedSet.hxx"
1515

1616
static void PrintNestedUnorderedSetValue(const ROOT::REntry &entry,
1717
std::string_view name,

types/unordered_set/nested/write.C

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919
#include "NestedUnorderedSet.hxx"
2020

21-
using UnorderedSet = std::unordered_set<std::unordered_set<std::int32_t>>;
22-
2321
static std::shared_ptr<UnorderedSet>
2422
MakeUnorderedSetField(ROOT::RNTupleModel &model, std::string_view name,
2523
ROOT::ENTupleColumnType indexType) {

0 commit comments

Comments
 (0)