mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-29 11:10:40 +00:00
sstables: index_reader: make 'index_bound' public
index_reader::index_bound must be constructible by non-friend classes since it's used in std::optional (which isn't anyone's friend). This now works in gcc because gcc's inter-template access checking is broken, but clang correctly rejects it.
This commit is contained in:
@@ -390,6 +390,10 @@ class index_reader {
|
||||
tombstone tomb;
|
||||
};
|
||||
|
||||
public: // Otherwise std::optional<index_bound>::emplace() fails, since
|
||||
// it has a constraint std::is_constructible_v<T>, which fails with
|
||||
// private types
|
||||
|
||||
// Contains information about index_reader position in the index file
|
||||
struct index_bound {
|
||||
shared_index_lists::list_ptr current_list;
|
||||
@@ -402,6 +406,7 @@ class index_reader {
|
||||
std::optional<open_rt_marker> end_open_marker;
|
||||
};
|
||||
|
||||
private:
|
||||
index_bound _lower_bound;
|
||||
// Upper bound may remain uninitialized
|
||||
std::optional<index_bound> _upper_bound;
|
||||
|
||||
Reference in New Issue
Block a user