correct example in enum class docs
This commit is contained in:
parent
6531b16a56
commit
bf201f22b0
1 changed files with 3 additions and 3 deletions
|
|
@ -525,19 +525,19 @@ class Color {
|
||||||
<p>A workaround is to write these as a series of separate classes containing anonymous enums:</p>
|
<p>A workaround is to write these as a series of separate classes containing anonymous enums:</p>
|
||||||
|
|
||||||
<div class="code"><pre>
|
<div class="code"><pre>
|
||||||
class PrintingColors {
|
struct PrintingColors {
|
||||||
enum : unsigned int {
|
enum : unsigned int {
|
||||||
Cyan, Magenta, Yellow, Black
|
Cyan, Magenta, Yellow, Black
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class BasicColors {
|
struct BasicColors {
|
||||||
enum : unsigned int {
|
enum : unsigned int {
|
||||||
Red, Green, Blue
|
Red, Green, Blue
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class AllColors {
|
struct AllColors {
|
||||||
enum : unsigned int {
|
enum : unsigned int {
|
||||||
Yellow, Orange, Red, Magenta, Blue, Cyan, Green, Pink, Black, White
|
Yellow, Orange, Red, Magenta, Blue, Cyan, Green, Pink, Black, White
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue