Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unsigned char Var1;
- signed char Var2;
- void MyFunction(unsigned char* Var);
- MyFunction(&Var2); // This creates an error
- template <typename T>
- void MyFunction(T* Var);
- template <typename T>
- void MyFunction(T* Var)
- {
- static_assert(sizeof(T) == 1, "Wrong type. Can only deal with 8-bit types.");
- ...
- }
Add Comment
Please, Sign In to add comment