Shorthand for __VA_ARGS__

This commit is contained in:
Scott Lahteine
2019-09-27 04:30:48 -05:00
parent a18d16fb8b
commit dc65788511
4 changed files with 39 additions and 39 deletions

View File

@@ -59,7 +59,7 @@ public:
inline void restore() { ref_ = val_; }
};
#define REMEMBER(N,X, ...) const restorer<typeof(X)> restorer_##N(X, ##__VA_ARGS__)
#define REMEMBER(N,X,V...) const restorer<typeof(X)> restorer_##N(X, ##V)
#define RESTORE(N) restorer_##N.restore()
// Converts from an uint8_t in the range of 0-255 to an uint8_t