> Hi Ben,
>
[quoted text clipped - 5 lines]
> the
> compiler's rule.
But why does the rule apply to literals? Using a literal does not require
accessing a managed object, in contrast to static field access which
requires IL (because static field references interact with class
initializers, GC, etc, etc). At least the C# compiler simply substitutes
the literal value at compile time (IL generation, not JIT), why can't the
C++ compiler do likewise? A literal member of integral type should be
considered a constant integral expression and all that implies (use to
declare arrays, as a typedef parameter, etc.)
> Thanks!
>
[quoted text clipped - 21 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
Gary Chang[MSFT] - 22 Nov 2006 03:33 GMT
Hi Ben,
I understand your concern. But your program is not a pure managed one, the
problem is happens inside the native code. That literal is defined within
the managed code, which the unmanage code unable to reference it by the
native code compiler rule. Iam afraid this behavior is by design.
I suggest you can also submit this issue to our product feedback center,
our development team may communicate with you directly on the issue there:
http://connect.microsoft.com/feedback/default.aspx?SiteID=210
Thanks!
Best regards,
Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.