Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<typename T> T Foo(T& target)
- {
- //Assign to 'target', but never read from it before that.
- //Also, 'target' is going to be a POD-type.
- target = T();
- return target;
- }
- int main()
- {
- float value = Foo(value);
- }
- T value;
Add Comment
Please, Sign In to add comment