Add Array initialization from struct constructor (#5865) (#6147)

- add flatbuffers::span
- add new constructor for `struct` with `array`
- add some test for flatbuffers::span and 'arrays_test.fbs'
This commit is contained in:
Vladimir Glavnyy
2020-10-13 02:24:18 +07:00
committed by GitHub
parent 77d57fd075
commit 04bec23a37
10 changed files with 608 additions and 89 deletions

View File

@@ -177,10 +177,9 @@ namespace flatbuffers {
#define FLATBUFFERS_CONSTEXPR_CPP11
#endif
// This macro is never used in code!
#if (defined(__cplusplus) && __cplusplus >= 201402L) || \
(defined(__cpp_constexpr) && __cpp_constexpr >= 201304)
#define FLATBUFFERS_CONSTEXPR_CPP14 FLATBUFFERS_CONSTEXPR
#define FLATBUFFERS_CONSTEXPR_CPP14 FLATBUFFERS_CONSTEXPR_CPP11
#else
#define FLATBUFFERS_CONSTEXPR_CPP14
#endif