[395] | 1 | // Copyright (C) 2014-2015 ChaosForge Ltd
|
---|
[260] | 2 | // http://chaosforge.org/
|
---|
| 3 | //
|
---|
[395] | 4 | // This file is part of Nova libraries.
|
---|
| 5 | // For conditions of distribution and use, see copying.txt file in root folder.
|
---|
[260] | 6 |
|
---|
| 7 | /**
|
---|
| 8 | * @file array.hh
|
---|
| 9 | * @author Kornel Kisielewicz epyon@chaosforge.org
|
---|
| 10 | * @brief exception free array classes
|
---|
| 11 | */
|
---|
| 12 |
|
---|
[391] | 13 | #ifndef NV_STL_ARRAY_HH
|
---|
| 14 | #define NV_STL_ARRAY_HH
|
---|
[260] | 15 |
|
---|
[391] | 16 | #include <nv/stl/container/contiguous_storage.hh>
|
---|
[434] | 17 | #include <nv/stl/container/fixed_storage.hh>
|
---|
| 18 | #include <nv/stl/container/sized_storage.hh>
|
---|
| 19 | #include <nv/stl/container/random_access.hh>
|
---|
[260] | 20 |
|
---|
| 21 | namespace nv
|
---|
| 22 | {
|
---|
| 23 |
|
---|
[374] | 24 | template< typename T, size_t N >
|
---|
[383] | 25 | using fixed_static_storage = fixed_storage< static_storage< T, N >, N >;
|
---|
| 26 |
|
---|
| 27 | template< typename T, size_t N >
|
---|
| 28 | using fixed_dynamic_storage = fixed_storage< dynamic_storage< T >, N >;
|
---|
| 29 |
|
---|
| 30 | template< typename T >
|
---|
[434] | 31 | using resizable_dynamic_storage = sized_storage< dynamic_storage< T > >;
|
---|
[383] | 32 |
|
---|
| 33 | template< typename T, size_t N >
|
---|
[434] | 34 | using resizable_static_storage = sized_storage< static_storage< T, N > >;
|
---|
[383] | 35 |
|
---|
| 36 | template< typename T, size_t N >
|
---|
[391] | 37 | using array =
|
---|
[434] | 38 | random_access < fixed_static_storage< T, N > >;
|
---|
[391] | 39 |
|
---|
[382] | 40 | template< typename T >
|
---|
[391] | 41 | using dynamic_array =
|
---|
[434] | 42 | random_access < resizable_dynamic_storage< T > >;
|
---|
[375] | 43 |
|
---|
[260] | 44 | }
|
---|
| 45 |
|
---|
[406] | 46 | #endif // NV_STL_ARRAY_HH
|
---|