View Single Post
  #2 (permalink)  
Old June 29th, 2010, 07:39 PM
Old Pedant Old Pedant is offline
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Ummmm....shouldn't that last example be
Code:
struct A{};  
void f(const A& a);  
int main()  
{  
    f(new A()); /* OK, binding a temporary A to a const reference*/  
}
Or am I behind the times?
Reply With Quote