diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2017-12-05 18:39:57 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2017-12-05 18:39:57 +0200 |
commit | dbeaddc16c0bcfab9162f99411a317bc27bdb85e (patch) | |
tree | b66c24210ed3c9309e5c6642af544fddc34ee70e /build2/types.hxx | |
parent | febfafcf7f0e4d1cbe878e7dfffd9c9b78036aed (diff) |
Work around VC14 issues
Diffstat (limited to 'build2/types.hxx')
-rw-r--r-- | build2/types.hxx | 18 |
1 files changed, 18 insertions, 0 deletions
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 <typename T, typename P> + inline bool + operator== (const relaxed_atomic<T*>& x, const P& y) + { + return static_cast<T*> (x) == y; + } + + template <typename T, typename P> + inline bool + operator!= (const relaxed_atomic<T*>& x, const P& y) + { + return static_cast<T*> (x) == y; + } +#endif + using std::mutex; using mlock = std::unique_lock<mutex>; |