@@ -30,11 +30,12 @@ namespace pybind11 {
30
30
namespace detail {
31
31
32
32
// Can be replaced by a generic lambda in C++14
33
- struct variant_caster_visitor : public boost ::static_visitor<handle> {
33
+ struct __attribute__ ((visibility(" hidden" ))) paddle_variant_caster_visitor
34
+ : public boost::static_visitor<handle> {
34
35
return_value_policy policy;
35
36
handle parent;
36
37
37
- variant_caster_visitor (return_value_policy policy, handle parent)
38
+ paddle_variant_caster_visitor (return_value_policy policy, handle parent)
38
39
: policy (policy), parent (parent) {}
39
40
40
41
template <class T >
@@ -44,10 +45,10 @@ struct variant_caster_visitor : public boost::static_visitor<handle> {
44
45
};
45
46
46
47
template <class Variant >
47
- struct variant_caster ;
48
+ struct paddle_variant_caster ;
48
49
49
50
template <template <class ...> class V , class ... Ts>
50
- struct variant_caster <V<Ts...>> {
51
+ struct paddle_variant_caster <V<Ts...>> {
51
52
using Type = V<Ts...>;
52
53
53
54
template <typename T>
@@ -90,7 +91,7 @@ struct variant_caster<V<Ts...>> {
90
91
91
92
static handle cast (Type const &src, return_value_policy policy,
92
93
handle parent) {
93
- variant_caster_visitor visitor (policy, parent);
94
+ paddle_variant_caster_visitor visitor (policy, parent);
94
95
return boost::apply_visitor (visitor, src);
95
96
}
96
97
@@ -101,7 +102,7 @@ struct variant_caster<V<Ts...>> {
101
102
// Add specialization for concrete variant type
102
103
template <class ... Args>
103
104
struct type_caster <boost::variant<Args...>>
104
- : variant_caster <boost::variant<Args...>> {};
105
+ : paddle_variant_caster <boost::variant<Args...>> {};
105
106
106
107
} // namespace detail
107
108
} // namespace pybind11
0 commit comments