开发者

instantiating struct with boost multi_array

开发者 https://www.devze.com 2023-02-25 12:12 出处:网络
I have a struct that extends an abstract class and then I add a boost multi_array inside asvariable, I get the following error.

I have a struct that extends an abstract class and then I add a boost multi_array inside as variable, I get the following error.

struct myrunnablestruct : zi::runnable{
    boost::multi_array<int,3> myArray;
    myrunnablestruct(unsigned int dimensions )
      : myArray( boost::extents[ dimensions ][ dimensions ][ dimensions ] )
    { }
}

int main(){
    myrunnablestruct mr开发者_JAVA技巧s(8);
}

error: cannot declare variable 'mrs' to be of abstract type because the following virtual functions are pure within zi::concurrency::runnable


The error is unreleated to boost::multi_array<>.

zi::runnable has pure virtual member function(s), which your struct does not implement, and it is impossible to instantiate a type with pure virtual member functions. Presumably the error message tells you exactly which member functions you need to implement, but you didn't paste that part of the error message in your question.

0

精彩评论

暂无评论...
验证码 换一张
取 消