We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47ebe5e commit b664217Copy full SHA for b664217
clang-tools-extra/test/clang-tidy/checkers/performance/inefficient-vector-operation.cpp
@@ -5,8 +5,7 @@
5
6
namespace std {
7
8
-// FIXME: This doesn't work if size_t is not a signed type
9
-typedef int size_t;
+typedef decltype(sizeof 0) size_t;
10
11
template<class E> class initializer_list {
12
public:
@@ -16,7 +15,8 @@ template<class E> class initializer_list {
16
15
using size_type = size_t;
17
using iterator = const E*;
18
using const_iterator = const E*;
19
- iterator first, last;
+ iterator p;
+ size_t sz;
20
initializer_list();
21
size_t size() const; // number of elements
22
const E* begin() const; // first element
0 commit comments