In my current project I defined some macros that serve as hints for parameters, return values and the relationship between them.
For example notnull
is for pointers that are not null. But there are also parameterized hints, like issizeof(__T)
to indicate that a size_t
should be filled with the size of the type __T
. Similar, GenericPtr(__T)
indicates that a void*
is returned, but semantically it is a pointer to a __T
.
They are defined like this:
#define notnull
#define issizeof(__T)
#define GenericPtr(__T) (void*)
Now I want to use them for a malloc-like function like this:
/// @returns a newly allocated memory region for a T
/// @note Terminates the program on failure
notnull GenericPtr(T) myMalloc(issizeof(T) size_t s);
Now when I run doxygen, it sees notnull
as the type and GenericPtr
as the function-name. If there are multiple parameters, it breaks and thinks each paraneter is a global variable.
Is there a way to tell Doxygen that these hints belong to the type and that GenericPtr(T)
is actually a type, not a function declarator?