This is an automated email from the ASF dual-hosted git repository.
airborne pushed a commit to branch clucene
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
The following commit(s) were added to refs/heads/clucene by this push:
new c51b5cc9adc [fix](clucene) Fix GCC -Werror=overloaded-virtual in
FieldForMerge (#385)
c51b5cc9adc is described below
commit c51b5cc9adc63817ad8322f617c75737ece7288d
Author: Jack <[email protected]>
AuthorDate: Sun Mar 15 09:44:36 2026 +0800
[fix](clucene) Fix GCC -Werror=overloaded-virtual in FieldForMerge (#385)
Add using declarations to bring base class Field's non-const virtual
methods (stringValue, readerValue, tokenStreamValue) into FieldForMerge
scope, preventing them from being hidden by the const overloads.
Without this fix, GCC with -Werror=overloaded-virtual reports errors
when both Field.h and _FieldsReader.h are included in the same
translation unit through different include chains.
---
src/core/CLucene/index/_FieldsReader.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/core/CLucene/index/_FieldsReader.h
b/src/core/CLucene/index/_FieldsReader.h
index 33aec75acc2..5eb175f6172 100644
--- a/src/core/CLucene/index/_FieldsReader.h
+++ b/src/core/CLucene/index/_FieldsReader.h
@@ -153,6 +153,10 @@ CL_NS_DEF(index)
// for merge
class FieldForMerge : public CL_NS(document)::Field {
public:
+ using CL_NS(document)::Field::stringValue;
+ using CL_NS(document)::Field::readerValue;
+ using CL_NS(document)::Field::tokenStreamValue;
+
const TCHAR* stringValue() const;
CL_NS(util)::Reader* readerValue() const;
const CL_NS(util)::ValueArray<uint8_t>* binaryValue();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]