Преглед изворни кода

Use auto because no one cares that it is 'typename std::vector<V>::const_iterator'. begin()/end() is a stdlib convention.

Sam Jaffe пре 7 година
родитељ
комит
27ba42ae02
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      json/json_direct_vector_binder.hpp

+ 1 - 1
json/json_direct_vector_binder.hpp

@@ -36,7 +36,7 @@ namespace json { namespace binder {
     virtual void write(T const& val, std::ostream & data) const override {
       data << '[';
       std::vector<V> const & vec = val.*ptr;
-      typename std::vector<V>::const_iterator it = vec.begin(), end = vec.end();
+      auto it = vec.begin(), end = vec.end();
       if (it != end) {
         impl.write(*it, data);
         for (++it; it != end; ++it) {