aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/parser/parser.cc
diff options
context:
space:
mode:
authorJade Lovelace <lix@jade.fyi>2024-08-01 13:42:14 -0700
committerJade Lovelace <lix@jade.fyi>2024-08-04 20:55:45 -0700
commitca9d3e6e00ec452701d9d3b7e909eff61799f739 (patch)
treec56d28840835fabdfd70589a45a0ecf1a7accf80 /src/libexpr/parser/parser.cc
parent9238e62ae6b7b8bf00d53b48e0c3ae33285dd4ab (diff)
tree-wide: fix various lint warnings
Change-Id: I0fc80718eb7e02d84cc4b5d5deec4c0f41116134
Diffstat (limited to 'src/libexpr/parser/parser.cc')
-rw-r--r--src/libexpr/parser/parser.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libexpr/parser/parser.cc b/src/libexpr/parser/parser.cc
index a00586c36..b7a105fe7 100644
--- a/src/libexpr/parser/parser.cc
+++ b/src/libexpr/parser/parser.cc
@@ -12,7 +12,6 @@
#include "state.hh"
#include <charconv>
-#include <clocale>
#include <memory>
// flip this define when doing parser development to enable some g checks.
@@ -254,7 +253,8 @@ struct AttrState : SubexprState {
std::vector<AttrName> attrs;
- void pushAttr(auto && attr, PosIdx) { attrs.emplace_back(std::move(attr)); }
+ template <typename T>
+ void pushAttr(T && attr, PosIdx) { attrs.emplace_back(std::forward<T>(attr)); }
};
template<> struct BuildAST<grammar::attr::simple> {
@@ -290,7 +290,8 @@ struct InheritState : SubexprState {
std::unique_ptr<Expr> from;
PosIdx fromPos;
- void pushAttr(auto && attr, PosIdx pos) { attrs.emplace_back(std::move(attr), pos); }
+ template <typename T>
+ void pushAttr(T && attr, PosIdx pos) { attrs.emplace_back(std::forward<T>(attr), pos); }
};
template<> struct BuildAST<grammar::inherit::from> {