[C++] strongly typed enum c++

Σε Εξέλιξη Αναρτήθηκε Πριν 7 χρόνια Πληρώθηκε κατά την παράδοση
Σε Εξέλιξη Πληρώθηκε κατά την παράδοση

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

Προγραμματισμός C++ Αρχιτεκτονική Λογισμικού

Ταυτότητα Εργασίας: #10555492

Σχετικά με την εργασία

4 προτάσεις Απομακρυσμένη εργασία Ενεργό Πριν 7 χρόνια

Ανατέθηκε στον:

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 Περισσότερα

$150 USD σε 1 μέρα
(90 Αξιολογήσεις)
6.2

4 freelancers κάνουν προσφορές κατά μέσο όρο $232 για αυτή τη δουλειά

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 Περισσότερα

$264 USD σε 3 μέρες
(34 Αξιολογήσεις)
6.7