C++/CLI static class and literal

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?d3BjbWFtZQ==?=

    C++/CLI static class and literal

    Why does the following code

    public ref struct X abstract sealed {
    literal int Y = 1;
    };

    give the error C4693: 'X' a sealed abstract class cannot have any instance
    members 'Y'?

    In the help it says that literal implies static.

  • Ben Voigt [C++ MVP]

    #2
    Re: C++/CLI static class and literal


    "wpcmame" <wpcmame@discus sions.microsoft .comwrote in message
    news:3EB369AE-30F2-47C2-B673-5F57289E45BC@mi crosoft.com...
    Why does the following code
    >
    public ref struct X abstract sealed {
    literal int Y = 1;
    };
    >
    give the error C4693: 'X' a sealed abstract class cannot have any instance
    members 'Y'?
    >
    In the help it says that literal implies static.
    >

    It is a confirmed bug:



    Comment

    Working...