25 template <
class Item,
class Cache,
int Chunk_capacity>
26 class bootchunkseq_deque_config {
29 using size_type = size_t;
32 using client_cache_type = Cache;
33 using cache_type = client_cache_type;
35 using heap_allocator_type = fixedcapacity::inline_allocator<value_type, Chunk_capacity>;
36 template <
class Ringbuffer_item>
37 using ringbuffer_type = fixedcapacity::ringbuffer_ptr<heap_allocator_type>;
39 using chunk_annotation_type =
struct { };
41 template <
class Chunk_item,
class Chunk_cache>
42 using chunk_gen_type = chunk<ringbuffer_type<Chunk_item>, Chunk_cache, chunk_annotation_type>;
46 template <
class Item,
int Capacity>
47 using cdeque = bootchunkseq<bootchunkseq_deque_config<Item, cachedmeasure::trivial<Item, size_t>, Capacity>>;
49 int main(
int argc,
const char * argv[])
52 using heap_allocator = fixedcapacity::heap_allocator<value_type, 4>;
53 using vector_type = fixedcapacity::stack<heap_allocator>;
55 using measure_type =
typename cache_type::measure_type;
56 using annotation_type =
struct { };
57 using chunk_type = chunk<vector_type, cache_type, annotation_type>;
63 c.push_back(meas, 123);
65 std::cout << c.cached << std::endl;
bootchunkseq< bootchunkseq_deque_config< Item, cachedmeasure::trivial< Item, size_t >, Capacity >> cdeque
int main(int argc, const char *argv[])
Representation of a chunk.
Definitions of a few cached-measurement policies.
Routines for finding an item in a container via binary search.
Representation of a chunk.
Definitions of a few algebras.