John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 1 | #ifndef _AOS_MACROS_H_ |
| 2 | #define _AOS_MACROS_H_ |
brians | 343bc11 | 2013-02-10 01:53:46 +0000 | [diff] [blame] | 3 | |
| 4 | // This file has some common macros etc. |
| 5 | |
| 6 | // A macro to disallow the copy constructor and operator= functions |
| 7 | // This should be used in the private: declarations for a class |
| 8 | #define DISALLOW_COPY_AND_ASSIGN(TypeName) \ |
Austin Schuh | 60e7794 | 2022-05-16 17:48:24 -0700 | [diff] [blame] | 9 | TypeName(const TypeName &) = delete; \ |
| 10 | void operator=(const TypeName &) = delete |
Brian Silverman | 6da0427 | 2014-05-18 18:47:48 -0700 | [diff] [blame] | 11 | |
Austin Schuh | c69e679 | 2021-02-05 11:20:05 -0800 | [diff] [blame] | 12 | #define AOS_STRINGIFY(x) AOS_TO_STRING(x) |
| 13 | #define AOS_TO_STRING(x) #x |
Brian Silverman | a7234c6 | 2014-03-24 20:23:25 -0700 | [diff] [blame] | 14 | |
Brian Silverman | 5bf41dc | 2014-04-21 18:31:45 -0700 | [diff] [blame] | 15 | #ifdef __clang__ |
| 16 | #define GOOD_PRINTF_FORMAT_TYPE __printf__ |
| 17 | #else |
Brian Silverman | f798614 | 2014-04-21 17:42:35 -0700 | [diff] [blame] | 18 | #define GOOD_PRINTF_FORMAT_TYPE gnu_printf |
| 19 | #endif |
| 20 | |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 21 | #endif // _AOS_MACROS_H_ |