From aad1a0c5cb6c50d0770a3870d754e36e9684a9da Mon Sep 17 00:00:00 2001 From: Yedidya Feldblum Date: Wed, 24 Aug 2016 14:25:31 -0700 Subject: [PATCH] Use cbegin and cend in static reflection container traits Summary: [Thrift] Use `cbegin` and `cend` in static reflection container traits. These are functions that all the C++ standard library containers have. And add the two methods to `folly::sorted_vector_set` and `folly::sorted_vector_map`. Reviewed By: juchem Differential Revision: D3763187 fbshipit-source-id: 9d467a1cf391206eba671f454da428323c4a566a --- folly/sorted_vector_types.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/folly/sorted_vector_types.h b/folly/sorted_vector_types.h index 18540185..cc5c9c3c 100644 --- a/folly/sorted_vector_types.h +++ b/folly/sorted_vector_types.h @@ -229,7 +229,9 @@ public: iterator begin() { return m_.cont_.begin(); } iterator end() { return m_.cont_.end(); } + const_iterator cbegin() const { return m_.cont_.cbegin(); } const_iterator begin() const { return m_.cont_.begin(); } + const_iterator cend() const { return m_.cont_.cend(); } const_iterator end() const { return m_.cont_.end(); } reverse_iterator rbegin() { return m_.cont_.rbegin(); } reverse_iterator rend() { return m_.cont_.rend(); } @@ -470,7 +472,9 @@ public: iterator begin() { return m_.cont_.begin(); } iterator end() { return m_.cont_.end(); } + const_iterator cbegin() const { return m_.cont_.cbegin(); } const_iterator begin() const { return m_.cont_.begin(); } + const_iterator cend() const { return m_.cont_.cend(); } const_iterator end() const { return m_.cont_.end(); } reverse_iterator rbegin() { return m_.cont_.rbegin(); } reverse_iterator rend() { return m_.cont_.rend(); } -- 2.34.1