Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. struct A
  2. {
  3. A(int);
  4. };
  5.  
  6. struct B
  7. {
  8. B(A);
  9. };
  10.  
  11. struct C
  12. {
  13. C(B);
  14. };
  15.  
  16. A(1); // A <- int
  17.  
  18. B(1); // B <- A <- int
  19.  
  20. C(A(1)); // C <- B <- A <- int
  21. C(B(1)); // C <- B <- A <- int
  22. C(B(A(1))); // C <- B <- A <- int
  23.  
  24. C(1); // C <- B <- A <- int
  25.  
  26. error: no matching function for call to ‘C::C(int)’
  27. no known conversion for argument 1 from ‘int’ to ‘B’
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement