Vs2017 rror C3615: constexpr function 'strong::operator +=' cannot result in a constant expression
unholytony opened this issue · 2 comments
unholytony commented
Vs2017 seems to be complaining that the freestanding value_of functions are not constexpr.
template < typename T, typename = impl::WhenSafeType<T>>
STRONG_NODISCARD
**constexpr** auto value_of( T&& t ) noexcept -> decltype( std::forward<T>( t ).value_of() )
{
return std::forward<T>( t ).value_of();
}
template < typename T, typename = impl::WhenNotSafeType<T>>
**constexpr** T&& value_of( T&& t ) noexcept
{
return std::forward<T>( t );
}
seems to fix it...
unholytony commented
oops sorry, constexpr was meant to be bold but its in a direct quote... you get the idea...
rollbear commented
Constexpr has been added, so this should be OK.