I'll show my code first then explain my issue:

```
std::vector<std::unique_ptr<SGUIObject> > m_objects;

const std::unique_ptr<SGUIObject>& SGUIManager::getObject(const std::string& object_name)
    {
        for (auto const& iter : m_objects)
        {
            if (iter.get()->getObjectName() == object_name)
                return iter;
        }
    }

//SButton is derived from SGUIObject
//m_clicked is a boolean member in SButton (private)

//isClicked is a public member method of SButton
const bool isClicked() const { return m_clicked; }

if (dynamic_cast<SButton>(SSceneManager::getGUIManager().getObject("testbutton").isClicked()))
            std::cout << "Clicked!" << std::endl;

```

I just copy pasted from several different files, so it looks weird when all put together. Anyways, what I'm trying to do is downcast from a SGUIObject to a SButton and call isClicked() in an if/else loop. When I do my current code, Code::Blocks gives me this error:

error: 'const class std::unique\_ptr' has no member named 'isClicked'|

I have a feeling I'm having a slight syntactical issue, and I'd be extremely grateful if someone was to explain it to me.

Thanks!