diff options
author | John Hodge <tpg@mutabah.net> | 2018-02-04 17:38:57 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2018-02-04 17:38:57 +0800 |
commit | 8fb6df4340c186fbc391b18dc026cd868f74b6ac (patch) | |
tree | 85c05f467fad90da983f77dfa6fba971e3cc3ef7 /src/include | |
parent | 05e399b35d71118b375510d35ca5a89876bcbfcd (diff) | |
download | mrust-8fb6df4340c186fbc391b18dc026cd868f74b6ac.tar.gz |
Trans - mingw32 target attempt (still being worked on)
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/tagged_union.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/tagged_union.hpp b/src/include/tagged_union.hpp index 9d95038c..478953b9 100644 --- a/src/include/tagged_union.hpp +++ b/src/include/tagged_union.hpp @@ -110,7 +110,7 @@ #define TU_IFLET(CLASS, VAR, TAG, NAME, ...) if(VAR.tag() == CLASS::TAG_##TAG) { auto& NAME = VAR.as_##TAG(); (void)&NAME; __VA_ARGS__ } // Evil hack: two for loops, the inner stops the outer after it's done. -#define TU_ARM(VAR, TAG, NAME) case ::std::remove_reference<decltype(VAR)>::type::TAG_##TAG: for(bool tu_lc = true; tu_lc; tu_lc=false) for(auto& NAME = VAR.as_##TAG(); tu_lc; tu_lc=false) +#define TU_ARM(VAR, TAG, NAME) case ::std::remove_reference<decltype(VAR)>::type::TAG_##TAG: for(bool tu_lc = true; tu_lc; tu_lc=false) for(auto& NAME = VAR.as_##TAG(); (void)NAME, tu_lc; tu_lc=false) //#define TU_TEST(VAL, ...) (VAL.is_##TAG() && VAL.as_##TAG() TEST) #define TU_TEST1(VAL, TAG1, TEST) (VAL.is_##TAG1() && VAL.as_##TAG1() TEST) |