You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possiable to disable exception?
In some environment, exception and RTTI is disabled, I found RTTI is only used by gtest, but there is no way to disable exception. I think it's better to provide a error handle instead of throw when exception is disabled.
std::expected is available with some compilers. I'm thinking of making a fork that supports this for my own needs/desires. I think a good interface would look something like
template<T>
std::expected<T, YAML::Exception>
YAML::Node::expect() const noexcept;
// example
auto result = node["value"].expect<std::string>();
Since this would be similar to the Node::as method. If I get it to a point that feels stable, are there guidelines for contributing somewhere?
Activity
champignoom commentedon Dec 11, 2020
It would require the
std::expected(see #696) which is not likely to arrive within years.josiest commentedon Nov 13, 2022
std::expectedis available with some compilers. I'm thinking of making a fork that supports this for my own needs/desires. I think a good interface would look something likeSince this would be similar to the
Node::asmethod. If I get it to a point that feels stable, are there guidelines for contributing somewhere?