summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2016-08-09 16:00:44 +0800
committerJohn Hodge <tpg@mutabah.net>2016-08-09 16:00:44 +0800
commit2de440f7d607ecb9f42a59ab1c1457ae3dc697d6 (patch)
tree5c01131b0d26d4b0e36704ef7416af4fd7f165bc /src
parent677f715a239a5c8254e2a2fa8c08ca43107e6aba (diff)
downloadmrust-2de440f7d607ecb9f42a59ab1c1457ae3dc697d6.tar.gz
Tagged Union - Fix TU_MATCHA to work
Diffstat (limited to 'src')
-rw-r--r--src/include/tagged_union.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/include/tagged_union.hpp b/src/include/tagged_union.hpp
index 89ba5be4..91a02c0c 100644
--- a/src/include/tagged_union.hpp
+++ b/src/include/tagged_union.hpp
@@ -99,7 +99,7 @@
// TODO: use `decltype` in place of the `class` argument to TU_MATCH/TU_IFLET
// "match"-like statement
// TU_MATCH(Class, m_data, ent, (Variant, CODE), (Variant2, CODE))
-#define TU_MATCHA(VARS, NAMES, ...) TU_MATCH( decltype( ::std::remove_reference(TU_FIRST VARS) ), VARS, NAMES, __VA_ARGS__ )
+#define TU_MATCHA(VARS, NAMES, ...) TU_MATCH( ::std::remove_reference<decltype(TU_FIRST VARS)>::type, VARS, NAMES, __VA_ARGS__ )
#define TU_MATCH(CLASS, VAR, NAME, ...) switch( (TU_FIRST VAR).tag()) {/*
*/ case CLASS::TAGDEAD: assert(!"ERROR: destructed tagged union used");/*
*/ TU_MATCH_ARMS(CLASS, VAR, NAME, __VA_ARGS__)/*