Use default alignment if alignof(std::max_align_t) < 16 with C++11.

- As per Andrew Hunter’s comments in the commit which added Jet
  alignment when using C++11 here:
  https://ceres-solver-review.googlesource.com/#/c/7100, there is wide
  lattitude in the standard about what the maximum supported alignment
  can be.
- Previously, we were forcing the alignment to 1, if the value of
  alignof(std::max_align_t), which we use as a proxy for the maximum
  supported alignment on the platform, was < 16.
- An alignment of 1 is not valid for Jets, as it would weaken the
  natural alignment of the types within a Jet, which would typically be
  4 (32-bit systems) or 8 (64-bit systems), thus resulting in a compiler
  error.
- This was reported as issue 235 for Clang 3.8 on i386:
  https://github.com/ceres-solver/ceres-solver/issues/235.

Change-Id: Ie39e5499c64f9231f29ebf4392992b5c9ce2e385
2 files changed
tree: 0ea0417d2bd8f78666911213a91fa17a21ce8d46
  1. cmake/
  2. config/
  3. data/
  4. docs/
  5. examples/
  6. include/
  7. internal/
  8. jni/
  9. scripts/
  10. .gitignore
  11. CMakeLists.txt
  12. LICENSE
  13. package.xml
  14. README.md
README.md

Ceres Solver

Ceres Solver is an open source C++ library for modeling and solving large, complicated optimization problems. It is a feature rich, mature and performant library which has been used in production at Google since 2010. Ceres Solver can solve two kinds of problems.

  1. Non-linear Least Squares problems with bounds constraints.
  2. General unconstrained optimization problems.

Please see ceres-solver.org for more information.

WARNING - Do not make GitHub pull requests!

Ceres development happens on Gerrit, including both repository hosting and code reviews. The GitHub Repository is a continuously updated mirror which is primarily meant for issue tracking. Please see our Contributing to Ceres Guide for more details.

The upstream Gerrit repository is

https://ceres-solver.googlesource.com/ceres-solver