File tree 3 files changed +33
-0
lines changed 3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ .. Copyright (c) 2016, Johan Mabille, Sylvain Corlay and Wolf Vollprecht
2
+
3
+ Distributed under the terms of the BSD 3-Clause License.
4
+
5
+ The full license is in the file LICENSE, distributed with this software.
6
+
7
+ Compiler workarounds
8
+ ====================
9
+
10
+ This page tracks the workarounds for the various compiler issues that we
11
+ encountered in the development. This is mostly of interest for developers
12
+ interested in contributing to xtensor-python.
13
+
14
+ GCC and ``std::allocator<long long> ``
15
+ -------------------------------------
16
+
17
+ GCC sometimes fails to automatically instantiate the ``std::allocator ``
18
+ class template for the types ``long long `` and ``unsigned long long ``.
19
+ Those allocators are thus explicitly instantiated in the dummy function
20
+ ``void long_long_allocator() `` in the file ``py_container.hpp ``.
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ This software is licensed under the BSD-3-Clause license. See the LICENSE file f
73
73
.. toctree ::
74
74
:caption: DEVELOPER ZONE
75
75
76
+ compilers
76
77
releasing
77
78
78
79
.. _NumPy : http://www.numpy.org
Original file line number Diff line number Diff line change @@ -455,6 +455,18 @@ namespace xt
455
455
}
456
456
#endif
457
457
}
458
+
459
+ #if defined(__GNUC__) && !defined(__clang__)
460
+ namespace workaround
461
+ {
462
+ // Fixes "undefined symbol" issues
463
+ inline void long_long_allocator ()
464
+ {
465
+ std::allocator<long long > a;
466
+ std::allocator<unsigned long long > b;
467
+ }
468
+ }
469
+ #endif
458
470
}
459
471
460
472
#endif
You can’t perform that action at this time.
0 commit comments