|
14 | 14 |
|
15 | 15 | --- |
16 | 16 |
|
| 17 | +## Table of contents |
| 18 | + |
| 19 | +* [Types](#types) |
| 20 | +* [Basic usage](#basic-usage) |
| 21 | +* [Operators](#operators) |
| 22 | +* [Construction](#construction) |
| 23 | +* [Expression templates](#expression-templates) |
| 24 | +* [Indexing](#indexing) |
| 25 | +* [Functions](#functions) |
| 26 | +* [STL integration](#stl-integration) |
| 27 | +* [Options](#options) |
| 28 | +* [User defined conversions](#user-defined-conversions) |
| 29 | +* [Metafunctions](#metafunctions) |
| 30 | + |
17 | 31 | ## Types |
18 | 32 |
|
19 | 33 | The generic vector template is defined as `vector<[scalar type], [size]>` in namespace `dd`. For convenience, vectors sizes 2-4 have aliases of the form `[scalar type][size]d` in the `dd::types` namespace: |
@@ -222,3 +236,24 @@ struct dd::converter<dd::vector<S1, 2>, some_vector<S2>> |
222 | 236 | } |
223 | 237 | }; |
224 | 238 | ``` |
| 239 | + |
| 240 | +## Metafunctions |
| 241 | + |
| 242 | +NOTES: |
| 243 | +* these are included in the documentation only for posterity and are not expected to be of use to the user |
| 244 | +* all metafunctions are under the namespace `dd::traits` |
| 245 | +* all metafunctions have corresponding `_t` or `_v` postfix helpers |
| 246 | +* for brevity, `value` serves as an alias for `std::integral_constant` |
| 247 | + |
| 248 | +| Function | Description | |
| 249 | +| --- | --- | |
| 250 | +| `size<T>` -> `value<size_t>` | gets the vector size of expression `T` | |
| 251 | +| `scalar<T>` -> `type` | gets the scalar type of expression `T` | |
| 252 | +| `result<T>` -> `type` | gets the resulting vector value of expression `T` | |
| 253 | +| `is_expr<T>` -> `value<bool>` | determines if `T` is a vector expression | |
| 254 | +| `is_same_size<T, U>` -> `value<bool>` | determines if `T` and `U` are both expressions of the same size | |
| 255 | +| `is_valid_operation<T, U, bool S>` -> `value<bool>` | determines if `T` and `U` make up a valid operation. `S = true` forbids a scalar type from appearing first | |
| 256 | +| `is_value<T>` -> `value<bool>` | determines if `T` is a value expression | |
| 257 | +| `has_named_components<T>` -> `value<bool>` | determines if T has named components | |
| 258 | +| `has_converter<T, U>` -> `value<bool>` | determines if there is a `converter` specialization defined from `T` to `U` | |
| 259 | + |
0 commit comments