View Single Post
  #11 (permalink)  
Old 02-09-2010, 07:38 PM
James Kanze
Guest
 
Posts: n/a
Default Re: B const * array[ ] in gobal

On 9 Feb, 13:12, Victor Bazarov <v.Abaza...@comAcast.net> wrote:
> soft wind wrote:


[...]
> That expression is sometimes called "function-style cast".
> Even when you do 'int(31.15)', it creates a temporary of type
> 'int', which only lives until the full expression is evaluated
> or until the object is fully initialised (if used in the
> initialisation expression). The difference (unfortunate) for
> you is that you're allowed to take the address of a class
> temporary, but not of a temporary of a built-in type.


Only if the class overloads the address-of operator.

--
James Kanze
Reply With Quote