scipr-lab / libsnark

C++ library for zkSNARKs
Other
1.8k stars 570 forks source link

error: ‘std::__debug::vector<pb_variable<FieldT>>’ is an inaccessible base of ‘variable_array<FieldT>’ #175

Closed gargarchit closed 3 years ago

gargarchit commented 4 years ago

Here this should be declared as public in pb_variable

class pb_variable_array : public std::vector<pb_variable<FieldT> > instead of class pb_variable_array : private std::vector<pb_variable<FieldT> >

Also,

class pb_linear_combination_array : public std::vector<pb_linear_combination<FieldT> > instead of class pb_linear_combination_array : private std::vector<pb_linear_combination<FieldT> >

Here, all members of std::vector<pb_variable> are private, so you can't access them from outside of pb_variable_array.

gargarchit commented 4 years ago

@ValarDragon

gargarchit commented 4 years ago

I have opened a PR for this #176

gargarchit commented 3 years ago

176 merged in staging branch, closing issue