znone
2021-10-05 6a6b55518847de8d8de8b963a117c53f0c93f67f
include/qtl_common.hpp
@@ -768,9 +768,15 @@
}
template<typename Command, typename Record>
class query_iterator final : public std::iterator<std::forward_iterator_tag, Record>
class query_iterator final
{
public:
   using iterator_category = std::forward_iterator_tag;
   using value_type = Record;
   using difference_type = ptrdiff_t;
   using pointer = Record*;
   using reference = Record&;
   explicit query_iterator(Command& command) 
      : m_command(command) { }
   Record* operator->() const { return m_record.get(); }
@@ -780,7 +786,7 @@
   {
      if(!m_record)
         m_record=std::make_shared<Record>();
      if(m_record.unique())
      if(m_record.use_count()==1)
      {
         if(!m_command.fetch(std::forward<Record>(*m_record)))
            m_record.reset();