[PATCH] D33550: Make __wrap_iter constexpr

Marshall Clow via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 25 07:28:38 PDT 2017

mclow.lists created this revision.

`__wrap_iter` is an internal libc++ class that is used as an iterator type when (for some reason) we don't want to use raw pointers as an iterator.  It is the iterator type for `vector` and `string` (but not `array` - not sure why). If we used pointers, all the operations on the iterators would be constexpr.  With this patch, the corresponding operations on `__wrap_iter` are constexpr as well.

We'll have to do this when http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#2938 is adopted.

No tests, because all the interesting constructors of `__wrap_iter` are private, and only accessed through friend functions.
I have written tests (after making the appropriate ctors public) and they seem to work.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33550.100244.patch
Type: text/x-patch
Size: 14556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170525/aa793219/attachment-0001.bin>

More information about the cfe-commits mailing list