diff options
author | Eric Fiselier <eric@efcs.ca> | 2014-10-27 19:28:20 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2014-10-27 19:28:20 +0000 |
commit | 910285b238910084aabe786178337b158b82a3bb (patch) | |
tree | 983346d157ad4ff829f679c4d3f7639e47fd24d8 /libcxx/include/string | |
parent | f2896281784aa7a2e279559dc935a3250d85c2ca (diff) | |
download | bcm5719-llvm-910285b238910084aabe786178337b158b82a3bb.tar.gz bcm5719-llvm-910285b238910084aabe786178337b158b82a3bb.zip |
[libcxx] Fix use of operator comma where the types can be user defined
Summary:
An evil user might overload operator comma. Use a void cast to make sure any user overload is not selected.
Modify all the test iterators to define operator comma.
Reviewers: danalbert, mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D5929
llvm-svn: 220706
Diffstat (limited to 'libcxx/include/string')
-rw-r--r-- | libcxx/include/string | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/string b/libcxx/include/string index 12f541e2637..fe42bbf1d99 100644 --- a/libcxx/include/string +++ b/libcxx/include/string @@ -2215,7 +2215,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init(_ForwardIterator __first, _For __set_long_cap(__cap+1); __set_long_size(__sz); } - for (; __first != __last; ++__first, ++__p) + for (; __first != __last; ++__first, (void) ++__p) traits_type::assign(*__p, *__first); traits_type::assign(*__p, value_type()); } |