gltfpp icon indicating copy to clipboard operation
gltfpp copied to clipboard

Vocabulary Types vs. Traits

Open mmha opened this issue 8 years ago • 0 comments

Currently, T is used for required fields, option<T> for optional fields and defaulted<T> for optional fields that have a default value. Fields that require a special parser (i. e. gsl::span<T>, index to pointer conversions) are written outside of BOOST_HANA_DEFINE_STRUCT

It may be beneficial to introduce a ignore<T> type to make the struct correctly iterable. Also, it would improve consistency, as every member can be accessed via ->.

Alternatively, this information could probably be injected via type traits specialized on the class and a member pointer. However, this may impair readability of the source code

mmha avatar Jun 02 '17 16:06 mmha