blob: 88fc52e9993884518b40d30da028457967f206d1 [file] [log] [blame]
#ifndef _AOS_COMMON_MACROS_H_
#define _AOS_COMMON_MACROS_H_
// This file has some common macros etc.
// A macro to disallow the copy constructor and operator= functions
// This should be used in the private: declarations for a class
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&); \
void operator=(const TypeName&)
// A macro to wrap arguments to macros that contain commas.
// Useful for DISALLOW_COPY_AND_ASSIGNing templated types with multiple template
// arguments.
#define MACRO_ARG(...) __VA_ARGS__
// Double-wraps macro arguments.
// Necessary to use commas in gtest predicate arguments.
#define MACRO_DARG(...) (__VA_ARGS__)
#ifdef __GNUC__
#define UNUSED_VARIABLE __attribute__ ((unused))
#else
#define UNUSED_VARIABLE
#endif
#endif // _AOS_COMMON_MACROS_H_