aboutsummaryrefslogtreecommitdiff
path: root/build2/cxx/utility.txx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-05-20 23:25:45 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-06-11 19:06:40 +0200
commit4218bfe7668d55e36814d6bdcec2da40454025c1 (patch)
tree1abe3f38109ba83755adf7307414dbbd1e1a9eb8 /build2/cxx/utility.txx
parent9f56941794837ec63b8732d8d0cae4659528e714 (diff)
Initial VC++ support (static libraries only)
Diffstat (limited to 'build2/cxx/utility.txx')
-rw-r--r--build2/cxx/utility.txx54
1 files changed, 0 insertions, 54 deletions
diff --git a/build2/cxx/utility.txx b/build2/cxx/utility.txx
deleted file mode 100644
index 4d38513..0000000
--- a/build2/cxx/utility.txx
+++ /dev/null
@@ -1,54 +0,0 @@
-// file : build2/cxx/utility.txx -*- C++ -*-
-// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
-// license : MIT; see accompanying LICENSE file
-
-using namespace std;
-
-namespace build2
-{
- namespace cxx
- {
- template <typename T>
- bool
- translate_std (T& t, string& s)
- {
- if (auto l = t["cxx.std"])
- {
- const string& v (cast<string> (l));
-
- // Translate 11 to 0x and 14 to 1y for compatibility with older
- // versions of the compiler.
- //
- s = "-std=c++";
-
- if (v == "11")
- s += "0x";
- else if (v == "14")
- s += "1y";
- else
- s += v;
-
- return true;
- }
-
- return false;
- }
-
- template <typename T>
- inline void
- append_std (cstrings& args, T& t, string& s)
- {
- if (translate_std (t, s))
- args.push_back (s.c_str ());
- }
-
- template <typename T>
- inline void
- hash_std (sha256& csum, T& t)
- {
- string s;
- if (translate_std (t, s))
- csum.append (s);
- }
- }
-}