Index: test/std/utilities/optional/optional.specalg/make_optional_explicit_initializer_list.pass.cpp =================================================================== --- test/std/utilities/optional/optional.specalg/make_optional_explicit_initializer_list.pass.cpp +++ test/std/utilities/optional/optional.specalg/make_optional_explicit_initializer_list.pass.cpp @@ -23,9 +23,9 @@ struct TestT { int x; int size; - constexpr TestT(std::initializer_list il) : x(*il.begin()), size(il.size()) {} + constexpr TestT(std::initializer_list il) : x(*il.begin()), size(static_cast(il.size())) {} constexpr TestT(std::initializer_list il, const int*) - : x(*il.begin()), size(il.size()) {} + : x(*il.begin()), size(static_cast(il.size())) {} }; int main() Index: test/support/archetypes.hpp =================================================================== --- test/support/archetypes.hpp +++ test/support/archetypes.hpp @@ -69,11 +69,11 @@ } template ::type = true> explicit TestBase(std::initializer_list& il, int = 0) noexcept - : value(il.size()) { + : value(static_cast(il.size())) { ++alive; ++constructed; ++value_constructed; } template ::type = true> - explicit TestBase(std::initializer_list& il, int = 0) noexcept : value(il.size()) { + explicit TestBase(std::initializer_list& il, int = 0) noexcept : value(static_cast(il.size())) { ++alive; ++constructed; ++value_constructed; } TestBase& operator=(int xvalue) noexcept { @@ -135,9 +135,9 @@ template ::type = true> constexpr ValueBase(int, int y) : value(y) {} template ::type = true> - explicit constexpr ValueBase(std::initializer_list& il, int = 0) : value(il.size()) {} + explicit constexpr ValueBase(std::initializer_list& il, int = 0) : value(static_cast(il.size())) {} template ::type = true> - constexpr ValueBase(std::initializer_list& il, int = 0) : value(il.size()) {} + constexpr ValueBase(std::initializer_list& il, int = 0) : value(static_cast(il.size())) {} TEST_CONSTEXPR_CXX14 ValueBase& operator=(int xvalue) noexcept { value = xvalue; return *this; @@ -193,9 +193,9 @@ template ::type = true> constexpr TrivialValueBase(int, int y) : value(y) {} template ::type = true> - explicit constexpr TrivialValueBase(std::initializer_list& il, int = 0) : value(il.size()) {} + explicit constexpr TrivialValueBase(std::initializer_list& il, int = 0) : value(static_cast(il.size())) {} template ::type = true> - constexpr TrivialValueBase(std::initializer_list& il, int = 0) : value(il.size()) {}; + constexpr TrivialValueBase(std::initializer_list& il, int = 0) : value(static_cast(il.size())) {} int value; protected: constexpr TrivialValueBase() noexcept : value(0) {} Index: test/support/count_new.hpp =================================================================== --- test/support/count_new.hpp +++ test/support/count_new.hpp @@ -79,7 +79,7 @@ } ++new_called; ++outstanding_new; - last_new_size = s; + last_new_size = static_cast(s); } void deleteCalled(void * p) @@ -101,7 +101,7 @@ } ++outstanding_array_new; ++new_array_called; - last_new_array_size = s; + last_new_array_size = static_cast(s); } void deleteArrayCalled(void * p) @@ -304,10 +304,10 @@ void requireExactly(std::size_t N) { m_req_alloc = N; m_exactly = true; } ~RequireAllocationGuard() { - assert(globalMemCounter.checkOutstandingNewEq(m_outstanding_new_on_init)); + assert(globalMemCounter.checkOutstandingNewEq(static_cast(m_outstanding_new_on_init))); std::size_t Expect = m_new_count_on_init + m_req_alloc; - assert(globalMemCounter.checkNewCalledEq(Expect) || - (!m_exactly && globalMemCounter.checkNewCalledGreaterThan(Expect))); + assert(globalMemCounter.checkNewCalledEq(static_cast(Expect)) || + (!m_exactly && globalMemCounter.checkNewCalledGreaterThan(static_cast(Expect)))); } private: