I found the following error in my eclipse log. Thought I'd share the source code it was parsing in case it is of any use?
!ENTRY org.eclipse.cdt.core 4 0 2016-03-30 09:07:54.710
!MESSAGE Error: Encountered an ambiguous node "std::forward<ArgSeq>(arg_seq)" at /home/steve/src/vc/cay/utils/tuple/tuple_drop_type.h, line 43 while parsing /home/steve/src/vc/cay/rg/prev/test/event/actions_test.cpp
!STACK 0
org.eclipse.cdt.internal.core.parser.ParserException: Encountered an ambiguous node "std::forward<ArgSeq>(arg_seq)" at /home/steve/src/vc/cay/utils/tuple/tuple_drop_type.h, line 43 while parsing /home/steve/src/vc/cay/rg/prev/test/event/actions_test.cpp
at org.eclipse.cdt.internal.core.dom.parser.ASTAmbiguousNode.logAmbiguousNodeError(ASTAmbiguousNode.java:182)
at org.eclipse.cdt.internal.core.dom.parser.ASTAmbiguousNode.getEvaluation(ASTAmbiguousNode.java:177)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTPackExpansionExpression.getEvaluation(CPPASTPackExpansionExpression.java:67)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.LookupData.setFunctionArguments(LookupData.java:536)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.createLookupData(CPPSemantics.java:700)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.resolveBinding(CPPSemantics.java:295)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.createBinding(CPPVisitor.java:272)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName.createIntermediateBinding(CPPASTName.java:61)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase.resolvePreBinding(CPPASTNameBase.java:94)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTQualifiedName.resolvePreBinding(CPPASTQualifiedName.java:100)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionCallExpression.checkForExplicitTypeConversion(CPPASTFunctionCallExpression.java:331)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionCallExpression.computeEvaluation(CPPASTFunctionCallExpression.java:316)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionCallExpression.getEvaluation(CPPASTFunctionCallExpression.java:307)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionCallExpression.getExpressionType(CPPASTFunctionCallExpression.java:345)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.getDeclType(CPPVisitor.java:2305)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.getBaseType(CPPVisitor.java:2217)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.createType(CPPVisitor.java:2197)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.createType(CPPVisitor.java:2034)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.createAutoFunctionType(CPPVisitor.java:2191)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.createAutoType(CPPVisitor.java:2068)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.createType(CPPVisitor.java:2031)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.resolveFunctionDeclaration(CPPSemantics.java:2678)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.resolveFunction(CPPSemantics.java:2482)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.resolveAmbiguities(CPPSemantics.java:2196)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.resolveAmbiguities(CPPSemantics.java:1879)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPScope.getBinding(CPPScope.java:127)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPClassScope.getBinding(CPPClassScope.java:349)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPScope.getBinding(CPPScope.java:375)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.createBinding(CPPVisitor.java:830)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.createBinding(CPPVisitor.java:310)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName.createIntermediateBinding(CPPASTName.java:61)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase.resolveBinding(CPPASTNameBase.java:107)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPParameter.getOwner(CPPParameter.java:276)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalBinding.getParameterOwner(EvalBinding.java:151)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalBinding.marshal(EvalBinding.java:355)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.SignatureBuilder.marshalEvaluation(SignatureBuilder.java:90)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFunctionCall.marshal(EvalFunctionCall.java:177)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPEvaluation.getSignature(CPPEvaluation.java:41)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.TypeOfDependentExpression.<init>(TypeOfDependentExpression.java:33)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFunctionCall.computeType(EvalFunctionCall.java:122)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.EvalFunctionCall.getTypeOrFunctionSet(EvalFunctionCall.java:116)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.LookupData.getFunctionArgumentTypes(LookupData.java:546)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.resolveFunction(CPPSemantics.java:2492)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.resolveAmbiguities(CPPSemantics.java:2196)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics.resolveBinding(CPPSemantics.java:314)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.createBinding(CPPVisitor.java:272)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates.createBinding(CPPTemplates.java:640)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTemplateId.createIntermediateBinding(CPPASTTemplateId.java:125)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase.resolveBinding(CPPASTNameBase.java:107)
at org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPVisitor.createBinding(CPPVisitor.java:290)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName.createIntermediateBinding(CPPASTName.java:61)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNameBase.resolveBinding(CPPASTNameBase.java:107)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTemplateIDAmbiguity.checkNames(CPPASTTemplateIDAmbiguity.java:117)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTemplateIDAmbiguity.doResolveAmbiguity(CPPASTTemplateIDAmbiguity.java:82)
at org.eclipse.cdt.internal.core.dom.parser.ASTAmbiguousNode.resolveAmbiguity(ASTAmbiguousNode.java:83)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTAmbiguityResolver.visit(CPPASTAmbiguityResolver.java:67)
at org.eclipse.cdt.internal.core.dom.parser.ASTAmbiguousNode.accept(ASTAmbiguousNode.java:66)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionCallExpression.accept(CPPASTFunctionCallExpression.java:211)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclSpecifier.accept(CPPASTSimpleDeclSpecifier.java:219)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTypeId.accept(CPPASTTypeId.java:100)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDeclarator.postAccept(CPPASTFunctionDeclarator.java:292)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTDeclarator.accept(CPPASTDeclarator.java:202)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTAmbiguityResolver.visit(CPPASTAmbiguityResolver.java:134)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTFunctionDefinition.accept(CPPASTFunctionDefinition.java:176)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTemplateDeclaration.accept(CPPASTTemplateDeclaration.java:123)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTCompositeTypeSpecifier.accept(CPPASTCompositeTypeSpecifier.java:203)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTSimpleDeclaration.accept(CPPASTSimpleDeclaration.java:102)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTemplateDeclaration.accept(CPPASTTemplateDeclaration.java:123)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNamespaceDefinition.accept(CPPASTNamespaceDefinition.java:139)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNamespaceDefinition.accept(CPPASTNamespaceDefinition.java:139)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTNamespaceDefinition.accept(CPPASTNamespaceDefinition.java:139)
at org.eclipse.cdt.internal.core.dom.parser.ASTTranslationUnit.accept(ASTTranslationUnit.java:266)
at org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTTranslationUnit.resolveAmbiguities(CPPASTTranslationUnit.java:206)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.resolveAmbiguities(AbstractGNUSourceCodeParser.java:676)
at org.eclipse.cdt.internal.core.dom.parser.AbstractGNUSourceCodeParser.parse(AbstractGNUSourceCodeParser.java:664)
at org.eclipse.cdt.core.dom.parser.AbstractCLikeLanguage.getASTTranslationUnit(AbstractCLikeLanguage.java:167)
at org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask.createAST(AbstractIndexerTask.java:1229)
at org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask.parseFile(AbstractIndexerTask.java:1086)
at org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask.parseLinkage(AbstractIndexerTask.java:898)
at org.eclipse.cdt.internal.core.pdom.AbstractIndexerTask.runTask(AbstractIndexerTask.java:554)
at org.eclipse.cdt.internal.core.pdom.indexer.PDOMIndexerTask.run(PDOMIndexerTask.java:161)
at org.eclipse.cdt.internal.core.pdom.indexer.PDOMUpdateTask.run(PDOMUpdateTask.java:94)
$ cat /home/steve/src/vc/cay/utils/tuple/tuple_drop_type.h
#pragma once
#include <tuple>
/*
* given a tuple and a type T, returns a tuple with all elements of type T removed
*
* eg: remove chars from a tuple:
* std::tuple<int, double, char, int, double, char> a = std::make_tuple(1, 2., 'a', 3, 4., 'b');
* std::tuple<int, double, int, double> b = tuple::dropType(a, char{});
*
* assert(std::get<0>(b) == 1);
* assert(std::get<1>(b) == 2.);
* assert(std::get<2>(b) == 3);
* assert(std::get<3>(b) == 4.);
*
*/
namespace cay { namespace tuple {
namespace detail
{
template<size_t N, typename DropT>
struct DropTupleType
{
template<typename Tuple, typename... ArgSeq>
static auto apply(Tuple&& tuple, ArgSeq&&... arg_seq)
-> decltype(DropTupleType<N-1, DropT>::apply(
std::forward<Tuple>(tuple),
std::get<N-1>(std::forward<Tuple>(tuple)),
std::forward<ArgSeq>(arg_seq)...))
{
return DropTupleType<N-1, DropT>::apply(
std::forward<Tuple>(tuple),
std::get<N-1>(std::forward<Tuple>(tuple)),
std::forward<ArgSeq>(arg_seq)...);
}
template<typename Tuple, typename... ArgSeq>
static auto apply(Tuple&& tuple, DropT, ArgSeq&&... arg_seq)
-> decltype(DropTupleType<N-1, DropT>::apply(
std::forward<Tuple>(tuple),
std::get<N-1>(std::forward<Tuple>(tuple)),
std::forward<ArgSeq>(arg_seq)...))
{
return DropTupleType<N-1, DropT>::apply(
std::forward<Tuple>(tuple),
std::get<N-1>(std::forward<Tuple>(tuple)),
std::forward<ArgSeq>(arg_seq)...);
}
};
template<typename DropT>
struct DropTupleType<0, DropT>
{
template<typename Tuple, typename... ArgSeq>
static auto apply(Tuple&&, ArgSeq&&... arg_seq)
-> decltype(std::forward_as_tuple(std::forward<ArgSeq>(arg_seq)...))
{
return std::forward_as_tuple(std::forward<ArgSeq>(arg_seq)...);
}
template<typename Tuple, typename... ArgSeq>
static auto apply(Tuple&&, DropT, ArgSeq&&... arg_seq)
-> decltype(std::forward_as_tuple(std::forward<ArgSeq>(arg_seq)...))
{
return std::forward_as_tuple(std::forward<ArgSeq>(arg_seq)...);
}
};
}
template<typename DropT, typename Tuple>
auto dropType(Tuple&& tuple = {}, DropT&& = {})
-> decltype(detail::DropTupleType<std::tuple_size<
typename std::decay<Tuple>::type>::value,
typename std::decay<DropT>::type>::apply(
std::forward<Tuple>(tuple)))
{
return detail::DropTupleType<std::tuple_size<
typename std::decay<Tuple>::type>::value,
typename std::decay<DropT>::type>::apply(
std::forward<Tuple>(tuple));
}
}}