Make internal class __wrap_iter constexpr when not using libc++'s debugging mode. Introduce a new macro _LIBCPP_CONSTEXPR_IF_NODEBUG to mark this.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@337019 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Marshall Clow
2018-07-13 16:35:26 +00:00
parent 9765ed0367
commit c005c7e34c
3 changed files with 66 additions and 56 deletions

View File

@@ -1023,6 +1023,14 @@ template <unsigned> struct __static_assert_check {};
# define _LIBCPP_EXPLICIT_MOVE(x) (x)
#endif
#ifndef _LIBCPP_CONSTEXPR_IF_NODEBUG
#if !defined(_LIBCPP_DEBUG) && _LIBCPP_STD_VER >= 14
#define _LIBCPP_CONSTEXPR_IF_NODEBUG constexpr
#else
#define _LIBCPP_CONSTEXPR_IF_NODEBUG
#endif
#endif
#ifndef _LIBCPP_HAS_NO_ASAN
_LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
const void *, const void *, const void *, const void *);