template class and static function pointer.

template <int tt>
class aa {
    static void (* bb)();
};

template <int tt>
void (* aa<tt>::bb)() = 0;


what's wrong with this code?

but it's not compiler in VC7.1!

why?thanks!

0
madmanahong
5/24/2007 12:31:04 AM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
290 Views

Similar Articles

[PageSpeed] 9

On 23 May 2007 17:31:04 -0700, madmanahong <madmanahong@163.com> wrote:

>template <int tt>
>class aa {
>    static void (* bb)();
>};
>
>template <int tt>
>void (* aa<tt>::bb)() = 0;
>
>
>what's wrong with this code?
>
>but it's not compiler in VC7.1!
>
>why?thanks!

My VC7.1 compiles it without complaint.

-- 
Doug Harrison
Visual C++ MVP
0
dsh (2498)
5/24/2007 2:45:24 AM
On 23 May 2007 17:31:04 -0700, madmanahong <madmanahong@163.com> wrote:

>template <int tt>
>class aa {
>    static void (* bb)();
>};
>
>template <int tt>
>void (* aa<tt>::bb)() = 0;
>
>
>what's wrong with this code?
>
>but it's not compiler in VC7.1!
****
Could you have bothered to tell us what was going wrong, what the error message was, what
line it occurred on, or anything else that might have helped diagnose this problem...?
				joe
*****
>
>why?thanks!
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15973)
5/24/2007 3:10:55 AM
On Wed, 23 May 2007 21:45:24 -0500, "Doug Harrison [MVP]"
<dsh@mvps.org> wrote:

>My VC7.1 compiles it without complaint.

It's fine also on VC6.

MrAsm
0
mrasm (715)
5/24/2007 9:16:15 AM
Reply:

Similar Artilces: