Allocator Builder
Policy Based C++ Template Allocator Library
 All Classes Functions Variables Enumerations Enumerator Groups Pages
global_allocator.hpp
1 //
3 // Copyright 2014 Felix Petriconi
4 //
5 // License: http://boost.org/LICENSE_1_0.txt, Boost License 1.0
6 //
7 // Authors: http://petriconi.net, Felix Petriconi
8 //
10 #pragma once
11 
12 namespace alb {
13  struct length_prefix {
14  unsigned length;
15  };
16 
17  template <class Allocator>
19  {
20  public:
21  using value_type = Allocator;
22 
23  static Allocator &instance() {
24  static Allocator in;
25  return in;
26  }
27  };
28 }