src/containers/internal/mixins.d
raw| 1 | /** |
| 2 | * Container mixins |
| 3 | * Copyright: © 2015 Economic Modeling Specialists, Intl. |
| 4 | * Authors: Brian Schott |
| 5 | * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0) |
| 6 | */ |
| 7 | module containers.internal.mixins; |
| 8 | |
| 9 | mixin template AllocatorState(Allocator) |
| 10 | { |
| 11 | static if (stateSize!Allocator == 0) |
| 12 | alias allocator = Allocator.instance; |
| 13 | else |
| 14 | Allocator allocator; |
| 15 | } |