55. Type Aliases

Question.5

A firmware API has a complex callback signature:

// Without alias:
void register_handler(void (*handler)(const uint8_t*, size_t, int));

// With alias:
using DataHandler = void (*)(const uint8_t*, size_t, int);
void register_handler(DataHandler handler);

What is the primary benefit?

Need Help? Refer to the Quick Guide below

Select Answer