projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71c5b8b
)
c++: add begin/end to releasing_vec
author
Jason Merrill
<jason@redhat.com>
Thu, 30 Dec 2021 14:13:44 +0000
(09:13 -0500)
committer
Jason Merrill
<jason@redhat.com>
Tue, 4 Jan 2022 17:57:31 +0000
(12:57 -0500)
So C++11 range-for will work.
gcc/cp/ChangeLog:
* cp-tree.h (class releasing_vec): Add begin/end fns.
gcc/cp/cp-tree.h
patch
|
blob
|
history
diff --git
a/gcc/cp/cp-tree.h
b/gcc/cp/cp-tree.h
index
824fe98
..
10ca809
100644
(file)
--- a/
gcc/cp/cp-tree.h
+++ b/
gcc/cp/cp-tree.h
@@
-1008,6
+1008,9
@@
public:
(bootstrap/91828). */
tree& operator[] (ptrdiff_t i) const { return (*v)[i]; }
+ tree *begin() { return ::begin (v); }
+ tree *end() { return ::end (v); }
+
void release () { release_tree_vector (v); v = NULL; }
~releasing_vec () { release_tree_vector (v); }