Opened 3 years ago

Closed 3 years ago

#805 closed defect (fixed)

Missing #include <limits>

Reported by: stac47 Owned by: Olly Betts
Priority: normal Milestone: 1.4.18
Component: Other Version: 1.4.17
Severity: normal Keywords: Compilation
Cc: Blocked By:
Blocking: Operating System: Linux

Description

Hello, Compiling with the latest gcc (11), I have now the following error:

api/omdocument.cc: In member function 'bool OmDocumentTerm::add_position(Xapian::termcount, Xapian::termpos)': api/omdocument.cc:303:67: error: incomplete type 'std::numeric_limits<unsigned int>' used in nested name specifier

303 | if (rare(new_split > numeric_limits<decltype(split)>::max())) {

...

Patch attached.

Regards, Stac47 Regards

Attachments (1)

fix_missing_include_limits.patch (222 bytes ) - added by stac47 3 years ago.
Patch

Download all attachments as: .zip

Change History (2)

by stac47, 3 years ago

Patch

comment:1 by Olly Betts, 3 years ago

Milestone: 1.4.18
Resolution: fixed
Status: newclosed

Thanks for reporting this. The problem is a bit more widespread in git master - I've fixed it there with 8b25f036907b242fcb6228cdd8b29fcbf02a0f82 (checked using grep as I don't have ready access to GCC 11 yet) and in the 1.4 branch with 6e3b9c4b9715c65b377958ae41ca9f17f68da920 (just the instance you noted).

Note: See TracTickets for help on using tickets.