ADT
Last change
on this file since 6e4c44d was
e874605,
checked in by JiadaL <j82liang@…>, 2 years ago
|
Add class InlineValueDecl?, which is a Declaration class that works as a placeholder for aggregration value inherited from other aggregration. Disable inline value overwrite.
|
-
Property mode set to
100644
|
File size:
302 bytes
|
Line | |
---|
1 | #include <fstream.hfa> |
---|
2 | enum enumA { |
---|
3 | A=5, B, C=10, D |
---|
4 | }; |
---|
5 | |
---|
6 | enum enumB { |
---|
7 | inline enumA, |
---|
8 | E |
---|
9 | }; |
---|
10 | |
---|
11 | int main() { |
---|
12 | enum enumB val = A; |
---|
13 | sout | "enumB.A is" | val; |
---|
14 | enum enumB val2= enumB.B; |
---|
15 | sout | "enumB.B is" | val2; |
---|
16 | sout | "enumB.D is" | enumB.D; |
---|
17 | sout | "enumB.E is" | enumB.E; |
---|
18 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.