summaryrefslogtreecommitdiff
path: root/src/common.hpp
diff options
context:
space:
mode:
authorJohn Hodge (bugs) <tpg@mutabah.net>2017-02-25 22:24:40 +0800
committerJohn Hodge (bugs) <tpg@mutabah.net>2017-02-25 22:24:40 +0800
commit03addc877bab648ccde022edec29f5b051ce7cb9 (patch)
tree51089cf2abbda1d48a7105da1cb18ec84f2f4590 /src/common.hpp
parent12c012c69235fd90c855881f2c07c91dbb052635 (diff)
downloadmrust-03addc877bab648ccde022edec29f5b051ce7cb9.tar.gz
Add visual studio project files, little tweaks to codebase to allow compiling on visual studio (not complete)
Diffstat (limited to 'src/common.hpp')
-rw-r--r--src/common.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common.hpp b/src/common.hpp
index 0b0fad14..a0130371 100644
--- a/src/common.hpp
+++ b/src/common.hpp
@@ -14,8 +14,8 @@
#define FMT(ss) (dynamic_cast< ::std::stringstream&>(::std::stringstream() << ss).str())
// XXX: Evil hack - Define 'mv$' to be ::std::move
#define mv$(x) ::std::move(x)
-#define box$(x...) ::make_unique_ptr(::std::move(x))
-#define rc_new$(x...) ::make_shared_ptr(::std::move(x))
+#define box$(...) ::make_unique_ptr(::std::move(__VA_ARGS__))
+#define rc_new$(...) ::make_shared_ptr(::std::move(__VA_ARGS__))
#include "include/debug.hpp"
#include "include/rustic.hpp" // slice and option
@@ -77,6 +77,7 @@ static inline Ordering ord(unsigned l, unsigned r)
else
return OrdLess;
}
+#if UINTPTR_MAX != UINT_MAX
static inline Ordering ord(::std::uintptr_t l, ::std::uintptr_t r)
{
if(l == r)
@@ -86,6 +87,7 @@ static inline Ordering ord(::std::uintptr_t l, ::std::uintptr_t r)
else
return OrdLess;
}
+#endif
static inline Ordering ord(const ::std::string& l, const ::std::string& r)
{
if(l == r)