File tree Expand file tree Collapse file tree
Framework/Core/include/Framework Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,12 +118,12 @@ struct OpNode {
118118// / A placeholder node for simple type configurable
119119struct PlaceholderNode : LiteralNode {
120120 template <typename T>
121- PlaceholderNode (Configurable<T> v) : LiteralNode{v.value }
121+ PlaceholderNode (Configurable<T> v) : LiteralNode{v.value }, name{v. name }
122122 {
123123 if constexpr (variant_trait_v<typename std::decay<T>::type> != VariantType::Unknown) {
124- retrieve = [name = v. name ](InitContext& context) { return LiteralNode::var_t {context.options ().get <T>(name.c_str ())}; };
124+ retrieve = [](InitContext& context, std::string const & name ) { return LiteralNode::var_t {context.options ().get <T>(name.c_str ())}; };
125125 } else {
126- retrieve = [name = v. name ](InitContext& context) {
126+ retrieve = [](InitContext& context, std::string const & name ) {
127127 auto pt = context.options ().get <boost::property_tree::ptree>(name.c_str ());
128128 return LiteralNode::var_t {RootConfigParamHelpers::as<T>(pt)};
129129 };
@@ -132,10 +132,11 @@ struct PlaceholderNode : LiteralNode {
132132
133133 void reset (InitContext& context)
134134 {
135- value = retrieve (context);
135+ value = retrieve (context, name );
136136 }
137137
138- std::function<LiteralNode::var_t (InitContext&)> retrieve;
138+ std::string name;
139+ LiteralNode::var_t (*retrieve)(InitContext&, std::string const & name);
139140};
140141
141142// / A generic tree node
You can’t perform that action at this time.
0 commit comments