Skip to content

Commit

Permalink
Moved with_name to forward decls so builder_context can see it
Browse files Browse the repository at this point in the history
  • Loading branch information
AjayBrahmakshatriya committed Feb 15, 2024
1 parent 01fa38b commit 65db456
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
11 changes: 0 additions & 11 deletions include/builder/dyn_var.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,6 @@ struct as_compound_expr {
};
using cast = as_compound_expr;

struct as_global {
std::string name;
as_global(const std::string &n) : name(n) {}
};
// With name is just like as_global but can be used locally
struct with_name {
std::string name;
bool with_decl;
with_name(const std::string &n, bool wd = false) : name(n), with_decl(wd) {}
};

template <typename T>
class dyn_var_impl : public var {
public:
Expand Down
14 changes: 13 additions & 1 deletion include/builder/forward_declarations.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,19 @@ struct defer_init {
// No members
};

struct with_name;

// Constructor helpers for dyn_var
struct as_global {
std::string name;
as_global(const std::string &n) : name(n) {}
};
// With name is just like as_global but can be used locally
struct with_name {
std::string name;
bool with_decl;
with_name(const std::string &n, bool wd = false) : name(n), with_decl(wd) {}
};


} // namespace builder
#endif

0 comments on commit 65db456

Please sign in to comment.