https://bugs.kde.org/show_bug.cgi?id=360567

            Bug ID: 360567
           Summary: Wrong parameter info displayed for variadic function
                    templates
           Product: kdevelop
           Version: git master
          Platform: Compiled Sources
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Language Support: CPP (Clang-based)
          Assignee: kdevelop-bugs-n...@kde.org
          Reporter: aspotas...@gmail.com

In the sample code below, pressing Ctrl+Space shows "void print()". "void
print()" is just wrong here, these two options should be displayed instead:
 * void print(int a, char b)
 * void print(std::string a, double b)

=====
#include <string>
#include <iostream>

void print_impl(int a, char b)
{
    std::cout << a << b;
}

void print_impl(std::string a, double b)
{
    std::cout << a << b;
}

template <typename ...Args>
void print(Args&& ...args)
{
    print_impl(args...);
    std::cout << std::endl;
}

int main()
{
    print(1, '2');
    print("abc", 1e15);
    return 0;
}

Reproducible: Always

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to