Advertisement
tinyevil

Untitled

Jul 28th, 2018
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1.  
  2. var c:vector<char>;
  3. // typeof(c) == ^vector<char>
  4. c = make_vector(10, 'a'); //ok, lvalue is modifiable
  5. c.push_back('a'); //ok
  6.  
  7. let v:vector<char>;
  8. // typeof(v) == (const^)vector<char>
  9. v = make_vector(10, 'b'); //not ok?
  10. v.push_back('b'); //not ok?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement