stephentu / silo

Multicore in-memory storage engine
MIT License
372 stars 115 forks source link

Silo compilation error #18

Open Fuger2021 opened 2 months ago

Fuger2021 commented 2 months ago

Compile Silo and get the following error

error: no match for ‘operator<<’ (operand types are ‘std::ostringstream’ {aka ‘std::__cxx11::basic_ostringstream<char>’} and ‘std::pair<const std::__cxx11::basic_string<char>, long unsigned int>’)
  319 |     ss << *begin++;
      |     ~~~^~~~~~~~~~~

./util.h causes the error

template <typename ForwardIterator>
std::string
format_list(ForwardIterator begin, ForwardIterator end)
{
  std::ostringstream ss;
  ss << "[";
  bool first = true;
  while (begin != end) {
    if (!first)
      ss << ", ";
    first = false;
    ss << *begin++;  // here
  }
  ss << "]";
  return ss.str();
}

It seems this is a bug in Silo itself. I'm working on Debian 12@Linux 5.15.19. I’d like to know how you compiled Silo correctly, thank you!