diff options
author | John Hodge (bugs) <tpg@mutabah.net> | 2017-02-25 22:24:40 +0800 |
---|---|---|
committer | John Hodge (bugs) <tpg@mutabah.net> | 2017-02-25 22:24:40 +0800 |
commit | 03addc877bab648ccde022edec29f5b051ce7cb9 (patch) | |
tree | 51089cf2abbda1d48a7105da1cb18ec84f2f4590 /src/common.hpp | |
parent | 12c012c69235fd90c855881f2c07c91dbb052635 (diff) | |
download | mrust-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.hpp | 6 |
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) |