Update test_ipc.cpp

This commit is contained in:
木头云 2020-09-13 15:49:25 +08:00 committed by GitHub
parent f21ebccbb2
commit 94c1043025
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ namespace {
class rand_buf : public buffer { class rand_buf : public buffer {
public: public:
rand_buf() { rand_buf() {
int size = capo::random{1, 65536}(); int size = capo::random<>{1, 65536}();
*this = buffer(new char[size], size, [](void * p, std::size_t) { *this = buffer(new char[size], size, [](void * p, std::size_t) {
delete [] static_cast<char *>(p); delete [] static_cast<char *>(p);
}); });