I think this is a bug...
- From: "Peter Oliphant" <poliphant@xxxxxxxxxxxxxxxx>
- Date: Tue, 6 Dec 2005 06:38:04 -0800
Here is a case where something that shouldn't compile does. Note below that
Test_Method() only accepts a pointer to Test_Struct as an parameter, but it
will compile with a value instance as a parameter.
For context, I'm using VS C++.NEW 2005 Express with clr:/pure syntax. I
submitted this as a bug report, link below:
http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=ef3c8d9e-75e2-4916-87ee-640a4de75f39
Source below:
// Test_Compiler.cpp : main project file.
#include "stdafx.h"
using namespace System;
value struct Test_Struct
{
long x ;
} ;
ref class My_Class
{
public:
My_Class() {}
~My_Class() {}
private:
void Test_Compiler()
{
Test_Struct info ;
Test_Method( info ) ; // shouldn't compile, but does!!!
Test_Method( %info ) ; // ok
}
void Test_Method( Test_Struct^ info ) {}
} ;
int main(array<System::String ^> ^args)
{
return 0 ;
}
[==P==]
.
- Follow-Ups:
- Re: I think this is a bug...
- From: Holger Grund
- Re: I think this is a bug...
- Prev by Date: Re: IntelliSense is locking VS C++.NET Express
- Next by Date: Re: Cast HDC to long
- Previous by thread: Cast HDC to long
- Next by thread: Re: I think this is a bug...
- Index(es):
Relevant Pages
|
Loading