diff options
-rw-r--r-- | build2/types.hxx | 18 | ||||
-rw-r--r-- | build2/variable.ixx | 1 |
2 files changed, 18 insertions, 1 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>; diff --git a/build2/variable.ixx b/build2/variable.ixx index 0a235e5..fd6b7b2 100644 --- a/build2/variable.ixx +++ b/build2/variable.ixx @@ -106,7 +106,6 @@ namespace build2 return !(x < y); } - template <> inline const names& cast (const value& v) |