[Xapian-tickets] [Xapian] #806: Project does not compile on VS2019 with C++20 turned on
Xapian
nobody at xapian.org
Wed Dec 23 22:59:46 GMT 2020
#806: Project does not compile on VS2019 with C++20 turned on
--------------------------+--------------------------------------
Reporter: Mateusz Pusz | Owner: Olly Betts
Type: defect | Status: new
Priority: normal | Milestone: 1.4.18
Component: Other | Version: 1.4.16
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: Microsoft Windows
--------------------------+--------------------------------------
Comment (by Olly Betts):
The system/compiler headers really should be robust to this as it is part
of the language, but it's certainly plausible there might be bugs in this
area.
We do completely avoid `using namespace std;` in public headers, and we
also aim to avoid it in internal headers, but some older headers do still
have it.
Pushing it down to the block level everywhere doesn't seem workable -
pretty much every function would need `using namespace std;` or explicit
`std::` qualifiers adding everywhere. But `using namespace std;` in non-
header sources should be safe from this issue provided it's done after all
headers have been included. There's still potential for clashes from
additions in new C++ standard versions, but in practice these are rare and
the trade-off for convenience seems worthwhile.
Can you work out which use is actually the problem here? A targetted fix
seems reasonable, but I worry a mass refactor to eliminate all cases is
potentially destabilising for a stable release branch.
--
Ticket URL: <https://trac.xapian.org/ticket/806#comment:6>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list