From 9fb791e9fad6c63fc1dac49f4d05ae63b8a3db9b Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 5 Jan 2016 11:55:15 +0200 Subject: Rename build directory/namespace to build2 --- build/config/utility.txx | 45 --------------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 build/config/utility.txx (limited to 'build/config/utility.txx') diff --git a/build/config/utility.txx b/build/config/utility.txx deleted file mode 100644 index 06cb2eb..0000000 --- a/build/config/utility.txx +++ /dev/null @@ -1,45 +0,0 @@ -// file : build/config/utility.txx -*- C++ -*- -// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd -// license : MIT; see accompanying LICENSE file - -#include - -namespace build -{ - namespace config - { - template - std::pair, bool> - required (scope& root, const variable& var, const T& def_value, bool ovr) - { - using result = std::pair, bool>; - - if (auto l = root[var]) - { - if (l.belongs (*global_scope)) - return result (root.assign (var) = *l, true); - - if (!ovr || l.belongs (root)) - return result (*l, false); - } - - return result (root.assign (var) = def_value, true); - } - - template - bool - find_option (const char* option, T& s, const char* var) - { - if (auto l = s[var]) - { - for (const std::string& s: as (*l)) - { - if (s == option) - return true; - } - } - - return false; - } - } -} -- cgit v1.1