cxx_generalized_initializers.cpp 341 B

1234567891011121314151617181920212223
  1. // Dummy implementation. Test only the compiler feature.
  2. namespace std {
  3. typedef decltype(sizeof(int)) size_t;
  4. template <class _E>
  5. class initializer_list
  6. {
  7. const _E* __begin_;
  8. size_t __size_;
  9. };
  10. }
  11. template <typename T>
  12. struct A
  13. {
  14. A(std::initializer_list<T>) {}
  15. };
  16. void someFunc()
  17. {
  18. A<int> as = { 1, 2, 3, 4 };
  19. }