Disable armeabi builds for Android and re-enable CI builds. (#4970)

armeabi support was removed from the Android NDK so we should no
longer build it.  Since this fixes the Android build failures this
commit also re-enables Travis Android builds.

While re-enabling Android builds, some recent changes broke C++98
support so this fixes those issues as well which include:
- Conditionally compiling use of move constructors, operators and
  std::move.
- Changing sample to use flatbuffers::unique_ptr rather than
  std::unique_ptr.

Finally, added the special "default_ptr_type" value for the
"cpp_ptr_type" attribute.  This expands to the value passed to
the "--cpp-ptr-type" argument of flatc.
This commit is contained in:
Stewart Miles
2018-10-08 12:43:57 -07:00
committed by Wouter van Oortmerssen
parent d840856093
commit 569492e890
11 changed files with 158 additions and 67 deletions

View File

@@ -578,7 +578,8 @@ class CppGenerator : public BaseGenerator {
bool is_constructor) {
auto &ptr_type = PtrType(field);
if (ptr_type != "naked") {
return ptr_type + "<" + type + ">";
return (ptr_type != "default_ptr_type" ? ptr_type :
parser_.opts.cpp_object_api_pointer_type) + "<" + type + ">";
} else if (is_constructor) {
return "";
} else {