From 0b98372af5f1488834dc9ea3356a4481e3f71eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Tue, 23 Aug 2016 02:13:56 +0200 Subject: [PATCH] Silence most vexing parse warnings in clang. --- include/boost/container/detail/iterators.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/boost/container/detail/iterators.hpp b/include/boost/container/detail/iterators.hpp index 172db26..d3b353a 100644 --- a/include/boost/container/detail/iterators.hpp +++ b/include/boost/container/detail/iterators.hpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include @@ -626,14 +627,14 @@ struct emplace_functor { emplace_functor::inplace_impl(dest, index_tuple_t()); } private: - template + template BOOST_CONTAINER_FORCEINLINE void inplace_impl(Allocator &a, T* ptr, const container_detail::index_tuple&) { allocator_traits::construct (a, ptr, ::boost::forward(container_detail::get(args_))...); } - template + template BOOST_CONTAINER_FORCEINLINE void inplace_impl(DestIt dest, const container_detail::index_tuple&) { typedef typename boost::container::iterator_traits::value_type value_type; @@ -671,8 +672,8 @@ struct emplace_functor##N\ void operator()(DestIt dest)\ {\ typedef typename boost::container::iterator_traits::value_type value_type;\ - value_type tmp(BOOST_MOVE_MFWD##N);\ - *dest = ::boost::move(const_cast(tmp));\ + BOOST_MOVE_IF(N, value_type tmp(BOOST_MOVE_MFWD##N), container_detail::value_init tmp) ;\ + *dest = ::boost::move(const_cast(BOOST_MOVE_IF(N, tmp, tmp.get())));\ }\ \ BOOST_MOVE_MREF##N\