|
Boost Users : |
Subject: Re: [Boost-users] default argument and call trait const_reference
From: Hicham Mouline (hicham_at_[hidden])
Date: 2009-04-16 11:06:56
>I apologize, I didn't replace all names to make code more readable...
>It was just P ... that was P's ctor...
>It's Get, not GetSpot
>x.template Get<P,P>( 5 );
>I've added to default argument to the out-of-class definition as well
>and then it works...
>does it make any sense?
>H
I put the code here:
http://codepad.org/6tLNKGvO
1) g++3.4 complains about putting the default parameters in the declaration
and the definition of GetSpot<>
2) VS2005 compiles it fine.
As I said in my previous email, when the default parameter "Interp()" is not
put in the definition of GetSpot<>
debugging shows that "i" has not been constructed properly.
When I add "Interp()" to the definition also, debugs works fine.
In Release, the same behaviour is observed.
Regards,
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net