Skip to content

Commit

Permalink
Doc
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonMarechal25 committed Oct 11, 2024
1 parent 9c0c744 commit ca54927
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/solver/modelParser/encoders.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@
namespace YAML
{

/**
* @brief shortend to default construct a value when node is null
* @tparam T Type to convert the node to
* @param n node
* @return Object of type T
* It's just to simplify repertitve and verbose lines
* as_fallback_default<std::vector<Antares::Solver::ModelParser::Parameter>>(
node["parameters"]) is equivalent to
node["parameters"].as<std::vector<Antares::Solver::ModelParser::Parameter>>(std::vector<Antares::Solver::ModelParser::Parameter>())
*/
template<typename T>
inline T as_fallback_default(const Node& n)
{
Expand Down

0 comments on commit ca54927

Please sign in to comment.