passenger 4.0.20 → 4.0.21
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of passenger might be problematic. Click here for more details.
- checksums.yaml +8 -8
- checksums.yaml.gz.asc +7 -7
- data.tar.gz.asc +7 -7
- data/.gitignore +1 -0
- data/.travis.yml +1 -1
- data/NEWS +15 -0
- data/README.md +5 -3
- data/Rakefile +1 -0
- data/bin/passenger-config +1 -5
- data/bin/passenger-install-apache2-module +53 -5
- data/bin/passenger-install-nginx-module +19 -6
- data/bin/passenger-memory-stats +3 -3
- data/build/agents.rb +11 -8
- data/build/apache2.rb +9 -5
- data/build/basics.rb +15 -21
- data/build/common_library.rb +16 -6
- data/build/cplusplus_support.rb +5 -5
- data/build/cxx_tests.rb +3 -3
- data/build/documentation.rb +1 -1
- data/build/misc.rb +4 -37
- data/build/node_tests.rb +29 -0
- data/build/oxt_tests.rb +1 -1
- data/build/packaging.rb +29 -10
- data/build/preprocessor.rb +2 -1
- data/build/test_basics.rb +15 -6
- data/debian.template/locations.ini.template +1 -0
- data/debian.template/passenger.install.template +1 -0
- data/dev/copy_boost_headers.rb +7 -3
- data/dev/run_travis.sh +32 -16
- data/doc/Users guide Apache.idmap.txt +22 -34
- data/doc/Users guide Apache.txt +20 -234
- data/doc/Users guide Nginx.idmap.txt +84 -66
- data/doc/Users guide Nginx.txt +50 -1
- data/doc/Users guide Standalone.idmap.txt +74 -0
- data/doc/Users guide Standalone.txt +22 -9
- data/doc/Users guide.txt +51 -0
- data/doc/users_guide_snippets/environment_variables.txt +0 -3
- data/doc/users_guide_snippets/installation.txt +337 -380
- data/doc/users_guide_snippets/installation/run_installer.txt +58 -0
- data/doc/users_guide_snippets/installation/verify_running_epilogue.txt +6 -0
- data/doc/users_guide_snippets/support_information.txt +2 -9
- data/doc/users_guide_snippets/troubleshooting/default.txt +112 -0
- data/doc/users_guide_snippets/troubleshooting/rails.txt +56 -0
- data/doc/users_guide_snippets/where_to_get_support.txt +9 -0
- data/ext/apache2/Bucket.h +1 -1
- data/ext/apache2/Configuration.hpp +0 -44
- data/ext/apache2/CreateDirConfig.cpp +1 -1
- data/ext/apache2/CreateDirConfig.cpp.erb +1 -1
- data/ext/apache2/Hooks.cpp +28 -21
- data/ext/apache2/MergeDirConfig.cpp +1 -0
- data/ext/apache2/MergeDirConfig.cpp.erb +1 -1
- data/ext/apache2/SetHeaders.cpp +73 -0
- data/ext/apache2/SetHeaders.cpp.erb +88 -0
- data/ext/boost/algorithm/string/detail/find_format.hpp +5 -5
- data/ext/boost/algorithm/string/detail/find_format_all.hpp +5 -5
- data/ext/boost/algorithm/string/detail/finder.hpp +1 -1
- data/ext/boost/algorithm/string/formatter.hpp +2 -2
- data/ext/boost/assert.hpp +6 -1
- data/ext/boost/atomic.hpp +18 -0
- data/ext/boost/atomic/atomic.hpp +241 -0
- data/ext/boost/atomic/detail/base.hpp +585 -0
- data/ext/boost/atomic/detail/cas32strong.hpp +885 -0
- data/ext/boost/atomic/detail/cas32weak.hpp +947 -0
- data/ext/boost/atomic/detail/cas64strong.hpp +443 -0
- data/ext/boost/atomic/detail/config.hpp +54 -0
- data/ext/boost/atomic/detail/gcc-alpha.hpp +368 -0
- data/ext/boost/atomic/detail/gcc-armv6plus.hpp +252 -0
- data/ext/boost/atomic/detail/gcc-cas.hpp +157 -0
- data/ext/boost/atomic/detail/gcc-ppc.hpp +2850 -0
- data/ext/boost/atomic/detail/gcc-sparcv9.hpp +1259 -0
- data/ext/boost/atomic/detail/gcc-x86.hpp +1766 -0
- data/ext/boost/atomic/detail/generic-cas.hpp +206 -0
- data/ext/boost/atomic/detail/interlocked.hpp +200 -0
- data/ext/boost/atomic/detail/linux-arm.hpp +189 -0
- data/ext/boost/atomic/detail/lockpool.hpp +97 -0
- data/ext/boost/atomic/detail/platform.hpp +62 -0
- data/ext/boost/atomic/detail/type-classification.hpp +45 -0
- data/ext/boost/chrono/config.hpp +8 -3
- data/ext/boost/chrono/duration.hpp +9 -10
- data/ext/boost/chrono/system_clocks.hpp +1 -1
- data/ext/boost/chrono/time_point.hpp +4 -3
- data/ext/boost/config/auto_link.hpp +53 -52
- data/ext/boost/config/compiler/borland.hpp +1 -0
- data/ext/boost/config/compiler/clang.hpp +24 -1
- data/ext/boost/config/compiler/codegear.hpp +1 -0
- data/ext/boost/config/compiler/common_edg.hpp +1 -0
- data/ext/boost/config/compiler/cray.hpp +1 -0
- data/ext/boost/config/compiler/digitalmars.hpp +1 -0
- data/ext/boost/config/compiler/gcc.hpp +29 -3
- data/ext/boost/config/compiler/gcc_xml.hpp +2 -1
- data/ext/boost/config/compiler/hp_acc.hpp +1 -0
- data/ext/boost/config/compiler/intel.hpp +1 -1
- data/ext/boost/config/compiler/metrowerks.hpp +1 -0
- data/ext/boost/config/compiler/mpw.hpp +1 -0
- data/ext/boost/config/compiler/pathscale.hpp +1 -0
- data/ext/boost/config/compiler/pgi.hpp +1 -0
- data/ext/boost/config/compiler/sunpro_cc.hpp +1 -0
- data/ext/boost/config/compiler/vacpp.hpp +3 -2
- data/ext/boost/config/compiler/visualc.hpp +25 -11
- data/ext/boost/config/platform/vxworks.hpp +353 -15
- data/ext/boost/config/select_compiler_config.hpp +4 -4
- data/ext/boost/config/stdlib/dinkumware.hpp +10 -3
- data/ext/boost/config/stdlib/libstdcpp3.hpp +2 -1
- data/ext/boost/config/suffix.hpp +45 -19
- data/ext/boost/date_time/format_date_parser.hpp +1 -11
- data/ext/boost/date_time/strings_from_facet.hpp +5 -3
- data/ext/boost/detail/atomic_redef_macros.hpp +19 -0
- data/ext/boost/detail/atomic_undef_macros.hpp +39 -0
- data/ext/boost/detail/endian.hpp +52 -4
- data/ext/boost/detail/scoped_enum_emulation.hpp +10 -10
- data/ext/boost/detail/select_type.hpp +36 -0
- data/ext/boost/exception/current_exception_cast.hpp +1 -1
- data/ext/boost/exception/detail/error_info_impl.hpp +3 -5
- data/ext/boost/exception/detail/exception_ptr.hpp +3 -3
- data/ext/boost/exception/detail/is_output_streamable.hpp +1 -1
- data/ext/boost/exception/detail/object_hex_dump.hpp +1 -1
- data/ext/boost/exception/detail/type_info.hpp +1 -1
- data/ext/boost/exception/diagnostic_information.hpp +15 -14
- data/ext/boost/exception/exception.hpp +1 -1
- data/ext/boost/exception/get_error_info.hpp +1 -1
- data/ext/boost/exception/info.hpp +12 -13
- data/ext/boost/exception/to_string.hpp +6 -1
- data/ext/boost/exception/to_string_stub.hpp +9 -1
- data/ext/boost/foreach.hpp +5 -5
- data/ext/boost/function/function_template.hpp +6 -6
- data/ext/boost/functional/hash/detail/float_functions.hpp +90 -0
- data/ext/boost/functional/hash/detail/hash_float.hpp +11 -2
- data/ext/boost/functional/hash/extensions.hpp +14 -2
- data/ext/boost/functional/hash/hash.hpp +26 -5
- data/ext/boost/get_pointer.hpp +17 -2
- data/ext/boost/integer_traits.hpp +1 -1
- data/ext/boost/lexical_cast.hpp +615 -395
- data/ext/boost/libs/atomic/lockpool.cpp +24 -0
- data/ext/boost/libs/system/src/error_code.cpp +25 -18
- data/ext/boost/libs/thread/src/future.cpp +7 -5
- data/ext/boost/libs/thread/src/pthread/once.cpp +9 -3
- data/ext/boost/libs/thread/src/pthread/once_atomic.cpp +90 -0
- data/ext/boost/libs/thread/src/pthread/thread.cpp +129 -95
- data/ext/boost/libs/thread/src/pthread/timeconv.inl +20 -1
- data/ext/boost/limits.hpp +1 -1
- data/ext/boost/math/policies/policy.hpp +10 -0
- data/ext/boost/math/special_functions/detail/round_fwd.hpp +17 -4
- data/ext/boost/math/special_functions/fpclassify.hpp +114 -45
- data/ext/boost/math/special_functions/math_fwd.hpp +195 -83
- data/ext/boost/math/special_functions/sign.hpp +13 -8
- data/ext/boost/math/tools/config.hpp +38 -16
- data/ext/boost/move/algorithm.hpp +275 -0
- data/ext/boost/move/core.hpp +332 -0
- data/ext/boost/move/detail/config_begin.hpp +23 -0
- data/ext/boost/move/detail/config_end.hpp +20 -0
- data/ext/boost/move/detail/meta_utils.hpp +158 -0
- data/ext/boost/move/iterator.hpp +298 -0
- data/ext/boost/move/move.hpp +10 -1256
- data/ext/boost/move/traits.hpp +142 -0
- data/ext/boost/move/utility.hpp +194 -0
- data/ext/boost/mpl/assert.hpp +72 -4
- data/ext/boost/noncopyable.hpp +15 -3
- data/ext/boost/pointer_to_other.hpp +55 -0
- data/ext/boost/range/concepts.hpp +4 -4
- data/ext/boost/range/detail/extract_optional_type.hpp +1 -1
- data/ext/boost/range/empty.hpp +1 -1
- data/ext/boost/range/iterator_range_core.hpp +4 -1
- data/ext/boost/range/iterator_range_io.hpp +2 -2
- data/ext/boost/ratio/config.hpp +6 -0
- data/ext/boost/ratio/detail/overflow_helpers.hpp +2 -2
- data/ext/boost/smart_ptr/allocate_shared_array.hpp +250 -0
- data/ext/boost/smart_ptr/detail/allocate_array_helper.hpp +169 -0
- data/ext/boost/smart_ptr/detail/array_deleter.hpp +124 -0
- data/ext/boost/smart_ptr/detail/array_traits.hpp +53 -0
- data/ext/boost/smart_ptr/detail/array_utility.hpp +178 -0
- data/ext/boost/smart_ptr/detail/make_array_helper.hpp +157 -0
- data/ext/boost/smart_ptr/detail/operator_bool.hpp +16 -9
- data/ext/boost/smart_ptr/detail/shared_count.hpp +78 -7
- data/ext/boost/smart_ptr/detail/sp_convertible.hpp +15 -0
- data/ext/boost/smart_ptr/detail/sp_counted_base.hpp +12 -6
- data/ext/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp +1 -0
- data/ext/boost/smart_ptr/detail/sp_counted_base_aix.hpp +1 -0
- data/ext/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp +1 -0
- data/ext/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp +1 -0
- data/ext/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp +1 -0
- data/ext/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp +1 -0
- data/ext/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp +1 -0
- data/ext/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp +1 -0
- data/ext/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp +1 -0
- data/ext/boost/smart_ptr/detail/sp_counted_base_nt.hpp +1 -0
- data/ext/boost/smart_ptr/detail/sp_counted_base_pt.hpp +1 -0
- data/ext/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp +162 -0
- data/ext/boost/smart_ptr/detail/sp_counted_base_solaris.hpp +1 -0
- data/ext/boost/smart_ptr/detail/sp_counted_base_spin.hpp +1 -0
- data/ext/boost/smart_ptr/detail/sp_counted_base_sync.hpp +1 -0
- data/ext/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp +1 -0
- data/ext/boost/smart_ptr/detail/sp_counted_impl.hpp +15 -0
- data/ext/boost/smart_ptr/detail/sp_forward.hpp +39 -0
- data/ext/boost/smart_ptr/detail/sp_has_sync.hpp +19 -3
- data/ext/boost/smart_ptr/detail/sp_if_array.hpp +31 -0
- data/ext/boost/smart_ptr/detail/sp_nullptr_t.hpp +45 -0
- data/ext/boost/smart_ptr/detail/spinlock_gcc_arm.hpp +5 -12
- data/ext/boost/smart_ptr/enable_shared_from_this.hpp +4 -4
- data/ext/boost/smart_ptr/make_shared.hpp +5 -1060
- data/ext/boost/smart_ptr/make_shared_array.hpp +247 -0
- data/ext/boost/smart_ptr/make_shared_object.hpp +1128 -0
- data/ext/boost/smart_ptr/scoped_array.hpp +32 -7
- data/ext/boost/smart_ptr/scoped_ptr.hpp +31 -5
- data/ext/boost/smart_ptr/shared_array.hpp +135 -20
- data/ext/boost/smart_ptr/shared_ptr.hpp +444 -126
- data/ext/boost/smart_ptr/weak_ptr.hpp +39 -28
- data/ext/boost/static_assert.hpp +74 -17
- data/ext/boost/system/error_code.hpp +76 -68
- data/ext/boost/system/system_error.hpp +5 -1
- data/ext/boost/thread/barrier.hpp +6 -2
- data/ext/boost/thread/completion_latch.hpp +233 -0
- data/ext/boost/thread/condition.hpp +6 -1
- data/ext/boost/thread/detail/async_func.hpp +571 -0
- data/ext/boost/thread/detail/config.hpp +248 -40
- data/ext/boost/thread/detail/counter.hpp +93 -0
- data/ext/boost/thread/detail/delete.hpp +12 -0
- data/ext/boost/thread/detail/invoke.hpp +1351 -0
- data/ext/boost/thread/detail/is_convertible.hpp +48 -0
- data/ext/boost/thread/detail/lockable_wrapper.hpp +45 -0
- data/ext/boost/thread/detail/log.hpp +83 -0
- data/ext/boost/thread/detail/make_tuple_indices.hpp +224 -0
- data/ext/boost/thread/detail/move.hpp +32 -16
- data/ext/boost/thread/detail/thread.hpp +236 -41
- data/ext/boost/thread/detail/thread_group.hpp +55 -9
- data/ext/boost/thread/detail/thread_interruption.hpp +4 -1
- data/ext/boost/thread/exceptions.hpp +2 -0
- data/ext/boost/thread/externally_locked.hpp +351 -0
- data/ext/boost/thread/externally_locked_stream.hpp +170 -0
- data/ext/boost/thread/future.hpp +2517 -455
- data/ext/boost/thread/future_error_code.hpp +61 -0
- data/ext/boost/thread/is_locked_by_this_thread.hpp +39 -0
- data/ext/boost/thread/latch.hpp +142 -0
- data/ext/boost/thread/lock_algorithms.hpp +468 -0
- data/ext/boost/thread/lock_concepts.hpp +197 -0
- data/ext/boost/thread/lock_factories.hpp +78 -0
- data/ext/boost/thread/lock_guard.hpp +88 -0
- data/ext/boost/thread/lock_options.hpp +31 -0
- data/ext/boost/thread/lock_traits.hpp +45 -0
- data/ext/boost/thread/lock_types.hpp +1226 -0
- data/ext/boost/thread/lockable_adapter.hpp +226 -0
- data/ext/boost/thread/lockable_concepts.hpp +157 -0
- data/ext/boost/thread/lockable_traits.hpp +207 -0
- data/ext/boost/thread/locks.hpp +5 -1816
- data/ext/boost/thread/mutex.hpp +33 -1
- data/ext/boost/thread/null_mutex.hpp +243 -0
- data/ext/boost/thread/once.hpp +10 -1
- data/ext/boost/thread/poly_lockable.hpp +68 -0
- data/ext/boost/thread/poly_lockable_adapter.hpp +89 -0
- data/ext/boost/thread/poly_shared_lockable.hpp +135 -0
- data/ext/boost/thread/poly_shared_lockable_adapter.hpp +170 -0
- data/ext/boost/thread/pthread/condition_variable.hpp +74 -26
- data/ext/boost/thread/pthread/condition_variable_fwd.hpp +54 -27
- data/ext/boost/thread/pthread/mutex.hpp +101 -38
- data/ext/boost/thread/pthread/once.hpp +459 -44
- data/ext/boost/thread/pthread/once_atomic.hpp +313 -0
- data/ext/boost/thread/pthread/recursive_mutex.hpp +19 -10
- data/ext/boost/thread/pthread/shared_mutex.hpp +226 -61
- data/ext/boost/thread/pthread/shared_mutex_assert.hpp +724 -0
- data/ext/boost/thread/pthread/thread_data.hpp +53 -50
- data/ext/boost/thread/pthread/timespec.hpp +96 -12
- data/ext/boost/thread/recursive_mutex.hpp +44 -1
- data/ext/boost/thread/reverse_lock.hpp +3 -2
- data/ext/boost/thread/scoped_thread.hpp +285 -0
- data/ext/boost/thread/shared_lock_guard.hpp +2 -1
- data/ext/boost/thread/shared_mutex.hpp +23 -0
- data/ext/boost/thread/strict_lock.hpp +235 -0
- data/ext/boost/thread/sync_bounded_queue.hpp +594 -0
- data/ext/boost/thread/sync_queue.hpp +516 -0
- data/ext/boost/thread/synchronized_value.hpp +1001 -0
- data/ext/boost/thread/testable_mutex.hpp +148 -0
- data/ext/boost/thread/thread.hpp +1 -13
- data/ext/boost/thread/thread_functors.hpp +57 -0
- data/ext/boost/thread/thread_guard.hpp +46 -0
- data/ext/boost/thread/thread_only.hpp +29 -0
- data/ext/boost/thread/v2/shared_mutex.hpp +1062 -0
- data/ext/boost/thread/v2/thread.hpp +37 -10
- data/ext/boost/thread/xtime.hpp +2 -1
- data/ext/boost/token_functions.hpp +16 -16
- data/ext/boost/type_traits/add_lvalue_reference.hpp +26 -0
- data/ext/boost/type_traits/add_reference.hpp +1 -1
- data/ext/boost/type_traits/add_rvalue_reference.hpp +4 -4
- data/ext/boost/type_traits/aligned_storage.hpp +13 -0
- data/ext/boost/type_traits/common_type.hpp +11 -12
- data/ext/boost/type_traits/config.hpp +1 -1
- data/ext/boost/type_traits/detail/common_type_imp.hpp +1 -1
- data/ext/boost/type_traits/detail/has_binary_operator.hpp +1 -1
- data/ext/boost/type_traits/detail/is_function_ptr_tester.hpp +1 -1
- data/ext/boost/type_traits/has_left_shift.hpp +49 -0
- data/ext/boost/type_traits/has_right_shift.hpp +49 -0
- data/ext/boost/type_traits/has_trivial_move_assign.hpp +57 -0
- data/ext/boost/type_traits/has_trivial_move_constructor.hpp +57 -0
- data/ext/boost/type_traits/intrinsics.hpp +18 -2
- data/ext/boost/type_traits/is_abstract.hpp +1 -1
- data/ext/boost/type_traits/is_array.hpp +1 -1
- data/ext/boost/type_traits/is_const.hpp +1 -1
- data/ext/boost/type_traits/is_convertible.hpp +78 -17
- data/ext/boost/type_traits/is_function.hpp +6 -1
- data/ext/boost/type_traits/is_integral.hpp +6 -1
- data/ext/boost/type_traits/is_nothrow_move_assignable.hpp +84 -0
- data/ext/boost/type_traits/is_nothrow_move_constructible.hpp +84 -0
- data/ext/boost/type_traits/is_pod.hpp +3 -1
- data/ext/boost/type_traits/is_rvalue_reference.hpp +1 -1
- data/ext/boost/type_traits/is_volatile.hpp +1 -1
- data/ext/boost/type_traits/make_signed.hpp +153 -0
- data/ext/boost/type_traits/make_unsigned.hpp +16 -0
- data/ext/boost/type_traits/remove_const.hpp +1 -1
- data/ext/boost/type_traits/remove_cv.hpp +1 -1
- data/ext/boost/type_traits/remove_reference.hpp +1 -1
- data/ext/boost/type_traits/remove_volatile.hpp +1 -1
- data/ext/boost/unordered/detail/allocate.hpp +1120 -0
- data/ext/boost/unordered/detail/buckets.hpp +876 -0
- data/ext/boost/unordered/detail/equivalent.hpp +680 -0
- data/ext/boost/unordered/detail/extract_key.hpp +183 -0
- data/ext/boost/unordered/detail/fwd.hpp +23 -0
- data/ext/boost/unordered/detail/table.hpp +861 -0
- data/ext/boost/unordered/detail/unique.hpp +622 -0
- data/ext/boost/unordered/detail/util.hpp +260 -0
- data/ext/boost/unordered/unordered_map.hpp +1652 -0
- data/ext/boost/unordered/unordered_map_fwd.hpp +65 -0
- data/ext/boost/unordered/unordered_set.hpp +1549 -0
- data/ext/boost/unordered/unordered_set_fwd.hpp +63 -0
- data/ext/boost/unordered_map.hpp +18 -0
- data/ext/boost/unordered_set.hpp +18 -0
- data/ext/boost/utility/addressof.hpp +2 -2
- data/ext/boost/utility/result_of.hpp +8 -1
- data/ext/boost/version.hpp +2 -2
- data/ext/common/Account.h +1 -1
- data/ext/common/AccountsDatabase.h +1 -1
- data/ext/common/AgentsStarter.cpp +3 -1
- data/ext/common/AgentsStarter.h +2 -2
- data/ext/common/ApplicationPool2/AppTypes.cpp +24 -6
- data/ext/common/ApplicationPool2/AppTypes.h +17 -8
- data/ext/common/ApplicationPool2/Common.h +12 -12
- data/ext/common/ApplicationPool2/DirectSpawner.h +2 -2
- data/ext/common/ApplicationPool2/DummySpawner.h +3 -3
- data/ext/common/ApplicationPool2/Group.h +6 -6
- data/ext/common/ApplicationPool2/Implementation.cpp +19 -19
- data/ext/common/ApplicationPool2/PipeWatcher.h +5 -5
- data/ext/common/ApplicationPool2/Pool.h +21 -21
- data/ext/common/ApplicationPool2/Process.h +6 -6
- data/ext/common/ApplicationPool2/Session.h +1 -1
- data/ext/common/ApplicationPool2/SmartSpawner.h +24 -12
- data/ext/common/ApplicationPool2/Socket.h +2 -2
- data/ext/common/ApplicationPool2/Spawner.h +64 -14
- data/ext/common/ApplicationPool2/SpawnerFactory.h +7 -7
- data/ext/common/ApplicationPool2/SuperGroup.h +5 -5
- data/ext/common/BackgroundEventLoop.cpp +4 -4
- data/ext/common/BackgroundEventLoop.h +1 -1
- data/ext/common/Constants.h +13 -1
- data/ext/common/EventedBufferedInput.h +8 -8
- data/ext/common/Exceptions.cpp +71 -0
- data/ext/common/Exceptions.h +60 -7
- data/ext/common/FileDescriptor.h +4 -4
- data/ext/common/MessageClient.h +1 -1
- data/ext/common/MessageServer.h +5 -5
- data/ext/common/MultiLibeio.cpp +3 -3
- data/ext/common/MultiLibeio.h +2 -2
- data/ext/common/RandomGenerator.h +11 -11
- data/ext/common/ResourceLocator.h +8 -1
- data/ext/common/SafeLibev.h +12 -12
- data/ext/common/ServerInstanceDir.h +11 -3
- data/ext/common/UnionStation.h +10 -10
- data/ext/common/Utils.cpp +11 -13
- data/ext/common/Utils.h +9 -9
- data/ext/common/Utils/BlockingQueue.h +10 -10
- data/ext/common/Utils/BufferedIO.h +1 -1
- data/ext/common/Utils/CachedFileStat.hpp +2 -2
- data/ext/common/Utils/FileChangeChecker.h +1 -1
- data/ext/common/Utils/HashMap.h +13 -4
- data/ext/common/Utils/IOUtils.cpp +33 -10
- data/ext/common/Utils/IniFile.h +3 -3
- data/ext/common/Utils/Lock.h +2 -2
- data/ext/common/Utils/MessagePassing.h +10 -10
- data/ext/common/Utils/ProcessMetricsCollector.h +24 -6
- data/ext/common/Utils/ScopeGuard.h +5 -5
- data/ext/common/Utils/jsoncpp.cpp +2 -0
- data/ext/common/agents/HelperAgent/FileBackedPipe.h +26 -26
- data/ext/common/agents/HelperAgent/Main.cpp +18 -18
- data/ext/common/agents/HelperAgent/RequestHandler.cpp +4 -4
- data/ext/common/agents/HelperAgent/RequestHandler.h +30 -21
- data/ext/common/agents/LoggingAgent/AdminController.h +1 -1
- data/ext/common/agents/LoggingAgent/FilterSupport.h +13 -11
- data/ext/common/agents/LoggingAgent/LoggingServer.h +11 -11
- data/ext/common/agents/LoggingAgent/Main.cpp +9 -9
- data/ext/common/agents/LoggingAgent/RemoteSender.h +3 -3
- data/ext/common/agents/SpawnPreparer.cpp +1 -0
- data/ext/common/agents/Watchdog/AgentWatcher.cpp +8 -7
- data/ext/common/agents/Watchdog/Main.cpp +81 -73
- data/ext/common/agents/Watchdog/ServerInstanceDirToucher.cpp +1 -1
- data/ext/libev/Changes +57 -0
- data/ext/libev/LICENSE +2 -1
- data/ext/libev/Makefile.in +110 -50
- data/ext/libev/README +8 -8
- data/ext/libev/aclocal.m4 +1503 -861
- data/ext/libev/config.guess +290 -304
- data/ext/libev/config.sub +77 -198
- data/ext/libev/configure +1735 -890
- data/ext/libev/configure.ac +3 -2
- data/ext/libev/ev++.h +6 -6
- data/ext/libev/ev.c +541 -214
- data/ext/libev/ev.h +106 -100
- data/ext/libev/ev_epoll.c +1 -1
- data/ext/libev/ev_kqueue.c +20 -4
- data/ext/libev/ev_vars.h +15 -16
- data/ext/libev/ev_win32.c +12 -2
- data/ext/libev/ev_wrap.h +162 -160
- data/ext/libev/event.c +29 -6
- data/ext/libev/event.h +9 -2
- data/ext/libev/ltmain.sh +2632 -1384
- data/ext/nginx/ConfigurationCommands.c +1 -1
- data/ext/nginx/ConfigurationCommands.c.erb +3 -1
- data/ext/nginx/ContentHandler.c +25 -2
- data/ext/nginx/CreateLocationConfig.c +1 -0
- data/ext/nginx/CreateLocationConfig.c.erb +1 -1
- data/ext/nginx/MergeLocationConfig.c +1 -0
- data/ext/nginx/MergeLocationConfig.c.erb +1 -1
- data/ext/nginx/config +12 -0
- data/ext/oxt/dynamic_thread_group.hpp +7 -4
- data/ext/oxt/system_calls.cpp +5 -1
- data/ext/oxt/system_calls.hpp +3 -0
- data/helper-scripts/node-loader.js +117 -249
- data/lib/phusion_passenger.rb +27 -5
- data/lib/phusion_passenger/abstract_installer.rb +104 -9
- data/lib/phusion_passenger/admin_tools/memory_stats.rb +10 -9
- data/lib/phusion_passenger/apache2/config_options.rb +6 -3
- data/lib/phusion_passenger/common_library.rb +7 -1
- data/lib/phusion_passenger/constants.rb +6 -0
- data/lib/phusion_passenger/loader_shared_helpers.rb +7 -4
- data/lib/phusion_passenger/nginx/config_options.rb +2 -1
- data/lib/phusion_passenger/packaging.rb +3 -0
- data/lib/phusion_passenger/platform_info/apache.rb +43 -6
- data/lib/phusion_passenger/platform_info/apache_detector.rb +15 -5
- data/lib/phusion_passenger/platform_info/compiler.rb +167 -32
- data/lib/phusion_passenger/platform_info/cxx_portability.rb +133 -77
- data/lib/phusion_passenger/platform_info/depcheck.rb +17 -7
- data/lib/phusion_passenger/platform_info/depcheck_specs/apache2.rb +3 -3
- data/lib/phusion_passenger/platform_info/depcheck_specs/compiler_toolchain.rb +4 -4
- data/lib/phusion_passenger/platform_info/depcheck_specs/ruby.rb +5 -6
- data/lib/phusion_passenger/platform_info/linux.rb +2 -1
- data/lib/phusion_passenger/platform_info/operating_system.rb +1 -1
- data/lib/phusion_passenger/platform_info/ruby.rb +18 -3
- data/lib/phusion_passenger/standalone/runtime_installer.rb +6 -2
- data/lib/phusion_passenger/standalone/start_command.rb +8 -2
- data/lib/phusion_passenger/utils/ansi_colors.rb +9 -0
- data/lib/phusion_passenger/utils/hosts_file_parser.rb +4 -2
- data/node_lib/phusion_passenger/httplib_emulation.js +141 -0
- data/node_lib/phusion_passenger/line_reader.js +154 -0
- data/node_lib/phusion_passenger/request_handler.js +65 -0
- data/node_lib/phusion_passenger/session_protocol_parser.js +113 -0
- data/resources/templates/apache2/deployment_example.txt.erb +2 -1
- data/resources/templates/apache2/installing_against_a_different_apache.txt.erb +14 -0
- data/resources/templates/apache2/multiple_apache_installations_detected.txt.erb +15 -0
- data/resources/templates/apache2/possible_solutions_for_compilation_and_installation_problems.txt.erb +4 -5
- data/resources/templates/general_error_with_html.html.template +1 -1
- data/resources/templates/installer_common/gem_install_permission_problems.txt.erb +17 -0
- data/resources/templates/installer_common/low_amount_of_memory_warning.txt.erb +6 -4
- data/resources/templates/installer_common/world_inaccessible_directories.txt.erb +16 -0
- data/resources/templates/nginx/deployment_example.txt.erb +2 -1
- data/resources/templates/nginx/possible_solutions_for_compilation_and_installation_problems.txt.erb +4 -5
- data/resources/templates/standalone/config.erb +1 -0
- data/test/cxx/ApplicationPool2/DirectSpawnerTest.cpp +3 -3
- data/test/cxx/ApplicationPool2/PoolTest.cpp +4 -4
- data/test/cxx/ApplicationPool2/ProcessTest.cpp +5 -5
- data/test/cxx/ApplicationPool2/SmartSpawnerTest.cpp +5 -5
- data/test/cxx/ApplicationPool2/SpawnerTestCases.cpp +1 -1
- data/test/cxx/EventedBufferedInputTest.cpp +6 -6
- data/test/cxx/FileBackedPipeTest.cpp +1 -1
- data/test/cxx/MessagePassingTest.cpp +1 -1
- data/test/cxx/MessageServerTest.cpp +4 -4
- data/test/cxx/RequestHandlerTest.cpp +7 -7
- data/test/cxx/UnionStationTest.cpp +2 -2
- data/test/node/line_reader_spec.js +338 -0
- data/test/node/spec_helper.js +27 -0
- data/test/ruby/standalone/runtime_installer_spec.rb +2 -1
- metadata +131 -22
- metadata.gz.asc +7 -7
- data/ext/boost/functional/hash/detail/container_fwd_0x.hpp +0 -29
- data/ext/boost/lambda/core.hpp +0 -79
- data/ext/boost/lambda/detail/actions.hpp +0 -174
- data/ext/boost/lambda/detail/arity_code.hpp +0 -110
- data/ext/boost/lambda/detail/function_adaptors.hpp +0 -789
- data/ext/boost/lambda/detail/is_instance_of.hpp +0 -104
- data/ext/boost/lambda/detail/lambda_config.hpp +0 -48
- data/ext/boost/lambda/detail/lambda_functor_base.hpp +0 -615
- data/ext/boost/lambda/detail/lambda_functors.hpp +0 -324
- data/ext/boost/lambda/detail/lambda_fwd.hpp +0 -74
- data/ext/boost/lambda/detail/lambda_traits.hpp +0 -578
- data/ext/boost/lambda/detail/member_ptr.hpp +0 -737
- data/ext/boost/lambda/detail/operator_actions.hpp +0 -139
- data/ext/boost/lambda/detail/operator_lambda_func_base.hpp +0 -271
- data/ext/boost/lambda/detail/operator_return_type_traits.hpp +0 -917
- data/ext/boost/lambda/detail/operators.hpp +0 -370
- data/ext/boost/lambda/detail/ret.hpp +0 -325
- data/ext/boost/lambda/detail/return_type_traits.hpp +0 -282
- data/ext/boost/lambda/detail/select_functions.hpp +0 -74
- data/ext/boost/lambda/lambda.hpp +0 -34
@@ -11,9 +11,10 @@
|
|
11
11
|
// http://www.boost.org/libs/smart_ptr/scoped_array.htm
|
12
12
|
//
|
13
13
|
|
14
|
+
#include <boost/config.hpp>
|
14
15
|
#include <boost/assert.hpp>
|
15
16
|
#include <boost/checked_delete.hpp>
|
16
|
-
#include <boost/
|
17
|
+
#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
|
17
18
|
|
18
19
|
#include <boost/detail/workaround.hpp>
|
19
20
|
|
@@ -53,7 +54,7 @@ public:
|
|
53
54
|
|
54
55
|
typedef T element_type;
|
55
56
|
|
56
|
-
explicit scoped_array( T * p = 0 ) : px( p )
|
57
|
+
explicit scoped_array( T * p = 0 ) BOOST_NOEXCEPT : px( p )
|
57
58
|
{
|
58
59
|
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
59
60
|
boost::sp_array_constructor_hook( px );
|
@@ -68,20 +69,20 @@ public:
|
|
68
69
|
boost::checked_array_delete( px );
|
69
70
|
}
|
70
71
|
|
71
|
-
void reset(T * p = 0) // never throws
|
72
|
+
void reset(T * p = 0) // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
|
72
73
|
{
|
73
74
|
BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors
|
74
75
|
this_type(p).swap(*this);
|
75
76
|
}
|
76
77
|
|
77
|
-
T & operator[](std::ptrdiff_t i) const // never throws
|
78
|
+
T & operator[](std::ptrdiff_t i) const // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
|
78
79
|
{
|
79
80
|
BOOST_ASSERT( px != 0 );
|
80
81
|
BOOST_ASSERT( i >= 0 );
|
81
82
|
return px[i];
|
82
83
|
}
|
83
84
|
|
84
|
-
T * get() const
|
85
|
+
T * get() const BOOST_NOEXCEPT
|
85
86
|
{
|
86
87
|
return px;
|
87
88
|
}
|
@@ -89,7 +90,7 @@ public:
|
|
89
90
|
// implicit conversion to "bool"
|
90
91
|
#include <boost/smart_ptr/detail/operator_bool.hpp>
|
91
92
|
|
92
|
-
void swap(scoped_array & b)
|
93
|
+
void swap(scoped_array & b) BOOST_NOEXCEPT
|
93
94
|
{
|
94
95
|
T * tmp = b.px;
|
95
96
|
b.px = px;
|
@@ -97,7 +98,31 @@ public:
|
|
97
98
|
}
|
98
99
|
};
|
99
100
|
|
100
|
-
|
101
|
+
#if !defined( BOOST_NO_CXX11_NULLPTR )
|
102
|
+
|
103
|
+
template<class T> inline bool operator==( scoped_array<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
|
104
|
+
{
|
105
|
+
return p.get() == 0;
|
106
|
+
}
|
107
|
+
|
108
|
+
template<class T> inline bool operator==( boost::detail::sp_nullptr_t, scoped_array<T> const & p ) BOOST_NOEXCEPT
|
109
|
+
{
|
110
|
+
return p.get() == 0;
|
111
|
+
}
|
112
|
+
|
113
|
+
template<class T> inline bool operator!=( scoped_array<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
|
114
|
+
{
|
115
|
+
return p.get() != 0;
|
116
|
+
}
|
117
|
+
|
118
|
+
template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, scoped_array<T> const & p ) BOOST_NOEXCEPT
|
119
|
+
{
|
120
|
+
return p.get() != 0;
|
121
|
+
}
|
122
|
+
|
123
|
+
#endif
|
124
|
+
|
125
|
+
template<class T> inline void swap(scoped_array<T> & a, scoped_array<T> & b) BOOST_NOEXCEPT
|
101
126
|
{
|
102
127
|
a.swap(b);
|
103
128
|
}
|
@@ -11,8 +11,10 @@
|
|
11
11
|
// http://www.boost.org/libs/smart_ptr/scoped_ptr.htm
|
12
12
|
//
|
13
13
|
|
14
|
+
#include <boost/config.hpp>
|
14
15
|
#include <boost/assert.hpp>
|
15
16
|
#include <boost/checked_delete.hpp>
|
17
|
+
#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
|
16
18
|
#include <boost/detail/workaround.hpp>
|
17
19
|
|
18
20
|
#ifndef BOOST_NO_AUTO_PTR
|
@@ -63,7 +65,7 @@ public:
|
|
63
65
|
|
64
66
|
#ifndef BOOST_NO_AUTO_PTR
|
65
67
|
|
66
|
-
explicit scoped_ptr( std::auto_ptr<T> p ): px( p.release() )
|
68
|
+
explicit scoped_ptr( std::auto_ptr<T> p ) BOOST_NOEXCEPT : px( p.release() )
|
67
69
|
{
|
68
70
|
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
69
71
|
boost::sp_scalar_constructor_hook( px );
|
@@ -98,7 +100,7 @@ public:
|
|
98
100
|
return px;
|
99
101
|
}
|
100
102
|
|
101
|
-
T * get() const
|
103
|
+
T * get() const BOOST_NOEXCEPT
|
102
104
|
{
|
103
105
|
return px;
|
104
106
|
}
|
@@ -106,7 +108,7 @@ public:
|
|
106
108
|
// implicit conversion to "bool"
|
107
109
|
#include <boost/smart_ptr/detail/operator_bool.hpp>
|
108
110
|
|
109
|
-
void swap(scoped_ptr & b)
|
111
|
+
void swap(scoped_ptr & b) BOOST_NOEXCEPT
|
110
112
|
{
|
111
113
|
T * tmp = b.px;
|
112
114
|
b.px = px;
|
@@ -114,14 +116,38 @@ public:
|
|
114
116
|
}
|
115
117
|
};
|
116
118
|
|
117
|
-
|
119
|
+
#if !defined( BOOST_NO_CXX11_NULLPTR )
|
120
|
+
|
121
|
+
template<class T> inline bool operator==( scoped_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
|
122
|
+
{
|
123
|
+
return p.get() == 0;
|
124
|
+
}
|
125
|
+
|
126
|
+
template<class T> inline bool operator==( boost::detail::sp_nullptr_t, scoped_ptr<T> const & p ) BOOST_NOEXCEPT
|
127
|
+
{
|
128
|
+
return p.get() == 0;
|
129
|
+
}
|
130
|
+
|
131
|
+
template<class T> inline bool operator!=( scoped_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
|
132
|
+
{
|
133
|
+
return p.get() != 0;
|
134
|
+
}
|
135
|
+
|
136
|
+
template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, scoped_ptr<T> const & p ) BOOST_NOEXCEPT
|
137
|
+
{
|
138
|
+
return p.get() != 0;
|
139
|
+
}
|
140
|
+
|
141
|
+
#endif
|
142
|
+
|
143
|
+
template<class T> inline void swap(scoped_ptr<T> & a, scoped_ptr<T> & b) BOOST_NOEXCEPT
|
118
144
|
{
|
119
145
|
a.swap(b);
|
120
146
|
}
|
121
147
|
|
122
148
|
// get_pointer(p) is a generic way to say p.get()
|
123
149
|
|
124
|
-
template<class T> inline T * get_pointer(scoped_ptr<T> const & p)
|
150
|
+
template<class T> inline T * get_pointer(scoped_ptr<T> const & p) BOOST_NOEXCEPT
|
125
151
|
{
|
126
152
|
return p.get();
|
127
153
|
}
|
@@ -5,7 +5,7 @@
|
|
5
5
|
// shared_array.hpp
|
6
6
|
//
|
7
7
|
// (C) Copyright Greg Colvin and Beman Dawes 1998, 1999.
|
8
|
-
// Copyright (c) 2001, 2002 Peter Dimov
|
8
|
+
// Copyright (c) 2001, 2002, 2012 Peter Dimov
|
9
9
|
//
|
10
10
|
// Distributed under the Boost Software License, Version 1.0. (See
|
11
11
|
// accompanying file LICENSE_1_0.txt or copy at
|
@@ -25,7 +25,9 @@
|
|
25
25
|
#include <boost/assert.hpp>
|
26
26
|
#include <boost/checked_delete.hpp>
|
27
27
|
|
28
|
+
#include <boost/smart_ptr/shared_ptr.hpp>
|
28
29
|
#include <boost/smart_ptr/detail/shared_count.hpp>
|
30
|
+
#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
|
29
31
|
#include <boost/detail/workaround.hpp>
|
30
32
|
|
31
33
|
#include <cstddef> // for std::ptrdiff_t
|
@@ -55,59 +57,146 @@ public:
|
|
55
57
|
|
56
58
|
typedef T element_type;
|
57
59
|
|
58
|
-
|
60
|
+
shared_array() BOOST_NOEXCEPT : px( 0 ), pn()
|
59
61
|
{
|
60
62
|
}
|
61
63
|
|
64
|
+
template<class Y>
|
65
|
+
explicit shared_array( Y * p ): px( p ), pn( p, checked_array_deleter<Y>() )
|
66
|
+
{
|
67
|
+
boost::detail::sp_assert_convertible< Y[], T[] >();
|
68
|
+
}
|
69
|
+
|
62
70
|
//
|
63
71
|
// Requirements: D's copy constructor must not throw
|
64
72
|
//
|
65
73
|
// shared_array will release p by calling d(p)
|
66
74
|
//
|
67
75
|
|
68
|
-
template<class D> shared_array(
|
76
|
+
template<class Y, class D> shared_array( Y * p, D d ): px( p ), pn( p, d )
|
69
77
|
{
|
78
|
+
boost::detail::sp_assert_convertible< Y[], T[] >();
|
79
|
+
}
|
80
|
+
|
81
|
+
// As above, but with allocator. A's copy constructor shall not throw.
|
82
|
+
|
83
|
+
template<class Y, class D, class A> shared_array( Y * p, D d, A a ): px( p ), pn( p, d, a )
|
84
|
+
{
|
85
|
+
boost::detail::sp_assert_convertible< Y[], T[] >();
|
70
86
|
}
|
71
87
|
|
72
88
|
// generated copy constructor, destructor are fine...
|
73
89
|
|
74
|
-
#if defined(
|
90
|
+
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
75
91
|
|
76
92
|
// ... except in C++0x, move disables the implicit copy
|
77
93
|
|
78
|
-
shared_array( shared_array const & r ): px( r.px ), pn( r.pn )
|
94
|
+
shared_array( shared_array const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn )
|
79
95
|
{
|
80
96
|
}
|
81
97
|
|
98
|
+
shared_array( shared_array && r ) BOOST_NOEXCEPT : px( r.px ), pn()
|
99
|
+
{
|
100
|
+
pn.swap( r.pn );
|
101
|
+
r.px = 0;
|
102
|
+
}
|
103
|
+
|
104
|
+
#endif
|
105
|
+
|
106
|
+
// conversion
|
107
|
+
|
108
|
+
template<class Y>
|
109
|
+
#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
|
110
|
+
|
111
|
+
shared_array( shared_array<Y> const & r, typename boost::detail::sp_enable_if_convertible< Y[], T[] >::type = boost::detail::sp_empty() )
|
112
|
+
|
113
|
+
#else
|
114
|
+
|
115
|
+
shared_array( shared_array<Y> const & r )
|
116
|
+
|
82
117
|
#endif
|
118
|
+
BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) // never throws
|
119
|
+
{
|
120
|
+
boost::detail::sp_assert_convertible< Y[], T[] >();
|
121
|
+
}
|
122
|
+
|
123
|
+
// aliasing
|
124
|
+
|
125
|
+
template< class Y >
|
126
|
+
shared_array( shared_array<Y> const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn )
|
127
|
+
{
|
128
|
+
}
|
83
129
|
|
84
130
|
// assignment
|
85
131
|
|
86
|
-
shared_array & operator=( shared_array const & r )
|
132
|
+
shared_array & operator=( shared_array const & r ) BOOST_NOEXCEPT
|
87
133
|
{
|
88
134
|
this_type( r ).swap( *this );
|
89
135
|
return *this;
|
90
136
|
}
|
91
137
|
|
92
|
-
|
138
|
+
#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400)
|
139
|
+
|
140
|
+
template<class Y>
|
141
|
+
shared_array & operator=( shared_array<Y> const & r ) BOOST_NOEXCEPT
|
142
|
+
{
|
143
|
+
this_type( r ).swap( *this );
|
144
|
+
return *this;
|
145
|
+
}
|
146
|
+
|
147
|
+
#endif
|
148
|
+
|
149
|
+
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
150
|
+
|
151
|
+
shared_array & operator=( shared_array && r ) BOOST_NOEXCEPT
|
152
|
+
{
|
153
|
+
this_type( static_cast< shared_array && >( r ) ).swap( *this );
|
154
|
+
return *this;
|
155
|
+
}
|
156
|
+
|
157
|
+
template<class Y>
|
158
|
+
shared_array & operator=( shared_array<Y> && r ) BOOST_NOEXCEPT
|
159
|
+
{
|
160
|
+
this_type( static_cast< shared_array<Y> && >( r ) ).swap( *this );
|
161
|
+
return *this;
|
162
|
+
}
|
163
|
+
|
164
|
+
#endif
|
165
|
+
|
166
|
+
void reset() BOOST_NOEXCEPT
|
167
|
+
{
|
168
|
+
this_type().swap( *this );
|
169
|
+
}
|
170
|
+
|
171
|
+
template<class Y> void reset( Y * p ) // Y must be complete
|
172
|
+
{
|
173
|
+
BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors
|
174
|
+
this_type( p ).swap( *this );
|
175
|
+
}
|
176
|
+
|
177
|
+
template<class Y, class D> void reset( Y * p, D d )
|
178
|
+
{
|
179
|
+
this_type( p, d ).swap( *this );
|
180
|
+
}
|
181
|
+
|
182
|
+
template<class Y, class D, class A> void reset( Y * p, D d, A a )
|
93
183
|
{
|
94
|
-
|
95
|
-
this_type(p).swap(*this);
|
184
|
+
this_type( p, d, a ).swap( *this );
|
96
185
|
}
|
97
186
|
|
98
|
-
template
|
187
|
+
template<class Y> void reset( shared_array<Y> const & r, element_type * p )
|
99
188
|
{
|
100
|
-
this_type(
|
189
|
+
this_type( r, p ).swap( *this );
|
101
190
|
}
|
102
191
|
|
103
|
-
T & operator[] (std::ptrdiff_t i) const // never throws
|
192
|
+
T & operator[] (std::ptrdiff_t i) const // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
|
104
193
|
{
|
105
194
|
BOOST_ASSERT(px != 0);
|
106
195
|
BOOST_ASSERT(i >= 0);
|
107
196
|
return px[i];
|
108
197
|
}
|
109
198
|
|
110
|
-
T * get() const
|
199
|
+
T * get() const BOOST_NOEXCEPT
|
111
200
|
{
|
112
201
|
return px;
|
113
202
|
}
|
@@ -115,17 +204,17 @@ public:
|
|
115
204
|
// implicit conversion to "bool"
|
116
205
|
#include <boost/smart_ptr/detail/operator_bool.hpp>
|
117
206
|
|
118
|
-
bool unique() const
|
207
|
+
bool unique() const BOOST_NOEXCEPT
|
119
208
|
{
|
120
209
|
return pn.unique();
|
121
210
|
}
|
122
211
|
|
123
|
-
long use_count() const
|
212
|
+
long use_count() const BOOST_NOEXCEPT
|
124
213
|
{
|
125
214
|
return pn.use_count();
|
126
215
|
}
|
127
216
|
|
128
|
-
void swap(shared_array<T> & other)
|
217
|
+
void swap(shared_array<T> & other) BOOST_NOEXCEPT
|
129
218
|
{
|
130
219
|
std::swap(px, other.px);
|
131
220
|
pn.swap(other.pn);
|
@@ -138,27 +227,53 @@ public:
|
|
138
227
|
|
139
228
|
private:
|
140
229
|
|
230
|
+
template<class Y> friend class shared_array;
|
231
|
+
|
141
232
|
T * px; // contained pointer
|
142
233
|
detail::shared_count pn; // reference counter
|
143
234
|
|
144
235
|
}; // shared_array
|
145
236
|
|
146
|
-
template<class T> inline bool operator==(shared_array<T> const & a, shared_array<T> const & b)
|
237
|
+
template<class T> inline bool operator==(shared_array<T> const & a, shared_array<T> const & b) BOOST_NOEXCEPT
|
147
238
|
{
|
148
239
|
return a.get() == b.get();
|
149
240
|
}
|
150
241
|
|
151
|
-
template<class T> inline bool operator!=(shared_array<T> const & a, shared_array<T> const & b)
|
242
|
+
template<class T> inline bool operator!=(shared_array<T> const & a, shared_array<T> const & b) BOOST_NOEXCEPT
|
152
243
|
{
|
153
244
|
return a.get() != b.get();
|
154
245
|
}
|
155
246
|
|
156
|
-
|
247
|
+
#if !defined( BOOST_NO_CXX11_NULLPTR )
|
248
|
+
|
249
|
+
template<class T> inline bool operator==( shared_array<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
|
250
|
+
{
|
251
|
+
return p.get() == 0;
|
252
|
+
}
|
253
|
+
|
254
|
+
template<class T> inline bool operator==( boost::detail::sp_nullptr_t, shared_array<T> const & p ) BOOST_NOEXCEPT
|
255
|
+
{
|
256
|
+
return p.get() == 0;
|
257
|
+
}
|
258
|
+
|
259
|
+
template<class T> inline bool operator!=( shared_array<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
|
260
|
+
{
|
261
|
+
return p.get() != 0;
|
262
|
+
}
|
263
|
+
|
264
|
+
template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, shared_array<T> const & p ) BOOST_NOEXCEPT
|
265
|
+
{
|
266
|
+
return p.get() != 0;
|
267
|
+
}
|
268
|
+
|
269
|
+
#endif
|
270
|
+
|
271
|
+
template<class T> inline bool operator<(shared_array<T> const & a, shared_array<T> const & b) BOOST_NOEXCEPT
|
157
272
|
{
|
158
273
|
return std::less<T*>()(a.get(), b.get());
|
159
274
|
}
|
160
275
|
|
161
|
-
template<class T> void swap(shared_array<T> & a, shared_array<T> & b)
|
276
|
+
template<class T> void swap(shared_array<T> & a, shared_array<T> & b) BOOST_NOEXCEPT
|
162
277
|
{
|
163
278
|
a.swap(b);
|
164
279
|
}
|
@@ -32,6 +32,7 @@
|
|
32
32
|
#include <boost/smart_ptr/detail/shared_count.hpp>
|
33
33
|
#include <boost/detail/workaround.hpp>
|
34
34
|
#include <boost/smart_ptr/detail/sp_convertible.hpp>
|
35
|
+
#include <boost/smart_ptr/detail/sp_nullptr_t.hpp>
|
35
36
|
|
36
37
|
#if !defined(BOOST_SP_NO_ATOMIC_ACCESS)
|
37
38
|
#include <boost/smart_ptr/detail/spinlock_pool.hpp>
|
@@ -57,45 +58,151 @@ namespace boost
|
|
57
58
|
template<class T> class shared_ptr;
|
58
59
|
template<class T> class weak_ptr;
|
59
60
|
template<class T> class enable_shared_from_this;
|
60
|
-
|
61
|
+
class enable_shared_from_raw;
|
61
62
|
|
62
63
|
namespace detail
|
63
64
|
{
|
64
65
|
|
65
|
-
|
66
|
-
struct const_cast_tag {};
|
67
|
-
struct dynamic_cast_tag {};
|
68
|
-
struct polymorphic_cast_tag {};
|
66
|
+
// sp_element, element_type
|
69
67
|
|
70
|
-
template<class T> struct
|
68
|
+
template< class T > struct sp_element
|
71
69
|
{
|
72
|
-
typedef T
|
70
|
+
typedef T type;
|
73
71
|
};
|
74
72
|
|
75
|
-
|
73
|
+
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
74
|
+
|
75
|
+
template< class T > struct sp_element< T[] >
|
76
|
+
{
|
77
|
+
typedef T type;
|
78
|
+
};
|
79
|
+
|
80
|
+
#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 )
|
81
|
+
|
82
|
+
template< class T, std::size_t N > struct sp_element< T[N] >
|
83
|
+
{
|
84
|
+
typedef T type;
|
85
|
+
};
|
86
|
+
|
87
|
+
#endif
|
88
|
+
|
89
|
+
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
90
|
+
|
91
|
+
// sp_dereference, return type of operator*
|
92
|
+
|
93
|
+
template< class T > struct sp_dereference
|
94
|
+
{
|
95
|
+
typedef T & type;
|
96
|
+
};
|
97
|
+
|
98
|
+
template<> struct sp_dereference< void >
|
76
99
|
{
|
77
|
-
typedef void
|
100
|
+
typedef void type;
|
78
101
|
};
|
79
102
|
|
80
103
|
#if !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
|
81
104
|
|
82
|
-
template<> struct
|
105
|
+
template<> struct sp_dereference< void const >
|
106
|
+
{
|
107
|
+
typedef void type;
|
108
|
+
};
|
109
|
+
|
110
|
+
template<> struct sp_dereference< void volatile >
|
111
|
+
{
|
112
|
+
typedef void type;
|
113
|
+
};
|
114
|
+
|
115
|
+
template<> struct sp_dereference< void const volatile >
|
116
|
+
{
|
117
|
+
typedef void type;
|
118
|
+
};
|
119
|
+
|
120
|
+
#endif // !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
|
121
|
+
|
122
|
+
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
123
|
+
|
124
|
+
template< class T > struct sp_dereference< T[] >
|
125
|
+
{
|
126
|
+
typedef void type;
|
127
|
+
};
|
128
|
+
|
129
|
+
#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 )
|
130
|
+
|
131
|
+
template< class T, std::size_t N > struct sp_dereference< T[N] >
|
83
132
|
{
|
84
|
-
typedef void
|
133
|
+
typedef void type;
|
85
134
|
};
|
86
135
|
|
87
|
-
|
136
|
+
#endif
|
137
|
+
|
138
|
+
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
139
|
+
|
140
|
+
// sp_member_access, return type of operator->
|
141
|
+
|
142
|
+
template< class T > struct sp_member_access
|
143
|
+
{
|
144
|
+
typedef T * type;
|
145
|
+
};
|
146
|
+
|
147
|
+
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
148
|
+
|
149
|
+
template< class T > struct sp_member_access< T[] >
|
150
|
+
{
|
151
|
+
typedef void type;
|
152
|
+
};
|
153
|
+
|
154
|
+
#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 )
|
155
|
+
|
156
|
+
template< class T, std::size_t N > struct sp_member_access< T[N] >
|
157
|
+
{
|
158
|
+
typedef void type;
|
159
|
+
};
|
160
|
+
|
161
|
+
#endif
|
162
|
+
|
163
|
+
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
164
|
+
|
165
|
+
// sp_array_access, return type of operator[]
|
166
|
+
|
167
|
+
template< class T > struct sp_array_access
|
88
168
|
{
|
89
|
-
typedef void
|
169
|
+
typedef void type;
|
90
170
|
};
|
91
171
|
|
92
|
-
|
172
|
+
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
173
|
+
|
174
|
+
template< class T > struct sp_array_access< T[] >
|
93
175
|
{
|
94
|
-
typedef
|
176
|
+
typedef T & type;
|
177
|
+
};
|
178
|
+
|
179
|
+
#if !defined( __BORLANDC__ ) || !BOOST_WORKAROUND( __BORLANDC__, < 0x600 )
|
180
|
+
|
181
|
+
template< class T, std::size_t N > struct sp_array_access< T[N] >
|
182
|
+
{
|
183
|
+
typedef T & type;
|
95
184
|
};
|
96
185
|
|
97
186
|
#endif
|
98
187
|
|
188
|
+
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
189
|
+
|
190
|
+
// sp_extent, for operator[] index check
|
191
|
+
|
192
|
+
template< class T > struct sp_extent
|
193
|
+
{
|
194
|
+
enum _vt { value = 0 };
|
195
|
+
};
|
196
|
+
|
197
|
+
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
198
|
+
|
199
|
+
template< class T, std::size_t N > struct sp_extent< T[N] >
|
200
|
+
{
|
201
|
+
enum _vt { value = N };
|
202
|
+
};
|
203
|
+
|
204
|
+
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
205
|
+
|
99
206
|
// enable_shared_from_this support
|
100
207
|
|
101
208
|
template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr<X> const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe )
|
@@ -106,13 +213,7 @@ template< class X, class Y, class T > inline void sp_enable_shared_from_this( bo
|
|
106
213
|
}
|
107
214
|
}
|
108
215
|
|
109
|
-
template< class X, class Y
|
110
|
-
{
|
111
|
-
if( pe != 0 )
|
112
|
-
{
|
113
|
-
pe->_internal_accept_owner( ppx, const_cast< Y* >( py ) );
|
114
|
-
}
|
115
|
-
}
|
216
|
+
template< class X, class Y > inline void sp_enable_shared_from_this( boost::shared_ptr<X> * ppx, Y const * py, boost::enable_shared_from_raw const * pe );
|
116
217
|
|
117
218
|
#ifdef _MANAGED
|
118
219
|
|
@@ -150,6 +251,69 @@ template< class T, class R > struct sp_enable_if_auto_ptr< std::auto_ptr< T >, R
|
|
150
251
|
|
151
252
|
#endif
|
152
253
|
|
254
|
+
// sp_assert_convertible
|
255
|
+
|
256
|
+
template< class Y, class T > inline void sp_assert_convertible()
|
257
|
+
{
|
258
|
+
#if !defined( BOOST_SP_NO_SP_CONVERTIBLE )
|
259
|
+
|
260
|
+
// static_assert( sp_convertible< Y, T >::value );
|
261
|
+
typedef char tmp[ sp_convertible< Y, T >::value? 1: -1 ];
|
262
|
+
(void)sizeof( tmp );
|
263
|
+
|
264
|
+
#else
|
265
|
+
|
266
|
+
T* p = static_cast< Y* >( 0 );
|
267
|
+
(void)p;
|
268
|
+
|
269
|
+
#endif
|
270
|
+
}
|
271
|
+
|
272
|
+
// pointer constructor helper
|
273
|
+
|
274
|
+
template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T > * ppx, Y * p, boost::detail::shared_count & pn )
|
275
|
+
{
|
276
|
+
boost::detail::shared_count( p ).swap( pn );
|
277
|
+
boost::detail::sp_enable_shared_from_this( ppx, p, p );
|
278
|
+
}
|
279
|
+
|
280
|
+
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
281
|
+
|
282
|
+
template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * p, boost::detail::shared_count & pn )
|
283
|
+
{
|
284
|
+
sp_assert_convertible< Y[], T[] >();
|
285
|
+
boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn );
|
286
|
+
}
|
287
|
+
|
288
|
+
template< class T, std::size_t N, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * p, boost::detail::shared_count & pn )
|
289
|
+
{
|
290
|
+
sp_assert_convertible< Y[N], T[N] >();
|
291
|
+
boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn );
|
292
|
+
}
|
293
|
+
|
294
|
+
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
295
|
+
|
296
|
+
// deleter constructor helper
|
297
|
+
|
298
|
+
template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T > * ppx, Y * p )
|
299
|
+
{
|
300
|
+
boost::detail::sp_enable_shared_from_this( ppx, p, p );
|
301
|
+
}
|
302
|
+
|
303
|
+
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
304
|
+
|
305
|
+
template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * /*p*/ )
|
306
|
+
{
|
307
|
+
sp_assert_convertible< Y[], T[] >();
|
308
|
+
}
|
309
|
+
|
310
|
+
template< class T, std::size_t N, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[N] > * /*ppx*/, Y * /*p*/ )
|
311
|
+
{
|
312
|
+
sp_assert_convertible< Y[N], T[N] >();
|
313
|
+
}
|
314
|
+
|
315
|
+
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
316
|
+
|
153
317
|
} // namespace detail
|
154
318
|
|
155
319
|
|
@@ -170,19 +334,24 @@ private:
|
|
170
334
|
|
171
335
|
public:
|
172
336
|
|
173
|
-
typedef T element_type;
|
174
|
-
typedef T value_type;
|
175
|
-
typedef T * pointer;
|
176
|
-
typedef typename boost::detail::shared_ptr_traits<T>::reference reference;
|
337
|
+
typedef typename boost::detail::sp_element< T >::type element_type;
|
177
338
|
|
178
|
-
shared_ptr(): px(0), pn() // never throws in 1.30+
|
339
|
+
shared_ptr() BOOST_NOEXCEPT : px( 0 ), pn() // never throws in 1.30+
|
179
340
|
{
|
180
341
|
}
|
181
342
|
|
343
|
+
#if !defined( BOOST_NO_CXX11_NULLPTR )
|
344
|
+
|
345
|
+
shared_ptr( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT : px( 0 ), pn() // never throws
|
346
|
+
{
|
347
|
+
}
|
348
|
+
|
349
|
+
#endif
|
350
|
+
|
182
351
|
template<class Y>
|
183
|
-
explicit shared_ptr( Y * p ): px( p ), pn(
|
352
|
+
explicit shared_ptr( Y * p ): px( p ), pn() // Y must be complete
|
184
353
|
{
|
185
|
-
boost::detail::
|
354
|
+
boost::detail::sp_pointer_construct( this, p, pn );
|
186
355
|
}
|
187
356
|
|
188
357
|
//
|
@@ -191,39 +360,58 @@ public:
|
|
191
360
|
// shared_ptr will release p by calling d(p)
|
192
361
|
//
|
193
362
|
|
194
|
-
template<class Y, class D> shared_ptr(Y * p, D d): px(p), pn(p, d)
|
363
|
+
template<class Y, class D> shared_ptr( Y * p, D d ): px( p ), pn( p, d )
|
195
364
|
{
|
196
|
-
boost::detail::
|
365
|
+
boost::detail::sp_deleter_construct( this, p );
|
197
366
|
}
|
198
367
|
|
368
|
+
#if !defined( BOOST_NO_CXX11_NULLPTR )
|
369
|
+
|
370
|
+
template<class D> shared_ptr( boost::detail::sp_nullptr_t p, D d ): px( p ), pn( p, d )
|
371
|
+
{
|
372
|
+
}
|
373
|
+
|
374
|
+
#endif
|
375
|
+
|
199
376
|
// As above, but with allocator. A's copy constructor shall not throw.
|
200
377
|
|
201
378
|
template<class Y, class D, class A> shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a )
|
202
379
|
{
|
203
|
-
boost::detail::
|
380
|
+
boost::detail::sp_deleter_construct( this, p );
|
204
381
|
}
|
205
382
|
|
383
|
+
#if !defined( BOOST_NO_CXX11_NULLPTR )
|
384
|
+
|
385
|
+
template<class D, class A> shared_ptr( boost::detail::sp_nullptr_t p, D d, A a ): px( p ), pn( p, d, a )
|
386
|
+
{
|
387
|
+
}
|
388
|
+
|
389
|
+
#endif
|
390
|
+
|
206
391
|
// generated copy constructor, destructor are fine...
|
207
392
|
|
208
|
-
#if defined(
|
393
|
+
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
209
394
|
|
210
395
|
// ... except in C++0x, move disables the implicit copy
|
211
396
|
|
212
|
-
shared_ptr( shared_ptr const & r ): px( r.px ), pn( r.pn )
|
397
|
+
shared_ptr( shared_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn )
|
213
398
|
{
|
214
399
|
}
|
215
400
|
|
216
401
|
#endif
|
217
402
|
|
218
403
|
template<class Y>
|
219
|
-
explicit shared_ptr(weak_ptr<Y> const & r): pn(r.pn) // may throw
|
404
|
+
explicit shared_ptr( weak_ptr<Y> const & r ): pn( r.pn ) // may throw
|
220
405
|
{
|
406
|
+
boost::detail::sp_assert_convertible< Y, T >();
|
407
|
+
|
221
408
|
// it is now safe to copy r.px, as pn(r.pn) did not throw
|
222
409
|
px = r.px;
|
223
410
|
}
|
224
411
|
|
225
412
|
template<class Y>
|
226
|
-
shared_ptr( weak_ptr<Y> const & r, boost::detail::sp_nothrow_tag )
|
413
|
+
shared_ptr( weak_ptr<Y> const & r, boost::detail::sp_nothrow_tag )
|
414
|
+
BOOST_NOEXCEPT : px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() )
|
227
415
|
{
|
228
416
|
if( !pn.empty() )
|
229
417
|
{
|
@@ -241,72 +429,80 @@ public:
|
|
241
429
|
shared_ptr( shared_ptr<Y> const & r )
|
242
430
|
|
243
431
|
#endif
|
244
|
-
: px( r.px ), pn( r.pn )
|
432
|
+
BOOST_NOEXCEPT : px( r.px ), pn( r.pn )
|
245
433
|
{
|
434
|
+
boost::detail::sp_assert_convertible< Y, T >();
|
246
435
|
}
|
247
436
|
|
248
437
|
// aliasing
|
249
438
|
template< class Y >
|
250
|
-
shared_ptr( shared_ptr<Y> const & r,
|
439
|
+
shared_ptr( shared_ptr<Y> const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn )
|
251
440
|
{
|
252
441
|
}
|
253
442
|
|
254
|
-
|
255
|
-
shared_ptr(shared_ptr<Y> const & r, boost::detail::static_cast_tag): px(static_cast<element_type *>(r.px)), pn(r.pn)
|
256
|
-
{
|
257
|
-
}
|
443
|
+
#ifndef BOOST_NO_AUTO_PTR
|
258
444
|
|
259
445
|
template<class Y>
|
260
|
-
shared_ptr(
|
446
|
+
explicit shared_ptr( std::auto_ptr<Y> & r ): px(r.get()), pn()
|
261
447
|
{
|
262
|
-
|
448
|
+
boost::detail::sp_assert_convertible< Y, T >();
|
263
449
|
|
264
|
-
|
265
|
-
|
266
|
-
{
|
267
|
-
if(px == 0) // need to allocate new counter -- the cast failed
|
268
|
-
{
|
269
|
-
pn = boost::detail::shared_count();
|
270
|
-
}
|
271
|
-
}
|
450
|
+
Y * tmp = r.get();
|
451
|
+
pn = boost::detail::shared_count( r );
|
272
452
|
|
273
|
-
|
274
|
-
shared_ptr(shared_ptr<Y> const & r, boost::detail::polymorphic_cast_tag): px(dynamic_cast<element_type *>(r.px)), pn(r.pn)
|
275
|
-
{
|
276
|
-
if(px == 0)
|
277
|
-
{
|
278
|
-
boost::throw_exception(std::bad_cast());
|
279
|
-
}
|
453
|
+
boost::detail::sp_deleter_construct( this, tmp );
|
280
454
|
}
|
281
455
|
|
282
|
-
#
|
456
|
+
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
283
457
|
|
284
458
|
template<class Y>
|
285
|
-
|
459
|
+
shared_ptr( std::auto_ptr<Y> && r ): px(r.get()), pn()
|
286
460
|
{
|
461
|
+
boost::detail::sp_assert_convertible< Y, T >();
|
462
|
+
|
287
463
|
Y * tmp = r.get();
|
288
|
-
pn = boost::detail::shared_count(r);
|
289
|
-
|
464
|
+
pn = boost::detail::shared_count( r );
|
465
|
+
|
466
|
+
boost::detail::sp_deleter_construct( this, tmp );
|
290
467
|
}
|
291
468
|
|
292
|
-
#
|
469
|
+
#elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
293
470
|
|
294
471
|
template<class Ap>
|
295
472
|
explicit shared_ptr( Ap r, typename boost::detail::sp_enable_if_auto_ptr<Ap, int>::type = 0 ): px( r.get() ), pn()
|
296
473
|
{
|
297
|
-
typename Ap::element_type
|
474
|
+
typedef typename Ap::element_type Y;
|
475
|
+
|
476
|
+
boost::detail::sp_assert_convertible< Y, T >();
|
477
|
+
|
478
|
+
Y * tmp = r.get();
|
298
479
|
pn = boost::detail::shared_count( r );
|
299
|
-
boost::detail::sp_enable_shared_from_this( this, tmp, tmp );
|
300
|
-
}
|
301
480
|
|
481
|
+
boost::detail::sp_deleter_construct( this, tmp );
|
482
|
+
}
|
302
483
|
|
303
484
|
#endif // BOOST_NO_SFINAE, BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
304
485
|
|
305
486
|
#endif // BOOST_NO_AUTO_PTR
|
306
487
|
|
488
|
+
#if !defined( BOOST_NO_CXX11_SMART_PTR ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
489
|
+
|
490
|
+
template< class Y, class D >
|
491
|
+
shared_ptr( std::unique_ptr< Y, D > && r ): px( r.get() ), pn()
|
492
|
+
{
|
493
|
+
boost::detail::sp_assert_convertible< Y, T >();
|
494
|
+
|
495
|
+
typename std::unique_ptr< Y, D >::pointer tmp = r.get();
|
496
|
+
pn = boost::detail::shared_count( r );
|
497
|
+
|
498
|
+
boost::detail::sp_deleter_construct( this, tmp );
|
499
|
+
}
|
500
|
+
|
501
|
+
#endif
|
502
|
+
|
307
503
|
// assignment
|
308
504
|
|
309
|
-
shared_ptr & operator=( shared_ptr const & r )
|
505
|
+
shared_ptr & operator=( shared_ptr const & r ) BOOST_NOEXCEPT
|
310
506
|
{
|
311
507
|
this_type(r).swap(*this);
|
312
508
|
return *this;
|
@@ -315,7 +511,7 @@ public:
|
|
315
511
|
#if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400)
|
316
512
|
|
317
513
|
template<class Y>
|
318
|
-
shared_ptr & operator=(shared_ptr<Y> const & r)
|
514
|
+
shared_ptr & operator=(shared_ptr<Y> const & r) BOOST_NOEXCEPT
|
319
515
|
{
|
320
516
|
this_type(r).swap(*this);
|
321
517
|
return *this;
|
@@ -328,11 +524,20 @@ public:
|
|
328
524
|
template<class Y>
|
329
525
|
shared_ptr & operator=( std::auto_ptr<Y> & r )
|
330
526
|
{
|
331
|
-
this_type(r).swap(*this);
|
527
|
+
this_type( r ).swap( *this );
|
528
|
+
return *this;
|
529
|
+
}
|
530
|
+
|
531
|
+
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
532
|
+
|
533
|
+
template<class Y>
|
534
|
+
shared_ptr & operator=( std::auto_ptr<Y> && r )
|
535
|
+
{
|
536
|
+
this_type( static_cast< std::auto_ptr<Y> && >( r ) ).swap( *this );
|
332
537
|
return *this;
|
333
538
|
}
|
334
539
|
|
335
|
-
#
|
540
|
+
#elif !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
336
541
|
|
337
542
|
template<class Ap>
|
338
543
|
typename boost::detail::sp_enable_if_auto_ptr< Ap, shared_ptr & >::type operator=( Ap r )
|
@@ -341,16 +546,26 @@ public:
|
|
341
546
|
return *this;
|
342
547
|
}
|
343
548
|
|
344
|
-
|
345
549
|
#endif // BOOST_NO_SFINAE, BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
346
550
|
|
347
551
|
#endif // BOOST_NO_AUTO_PTR
|
348
552
|
|
553
|
+
#if !defined( BOOST_NO_CXX11_SMART_PTR ) && !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
554
|
+
|
555
|
+
template<class Y, class D>
|
556
|
+
shared_ptr & operator=( std::unique_ptr<Y, D> && r )
|
557
|
+
{
|
558
|
+
this_type( static_cast< std::unique_ptr<Y, D> && >( r ) ).swap(*this);
|
559
|
+
return *this;
|
560
|
+
}
|
561
|
+
|
562
|
+
#endif
|
563
|
+
|
349
564
|
// Move support
|
350
565
|
|
351
|
-
#if defined(
|
566
|
+
#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
|
352
567
|
|
353
|
-
shared_ptr( shared_ptr && r ): px( r.px ), pn()
|
568
|
+
shared_ptr( shared_ptr && r ) BOOST_NOEXCEPT : px( r.px ), pn()
|
354
569
|
{
|
355
570
|
pn.swap( r.pn );
|
356
571
|
r.px = 0;
|
@@ -366,20 +581,22 @@ public:
|
|
366
581
|
shared_ptr( shared_ptr<Y> && r )
|
367
582
|
|
368
583
|
#endif
|
369
|
-
: px( r.px ), pn()
|
584
|
+
BOOST_NOEXCEPT : px( r.px ), pn()
|
370
585
|
{
|
586
|
+
boost::detail::sp_assert_convertible< Y, T >();
|
587
|
+
|
371
588
|
pn.swap( r.pn );
|
372
589
|
r.px = 0;
|
373
590
|
}
|
374
591
|
|
375
|
-
shared_ptr & operator=( shared_ptr && r )
|
592
|
+
shared_ptr & operator=( shared_ptr && r ) BOOST_NOEXCEPT
|
376
593
|
{
|
377
594
|
this_type( static_cast< shared_ptr && >( r ) ).swap( *this );
|
378
595
|
return *this;
|
379
596
|
}
|
380
597
|
|
381
598
|
template<class Y>
|
382
|
-
shared_ptr & operator=( shared_ptr<Y> && r )
|
599
|
+
shared_ptr & operator=( shared_ptr<Y> && r ) BOOST_NOEXCEPT
|
383
600
|
{
|
384
601
|
this_type( static_cast< shared_ptr<Y> && >( r ) ).swap( *this );
|
385
602
|
return *this;
|
@@ -387,15 +604,25 @@ public:
|
|
387
604
|
|
388
605
|
#endif
|
389
606
|
|
390
|
-
|
607
|
+
#if !defined( BOOST_NO_CXX11_NULLPTR )
|
608
|
+
|
609
|
+
shared_ptr & operator=( boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT // never throws
|
391
610
|
{
|
392
611
|
this_type().swap(*this);
|
612
|
+
return *this;
|
393
613
|
}
|
394
614
|
|
395
|
-
|
615
|
+
#endif
|
616
|
+
|
617
|
+
void reset() BOOST_NOEXCEPT // never throws in 1.30+
|
396
618
|
{
|
397
|
-
|
398
|
-
|
619
|
+
this_type().swap(*this);
|
620
|
+
}
|
621
|
+
|
622
|
+
template<class Y> void reset( Y * p ) // Y must be complete
|
623
|
+
{
|
624
|
+
BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors
|
625
|
+
this_type( p ).swap( *this );
|
399
626
|
}
|
400
627
|
|
401
628
|
template<class Y, class D> void reset( Y * p, D d )
|
@@ -408,24 +635,35 @@ public:
|
|
408
635
|
this_type( p, d, a ).swap( *this );
|
409
636
|
}
|
410
637
|
|
411
|
-
template<class Y> void reset( shared_ptr<Y> const & r,
|
638
|
+
template<class Y> void reset( shared_ptr<Y> const & r, element_type * p )
|
412
639
|
{
|
413
640
|
this_type( r, p ).swap( *this );
|
414
641
|
}
|
415
|
-
|
416
|
-
|
642
|
+
|
643
|
+
// never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
|
644
|
+
typename boost::detail::sp_dereference< T >::type operator* () const
|
417
645
|
{
|
418
|
-
BOOST_ASSERT(px != 0);
|
646
|
+
BOOST_ASSERT( px != 0 );
|
419
647
|
return *px;
|
420
648
|
}
|
421
|
-
|
422
|
-
|
649
|
+
|
650
|
+
// never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
|
651
|
+
typename boost::detail::sp_member_access< T >::type operator-> () const
|
423
652
|
{
|
424
|
-
BOOST_ASSERT(px != 0);
|
653
|
+
BOOST_ASSERT( px != 0 );
|
425
654
|
return px;
|
426
655
|
}
|
656
|
+
|
657
|
+
// never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT)
|
658
|
+
typename boost::detail::sp_array_access< T >::type operator[] ( std::ptrdiff_t i ) const
|
659
|
+
{
|
660
|
+
BOOST_ASSERT( px != 0 );
|
661
|
+
BOOST_ASSERT( i >= 0 && ( i < boost::detail::sp_extent< T >::value || boost::detail::sp_extent< T >::value == 0 ) );
|
662
|
+
|
663
|
+
return px[ i ];
|
664
|
+
}
|
427
665
|
|
428
|
-
|
666
|
+
element_type * get() const BOOST_NOEXCEPT
|
429
667
|
{
|
430
668
|
return px;
|
431
669
|
}
|
@@ -433,38 +671,43 @@ public:
|
|
433
671
|
// implicit conversion to "bool"
|
434
672
|
#include <boost/smart_ptr/detail/operator_bool.hpp>
|
435
673
|
|
436
|
-
bool unique() const
|
674
|
+
bool unique() const BOOST_NOEXCEPT
|
437
675
|
{
|
438
676
|
return pn.unique();
|
439
677
|
}
|
440
678
|
|
441
|
-
long use_count() const
|
679
|
+
long use_count() const BOOST_NOEXCEPT
|
442
680
|
{
|
443
681
|
return pn.use_count();
|
444
682
|
}
|
445
683
|
|
446
|
-
void swap(shared_ptr
|
684
|
+
void swap( shared_ptr & other ) BOOST_NOEXCEPT
|
447
685
|
{
|
448
686
|
std::swap(px, other.px);
|
449
687
|
pn.swap(other.pn);
|
450
688
|
}
|
451
689
|
|
452
|
-
template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const
|
690
|
+
template<class Y> bool owner_before( shared_ptr<Y> const & rhs ) const BOOST_NOEXCEPT
|
453
691
|
{
|
454
692
|
return pn < rhs.pn;
|
455
693
|
}
|
456
694
|
|
457
|
-
template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const
|
695
|
+
template<class Y> bool owner_before( weak_ptr<Y> const & rhs ) const BOOST_NOEXCEPT
|
458
696
|
{
|
459
697
|
return pn < rhs.pn;
|
460
698
|
}
|
461
699
|
|
462
|
-
void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const
|
700
|
+
void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const BOOST_NOEXCEPT
|
463
701
|
{
|
464
702
|
return pn.get_deleter( ti );
|
465
703
|
}
|
466
704
|
|
467
|
-
|
705
|
+
void * _internal_get_untyped_deleter() const BOOST_NOEXCEPT
|
706
|
+
{
|
707
|
+
return pn.get_untyped_deleter();
|
708
|
+
}
|
709
|
+
|
710
|
+
bool _internal_equiv( shared_ptr const & r ) const BOOST_NOEXCEPT
|
468
711
|
{
|
469
712
|
return px == r.px && pn == r.pn;
|
470
713
|
}
|
@@ -482,17 +725,17 @@ private:
|
|
482
725
|
|
483
726
|
#endif
|
484
727
|
|
485
|
-
|
728
|
+
element_type * px; // contained pointer
|
486
729
|
boost::detail::shared_count pn; // reference counter
|
487
730
|
|
488
731
|
}; // shared_ptr
|
489
732
|
|
490
|
-
template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b)
|
733
|
+
template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_NOEXCEPT
|
491
734
|
{
|
492
735
|
return a.get() == b.get();
|
493
736
|
}
|
494
737
|
|
495
|
-
template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b)
|
738
|
+
template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_NOEXCEPT
|
496
739
|
{
|
497
740
|
return a.get() != b.get();
|
498
741
|
}
|
@@ -501,64 +744,90 @@ template<class T, class U> inline bool operator!=(shared_ptr<T> const & a, share
|
|
501
744
|
|
502
745
|
// Resolve the ambiguity between our op!= and the one in rel_ops
|
503
746
|
|
504
|
-
template<class T> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<T> const & b)
|
747
|
+
template<class T> inline bool operator!=(shared_ptr<T> const & a, shared_ptr<T> const & b) BOOST_NOEXCEPT
|
505
748
|
{
|
506
749
|
return a.get() != b.get();
|
507
750
|
}
|
508
751
|
|
509
752
|
#endif
|
510
753
|
|
511
|
-
|
754
|
+
#if !defined( BOOST_NO_CXX11_NULLPTR )
|
755
|
+
|
756
|
+
template<class T> inline bool operator==( shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
|
512
757
|
{
|
513
|
-
return
|
758
|
+
return p.get() == 0;
|
514
759
|
}
|
515
760
|
|
516
|
-
template<class T> inline
|
761
|
+
template<class T> inline bool operator==( boost::detail::sp_nullptr_t, shared_ptr<T> const & p ) BOOST_NOEXCEPT
|
517
762
|
{
|
518
|
-
|
763
|
+
return p.get() == 0;
|
519
764
|
}
|
520
765
|
|
521
|
-
template<class T
|
766
|
+
template<class T> inline bool operator!=( shared_ptr<T> const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT
|
522
767
|
{
|
523
|
-
return
|
768
|
+
return p.get() != 0;
|
524
769
|
}
|
525
770
|
|
526
|
-
template<class T
|
771
|
+
template<class T> inline bool operator!=( boost::detail::sp_nullptr_t, shared_ptr<T> const & p ) BOOST_NOEXCEPT
|
527
772
|
{
|
528
|
-
return
|
773
|
+
return p.get() != 0;
|
529
774
|
}
|
530
775
|
|
531
|
-
|
776
|
+
#endif
|
777
|
+
|
778
|
+
template<class T, class U> inline bool operator<(shared_ptr<T> const & a, shared_ptr<U> const & b) BOOST_NOEXCEPT
|
532
779
|
{
|
533
|
-
return
|
780
|
+
return a.owner_before( b );
|
534
781
|
}
|
535
782
|
|
536
|
-
|
783
|
+
template<class T> inline void swap(shared_ptr<T> & a, shared_ptr<T> & b) BOOST_NOEXCEPT
|
784
|
+
{
|
785
|
+
a.swap(b);
|
786
|
+
}
|
537
787
|
|
538
|
-
template<class T, class U> shared_ptr<T>
|
788
|
+
template<class T, class U> shared_ptr<T> static_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT
|
539
789
|
{
|
540
|
-
|
790
|
+
(void) static_cast< T* >( static_cast< U* >( 0 ) );
|
791
|
+
|
792
|
+
typedef typename shared_ptr<T>::element_type E;
|
793
|
+
|
794
|
+
E * p = static_cast< E* >( r.get() );
|
795
|
+
return shared_ptr<T>( r, p );
|
541
796
|
}
|
542
797
|
|
543
|
-
template<class T, class U> shared_ptr<T>
|
798
|
+
template<class T, class U> shared_ptr<T> const_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT
|
544
799
|
{
|
545
|
-
|
800
|
+
(void) const_cast< T* >( static_cast< U* >( 0 ) );
|
801
|
+
|
802
|
+
typedef typename shared_ptr<T>::element_type E;
|
803
|
+
|
804
|
+
E * p = const_cast< E* >( r.get() );
|
805
|
+
return shared_ptr<T>( r, p );
|
546
806
|
}
|
547
807
|
|
548
|
-
template<class T, class U> shared_ptr<T>
|
808
|
+
template<class T, class U> shared_ptr<T> dynamic_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT
|
549
809
|
{
|
550
|
-
|
810
|
+
(void) dynamic_cast< T* >( static_cast< U* >( 0 ) );
|
811
|
+
|
812
|
+
typedef typename shared_ptr<T>::element_type E;
|
813
|
+
|
814
|
+
E * p = dynamic_cast< E* >( r.get() );
|
815
|
+
return p? shared_ptr<T>( r, p ): shared_ptr<T>();
|
551
816
|
}
|
552
817
|
|
553
|
-
template<class T, class U> shared_ptr<T>
|
818
|
+
template<class T, class U> shared_ptr<T> reinterpret_pointer_cast( shared_ptr<U> const & r ) BOOST_NOEXCEPT
|
554
819
|
{
|
555
|
-
|
556
|
-
|
820
|
+
(void) reinterpret_cast< T* >( static_cast< U* >( 0 ) );
|
821
|
+
|
822
|
+
typedef typename shared_ptr<T>::element_type E;
|
823
|
+
|
824
|
+
E * p = reinterpret_cast< E* >( r.get() );
|
825
|
+
return shared_ptr<T>( r, p );
|
557
826
|
}
|
558
827
|
|
559
828
|
// get_pointer() enables boost::mem_fn to recognize shared_ptr
|
560
829
|
|
561
|
-
template<class T> inline T * get_pointer(shared_ptr<T> const & p)
|
830
|
+
template<class T> inline typename shared_ptr<T>::element_type * get_pointer(shared_ptr<T> const & p) BOOST_NOEXCEPT
|
562
831
|
{
|
563
832
|
return p.get();
|
564
833
|
}
|
@@ -600,6 +869,9 @@ template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::
|
|
600
869
|
|
601
870
|
// get_deleter
|
602
871
|
|
872
|
+
namespace detail
|
873
|
+
{
|
874
|
+
|
603
875
|
#if ( defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3) ) || \
|
604
876
|
( defined(__EDG_VERSION__) && BOOST_WORKAROUND(__EDG_VERSION__, <= 238) ) || \
|
605
877
|
( defined(__HP_aCC) && BOOST_WORKAROUND(__HP_aCC, <= 33500) )
|
@@ -607,7 +879,7 @@ template<class E, class T, class Y> std::basic_ostream<E, T> & operator<< (std::
|
|
607
879
|
// g++ 2.9x doesn't allow static_cast<X const *>(void *)
|
608
880
|
// apparently EDG 2.38 and HP aCC A.03.35 also don't accept it
|
609
881
|
|
610
|
-
template<class D, class T> D *
|
882
|
+
template<class D, class T> D * basic_get_deleter(shared_ptr<T> const & p)
|
611
883
|
{
|
612
884
|
void const * q = p._internal_get_deleter(BOOST_SP_TYPEID(D));
|
613
885
|
return const_cast<D *>(static_cast<D const *>(q));
|
@@ -615,18 +887,64 @@ template<class D, class T> D * get_deleter(shared_ptr<T> const & p)
|
|
615
887
|
|
616
888
|
#else
|
617
889
|
|
618
|
-
template<class D, class T> D *
|
890
|
+
template<class D, class T> D * basic_get_deleter( shared_ptr<T> const & p ) BOOST_NOEXCEPT
|
619
891
|
{
|
620
|
-
return static_cast<D *>(p._internal_get_deleter(BOOST_SP_TYPEID(D)));
|
892
|
+
return static_cast<D *>( p._internal_get_deleter(BOOST_SP_TYPEID(D)) );
|
621
893
|
}
|
622
894
|
|
623
895
|
#endif
|
624
896
|
|
897
|
+
class esft2_deleter_wrapper
|
898
|
+
{
|
899
|
+
private:
|
900
|
+
|
901
|
+
shared_ptr<void> deleter_;
|
902
|
+
|
903
|
+
public:
|
904
|
+
|
905
|
+
esft2_deleter_wrapper()
|
906
|
+
{
|
907
|
+
}
|
908
|
+
|
909
|
+
template< class T > void set_deleter( shared_ptr<T> const & deleter )
|
910
|
+
{
|
911
|
+
deleter_ = deleter;
|
912
|
+
}
|
913
|
+
|
914
|
+
template<typename D> D* get_deleter() const BOOST_NOEXCEPT
|
915
|
+
{
|
916
|
+
return boost::detail::basic_get_deleter<D>( deleter_ );
|
917
|
+
}
|
918
|
+
|
919
|
+
template< class T> void operator()( T* )
|
920
|
+
{
|
921
|
+
BOOST_ASSERT( deleter_.use_count() <= 1 );
|
922
|
+
deleter_.reset();
|
923
|
+
}
|
924
|
+
};
|
925
|
+
|
926
|
+
} // namespace detail
|
927
|
+
|
928
|
+
template<class D, class T> D * get_deleter( shared_ptr<T> const & p ) BOOST_NOEXCEPT
|
929
|
+
{
|
930
|
+
D *del = boost::detail::basic_get_deleter<D>(p);
|
931
|
+
|
932
|
+
if(del == 0)
|
933
|
+
{
|
934
|
+
boost::detail::esft2_deleter_wrapper *del_wrapper = boost::detail::basic_get_deleter<boost::detail::esft2_deleter_wrapper>(p);
|
935
|
+
// The following get_deleter method call is fully qualified because
|
936
|
+
// older versions of gcc (2.95, 3.2.3) fail to compile it when written del_wrapper->get_deleter<D>()
|
937
|
+
if(del_wrapper) del = del_wrapper->::boost::detail::esft2_deleter_wrapper::get_deleter<D>();
|
938
|
+
}
|
939
|
+
|
940
|
+
return del;
|
941
|
+
}
|
942
|
+
|
625
943
|
// atomic access
|
626
944
|
|
627
945
|
#if !defined(BOOST_SP_NO_ATOMIC_ACCESS)
|
628
946
|
|
629
|
-
template<class T> inline bool atomic_is_lock_free( shared_ptr<T> const * /*p*/ )
|
947
|
+
template<class T> inline bool atomic_is_lock_free( shared_ptr<T> const * /*p*/ ) BOOST_NOEXCEPT
|
630
948
|
{
|
631
949
|
return false;
|
632
950
|
}
|
@@ -705,7 +1023,7 @@ template<class T> inline bool atomic_compare_exchange_explicit( shared_ptr<T> *
|
|
705
1023
|
|
706
1024
|
template< class T > struct hash;
|
707
1025
|
|
708
|
-
template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p )
|
1026
|
+
template< class T > std::size_t hash_value( boost::shared_ptr<T> const & p ) BOOST_NOEXCEPT
|
709
1027
|
{
|
710
1028
|
return boost::hash< T* >()( p.get() );
|
711
1029
|
}
|