https://github.com/CGAL/cgal/pull/4013#issuecomment-507291311
Because of two constructions in Algebraic_curve_kernel_2 and
Hyperbolic_octagon_translation, the assertion "!blocks.empty()" from
`<CGAL/CORE/MemoryPool.h>` was triggered during the destruction of
thread-local objects.
This strange patch ensures that the order of creation of thread-local
object is right, so the order of destruction is right as well.
```
[ 50%] Building CXX object CMakeFiles/Algebraic_kernel_d_2.dir/Algebraic_kernel_d_2.cpp.o
/usr/local/bin/c++ -DCGAL_TEST_SUITE=1 -DCGAL_USE_CORE=1 -DCGAL_USE_GMP -DCGAL_USE_GMPXX -DCGAL_USE_MPFI -DCGAL_USE_MPFR -I/home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-Release/test/Algebraic_kernel_d/include -isystem /usr/include/x86_64-linux-gnu -I/home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-Release/test/Algebraic_kernel_d -I/home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-Release/include -I/mnt/testsuite/include -DDONT_USE_BOOST_PROGRAM_OPTIONS -Wall -Wextra -O3 -DCGAL_NDEBUG -frounding-math -Wall -frounding-math -o CMakeFiles/Algebraic_kernel_d_2.dir/Algebraic_kernel_d_2.cpp.o -c /home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-Release/test/Algebraic_kernel_d/Algebraic_kernel_d_2.cpp
In file included from /mnt/testsuite/include/CGAL/Polynomial.h:44,
from /mnt/testsuite/include/CGAL/Algebraic_kernel_d_1.h:37,
from /mnt/testsuite/include/CGAL/Algebraic_kernel_d_2.h:31,
from /home/cgal_tester/build/src/cmake/platforms/Ubuntu-latest-GCC6-Release/test/Algebraic_kernel_d/Algebraic_kernel_d_2.cpp:25:
/mnt/testsuite/include/CGAL/Handle_with_policy.h: In member function 'void CGAL::Curve_pair_analysis_2<AlgebraicKernelWithAnalysis_2>::compute_event_x_coordinates_with_event_indices() const [with AlgebraicKernelWithAnalysis_2 = CGAL::Algebraic_curve_kernel_2<CGAL::Algebraic_kernel_d_1<CORE::BigInt, CORE::BigRat, CGAL::internal::Algebraic_real_rep<CORE::BigInt, CORE::BigRat>, CGAL::internal::Descartes<CGAL::Polynomial<CORE::BigInt>, CORE::BigRat> > >]':
/mnt/testsuite/include/CGAL/Handle_with_policy.h:1014:28: warning: '*((void*)&<anonymous> +8)' may be used uninitialized in this function [-Wmaybe-uninitialized]
1014 | Handle_policy::find( h);
| ~~~~~~~~~~~~~~~~~~~^~~~
/mnt/testsuite/include/CGAL/Handle_with_policy.h:1014:28: warning: '*((void*)&<anonymous> +8)' may be used uninitialized in this function [-Wmaybe-uninitialized]
1014 | Handle_policy::find( h);
| ~~~~~~~~~~~~~~~~~~~^~~~
/mnt/testsuite/include/CGAL/Handle_with_policy.h:1014:28: warning: '*((void*)&<anonymous> +8)' may be used uninitialized in this function [-Wmaybe-uninitialized]
1014 | Handle_policy::find( h);
| ~~~~~~~~~~~~~~~~~~~^~~~
```
The warning is because an uninitialized `optional` is copied (in a
`push_back()`). The fix is to use `emplace_back()` to construct it
directly in the vector, instead of copying it.