aboutsummaryrefslogtreecommitdiff
path: root/build2/cc/guess.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-08-31 19:28:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-08-31 19:28:20 +0200
commit1bf439f7918f2c6f8fa07db3abb53722156945c7 (patch)
tree8463d61d3fc6424fb8d323a106106a7f9a3a787a /build2/cc/guess.hxx
parent12a1044b81e39b8ca03faca641dacf76dda6c506 (diff)
Add ability to print cc compiler_id value
Diffstat (limited to 'build2/cc/guess.hxx')
-rw-r--r--build2/cc/guess.hxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/build2/cc/guess.hxx b/build2/cc/guess.hxx
index a762e79..599c56d 100644
--- a/build2/cc/guess.hxx
+++ b/build2/cc/guess.hxx
@@ -48,6 +48,11 @@ namespace build2
value_type
value () const;
+
+ compiler_id () = default;
+ compiler_id (value_type);
+ compiler_id (std::string t, std::string v)
+ : type (move (t)), variant (move (v)) {}
};
inline ostream&
@@ -56,6 +61,12 @@ namespace build2
return os << id.string ();
}
+ inline ostream&
+ operator<< (ostream& os, const compiler_id::value_type& v)
+ {
+ return os << compiler_id (v);
+ }
+
// Compiler class describes a set of compilers that follow more or less
// the same command line interface. Compilers that don't belong to any of
// the existing classes are in classes of their own (say, Sun CC would be