* Remove copy constructor to make flatbuffers struct trivially copyable + add tests.
* Add support non c++11 compliant compilers.
* Fix std::trivially_copyiable test for non-C++11 compliant compilers.
* Fix trivially_copyable not part of glibc < 5 even with c++11 switch enabled.
In some debug environments using vector[i] does bounds checking even
though the standard specifies that it should not. Using
*(vector.begin()) sidesteps this though, giving the same result without
the bounds checking.
The travis script was only failing if the last Android build fails.
This changes the script to report a failure if any of the Android
projects fail to build.
This CL also introduces the following changes to allow the generation of the
Go library for flatbuffers:
- add support for --gen-onefile for Go to simplify the build rule (mapping each
input .fbs to a single separate .go file)
- add a new --go-import flag to override the default import line (currently
github.com/google/flatbuffers/go)
- add new go_library in BUILD for flatbuffer (for files in flatbuffers/go)
(mirrored from cr/171126159)
Change-Id: I83e705a9a9d9544837af0baf9366ec37757799aa
- Allowed enums to be declared before use.
- Generalized parsing of `required`.
- Reworked escaping of namespaces.
- Escaping field names that are C++ keywords.
- Many smaller fixes.
Change-Id: Ie580de7b70dc208f676f4f71bb0d061808648b8d
Tested: on Linux.
* Fix issue #4389, if field is ommitted the return type is the same for python generator
* Fix issue #4389, bytes is returned when field is omitted
* Fix issue #4389, added generated python code after generator modification
* Add constant accessors to C++ unions
* Remove redundant const pointer return type
* Update generate_code.bat to reflect generate_code.sh
* Add updated generated files
* Remove extra space from generated code
* Update generated files
* Change directory back to tests after generating code
* flatbuffers: Move EndianSwap template to flatbuffers/base.h
Clang complains
call to function 'EndianSwap' that is neither visible in the template definition nor found by argument-dependent lookup
return EndianSwap(t);
This seems to be due to limitation of two-phase lookup of dependent names in template definitions
Its not being found using associated namespaces therefore
it has to be made visible at the template definition site as well
Signed-off-by: Khem Raj <raj.khem@gmail.com>
* use __builtin_bswap16 when building with clang
clang pretends to be gcc 4.2.0 and therefore the code does
not use __builtin_bswap16 but tries to synthesize it
Signed-off-by: Khem Raj <raj.khem@gmail.com>
* Fix DetachedBuffer move assignment lifetime
DetachedBuffer move assignment now destroys it's own content,
rather than waiting for the destructor of other.
See more under #4435
Add missing function return type
* Rename empty_assign to reset
Reset after destroy
reset() now operates on itself