Guest User

Untitled

a guest
Jun 24th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. template<typename T> T Foo(T& target)
  2. {
  3. //Assign to 'target', but never read from it before that.
  4. //Also, 'target' is going to be a POD-type.
  5.  
  6. target = T();
  7.  
  8. return target;
  9. }
  10.  
  11. int main()
  12. {
  13. float value = Foo(value);
  14. }
  15.  
  16. T value;
Add Comment
Please, Sign In to add comment