Fix aggregate initialization issue before C++20

Use value initialization to prevent

error: temporary of type ... has protected destructor

see https://stackoverflow.com/a/56745475
This commit is contained in:
Dennis Klein
2021-03-23 13:08:47 +01:00
committed by Dennis Klein
parent 21d6cf9830
commit 4b6cf8b181
2 changed files with 14 additions and 14 deletions

View File

@@ -306,8 +306,8 @@ void Monitor::CheckSegment()
ss << "shm id: " << fShmId
<< ", devices: " << numDevices << ", segments:\n";
for (const auto& s : segments) {
size_t free = boost::apply_visitor(SegmentFreeMemory{}, s.second);
size_t total = boost::apply_visitor(SegmentSize{}, s.second);
size_t free = boost::apply_visitor(SegmentFreeMemory(), s.second);
size_t total = boost::apply_visitor(SegmentSize(), s.second);
size_t used = total - free;
ss << " [" << s.first
<< "]: total: " << total