EricWF added a comment.

A large portion of this patch is UB. Any function that unconditionally calls 
`__get_db()` can never be a valid constant expression, hence UB.

Is there a smaller set of operations or `__wrap_iter` that *must* be made 
constexpr? Or do they all need to be?



================
Comment at: include/algorithm:1765
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 typename enable_if
----------------
These definitions should probably be moved to `<iterator>` where they are 
declared. I'm not sure why they lived in `<algorithm>` to begin with.


================
Comment at: include/iterator:1202
 template <class _Iter1, class _Iter2>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
 bool
----------------
These forward declarations seem unnecessary since they're also forward declared 
as friend functions inside `__wrap_iter`


https://reviews.llvm.org/D34237



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to