From cfc81e73e9731618175369ec46183b092625cf75 Mon Sep 17 00:00:00 2001 From: Chris Beck Date: Tue, 16 Aug 2016 14:23:19 -0400 Subject: [PATCH] update code comments --- include/strict_variant/variant.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/strict_variant/variant.hpp b/include/strict_variant/variant.hpp index 9e78c46..6c2185a 100644 --- a/include/strict_variant/variant.hpp +++ b/include/strict_variant/variant.hpp @@ -642,12 +642,10 @@ auto variant::emplace(Args &&... args) noexcept(false) -> mpl::enable_if_t, Args...>::value> { - using temp_t = typename storage_t::template value_t; static_assert( std::is_nothrow_move_constructible::value, "To use emplace, either the invoked ctor or the move ctor of value type must be noexcept."); - // TODO: If T is in a recursive_wrapper, we should construct recursive_wrapper instead. temp_t temp(std::forward(args)...); this->emplace(std::move(temp)); } @@ -679,6 +677,7 @@ struct variant::swapper { void do_swap() const noexcept { lhs_.apply_visitor_internal(*this); } // First visit is *this, to lhs_var + // Second visit is to rhs_var template void operator()(T & first_visit) const noexcept { second_visitor v{lhs_, rhs_, first_visit};