fork download
  1. #include <memory>
  2.  
  3. int main() {
  4. std::unique_ptr<int> j = {new int(0)};
  5. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:4:41: error: converting to 'std::unique_ptr<int>' from initializer list would use explicit constructor 'std::unique_ptr<_Tp, _Tp_Deleter>::unique_ptr(_Tp*) [with _Tp = int, _Tp_Deleter = std::default_delete<int>, _Tp* = int*]'
stdout
Standard output is empty