In the RM and Rationale only definitions like B are used. Whats 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 “narrowing.” This would not in general be possible if you had left out the “all” in the declaration, as in the declaration of A. So, as a general rule, access-to-classwide types usually need to be general ac
Related Questions
- What is exactly the difference between type A is access ObjectClass; and type B is access all ObjectClass; In the RM and Rationale only definitions like B are used. Whats the use for A-like definitions ?
- In the RM and Rationale only definitions like B are used. Whats the use for A-like definitions ?
- Can the BIOSTAT® CultiBag RM be used for growth of bacteria, yeast, fungi?