Go to the source code of this file.
◆ DETAIL_MR_CANONICAL_TYPEDEFS
| #define DETAIL_MR_CANONICAL_TYPEDEFS |
( |
| type_, |
|
|
| name_, |
|
|
| aliases_ ) |
◆ DETAIL_MR_CANONICAL_TYPEDEFS_LOOP_USING_A
MR_IDENTITY here keeps the legacy MSVC preprocessor happy.
◆ DETAIL_MR_CANONICAL_TYPEDEFS_LOOP_USING_A_END
| #define DETAIL_MR_CANONICAL_TYPEDEFS_LOOP_USING_A_END |
◆ DETAIL_MR_CANONICAL_TYPEDEFS_LOOP_USING_B
◆ DETAIL_MR_CANONICAL_TYPEDEFS_LOOP_USING_B_END
| #define DETAIL_MR_CANONICAL_TYPEDEFS_LOOP_USING_B_END |
◆ DETAIL_MR_CANONICAL_TYPEDEFS_LOOP_USING_BODY
| #define DETAIL_MR_CANONICAL_TYPEDEFS_LOOP_USING_BODY |
( |
| name_, |
|
|
| ... ) using name_ = __VA_ARGS__; |
◆ MR_CANONICAL_TYPEDEFS
| #define MR_CANONICAL_TYPEDEFS |
( |
| type_, |
|
|
| name_, |
|
|
| aliases_ ) |
Value:
DETAIL_MR_CANONICAL_TYPEDEFS(type_, name_, aliases_)
#define DETAIL_MR_CANONICAL_TYPEDEFS_LOOP_USING_A(...)
MR_IDENTITY here keeps the legacy MSVC preprocessor happy.
Definition MRCanonicalTypedefs.h:30
#define MR_IDENTITY(...)
Returns the argument unchanged.
Definition MRMacros.h:10
This helper macro is used to declare canonical typedefs. For example, if you have this: template <typename T> struct MRMESH_CLASS Vector3; /// MRMESH_CLASS isn't necessary, just to demonstrate that it's supported. using Vector3f = Vector3<float>; using Vector3i = Vector3<int>; You should rewrite it as following: MR_CANONICAL_TYPEDEFS( (template <typename T> struct MRMESH_CLASS), Vector3, ( Vector3f, Vector3<float> ) ( Vector3i, Vector3<int> ) )
WHAT THIS ACHIEVES? This macro only has effect on Clang. It primarily affects the error messages, using those typedefs instead of the full type when possible. It also helps when parsing our code with libclang to automatically generate Python bindings.
NOTE:
- Only non-template
usings can be declared like this. If you want to add additional templated ones, add them below the macro manually.