T& GetValue() const requires !std::is_void_v<T> //C7683
{
return *_value;
}
template<typename TValue = T> requires !std::is_void_v<TValue>
TValue& GetValueAs() const
{
return static_cast<TValue&>(*_value);
} !std::is_void_v<T> в обоих случаях и тогда оба метода компилируются (если это методы шаблонного класса, конечно).
The expression must have one of the following forms:
A primary expression, e.g. Swappable, std::is_integral::value, (std::is_object_v && ...), or any parenthesized expression.
A sequence of primary expressions joined with the operator &&.
A sequence of aforementioned expressions joined with the operator ||.