diff --git a/src/ComputingTasks.cc b/src/ComputingTasks.cc index 0c097a772a5fc0c1d46545b6ff3bf7f4ba4fc686..4201c811b8e5d249ea040d8abb84cda3c0fd816a 100644 --- a/src/ComputingTasks.cc +++ b/src/ComputingTasks.cc @@ -1377,7 +1377,7 @@ EstimatedParamsStatement::checkPass(ModFileStructure &mod_file_struct, WarningCo if (it.type == 3) // Correlation { // Use lexical ordering for the pair of symbols - pair<string, string> x = it.name < it.name2 ? make_pair(it.name, it.name2) : make_pair(it.name2, it.name); + auto x = it.name < it.name2 ? pair(it.name, it.name2) : pair(it.name2, it.name); if (already_declared_corr.find(x) == already_declared_corr.end()) already_declared_corr.insert(x); diff --git a/src/DynamicModel.cc b/src/DynamicModel.cc index cc6ff71316219a06781a6660ad9096fd32b62e3b..607bc284e629151f956ff0cbd6220652db77fa61 100644 --- a/src/DynamicModel.cc +++ b/src/DynamicModel.cc @@ -3469,7 +3469,7 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de if ((i < n_obs) || (i >= nb_diag + n_obs) || (j1 >= nb_diag)) for (int k = n_obs; k < i_nz_state_var[i]; k++) { - v_index_KF.emplace_back(i + j1 * n, make_pair(i + k * n, k + j1_n_state)); + v_index_KF.emplace_back(i + j1 * n, pair(i + k * n, k + j1_n_state)); } } int size_v_index_KF = v_index_KF.size(); @@ -3488,7 +3488,7 @@ DynamicModel::writeOutput(ostream &output, const string &basename, bool block_de for (int k = n_obs; k < i_nz_state_var[j]; k++) { int k_n = k * n; - v_index_KF_2.emplace_back(i * n + j, make_pair(i + k_n - n_n_obs, j + k_n)); + v_index_KF_2.emplace_back(i * n + j, pair(i + k_n - n_n_obs, j + k_n)); } } int size_v_index_KF_2 = v_index_KF_2.size(); diff --git a/src/DynamicModel.hh b/src/DynamicModel.hh index 4ec2244abffec1dd5bf154dee9edd768d9a949aa..b8bc149537ba75e3a54dd87ec9a8d9ae4a41a104 100644 --- a/src/DynamicModel.hh +++ b/src/DynamicModel.hh @@ -507,7 +507,7 @@ public: //! Fills eval context with values of model local variables and auxiliary variables void fillEvalContext(eval_context_t &eval_context) const; - auto getStaticOnlyEquationsInfo() const { return make_tuple(static_only_equations, static_only_equations_lineno, static_only_equations_equation_tags); }; + auto getStaticOnlyEquationsInfo() const { return tuple(static_only_equations, static_only_equations_lineno, static_only_equations_equation_tags); }; //! Return the number of blocks unsigned int diff --git a/src/DynareBison.yy b/src/DynareBison.yy index 8839deeb3e1cda3f80b87895ad007632364feb60..ca6ce5085679b04664b754a56e1cc156c7850ae9 100644 --- a/src/DynareBison.yy +++ b/src/DynareBison.yy @@ -562,7 +562,7 @@ parameters : PARAMETERS parameter_list ';'; model_local_variable : MODEL_LOCAL_VARIABLE model_local_variable_list ';'; named_var_elem : symbol EQUAL QUOTED_STRING - { $$ = make_pair($1, $3); } + { $$ = { $1, $3 }; } named_var_1 : '(' named_var_elem { $$ = vector<pair<string, string>>{$2}; } @@ -1820,11 +1820,11 @@ subsamples_eq : subsamples_eq_opt EQUAL subsamples_eq_opt ';' ; subsamples_eq_opt : symbol '.' SUBSAMPLES - { $$ = make_pair($1, ""); } + { $$ = { $1, "" }; } | STD '(' symbol ')' '.' SUBSAMPLES - { $$ = make_pair($3, ""); } + { $$ = { $3, "" }; } | CORR '(' symbol COMMA symbol ')' '.' SUBSAMPLES - { $$ = make_pair($3, $5); } + { $$ = { $3, $5 }; } ; subsamples_name_list : subsamples_name_list COMMA o_subsample_name @@ -1885,17 +1885,17 @@ prior_eq : prior_eq_opt EQUAL prior_eq_opt ';' ; prior_eq_opt : symbol '.' PRIOR - { $$ = make_tuple("par", $1, "", ""); } + { $$ = { "par", $1, "", "" }; } | symbol '.' symbol '.' PRIOR - { $$ = make_tuple("par", $1, "", $3); } + { $$ = { "par", $1, "", $3 }; } | STD '(' symbol ')' '.' PRIOR - { $$ = make_tuple("std", $3, "", ""); } + { $$ = { "std", $3, "", "" }; } | STD '(' symbol ')' '.' symbol '.' PRIOR - { $$ = make_tuple("std", $3, "", $6); } + { $$ = { "std", $3, "", $6 }; } | CORR '(' symbol COMMA symbol ')' '.' PRIOR - { $$ = make_tuple("corr", $3, $5, ""); } + { $$ = { "corr", $3, $5, "" }; } | CORR '(' symbol COMMA symbol ')' '.' symbol '.' PRIOR - { $$ = make_tuple("corr", $3, $5, $8); } + { $$ = { "corr", $3, $5, $8 }; } ; options : symbol '.' OPTIONS '(' options_options_list ')' ';' @@ -1927,17 +1927,17 @@ options_eq : options_eq_opt EQUAL options_eq_opt ';' ; options_eq_opt : symbol '.' OPTIONS - { $$ = make_tuple("par", $1, "", ""); } + { $$ = { "par", $1, "", "" }; } | symbol '.' symbol '.' OPTIONS - { $$ = make_tuple("par", $1, "", $3); } + { $$ = { "par", $1, "", $3 }; } | STD '(' symbol ')' '.' OPTIONS - { $$ = make_tuple("std", $3, "", ""); } + { $$ = { "std", $3, "", "" }; } | STD '(' symbol ')' '.' symbol '.' OPTIONS - { $$ = make_tuple("std", $3, "", $6); } + { $$ = { "std", $3, "", $6 }; } | CORR '(' symbol COMMA symbol ')' '.' OPTIONS - { $$ = make_tuple("corr", $3, $5, ""); } + { $$ = { "corr", $3, $5, "" }; } | CORR '(' symbol COMMA symbol ')' '.' symbol '.' OPTIONS - { $$ = make_tuple("corr", $3, $5, $8); } + { $$ = { "corr", $3, $5, $8 }; } ; estimation : ESTIMATION ';' @@ -3010,11 +3010,11 @@ model_diagnostics : MODEL_DIAGNOSTICS ';' ; calibration_range : '[' expression COMMA expression ']' - { $$ = make_pair($2, $4); } + { $$ = { $2, $4 }; } | PLUS - { $$ = make_pair(driver.add_non_negative_constant("0"), driver.add_inf_constant()); } + { $$ = { driver.add_non_negative_constant("0"), driver.add_inf_constant() }; } | MINUS - { $$ = make_pair(driver.add_uminus(driver.add_inf_constant()), driver.add_non_negative_constant("0")); } + { $$ = { driver.add_uminus(driver.add_inf_constant()), driver.add_non_negative_constant("0") }; } ; moment_calibration : MOMENT_CALIBRATION ';' moment_calibration_list END ';' @@ -3763,9 +3763,9 @@ integer_range : INT_NUMBER ':' INT_NUMBER { $$ = $1 + ':' + $3; } integer_range_w_inf : INT_NUMBER ':' INT_NUMBER - { $$ = make_pair($1, $3); } + { $$ = { $1, $3 }; } | INT_NUMBER ':' INF_CONSTANT - { $$ = make_pair($1, "Inf"); } + { $$ = { $1, "Inf" }; } ; signed_integer_range : signed_integer ':' signed_integer diff --git a/src/ExprNode.cc b/src/ExprNode.cc index 4a88be9dba2ae0bb29437a3788f01c390f92998d..fd5774b4f220ac5d2274cbc8bc5e6a5b2e70bb22 100644 --- a/src/ExprNode.cc +++ b/src/ExprNode.cc @@ -408,7 +408,7 @@ ExprNode::fillErrorCorrectionRow(int eqn, expr_t e = datatree.AddTimes(datatree.AddVariable(m.first), datatree.AddPossiblyNegativeConstant(-constant)); if (param_id != -1) e = datatree.AddTimes(e, datatree.AddVariable(param_id)); - auto coor = make_tuple(eqn, -orig_lag, colidx); + auto coor = tuple(eqn, -orig_lag, colidx); if (A0star.find(coor) == A0star.end()) A0star[coor] = e; else @@ -5679,7 +5679,7 @@ BinaryOpNode::getPacEC(BinaryOpNode *bopn, int lhs_symb_id, int lhs_orig_symb_id istarget = false; ordered_symb_ids.emplace_back(id, istarget, scale); } - ec_params_and_vars = make_pair(optim_param_symb_id, ordered_symb_ids); + ec_params_and_vars = { optim_param_symb_id, ordered_symb_ids }; } return ec_params_and_vars; } diff --git a/src/ModelTree.hh b/src/ModelTree.hh index 08e3b8ed8dbb2e441e288e6ea0cf32ec5cc4b230..36e3b7f3eceebfebefbf2abcff91618bb07ac019 100644 --- a/src/ModelTree.hh +++ b/src/ModelTree.hh @@ -36,7 +36,7 @@ using namespace std; // Helper to convert a vector into a tuple template <typename T, size_t... Indices> auto vectorToTupleHelper(const vector<T>& v, index_sequence<Indices...>) { - return make_tuple(v[Indices]...); + return tuple(v[Indices]...); } template <size_t N, typename T> auto vectorToTuple(const vector<T>& v) {