[C++] strongly typed enum c++

Sedang Disiapkan Disiarkan May 20, 2016 Dibayar semasa penghantaran
Sedang Disiapkan Dibayar semasa penghantaran

Two things:

a) Platform is embedded so I'm unable to use boost

b) I'm unable to use C++11 features

Desire:

Need an equivalent implementation to the one show here:

[url removed, login to view]

Ultimately what I'd like is to be able to specify the enum Color as follows:

MYLIB_ENUM(Color, unsigned int, Red = 1, Green, Blue, Yellow )

or

MYLIB_ENUM(Color, unsigned int, Red, Green, Blue, Yellow )

We could discuss types supported but unsigned int, int, unsigned short, short, unsigned char, char and perhaps float and double should be adequate

Pengaturcaraan C++ Kejuruteraan Perisian

ID Projek: #10555492

Tentang projek

4 cadangan Projek jarak jauh Aktif May 21, 2016

Dianugerahkan kepada:

hectorenavarrou

Hi, I can do it, however I don't think this is possible: MYLIB_ENUM(Color, unsigned int, Red = 1, Green, Blue, Yellow ), assigning a value for a particular element breaks the grammar of C++. Maybe that same funcionalit Lagi

$150 USD dalam sehari
(90 Ulasan)
6.2

4 pekerja bebas membida secara purata $232 untuk pekerjaan ini

AwaisChaudhry

Hi there! I have read what you exactly need, however I would like to ask you a few questions. I would call myself a master of what I do, I do work smart and do not rest until I get the job done. Please feel free to pin Lagi

$264 USD dalam 3 hari
(34 Ulasan)
6.7