From cfa8c2a41e8a585834e4d04d56ff7eec0d57f608 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Tue, 30 Jan 2024 17:50:03 +0100 Subject: async maps: Create utility library to handle cycle detection --- src/buildtool/build_engine/base_maps/expression_map.hpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/buildtool/build_engine/base_maps/expression_map.hpp') diff --git a/src/buildtool/build_engine/base_maps/expression_map.hpp b/src/buildtool/build_engine/base_maps/expression_map.hpp index 5d08b78b..3a72c109 100644 --- a/src/buildtool/build_engine/base_maps/expression_map.hpp +++ b/src/buildtool/build_engine/base_maps/expression_map.hpp @@ -15,6 +15,7 @@ #ifndef INCLUDED_SRC_BUILDTOOL_BUILD_ENGINE_BASE_MAPS_EXPRESSION_MAP_HPP #define INCLUDED_SRC_BUILDTOOL_BUILD_ENGINE_BASE_MAPS_EXPRESSION_MAP_HPP +#include #include #include @@ -43,6 +44,10 @@ auto CreateExpressionMap(gsl::not_null const& expr_file_map, gsl::not_null const& repo_config, std::size_t jobs = 0) -> ExpressionFunctionMap; +// use explicit cast to std::function to allow template deduction when used +static const std::function kEntityNamePrinter = + [](EntityName const& x) -> std::string { return x.ToString(); }; + } // namespace BuildMaps::Base #endif // INCLUDED_SRC_BUILDTOOL_BUILD_ENGINE_BASE_MAPS_EXPRESSION_MAP_HPP -- cgit v1.2.3