-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When declaring a class with only a parameterized constructor, the system throws an error or fails during instantiation. This seems to occur when the framework or serialization logic expects a default (no-argument) constructor.
To Reproduce
Steps to reproduce the behavior:
- Create a class with only a constructor that takes parameters.
- Attempt adding the object using the addItem() function.
- Observe the failure or exception.
Example Code:
class Product {
public:
Product(std::string name, double price) : name(name), price(price) {}
private:
std::string name;
double price;
};Expected behavior
The system should either handle parameterized constructors gracefully or provide a clear error message. Alternatively, documentation should specify that a default constructor is required.
Workaround:
Add a default constructor manually:
Product() : name(""), price(0.0) {}Additional Notes:
This issue may affect serialization, deserialization, or object pooling mechanisms that rely on default instantiation.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working