fork download
  1. #include "initializer_list"
  2.  
  3. struct X
  4. {
  5. X & operator =(std::initializer_list<int> const &) { return *this; }
  6. X & operator +=(std::initializer_list<int> const &) { return *this; }
  7. };
  8.  
  9. struct Y
  10. {
  11. Y() {}
  12. Y(int, double, char const *) {}
  13. };
  14.  
  15. int main()
  16. {
  17. X x;
  18. x = { 1, 2, 3, 4 };
  19. x += { 5, 6, 7 };
  20.  
  21. Y y;
  22. y = { 8, 9.0, "10" };
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0s 2848KB
stdin
Standard input is empty
stdout
Standard output is empty