Skip to content

Commit 6428b39

Browse files
author
Tor Didriksen
committed
Bug#35781622 Switch from -std=c++17 to -std=c++20
Post-push fix: -Wambiguous-reversed-operator Clang 16 on windows says: src\user_map.cc(186,35): error: ISO C++20 considers use of overloaded operator '==' (with operand types 'Sid' and 'Sid') to be ambiguous despite there being a unique best viable function [-Werror,-Wambiguous-reversed-operator] if (p->m_sid.is_user() && who == p->m_sid) { ~~~ ^ ~~~~~~~~ Change-Id: Ib0fe9c739b6466763ec617890e9320b7c211c44a
1 parent 9dc5ce8 commit 6428b39

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

libmysql/authentication_win/common.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ const char *Sid::as_string() {
272272

273273
#endif
274274

275-
bool Sid::operator==(const Sid &other) {
275+
bool Sid::operator==(const Sid &other) const {
276276
if (!is_valid() || !other.is_valid()) return false;
277277

278278
return EqualSid(m_data->User.Sid, other.m_data->User.Sid);

libmysql/authentication_win/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ class Sid {
233233

234234
bool is_user(void) const { return m_type == SidTypeUser; }
235235

236-
bool operator==(const Sid &);
236+
bool operator==(const Sid &) const;
237237

238238
operator PSID() const { return (PSID)m_data->User.Sid; }
239239

0 commit comments

Comments
 (0)