macros.hpp
Go to the documentation of this file.
1 
10 /*****************************************************************************
11 ** Ifdefs
12 *****************************************************************************/
13 
14 #ifndef ECL_ERRORS_MACROS_HPP_
15 #define ECL_ERRORS_MACROS_HPP_
16 
17 /*****************************************************************************
18 ** Includes
19 *****************************************************************************/
20 
21 #include <ecl/config/macros.hpp>
22 
23 /*****************************************************************************
24 ** PreProcessing
25 *****************************************************************************/
26 /*
27  * Import/exports symbols for the library
28  */
29 #ifdef ECL_HAS_SHARED_LIBS // ecl is being built around shared libraries
30  #ifdef ecl_errors_EXPORTS // we are building a shared lib/dll
31  #define ecl_errors_PUBLIC ECL_HELPER_EXPORT
32  #else // we are using shared lib/dll
33  #define ecl_errors_PUBLIC ECL_HELPER_IMPORT
34  #endif
35  #define ecl_errors_LOCAL ECL_HELPERS_LOCAL
36 #else // ecl is being built around static libraries
37  #define ecl_errors_PUBLIC
38  #define ecl_errors_LOCAL
39 #endif
40 
41 /*
42  * Convert a variable name to a string.
43  */
44 #define STRINGIFY(x) #x
45 #define TOSTRING(x) STRINGIFY(x)
46 
47 /*
48  * Joints two arguments together.
49  * The following piece of macro magic joins the two
50  * arguments together, even when one of the arguments is
51  * itself a macro (see 16.3.1 in C++ standard). The key
52  * is that macro expansion of macro arguments does not
53  * occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN.
54  */
55 #define JOIN( X, Y ) DO_JOIN( X, Y )
56 #define DO_JOIN( X, Y ) DO_JOIN2(X,Y)
57 #define DO_JOIN2( X, Y ) X##Y
58 
67 #define LOC __FILE__ ":" TOSTRING(__LINE__) " "
68 
69 
70 #endif /* ECL_ERRORS_MACROS_HPP_*/
macros.hpp


ecl_errors
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:13:55