fork download
  1. M:\Development\x64\test>cat main.cpp && cl main.cpp
  2. #include <vector>
  3.  
  4. int main()
  5. {
  6. std::vector<int> v{1,2,3,4};
  7. }
  8. Microsoft (R) C/C++ Optimizing Compiler Version 17.00.51025 for x64
  9. Copyright (C) Microsoft Corporation. All rights reserved.
  10.  
  11. main.cpp
  12. main.cpp(5) : error C2440: 'initializing' : cannot convert from 'initializer-list' to 'std::vector<int,std::allocator<_Ty>>'
  13. with
  14. [
  15. _Ty=int
  16. ]
  17. No constructor could take the source type, or constructor overload resolution was ambiguous
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty