File tree 3 files changed +8
-1
lines changed
3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 69
69
python-version : ${{ matrix.python }}
70
70
71
71
- name : Setup Boost (Linux)
72
- if : runner.os == 'Linux'
72
+ # Can't use boost + define _
73
+ if : runner.os == 'Linux' && matrix.python != '3.6'
73
74
run : sudo apt-get install libboost-dev
74
75
75
76
- name : Setup Boost (macOS)
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ constexpr descr<N - 1> const_str(char const(&text)[N]) { return descr<N - 1>(tex
58
58
constexpr descr<0 > const_str (char const (&)[1]) { return {}; }
59
59
60
60
// The "_" might be defined as a macro - don't define it if so.
61
+ // Repeating the const_str code to avoid introducing a #define.
61
62
#ifndef _
62
63
template <size_t N>
63
64
constexpr descr<N - 1 > _ (char const (&text)[N]) { return descr<N - 1 >(text); }
Original file line number Diff line number Diff line change @@ -18,7 +18,12 @@ class ArgAlwaysConverts { };
18
18
namespace pybind11 { namespace detail {
19
19
template <> struct type_caster <ArgInspector1> {
20
20
public:
21
+ // Classic
22
+ #ifndef _
23
+ PYBIND11_TYPE_CASTER (ArgInspector1, _(" ArgInspector1" ));
24
+ #else
21
25
PYBIND11_TYPE_CASTER (ArgInspector1, const_str(" ArgInspector1" ));
26
+ #endif
22
27
23
28
bool load (handle src, bool convert) {
24
29
value.arg = " loading ArgInspector1 argument " +
You can’t perform that action at this time.
0 commit comments