blob: 1e8fe1a56d7def42c3816ead80b07e300d59fd3c [file] [log] [blame]
John Park33858a32018-09-28 23:05:48 -07001#ifndef _AOS_MACROS_H_
2#define _AOS_MACROS_H_
brians343bc112013-02-10 01:53:46 +00003
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 Schuh60e77942022-05-16 17:48:24 -07009 TypeName(const TypeName &) = delete; \
10 void operator=(const TypeName &) = delete
Brian Silverman6da04272014-05-18 18:47:48 -070011
Austin Schuhc69e6792021-02-05 11:20:05 -080012#define AOS_STRINGIFY(x) AOS_TO_STRING(x)
13#define AOS_TO_STRING(x) #x
Brian Silvermana7234c62014-03-24 20:23:25 -070014
Brian Silverman5bf41dc2014-04-21 18:31:45 -070015#ifdef __clang__
16#define GOOD_PRINTF_FORMAT_TYPE __printf__
17#else
Brian Silvermanf7986142014-04-21 17:42:35 -070018#define GOOD_PRINTF_FORMAT_TYPE gnu_printf
19#endif
20
John Park33858a32018-09-28 23:05:48 -070021#endif // _AOS_MACROS_H_