class one: public two {
public: explicit one (specifier const& use_case);
one() = delete;
void stat(Statistic val);
};
I need to test the above mentioned public interface "void stat(Statistic stat)" using Libfuzzer Library, So i wrote the code as follows:
Result: Error: call to deleted constructor 'one'
Question: Though the constructor is marked as explicitly deleted, how can i invoke or create a constructor and successfully execute the code snippet below?
extern "C" LLVM..(Data, Size) {
Statistics val = Size; //Assigning the size;
one obj; //Creating an instance of one
obj.stat(val); //Call stat function and pass the value return 0;
}
Thanks in Advance.
Tried with this code snippet and was expecting to successfully pass the value
"Reinvoke" is a weird word, it doesn't make sense in C++.
You create a constructor by changing
one() = delete;toone() { /* function body */ }.This cannot be done outside the class, or after compilation. It may be easier to create a
oneobject by passing aspecifiervalue.