diff options
author | Lulu <lulu.berlin.2023@gmail.com> | 2024-10-08 20:05:28 +0200 |
---|---|---|
committer | Lulu <lulu.berlin.2023@gmail.com> | 2024-10-08 20:05:28 +0200 |
commit | 4ea8c9d6436f421dfd63638efd1fd01296bccc3f (patch) | |
tree | 657dc9826d7169ec673a66892af70afa8a5b1a1b /src | |
parent | 43e79f443469c55ef4d3a43ce1e455d6eafcd26c (diff) |
Set c++ version to c++23
I followed @pennae's advice and moved the constructor definition of
`AttrName` from the header file `nixexpr.hh` to `nixexpr.cc`.
Change-Id: I733f56c25635b366b11ba332ccec38dd7444e793
Diffstat (limited to 'src')
-rw-r--r-- | src/libexpr/nixexpr.cc | 8 | ||||
-rw-r--r-- | src/libexpr/nixexpr.hh | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc index 68da254e2..4b659b71a 100644 --- a/src/libexpr/nixexpr.cc +++ b/src/libexpr/nixexpr.cc @@ -21,6 +21,14 @@ std::ostream & operator <<(std::ostream & str, const SymbolStr & symbol) return printIdentifier(str, s); } +AttrName::AttrName(Symbol s) : symbol(s) +{ +} + +AttrName::AttrName(std::unique_ptr<Expr> e) : expr(std::move(e)) +{ +} + void Expr::show(const SymbolTable & symbols, std::ostream & str) const { abort(); diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh index d16281c39..4e857b321 100644 --- a/src/libexpr/nixexpr.hh +++ b/src/libexpr/nixexpr.hh @@ -30,8 +30,8 @@ struct AttrName { Symbol symbol; std::unique_ptr<Expr> expr; - AttrName(Symbol s) : symbol(s) {}; - AttrName(std::unique_ptr<Expr> e) : expr(std::move(e)) {}; + AttrName(Symbol s); + AttrName(std::unique_ptr<Expr> e); }; typedef std::vector<AttrName> AttrPath; |