C++/CLI static class and literal

G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top