473,473 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Bug Report: Incorrect treatment of function types in VC7.1

According to 8.3.5/3 the types int(int(int)) and int(int(*)(int))
should be the same. Indeed, the test program at the end of this
message compiles and executes correctly on

Comeau 4.3.3,
Codewarrior 8.0 and 9.2,
Intel 7.1 and 8.0 for Windows, and
GCC 3.2 and 3.3.1.

On VC7.1, the static assertion fails; if it is commented out, the
program compiles and the runtime assertion succeeds.

I'm writing an implementation of several logical formalisms for use
with Boost.MPL. This and related bugs are keeping the prefered syntax
from working on VC7.1

Thanks for your help.

Jonathan

---------------------------

#include <cassert>
#include <iostream>
#include <typeinfo>

//--------------Definition of is_same-----------------------------//

template<typename T, typename U>
struct is_same { enum { value = false }; };
template<typename T>
struct is_same<T, T> { enum { value = true }; };

//--------------Definition of STATIC_ASSERT-----------------------//

template<bool B> struct STATIC_ASSERTION_FAILURE { };
template<> struct STATIC_ASSERTION_FAILURE<false>;
#define STATIC_ASSERT(x) \
{ STATIC_ASSERTION_FAILURE< x > s; (void) s; };

int main()
{
typedef int first(int(int));
typedef int second(int(*)(int));
STATIC_ASSERT((is_same<first, second>::value));
assert(typeid(first) == typeid(second));
}
Nov 17 '05 #1
2 997
Jonathan,

I don't have an answer to your problem, but as the same problem exists
with the current Whidbey alpha compiler, I've forwarded your report to
MS.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 17 '05 #2

"David Lowndes" <da****@example.invalid> wrote in message
news:mg********************************@4ax.com...
Jonathan,

I don't have an answer to your problem, but as the same problem exists with the current Whidbey alpha compiler, I've forwarded your report to MS.


Thanks.

Jonathan

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: xzzy | last post by:
I need to automate a report in a different database (and thank yous to Terry Kreft for pointing me in the right direction). below is the code with the one line that does not work, marked: 'Does...
3
by: Randy Harris | last post by:
I can swear I saw an answer to this a while back but can't locate it. I need to pad lines on a report (print 20 lines, even if there are only 15 records - the last 5 lines blank). Any...
13
by: salad | last post by:
Hi Guys: I was stuck. I needed to send a report to a file. My beautiful report(s) in Access were going to require loss of formatting with RTFs, a PITA in WordMailMerge, sending it as a text...
3
by: Miguel | last post by:
I have a parameter query to filter by date from which I run a report. I need to be able to count the number of times a particular product or error type appears after the report is run from the...
1
by: Parasyke | last post by:
I have a report that I want to print for a product specification sheet with a photo of the product. I have the photos stored in a separate folder from my Access 2000 database. I have a form that...
0
by: jeanbdenis | last post by:
Hi All, I've been struggling with this issue for a while. I am using the autogenerated code from Excel VBA to consume a web service which takes as input a complex type and returns a complex...
3
by: Constantine AI | last post by:
Hi can anybody help me with this problem? I have a customer order form with a sales order line subform. The subform contains products ordered by customers, each (wooden) product can come in two...
11
by: Gord | last post by:
When I open a certain report, it runs some code that generates the records that will be displayed in that report. This works fine. When I go to print preview the report it appears that the code...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.