fork download
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. class Y
  6. {
  7. public:
  8. Y(const std::string& str) : str_{str} {}; // C2797 error
  9.  
  10. private:
  11. std::string str_;
  12. };
  13.  
  14. int main() {
  15. std::string str;
  16. Y y{str};
  17. // your code goes here
  18. return 0;
  19. }
Success #stdin #stdout 0s 3336KB
stdin
Standard input is empty
stdout
Standard output is empty