HWLIB with C++ for baremetal

I’m trying to write a C++ application for Baremetal on the Arria 10 SoC. I’ve been using the HardwareLib-Timer examples so far. When I tried to convert this to C++, I get compiler errors on socal.h. Specifically, I’m getting

hwlib/include/soc_a10/socal/socal.h:80:31: error: invalid conversion from ‘void*’ to ‘uint32_t* {aka long unsigned int*}’ [-fpermissive]
#define ALT_CAST(type, ptr) ((type) (ptr))

I see that the socal.h has been setup with “extern C” and __cplusplus checks, and I’m only getting this compile error when I switch to the C++ complier.

Is there an example of using hwlib with C++?