We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e0fa91e commit 7387021Copy full SHA for 7387021
lib/Interpreter/CppInterOp.cpp
@@ -993,11 +993,17 @@ namespace Cpp {
993
// actual types. We make this match solely based on count
994
995
const FunctionDecl* func = TFD->getTemplatedDecl();
996
- if (func->getNumParams() != arg_types.size())
+
997
+#ifdef USE_CLING
998
+ if (func->getNumParams() > arg_types.size())
999
continue;
1000
+#else // CLANG_REPL
1001
+ if (func->getMinRequiredArguments() > arg_types.size())
1002
+ continue;
1003
+#endif
1004
1005
// FIXME : first score based on the type similarity before forcing
- // instantiation try instantiating
1006
+ // instantiation.
1007
TCppFunction_t instantiated =
1008
InstantiateTemplate(candidate, arg_types.data(), arg_types.size());
1009
if (instantiated)
0 commit comments