diff options
Diffstat (limited to 'src/libexpr')
-rw-r--r-- | src/libexpr/flake/config.cc | 2 | ||||
-rw-r--r-- | src/libexpr/parser/parser.cc | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/libexpr/flake/config.cc b/src/libexpr/flake/config.cc index adcf7fd10..558b3e9b9 100644 --- a/src/libexpr/flake/config.cc +++ b/src/libexpr/flake/config.cc @@ -53,7 +53,7 @@ void ConfigFile::apply() bool trusted = whitelist.count(baseName); if (!trusted) { - switch (nix::fetchSettings.acceptFlakeConfig) { + switch (nix::fetchSettings.acceptFlakeConfig.get()) { case AcceptFlakeConfig::True: { trusted = true; break; 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> { |