6
Aktif bir istisna olmadan çağrılan C ++ sonlandırması
Diş açarken bir C ++ hatası alıyorum: terminate called without an active exception Aborted İşte kod: #include <queue> #include <thread> #include <mutex> #include <condition_variable> template<typename TYPE> class blocking_stream { public: blocking_stream(size_t max_buffer_size_) : max_buffer_size(max_buffer_size_) { } //PUSH data into the buffer blocking_stream &operator<<(TYPE &other) { std::unique_lock<std::mutex> mtx_lock(mtx); while(buffer.size()>=max_buffer_size) stop_if_full.wait(mtx_lock); buffer.push(std::move(other)); …