Skip to content
This repository was archived by the owner on Jun 23, 2021. It is now read-only.

Commit d5b6c6b

Browse files
committed
Don't flag aliases named 'is_transparent'
1 parent c9f5c4b commit d5b6c6b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lint381/cpp.py

+4
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ def alias_names(source, *, match):
235235
alias_token = match[1]
236236
alias = alias_token.value
237237

238+
# Name mandated by the C++ standard library for heterogeneous lookup.
239+
if alias == "is_transparent":
240+
return
241+
238242
if not alias[0].isupper():
239243
yield Error(message="Alias '{}' should be capitalized".format(alias),
240244
tokens=[alias_token])

test/integ/cpp/alias_names.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
using Foo = int;
22

33
using bar_t = int;
4+
5+
// Should be accepted because some comparators use this alias name for
6+
// heterogeneous lookup.
7+
using is_transparent = int;

0 commit comments

Comments
 (0)