Defines | |
#define | ECL_DEPRECATED |
Deprecated compiler warnings. | |
#define | ECL_DONT_INLINE |
Prevents a function from being inlined. | |
#define | ECL_LOCAL |
Declare local visibility for libraries. | |
#define | ECL_PUBLIC |
Declare public visibility for libraries. |
#define ECL_DEPRECATED |
Deprecated compiler warnings.
The following macro emits deprecated compiler warnings by both gnu or msvc compilers.
ELC_DEPRECATED void f() { std::cout << "Dude" << std::endl; }
Definition at line 66 of file macros.hpp.
#define ECL_DONT_INLINE |
Prevents a function from being inlined.
The following macro prevents functions from being inlined by both gnu or msvc compilers.
ELC_DONT_INLINE void f() { std::cout << "Dude" << std::endl; }
Definition at line 44 of file macros.hpp.
#define ECL_LOCAL |
Declare local visibility for libraries.
Definition at line 144 of file macros.hpp.
#define ECL_PUBLIC |
Declare public visibility for libraries.
This emits (in a cross platform way) the required symbols for setting whether a function/class should be visible or hidden. Note only does this protect the private parts of your library, but it can also greatly speed up the linking process.
To check what symbols are being exported for a gnu library,
nm -C -D <library>.so
Usage:
extern "C" ECL_PUBLIC void function(int a); class ECL_PUBLIC SomeClass { int c; ECL_LOCAL void privateMethod(); // Only for use within this DSO public: Person(int _c) : c(_c) { } static void foo(int a); };
Definition at line 143 of file macros.hpp.