Describe your issue
I found an issue where a C++ program compiles successfully on [Code Chef] but should logically fail due to the absence of a required constructor.
Screenshot
Additional info
Expected Behavior:
- This code should not compile because there is no constructor defined in the
Carclass. - When calling
Car c1(...);, the compiler should throw an error (something like “no matching constructor found”).
Actual Behavior on [Platform Name]:
- The code compiles successfully and runs without any errors.
Possible Issue:
- The platform’s C++ compiler may be automatically generating an implicit constructor, which is not standard behavior when arguments are passed.
- There could be a custom compiler setting or modification in the backend that allows this incorrect behavior.
Suggested Fix:
- Ensure the compiler follows standard C++ rules and does not allow object initialization when no valid constructor exists.
- Verify if any custom extensions or settings are affecting constructor behavior.
Could you please review this issue and confirm if it’s an intended feature or a bug?
Thanks,
Vinayak Kumar
