Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What is the difference between a class-wide access type and a “general” class-wide access type?

class class-wide type wide
0
10 Posted

What is the difference between a class-wide access type and a “general” class-wide access type?

0

What is exactly the difference between type A is access Object’Class; and type B is access all Object’Class; In the RM and Rationale only definitions like B are used. What’s the use for A-like definitions ? (Tucker Taft answers) The only difference is that A is more restrictive, and so presumably might catch bugs that B would not. A is a “pool-specific” access type, and as such, you cannot convert values of other access types to it, nor can you use ‘Access to create values of type A. Values of type A may only point into its “own” pool; that is only to objects created by allocators of type A. This means that unchecked-deallocation is somewhat safer when used with a pool-specific type like A. B is a “general” access type, and you can allocate in one storage pool, and then convert the access value to type B and store it into a variable of type B. Similarly, values of type B may point at objects declared “aliased.” When using class-wide pointer types, type conversion is sometimes used for

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.