-
-
Save dmikis/bddf84afd5a00a8b837374e9ced58696 to your computer and use it in GitHub Desktop.
__crt_countof
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern "C++" | |
{ | |
template <typename _CountofType, size_t _SizeOfArray> | |
char (*__countof_helper(_UNALIGNED _CountofType (&_Array)[_SizeOfArray]))[_SizeOfArray]; | |
#define __crt_countof(_Array) (sizeof(*__countof_helper(_Array)) + 0) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment