I'm trying to put std::string
s into boost::lockfree::queue
s so that my threads can update each other with new data.
When I try to use boost::lockfree::queue<std::string> updated_data;
, g++
says :
In instantiation of 'class boost::lockfree::queue >':
error: static assertion failed: (boost::has_trivial_destructor::value)
error: static assertion failed: (boost::has_trivial_assign::value)
I've been shown generally what these errors mean, but I have no hope of ever fixing this myself, as I'm almost brand new to c++.
Is there an alternative way to pass text data between threads with lockfree
? If not, please show me how to put std::string
into a boost::lockfree::queue
.