forked from OSchip/llvm-project
[libc++] Mark __wrap_iter's private constructors as explicit.
This is slightly more user-visible than D119894, because the user is expected to touch `__wrap_iter` directly. But the affected ctors are non-public, so the user was never expected to be actually calling them. And I didn't intentionally omit this from D119894; I just didn't think of it. Differential Revision: https://reviews.llvm.org/D120937
This commit is contained in:
parent
bccc88b384
commit
7e1355eb13
|
@ -136,13 +136,15 @@ public:
|
|||
|
||||
private:
|
||||
#if _LIBCPP_DEBUG_LEVEL == 2
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter(const void* __p, iterator_type __x) : __i(__x)
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
explicit __wrap_iter(const void* __p, iterator_type __x) : __i(__x)
|
||||
{
|
||||
if (!__libcpp_is_constant_evaluated())
|
||||
__get_db()->__insert_ic(this, __p);
|
||||
}
|
||||
#else
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
|
||||
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
|
||||
explicit __wrap_iter(iterator_type __x) _NOEXCEPT : __i(__x) {}
|
||||
#endif
|
||||
|
||||
template <class _Up> friend class __wrap_iter;
|
||||
|
|
Loading…
Reference in New Issue