Created
April 21, 2016 18:22
-
-
Save mcs07/cf65084c7b99a64e8cac2fed7a85e23b to your computer and use it in GitHub Desktop.
Fix auto-pointer registration in Boost Python 1.60 from https://github.com/boostorg/python/pull/59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/boost/python/object/class_metadata.hpp b/boost/python/object/class_metadata.hpp | |
index c71cf67..5009c17 100644 | |
--- a/boost/python/object/class_metadata.hpp | |
+++ b/boost/python/object/class_metadata.hpp | |
@@ -164,7 +164,7 @@ struct class_metadata | |
>::type held_type; | |
// Determine if the object will be held by value | |
- typedef is_convertible<held_type*,T*> use_value_holder; | |
+ typedef mpl::bool_<is_convertible<held_type*,T*>::value> use_value_holder; | |
// Compute the "wrapped type", that is, if held_type is a smart | |
// pointer, we're talking about the pointee. | |
@@ -175,10 +175,12 @@ struct class_metadata | |
>::type wrapped; | |
// Determine whether to use a "back-reference holder" | |
- typedef mpl::or_< | |
- has_back_reference<T> | |
- , is_same<held_type_arg,T> | |
- , is_base_and_derived<T,wrapped> | |
+ typedef mpl::bool_< | |
+ mpl::or_< | |
+ has_back_reference<T> | |
+ , is_same<held_type_arg,T> | |
+ , is_base_and_derived<T,wrapped> | |
+ >::value | |
> use_back_reference; | |
// Select the holder. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment