473,395 Members | 1,532 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

C++/CLI indexed property serious bug!

Fellows there is probably a serious implementation bug of C++/CLI
indexed property in VC++ 2005, it looks like it is implemented the
opposite way than the C++/CLI draft says!
At first the latest C++/CLI draft is 1.7 and you can download it from here:

http://www.plumhall.com/C++-CLI%20draft%201.7.pdf
But the draft that MS currently provides for downloading also says the same.
An implementation example of default indexed property is provided on
page 22 of the C++/CLI draft.
Based on the draft the following should compile:

ref class SomeClass
{
public:
property unsigned default[int]
{
unsigned get(int index) { return 1; }
void set(unsigned value, int index) {}
}
};

int main()
{
SomeClass obj;
}
However it does not:

C:\c>cl /clr:safe temp.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 14.00.40904
for Microsoft (R) .NET Framework version 2.00.40607.16
Copyright (C) Microsoft Corporation. All rights reserved.

temp.cpp
temp.cpp(7) : error C3902: 'set': type of last parameter must be
'unsigned int'
temp.cpp(7) : error C2192: parameter '1' declaration different

C:\c>

The compiler wants the arguments the other way around:

void set(int index, unsigned value) {}

Unless I am mistaken there, is a serious implementation error of the
indexed property concept.
I had initially reported the issue as a bug under the subject

"C++/CLI indexed property implementation bug".
Please check it, and tell the appropriate channels to look it closer, or
tell me what I have to do to make it reconsidered again!

--
Ioannis Vranos
Nov 17 '05 #1
7 1996
Ioannis,
Fellows there is probably a serious implementation bug of C++/CLI
indexed property in VC++ 2005, it looks like it is implemented the
opposite way than the C++/CLI draft says!


Sounds to me like it's the spec that is wrong, not the compiler...

Just file it as a spec bug using the MSDN product feedback page.
--
Tomas Restrepo
to****@mvps.org
Nov 17 '05 #2
Tomas Restrepo (MVP) wrote:
Sounds to me like it's the spec that is wrong, not the compiler...

Just file it as a spec bug using the MSDN product feedback page.

Do you mean that it is a bug of the standard? :-))

--
Ioannis Vranos
Nov 17 '05 #3
Ioannis Vranos wrote:
Tomas Restrepo (MVP) wrote:
Sounds to me like it's the spec that is wrong, not the compiler...

Just file it as a spec bug using the MSDN product feedback page.


Do you mean that it is a bug of the standard? :-))


Also there is no spec option in the bug category in the feedback page.

--
Ioannis Vranos
Nov 17 '05 #4
Ioannis Vranos wrote:
Ioannis Vranos wrote:
Tomas Restrepo (MVP) wrote:
Sounds to me like it's the spec that is wrong, not the compiler...

Just file it as a spec bug using the MSDN product feedback page.
Do you mean that it is a bug of the standard? :-))


Yep.
Also there is no spec option in the bug category in the feedback page.


Then file it as a compiler bug but indicate in the description that you
don't know if the compiler or the spec is wrong, just that they disagree.

-cd
Nov 17 '05 #5
Carl Daniel [VC++ MVP] wrote:
Do you mean that it is a bug of the standard? :-))

Yep.

Also there is no spec option in the bug category in the feedback page.

Then file it as a compiler bug but indicate in the description that you
don't know if the compiler or the spec is wrong, just that they disagree.

But how can it be the standard to be in error and an implementation to
be the right?

This is the first time I encounter such an explanation. :-)

--
Ioannis Vranos
Nov 17 '05 #6
Ioannis Vranos wrote:
But how can it be the standard to be in error and an implementation to
be the right?

This is the first time I encounter such an explanation. :-)


There is no standard - just a draft standard, that's how. It's just as much
a work in progress as the compiler is. The people defining the compiler
are, to a large extent, the same people who are defining the standard, so
any inconsistency like this could potentially be resolved either way.

-cd
Nov 17 '05 #7
Carl Daniel [VC++ MVP] wrote:
Then file it as a compiler bug but indicate in the description that you
don't know if the compiler or the spec is wrong, just that they disagree.

I have reposted it under the subject:

"C++/CLI draft standard and VC++ 2005 Express Beta 1 property
implementation *inconsistency*".
The original message was:

"C++/CLI indexed property implementation bug".

I hope it will be checked thoroughly.

--
Ioannis Vranos
Nov 17 '05 #8

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

Similar topics

6
by: Vincent LIDOU | last post by:
Do not trust values returned by materialized views under SQL Server without frequently checking underlying tables!!! I already posted this message under microsoft.public.sqlserver.server and I'm...
2
by: Kor | last post by:
Hi, Am I right that indexed properties are implemented in VB ..NET, but NOT in C#. It seems that for C# you have to wrap the property in a separate class, for emulating index properties. In...
6
by: Marc Scheuner [MVP ADSI] | last post by:
Folks, I was trying to achieve the following thing: I have a "structure" that basically is a two-dimensional array of numeric values. Both dimensions are handled by enumeration types in C#: ...
6
by: Altman | last post by:
I would like to use an indexed property to access my private array of user controls. If I don't use an indexed property, the property will show up in my Properties Window during development. Is...
0
by: liko81 | last post by:
I have an Invoice class that must know, directly or indirectly, how to do anything associated with creating, reading, or otherwise processing an invoice to a customer. It is an uber-DAO object that...
1
by: solar | last post by:
Indexed.Yes (Duplicates OK). In my code for remote control i wanted to remove the property Indexed of a field, but i receive the date type conversion error.How can i change these properties by...
17
by: David C. Ullrich | last post by:
Having a hard time phrasing this in the form of a question... The other day I saw a thread where someone asked about overrideable properties and nobody offered the advice that properties are...
25
by: Rick Collard | last post by:
Using DAO 3.6 on an Access 2002 database, I'm getting unexpected results with the FindFirst method. Here's the simple code to test: Public Sub FindIt() Dim db As Database, rs As Recordset...
0
by: saudamini | last post by:
i am trying to deserlize XML against the class which has this an indexed property, the deserializer just skips this indexed property, it's not setting it. I remember reading somewhere XML...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.