diff --git a/libcxx/include/__bit_reference b/libcxx/include/__bit_reference --- a/libcxx/include/__bit_reference +++ b/libcxx/include/__bit_reference @@ -84,7 +84,7 @@ {return __bit_iterator<_Cp, false>(__seg_, static_cast(__libcpp_ctz(__mask_)));} private: _LIBCPP_INLINE_VISIBILITY - __bit_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT + explicit __bit_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT : __seg_(__s), __mask_(__m) {} }; @@ -160,7 +160,7 @@ private: _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR - __bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT + explicit __bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT : __seg_(__s), __mask_(__m) {} __bit_const_reference& operator=(const __bit_const_reference&) = delete; @@ -1246,7 +1246,7 @@ private: _LIBCPP_INLINE_VISIBILITY - __bit_iterator(__storage_pointer __s, unsigned __ctz) _NOEXCEPT + explicit __bit_iterator(__storage_pointer __s, unsigned __ctz) _NOEXCEPT : __seg_(__s), __ctz_(__ctz) {} friend typename _Cp::__self; diff --git a/libcxx/include/__debug b/libcxx/include/__debug --- a/libcxx/include/__debug +++ b/libcxx/include/__debug @@ -118,7 +118,7 @@ public: #endif _LIBCPP_INLINE_VISIBILITY - __c_node(void* __c, __c_node* __next) + explicit __c_node(void* __c, __c_node* __next) : __c_(__c), __next_(__next), beg_(nullptr), end_(nullptr), cap_(nullptr) {} virtual ~__c_node(); @@ -135,7 +135,7 @@ struct _C_node : public __c_node { - _C_node(void* __c, __c_node* __n) + explicit _C_node(void* __c, __c_node* __n) : __c_node(__c, __n) {} virtual bool __dereferenceable(const void*) const; @@ -193,7 +193,7 @@ __i_node** __iend_; size_t __isz_; - __libcpp_db(); + explicit __libcpp_db(); public: #ifndef _LIBCPP_CXX03_LANG __libcpp_db(const __libcpp_db&) = delete; diff --git a/libcxx/include/__iterator/common_iterator.h b/libcxx/include/__iterator/common_iterator.h --- a/libcxx/include/__iterator/common_iterator.h +++ b/libcxx/include/__iterator/common_iterator.h @@ -42,7 +42,7 @@ iter_value_t<_Iter> __value; // We can move __x because the only caller verifies that __x is not a reference. - constexpr __proxy(iter_reference_t<_Iter>&& __x) + constexpr explicit __proxy(iter_reference_t<_Iter>&& __x) : __value(_VSTD::move(__x)) {} public: @@ -55,7 +55,7 @@ friend common_iterator; iter_value_t<_Iter> __value; - constexpr __postfix_proxy(iter_reference_t<_Iter>&& __x) + constexpr explicit __postfix_proxy(iter_reference_t<_Iter>&& __x) : __value(_VSTD::forward>(__x)) {} public: diff --git a/libcxx/include/__iterator/istreambuf_iterator.h b/libcxx/include/__iterator/istreambuf_iterator.h --- a/libcxx/include/__iterator/istreambuf_iterator.h +++ b/libcxx/include/__iterator/istreambuf_iterator.h @@ -49,7 +49,8 @@ { char_type __keep_; streambuf_type* __sbuf_; - _LIBCPP_INLINE_VISIBILITY __proxy(char_type __c, streambuf_type* __s) + _LIBCPP_INLINE_VISIBILITY + explicit __proxy(char_type __c, streambuf_type* __s) : __keep_(__c), __sbuf_(__s) {} friend class istreambuf_iterator; public: diff --git a/libcxx/include/__memory/compressed_pair.h b/libcxx/include/__memory/compressed_pair.h --- a/libcxx/include/__memory/compressed_pair.h +++ b/libcxx/include/__memory/compressed_pair.h @@ -32,18 +32,19 @@ using reference = _Tp&; using const_reference = const _Tp&; - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __compressed_pair_elem(__default_init_tag) {} - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __compressed_pair_elem(__value_init_tag) : __value_() {} + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__default_init_tag) {} + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__value_init_tag) : __value_() {} template ::type>::value> > - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit - __compressed_pair_elem(_Up&& __u) : __value_(std::forward<_Up>(__u)) {} + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR + explicit __compressed_pair_elem(_Up&& __u) : __value_(std::forward<_Up>(__u)) {} #ifndef _LIBCPP_CXX03_LANG - template - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14 - __compressed_pair_elem(piecewise_construct_t, tuple<_Args...> __args, __tuple_indices<_Indices...>) - : __value_(std::forward<_Args>(std::get<_Indices>(__args))...) {} + template + _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 + explicit __compressed_pair_elem(piecewise_construct_t, tuple<_Args...> __args, + __tuple_indices<_Indexes...>) + : __value_(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {} #endif _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 reference __get() _NOEXCEPT { return __value_; } @@ -60,9 +61,9 @@ using const_reference = const _Tp&; using __value_type = _Tp; - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __compressed_pair_elem() = default; - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __compressed_pair_elem(__default_init_tag) {} - _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __compressed_pair_elem(__value_init_tag) : __value_type() {} + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem() = default; + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__default_init_tag) {} + _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__value_init_tag) : __value_type() {} template ::type>::value> > _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR @@ -101,17 +102,17 @@ > > _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR - __compressed_pair() : _Base1(__value_init_tag()), _Base2(__value_init_tag()) {} + explicit __compressed_pair() : _Base1(__value_init_tag()), _Base2(__value_init_tag()) {} template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR - __compressed_pair(_U1&& __t1, _U2&& __t2) : _Base1(std::forward<_U1>(__t1)), _Base2(std::forward<_U2>(__t2)) {} + explicit __compressed_pair(_U1&& __t1, _U2&& __t2) : _Base1(std::forward<_U1>(__t1)), _Base2(std::forward<_U2>(__t2)) {} #ifndef _LIBCPP_CXX03_LANG template _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14 - __compressed_pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args, - tuple<_Args2...> __second_args) + explicit __compressed_pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args, + tuple<_Args2...> __second_args) : _Base1(__pc, std::move(__first_args), typename __make_tuple_indices::type()), _Base2(__pc, std::move(__second_args), typename __make_tuple_indices::type()) {} #endif diff --git a/libcxx/include/iomanip b/libcxx/include/iomanip --- a/libcxx/include/iomanip +++ b/libcxx/include/iomanip @@ -573,7 +573,7 @@ basic_ostream<_CharT, _Traits>& __os, const __quoted_output_proxy<_CharT, _Iter, _Traits> & __proxy) { - return __quoted_output (__os, __proxy.__first, __proxy.__last, __proxy.__delim, __proxy.__escape); + return __quoted_output(__os, __proxy.__first, __proxy.__last, __proxy.__delim, __proxy.__escape); } template @@ -583,8 +583,8 @@ _CharT __delim; _CharT __escape; - __quoted_proxy(basic_string<_CharT, _Traits, _Allocator> &__s, _CharT __d, _CharT __e) - : __string(__s), __delim(__d), __escape(__e) {} + explicit __quoted_proxy(basic_string<_CharT, _Traits, _Allocator> &__s, _CharT __d, _CharT __e) + : __string(__s), __delim(__d), __escape(__e) {} }; template