On 09/03/2016 09:30, Dimitry Sibiryakov wrote:
> Hello, All.
>
> Can someone explain in simple words the purpose of subj?
> Meaning of "Encloses a pointer to cascade parent object constness" is
> somehow dim for
> me: what is "parent object" and how does it differ from plain "const T*"?
>
class Child
{
public:
void modifyStateMethod();
};
class Parent
{
public:
Child* child;
NestConst<Child> child2;
};
const Parent* myParentConstObject;
myParentConstObject->child->modifyStateMethod(); // no error!
myParentConstObject->child2->modifyStateMethod(); // error!
It propagates the const in a tree of object, so if you start with
something const, every thing in the path will be const too.
Adriano
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel