summaryrefslogtreecommitdiffstats
path: root/src/xmlpatterns/functions/qsequencefns_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmlpatterns/functions/qsequencefns_p.h')
-rw-r--r--src/xmlpatterns/functions/qsequencefns_p.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/xmlpatterns/functions/qsequencefns_p.h b/src/xmlpatterns/functions/qsequencefns_p.h
index 77aa102..f16462f 100644
--- a/src/xmlpatterns/functions/qsequencefns_p.h
+++ b/src/xmlpatterns/functions/qsequencefns_p.h
@@ -146,13 +146,20 @@ namespace QPatternist
*/
virtual Expression::Ptr compress(const StaticContext::Ptr &context)
{
- Q_ASSERT(Id == IDExistsFN || Id == IDEmptyFN);
+ // RVCT doesn't like using template parameter in trinary operator when the trinary operator result is
+ // passed directly into another constructor.
+ bool tempAssert = (Id == IDExistsFN || Id == IDEmptyFN);
+ Q_ASSERT(tempAssert);
+
const Expression::Ptr me(FunctionCall::compress(context));
if(me != this)
return me;
- const Cardinality myCard((Id == IDExistsFN) ? Cardinality::oneOrMore() : Cardinality::empty());
+ // RVCT doesn't like using template parameter in trinary operator when the trinary operator result is
+ // passed directly into another constructor.
+ Expression::ID tempId = Id;
+ const Cardinality myCard((tempId == IDExistsFN) ? Cardinality::oneOrMore() : Cardinality::empty());
const Cardinality card(m_operands.first()->staticType()->cardinality());
if(myCard.isMatch(card))