Topaz Filer - Email filing software
VC7.0: const qualifier on 'void' type is ignored
Messages   Related Types
This message was discovered on microsoft.public.dotnet.languages.vc.


Aleksey Gurtovoy
As the following code highlights, VC7.0 ignores 'const' qualifier on 'void'
type when it's used as template argument:

[void_const_vc7.cpp]
template<typename T> struct memory_block;
template<> struct memory_block<void> {};
template<> struct memory_block<void const> {}; // error C2908, see below

[compiler output]
e:\depot\bugs\void_const_vc7.cpp(3) : error C2908: explicit specialization;
'memory_block<T>' has already been instantiated from the primary template
with
[
T=void
]

, which is clearly not a correct behavior.

--
Aleksey

Reply to this message...
Vote that this is a GOOD answer...
 
New BootFX DBGet build available
Twitter and Snow… simple #uksnow
 
    
Ronald Laeremans [MSFT]
However, this one will ship broken in VC 7.0 RTM. We will have it working
for the next version.

Ronald Laeremans
Visual C++ compiler team

"Aleksey Gurtovoy" <Click here to reveal e-mail address> wrote in message
news:#gutCraQBHA.404@tkmsftngp03...
> As the following code highlights, VC7.0 ignores 'const' qualifier on
'void'
[Original message clipped]

Reply to this message...
Vote that this is a GOOD answer...
 
Windows 7 compatible tool for mounting ISO images
Introduction to BootFX’s Object Relational Mapping Functionality article now live on CodeProject
 
 




Ad
BootFX
Reliable and powerful .NET application framework.
Looking to invest in a major software project? Technical and commercial advice available here.
Other Helpful Sites
MBR 247
Topaz Filer
SharePoint Email Filing
Software Advisory Services
 
Copyright © AMX Software Ltd 2008-2010. Portions copyright © Matthew Baxter-Reynolds 2001-2010. All rights reserved.
Contact Us - Terms of Use - Privacy Policy - 4.0.30129.1734