fork download
  1. #include <string>
  2.  
  3. void FuncX(const std::string& s = {})
  4. {
  5. ;
  6. }
  7.  
  8. struct STest
  9. {
  10. void Func(const std::string& s = {})
  11. {
  12. ;
  13. }
  14. };
  15.  
  16. int main()
  17. {
  18. FuncX(); // OK: basic_string()
  19.  
  20. STest t;
  21.  
  22. t.Func(); // CRASH (invalid null pointer): basic_string(const _Elem *_Ptr)
  23. }
Success #stdin #stdout 0s 3336KB
stdin
Standard input is empty
stdout
Standard output is empty