No matching member function for call to 'addCustomItem'

settingMenu.reset (new juce::PopupMenu);
std::unique_ptr<Component> cp = std::make_unique<juce::Component>("cp");
settingMenu->addCustomItem(-1, std::move(cp), nullptr, "cp");

Sorry, I know it’s a stupid thing, but where I’m wrong here? Xcode says me near the last line No matching member function for call to ‘addCustomItem’

The second parameter is supposed to be a CustomComponent, not a Component

1 Like

oh sorry, it’s a CustomComponent not a template, really sorry now everything makes sense
thank you!