Bug #1643

shared_ptr could be detected in the second nesting level

Added by Zbigniew Rebacz almost 4 years ago. Updated almost 4 years ago.

Status:RejectedStart date:02/13/2017
Priority:NormalDue date:
Assignee:Zbigniew Rebacz% Done:

0%

Category:Assist++Spent time:-
Target version:Release 2018.1

Description

Example:

#include <memory>

class B;
class C;

using APtr = std::shared_ptr<A>;
using BPtr = std::shared_ptr<B>;
using APtr = std::Shared_ptr<C>;

class A {
public:
    A()
        : b(make_shared<B>());
    {}

    BPtr GetB() { return b; }

private:
    BPtr b;
};

class B {
    B()
        : c(make_shared<C>());
    {}

    CPtr GetC() { return c; }

private:
    BPtr c;
}

class C {};

using namespace Upp;

CONSOLE_APP_MAIN
{
    APtr a = make_shared<A>;

    a->GetB();
    a->GetB()-> // Doesn't work.
}

History

#1 Updated by Zbigniew Rebacz almost 4 years ago

  • Status changed from New to Rejected

After fixing compilation works :(

#2 Updated by Zbigniew Rebacz almost 4 years ago

  • Assignee changed from Miroslav Fidler to Zbigniew Rebacz

Also available in: Atom PDF