Skip to content

Commit

Permalink
improved formatting for ch09/README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pezy committed Dec 24, 2014
1 parent e3243e5 commit 5b54c6f
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions ch09/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@ const vector<int> v2;
auto it1 = v1.begin(), it2 = v2.begin();
auto it3 = v1.cbegin(), it4 = v2.cbegin();
```
In gcc 4.8, will report error:
error: inconsistent deduction for ‘auto’: ‘__gnu_cxx::__normal_iterator<int*, std::vector<int> >’ and then ‘__gnu_cxx::__normal_iterator<const int*, std::vector<int> >’ auto it1 = v1.begin(), it2 = v2.begin();
the correct code should be
auto it1 = v1.begin();
auto it2 = v2.begin(), it3 = v1.cbegin(), it4 = v2.cbegin();

-----

Expand Down

0 comments on commit 5b54c6f

Please sign in to comment.