That is a follow-up to the following commit:
> commit 6b51b12ab5
> Author: Laurent Rineau <laurent.rineau@cgal.org>
> Date: Fri Oct 4 16:42:13 2013 +0200
>
> Fix the case when FT is mpq_class
>
> If x and w are mpq_class objects, then the type of x/w is not mpq_class,
> but only a proxy type that is implicitly convertible to
> mpq_class. With the type deduction, CGAL::make_array(x/w, y/w,
> z/w) will not create an array<mpq_class> but an array of the proxy type.
>
> That creates the following compilation error, in a ternary operator:
>
> - with clang:
> include/CGAL/Cartesian/Vector_3.h:78:25: error: incompatible operand types ('array<__gmp_expr<[...], struct __gmp_binary_expr<class __gmp_expr<mpq_t, mpq_t>, class __gmp_expr<mpq_t, mpq_t>, struct __gmp_binary_divides>>, [...]>' and 'array<__gmp_expr<[...], __mpq_struct [1]>, [...]>')
> : base( w != FT_(1) ? CGAL::make_array(x/w, y/w, z/w)
> ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> - with g++:
> include/CGAL/Cartesian/Vector_3.h:78:25: error: no match for ternary 'operator?:' (operand types are 'bool', 'std::array<__gmp_expr<__mpq_struct [1], __gmp_binary_expr<__gmp_expr<__mpq_struct [1], __mpq_struct [1]>, __gmp_expr<__mpq_struct [1], __mpq_struct [1]>, __gmp_binary_divides> >, 3ul>', and 'std::array<__gmp_expr<__mpq_struct [1], __mpq_struct [1]>, 3ul>')
> : base( w != FT_(1) ? CGAL::make_array(x/w, y/w, z/w)
> ^
>
> The fix is to specify the template argument of CGAL::make_array.
The first patch in 2013 was on `Vector_3`, but `Vector_2` also suffers
from the issue.
Polyhedron_demo: Fix reload item
This PR actually fixes a general performance issue, due to the use of Boost `flat_map` container. The unique hash map from CGAL has been used instead.
- Remove the std::cerr in the `message()` function of the Mainwindow to avoid having html messages in the console.
- The messages using this function will only be readable in the application's console widget.
Specialization of I/O support for `std::pair<int, int>` was defined
twice.
For the records, the compilation errors were:
```
[ 62%] Building CXX object Plugins/Mesh_3/CMakeFiles/c3t3_io_plugin.dir/C3t3_io_plugin.cpp.o
cd /home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/Plugins/Mesh_3 && /usr/bin/c++ -DCGAL_EIGEN3_ENABLED -DCGAL_TEST_SUITE -DCGAL_USE_GMP -DCGAL_USE_MPFR -DCGAL_USE_ZLIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_KEYWORDS -DQT_OPENGL_LIB -DQT_SCRIPT_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DSCENE_IMAGE_GL_BUFFERS_AVAILABLE -DUSE_FORWARD_DECL -Dc3t3_io_plugin_EXPORTS -I/home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/Plugins/Mesh_3 -I/home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/./CGAL_demo -I/home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/../../include -I/home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/./include -I/home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/. -I/home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo -I/home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/include -I/mnt/testsuite/include -isystem /usr/include/eigen3 -isystem /usr/include/qt -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtCore -isystem /usr/lib/qt/mkspecs/linux-g++ -isystem /usr/include/qt/QtScript -isystem /usr/include/qt/QtOpenGL -isystem /usr/include/qt/QtXml -fvisibility=hidden -fPIC -fPIC -o CMakeFiles/c3t3_io_plugin.dir/C3t3_io_plugin.cpp.o -c /home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/Plugins/Mesh_3/C3t3_io_plugin.cpp
/home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/Plugins/Mesh_3/C3t3_io_plugin.cpp:299:8: error: redefinition of 'struct CGAL::Get_io_signature<std::pair<int, int> >'
struct Get_io_signature<Fake_patch_id> {
^
In file included from /mnt/testsuite/include/CGAL/Polyhedral_mesh_domain_3.h:61:0,
from /home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/./C3t3_type.h:24,
from /home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/./Scene_c3t3_item.h:5,
from /home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/Plugins/Mesh_3/C3t3_io_plugin.cpp:2:
/mnt/testsuite/include/CGAL/internal/Mesh_3/Handle_IO_for_pair_of_int.h:31:8: error: previous definition of 'struct CGAL::Get_io_signature<std::pair<int, int> >'
struct Get_io_signature<std::pair<int, int> > {
^
/home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/Plugins/Mesh_3/C3t3_io_plugin.cpp:319:7: error: redefinition of 'class CGAL::Output_rep<std::pair<int, int> >'
class Output_rep<Fake_patch_id> {
^
In file included from /mnt/testsuite/include/CGAL/Polyhedral_mesh_domain_3.h:61:0,
from /home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/./C3t3_type.h:24,
from /home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/./Scene_c3t3_item.h:5,
from /home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/Plugins/Mesh_3/C3t3_io_plugin.cpp:2:
/mnt/testsuite/include/CGAL/internal/Mesh_3/Handle_IO_for_pair_of_int.h:46:7: error: previous definition of 'class CGAL::Output_rep<std::pair<int, int> >'
class Output_rep<std::pair<int, int> > : public IO_rep_is_specialized {
^
/home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/Plugins/Mesh_3/C3t3_io_plugin.cpp:338:7: error: redefinition of 'class CGAL::Input_rep<std::pair<int, int> >'
class Input_rep<Fake_patch_id> {
^
In file included from /mnt/testsuite/include/CGAL/Polyhedral_mesh_domain_3.h:61:0,
from /home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/./C3t3_type.h:24,
from /home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/./Scene_c3t3_item.h:5,
from /home/cgal_tester/build/src/cmake/platforms/ArchLinux-CXX14/test/Polyhedron_Demo/Plugins/Mesh_3/C3t3_io_plugin.cpp:2:
/mnt/testsuite/include/CGAL/internal/Mesh_3/Handle_IO_for_pair_of_int.h:65:7: error: previous definition of 'class CGAL::Input_rep<std::pair<int, int> >'
class Input_rep<std::pair<int, int> > : public IO_rep_is_specialized {
^
Plugins/Mesh_3/CMakeFiles/c3t3_io_plugin.dir/build.make:66: recipe for target 'Plugins/Mesh_3/CMakeFiles/c3t3_io_plugin.dir/C3t3_io_plugin.cpp.o' failed
```
https://cgal.geometryfactory.com/CGAL/testsuite/CGAL-4.9-Ic-97/Polyhedron_Demo/TestReport_lrineau_ArchLinux-CXX14.gz
- By replacing the flat_map by another type of map, the bug that made the calculation of items longer after several reloads is fixed. Why this bug only appeared when reloading an item stays an unsolved mystery.