Skip to content

Commit 27f3997

Browse files
committed
Fix release build
1 parent f52c515 commit 27f3997

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tc/variant.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ namespace tc {
181181
using Overload::Overload;
182182
template<typename... Variant>
183183
detail::visit_result_t<Overload, Variant...> operator()(Variant&&... v) const& MAYTHROW {
184+
#if defined(TC_PRIVATE) || defined(_DEBUG)
184185
([&]() noexcept { _ASSERTNORETURN( !v.valueless_by_exception() ); }(), ...);
186+
#endif
185187
return
186188
#ifdef TC_MAC
187189
std::__variant_detail::__visitation::__variant::__visit_value // does not throw std::bad_variant_access, which is not supported until macOS 10.14

0 commit comments

Comments
 (0)