I am using the following alternative to the shipped ifdef header guard.
#ifndef __$FILE_BASE_UPPER$_$FILE_EXT_UPPER$_VER__
#define __$FILE_BASE_UPPER$_$FILE_EXT_UPPER$_VER__ $YEAR$$MONTH_02$$DAY_02$$HOUR_02$
#if (defined(_MSC_VER) && (_MSC_VER >= 1020)) || defined(__MCPP)
#pragma once
#endif /* Check for "#pragma once" support */
$selected$
#endif /* __$FILE_BASE_UPPER$_$FILE_EXT_UPPER$_VER__ */
However, you can probably already tell the issue here. Say I have a header file named foo-bar.h the outcome of the first line when "rendered" will be:
#ifndef __FOO-BAR_H_VER__
... all fine, except for the hyphen in the name. It would be great if there was some kind of filter I could apply to these built-in variables in order to convert hyphens and other characters that would be invalid inside identifiers into underscores. Either some kind of "filter function" or alternative versions of the built-in variables would be great for the purpose.
Thanks.