From dbeaddc16c0bcfab9162f99411a317bc27bdb85e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 5 Dec 2017 18:39:57 +0200 Subject: Work around VC14 issues --- build2/types.hxx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'build2/types.hxx') diff --git a/build2/types.hxx b/build2/types.hxx index 2f07029..092318e 100644 --- a/build2/types.hxx +++ b/build2/types.hxx @@ -133,6 +133,24 @@ namespace build2 return *this = a.load (memory_order_relaxed);} }; + // VC 14 has issues. + // +#if defined(_MSC_VER) && _MSC_VER <= 1900 + template + inline bool + operator== (const relaxed_atomic& x, const P& y) + { + return static_cast (x) == y; + } + + template + inline bool + operator!= (const relaxed_atomic& x, const P& y) + { + return static_cast (x) == y; + } +#endif + using std::mutex; using mlock = std::unique_lock; -- cgit v1.1