Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct TypeId
- {
- unsigned char myTypeId;
- // Comment out this line and it links incrementally
- TypeId() : myTypeId(0) {}
- };
- template<class Type>
- struct TypeRegistrationHelper
- {
- static TypeId ourTypeId;
- };
- template<class Type> TypeId TypeRegistrationHelper<Type>::ourTypeId;
- // Uncomment this line and it links incrementally
- //template struct TypeRegistrationHelper<float>;
- void UpdateFrame()
- {
- // Commenting/uncommenting this line causes a full link to happen
- // unless you have changed 1 of the 2 lines listed above. Then it links
- // incrementally as expected when changing this line.
- TypeRegistrationHelper<float>::ourTypeId;
- }
- #include "Updater.h"
- int main()
- {
- UpdateFrame();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement