diff -rupN boost_1_43_0/boost/function/function_base.hpp boost_vms_1_43_0/boost/function/function_base.hpp
|
old
|
new
|
public:
|
| 711 | 711 | else return true; |
| 712 | 712 | } |
| 713 | 713 | #endif |
| | 714 | private: |
| | 715 | #if defined(__VMS) && __INITIAL_POINTER_SIZE==64 |
| | 716 | typedef unsigned long long uintptr_type; |
| | 717 | #else |
| | 718 | typedef std::size_t uintptr_type; |
| | 719 | #endif |
| 714 | 720 | |
| 715 | 721 | public: // should be protected, but GCC 2.95.3 will fail to allow access |
| 716 | 722 | detail::function::vtable_base* get_vtable() const { |
| 717 | 723 | return reinterpret_cast<detail::function::vtable_base*>( |
| 718 | | reinterpret_cast<std::size_t>(vtable) & ~(std::size_t)0x01); |
| | 724 | reinterpret_cast<uintptr_type>(vtable) & ~(uintptr_type)0x01); |
| 719 | 725 | } |
| 720 | 726 | |
| 721 | 727 | bool has_trivial_copy_and_destroy() const { |
| 722 | | return reinterpret_cast<std::size_t>(vtable) & 0x01; |
| | 728 | return (reinterpret_cast<uintptr_type>(vtable) & 0x01)!=0; |
| 723 | 729 | } |
| 724 | 730 | |
| 725 | 731 | detail::function::vtable_base* vtable; |
diff -rupN boost_1_43_0/boost/function/function_template.hpp boost_vms_1_43_0/boost/function/function_template.hpp
|
old
|
new
|
namespace boost {
|
| 674 | 674 | typedef boost::detail::function::BOOST_FUNCTION_VTABLE< |
| 675 | 675 | R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS> |
| 676 | 676 | vtable_type; |
| | 677 | #if defined(__VMS) && __INITIAL_POINTER_SIZE == 64 |
| | 678 | typedef unsigned long long uintptr_type; |
| | 679 | #else |
| | 680 | typedef std::size_t uintptr_type; |
| | 681 | #endif |
| 677 | 682 | |
| 678 | 683 | vtable_type* get_vtable() const { |
| 679 | 684 | return reinterpret_cast<vtable_type*>( |
| 680 | | reinterpret_cast<std::size_t>(vtable) & ~(std::size_t)0x01); |
| | 685 | reinterpret_cast<uintptr_type>(vtable) & ~(uintptr_type)0x01); |
| 681 | 686 | } |
| 682 | 687 | |
| 683 | 688 | struct clear_type {}; |
| … |
… |
namespace boost {
|
| 913 | 918 | { { &manager_type::manage }, &invoker_type::invoke }; |
| 914 | 919 | |
| 915 | 920 | if (stored_vtable.assign_to(f, functor)) { |
| 916 | | std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base); |
| | 921 | uintptr_type value = reinterpret_cast<uintptr_type>(&stored_vtable.base); |
| 917 | 922 | if (boost::has_trivial_copy_constructor<Functor>::value && |
| 918 | 923 | boost::has_trivial_destructor<Functor>::value && |
| 919 | 924 | detail::function::function_allows_small_object_optimization<Functor>::value) |
| 920 | | value |= (std::size_t)0x01; |
| | 925 | value |= (uintptr_type)0x01; |
| 921 | 926 | vtable = reinterpret_cast<detail::function::vtable_base *>(value); |
| 922 | 927 | } else |
| 923 | 928 | vtable = 0; |
| … |
… |
namespace boost {
|
| 947 | 952 | { { &manager_type::manage }, &invoker_type::invoke }; |
| 948 | 953 | |
| 949 | 954 | if (stored_vtable.assign_to_a(f, functor, a)) { |
| 950 | | std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base); |
| | 955 | uintptr_type value = reinterpret_cast<uintptr_type>(&stored_vtable.base); |
| 951 | 956 | if (boost::has_trivial_copy_constructor<Functor>::value && |
| 952 | 957 | boost::has_trivial_destructor<Functor>::value && |
| 953 | 958 | detail::function::function_allows_small_object_optimization<Functor>::value) |
| 954 | | value |= (std::size_t)0x01; |
| | 959 | value |= (uintptr_type)0x01; |
| 955 | 960 | vtable = reinterpret_cast<detail::function::vtable_base *>(value); |
| 956 | 961 | } else |
| 957 | 962 | vtable = 0; |