slynch8 / 10x

10x IDE/Editor
191 stars 35 forks source link

[Bug] No autocomplete for inheritance of templated parents #2810

Open Kaltxi opened 2 months ago

Kaltxi commented 2 months ago

The following code has no autocomplete for c_str():

#include <iostream>
#include <string>
#include <format>
#include <utility>

template <typename T>
class Wrapper {
private:
    T value_;

public:
    Wrapper(T value) : value_(std::move(value)) {}

    T get() const {
        return value_;
    }
};

class WorldWrapper : public Wrapper<std::string> {
public:
    WorldWrapper() : Wrapper { "World" } {}
};

int main() {
    WorldWrapper wrapped{};
    std::cout << std::format("Hello {}\n", wrapped.get().c_str());
}

This might be related to #2097 but the issue still reproducible on latest versions.