forked from Cosmic-Sans/collab-vm-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcapnp-list.hpp
More file actions
25 lines (24 loc) · 722 Bytes
/
Copy pathcapnp-list.hpp
File metadata and controls
25 lines (24 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Cap'n Proto appears to have support for compatiblity with STL iterators
// by defining the macro KJ_STD_COMPAT, but it doesn't work with MSVC unless
// this specialization is defined.
//#ifdef WIN32
////#include <kj/windows-sanity.h>
//#undef VOID
//#undef CONST
//#undef SendMessage
//#endif
//#include <capnp/common.h>
#include <iterator>
#include <capnp/list.h>
namespace std
{
template <typename Container, typename Element>
struct iterator_traits<capnp::_::IndexingIterator<Container, Element>>
{
using iterator_category = random_access_iterator_tag;
using value_type = Element;
using difference_type = int;
using pointer = Element*;
using reference = Element&;
};
} // namespace std