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
@@ -1,139 +0,0 @@
|
|
1
|
-
// -- operator_actions.hpp - Boost Lambda Library ----------------------
|
2
|
-
|
3
|
-
// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
|
4
|
-
//
|
5
|
-
// Distributed under the Boost Software License, Version 1.0. (See
|
6
|
-
// accompanying file LICENSE_1_0.txt or copy at
|
7
|
-
// http://www.boost.org/LICENSE_1_0.txt)
|
8
|
-
|
9
|
-
// For more information, see http://lambda.cs.utu.fi
|
10
|
-
|
11
|
-
#ifndef BOOST_LAMBDA_OPERATOR_ACTIONS_HPP
|
12
|
-
#define BOOST_LAMBDA_OPERATOR_ACTIONS_HPP
|
13
|
-
|
14
|
-
namespace boost {
|
15
|
-
namespace lambda {
|
16
|
-
|
17
|
-
|
18
|
-
// -- artihmetic ----------------------
|
19
|
-
|
20
|
-
class plus_action {};
|
21
|
-
class minus_action {};
|
22
|
-
class multiply_action {};
|
23
|
-
class divide_action {};
|
24
|
-
class remainder_action {};
|
25
|
-
|
26
|
-
// -- bitwise -------------------
|
27
|
-
|
28
|
-
class leftshift_action {};
|
29
|
-
class rightshift_action {};
|
30
|
-
class xor_action {};
|
31
|
-
|
32
|
-
|
33
|
-
// -- bitwise/logical -------------------
|
34
|
-
|
35
|
-
class and_action {};
|
36
|
-
class or_action {};
|
37
|
-
class not_action {};
|
38
|
-
|
39
|
-
// -- relational -------------------------
|
40
|
-
|
41
|
-
class less_action {};
|
42
|
-
class greater_action {};
|
43
|
-
class lessorequal_action {};
|
44
|
-
class greaterorequal_action {};
|
45
|
-
class equal_action {};
|
46
|
-
class notequal_action {};
|
47
|
-
|
48
|
-
// -- increment/decrement ------------------------------
|
49
|
-
|
50
|
-
class increment_action {};
|
51
|
-
class decrement_action {};
|
52
|
-
|
53
|
-
// -- void return ------------------------------
|
54
|
-
|
55
|
-
// -- other ------------------------------
|
56
|
-
|
57
|
-
class addressof_action {};
|
58
|
-
// class comma_action {}; // defined in actions.hpp
|
59
|
-
class contentsof_action {};
|
60
|
-
// class member_pointer_action {}; (defined in member_ptr.hpp)
|
61
|
-
|
62
|
-
|
63
|
-
// -- actioun group templates --------------------
|
64
|
-
|
65
|
-
template <class Action> class arithmetic_action;
|
66
|
-
template <class Action> class bitwise_action;
|
67
|
-
template <class Action> class logical_action;
|
68
|
-
template <class Action> class relational_action;
|
69
|
-
template <class Action> class arithmetic_assignment_action;
|
70
|
-
template <class Action> class bitwise_assignment_action;
|
71
|
-
template <class Action> class unary_arithmetic_action;
|
72
|
-
template <class Action> class pre_increment_decrement_action;
|
73
|
-
template <class Action> class post_increment_decrement_action;
|
74
|
-
|
75
|
-
// ---------------------------------------------------------
|
76
|
-
|
77
|
-
// actions, for which the existence of protect is checked in return type
|
78
|
-
// deduction.
|
79
|
-
|
80
|
-
template <class Act> struct is_protectable<arithmetic_action<Act> > {
|
81
|
-
BOOST_STATIC_CONSTANT(bool, value = true);
|
82
|
-
};
|
83
|
-
template <class Act> struct is_protectable<bitwise_action<Act> > {
|
84
|
-
BOOST_STATIC_CONSTANT(bool, value = true);
|
85
|
-
};
|
86
|
-
template <class Act> struct is_protectable<logical_action<Act> > {
|
87
|
-
BOOST_STATIC_CONSTANT(bool, value = true);
|
88
|
-
};
|
89
|
-
template <class Act> struct is_protectable<relational_action<Act> > {
|
90
|
-
BOOST_STATIC_CONSTANT(bool, value = true);
|
91
|
-
};
|
92
|
-
template <class Act>
|
93
|
-
struct is_protectable<arithmetic_assignment_action<Act> > {
|
94
|
-
BOOST_STATIC_CONSTANT(bool, value = true);
|
95
|
-
};
|
96
|
-
template <class Act> struct is_protectable<bitwise_assignment_action<Act> > {
|
97
|
-
BOOST_STATIC_CONSTANT(bool, value = true);
|
98
|
-
};
|
99
|
-
template <class Act> struct is_protectable<unary_arithmetic_action<Act> > {
|
100
|
-
BOOST_STATIC_CONSTANT(bool, value = true);
|
101
|
-
};
|
102
|
-
template <class Act>
|
103
|
-
struct is_protectable<pre_increment_decrement_action<Act> > {
|
104
|
-
BOOST_STATIC_CONSTANT(bool, value = true);
|
105
|
-
};
|
106
|
-
template <class Act> struct
|
107
|
-
is_protectable<post_increment_decrement_action<Act> > {
|
108
|
-
BOOST_STATIC_CONSTANT(bool, value = true);
|
109
|
-
};
|
110
|
-
|
111
|
-
template <> struct is_protectable<other_action<addressof_action> > {
|
112
|
-
BOOST_STATIC_CONSTANT(bool, value = true);
|
113
|
-
};
|
114
|
-
template <> struct is_protectable<other_action<contentsof_action> > {
|
115
|
-
BOOST_STATIC_CONSTANT(bool, value = true);
|
116
|
-
};
|
117
|
-
|
118
|
-
template<> struct is_protectable<other_action<subscript_action> > {
|
119
|
-
BOOST_STATIC_CONSTANT(bool, value = true);
|
120
|
-
};
|
121
|
-
template<> struct is_protectable<other_action<assignment_action> > {
|
122
|
-
BOOST_STATIC_CONSTANT(bool, value = true);
|
123
|
-
};
|
124
|
-
|
125
|
-
// NOTE: comma action is also protectable, but the specialization is
|
126
|
-
// in actions.hpp
|
127
|
-
|
128
|
-
|
129
|
-
} // namespace lambda
|
130
|
-
} // namespace boost
|
131
|
-
|
132
|
-
#endif
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
@@ -1,271 +0,0 @@
|
|
1
|
-
// Boost Lambda Library - operator_lambda_func_base.hpp -----------------
|
2
|
-
//
|
3
|
-
// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
|
4
|
-
//
|
5
|
-
// Distributed under the Boost Software License, Version 1.0. (See
|
6
|
-
// accompanying file LICENSE_1_0.txt or copy at
|
7
|
-
// http://www.boost.org/LICENSE_1_0.txt)
|
8
|
-
//
|
9
|
-
// For more information, see www.boost.org
|
10
|
-
|
11
|
-
// ------------------------------------------------------------
|
12
|
-
|
13
|
-
#ifndef BOOST_LAMBDA_OPERATOR_LAMBDA_FUNC_BASE_HPP
|
14
|
-
#define BOOST_LAMBDA_OPERATOR_LAMBDA_FUNC_BASE_HPP
|
15
|
-
|
16
|
-
namespace boost {
|
17
|
-
namespace lambda {
|
18
|
-
|
19
|
-
|
20
|
-
// These operators cannot be implemented as apply functions of action
|
21
|
-
// templates
|
22
|
-
|
23
|
-
|
24
|
-
// Specialization for comma.
|
25
|
-
template<class Args>
|
26
|
-
class lambda_functor_base<other_action<comma_action>, Args> {
|
27
|
-
public:
|
28
|
-
Args args;
|
29
|
-
public:
|
30
|
-
explicit lambda_functor_base(const Args& a) : args(a) {}
|
31
|
-
|
32
|
-
template<class RET, CALL_TEMPLATE_ARGS>
|
33
|
-
RET call(CALL_FORMAL_ARGS) const {
|
34
|
-
return detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS),
|
35
|
-
detail::select(boost::tuples::get<1>(args), CALL_ACTUAL_ARGS);
|
36
|
-
}
|
37
|
-
|
38
|
-
|
39
|
-
template<class SigArgs> struct sig {
|
40
|
-
private:
|
41
|
-
typedef typename
|
42
|
-
detail::deduce_argument_types<Args, SigArgs>::type rets_t;
|
43
|
-
public:
|
44
|
-
typedef typename return_type_2_comma< // comma needs special handling
|
45
|
-
typename detail::element_or_null<0, rets_t>::type,
|
46
|
-
typename detail::element_or_null<1, rets_t>::type
|
47
|
-
>::type type;
|
48
|
-
};
|
49
|
-
|
50
|
-
};
|
51
|
-
|
52
|
-
namespace detail {
|
53
|
-
|
54
|
-
// helper traits to make the expression shorter, takes binary action
|
55
|
-
// bound argument tuple, open argument tuple and gives the return type
|
56
|
-
|
57
|
-
template<class Action, class Bound, class Open> class binary_rt {
|
58
|
-
private:
|
59
|
-
typedef typename
|
60
|
-
detail::deduce_argument_types<Bound, Open>::type rets_t;
|
61
|
-
public:
|
62
|
-
typedef typename return_type_2_prot<
|
63
|
-
Action,
|
64
|
-
typename detail::element_or_null<0, rets_t>::type,
|
65
|
-
typename detail::element_or_null<1, rets_t>::type
|
66
|
-
>::type type;
|
67
|
-
};
|
68
|
-
|
69
|
-
|
70
|
-
// same for unary actions
|
71
|
-
template<class Action, class Bound, class Open> class unary_rt {
|
72
|
-
private:
|
73
|
-
typedef typename
|
74
|
-
detail::deduce_argument_types<Bound, Open>::type rets_t;
|
75
|
-
public:
|
76
|
-
typedef typename return_type_1_prot<
|
77
|
-
Action,
|
78
|
-
typename detail::element_or_null<0, rets_t>::type
|
79
|
-
>::type type;
|
80
|
-
};
|
81
|
-
|
82
|
-
|
83
|
-
} // end detail
|
84
|
-
|
85
|
-
// Specialization for logical and (to preserve shortcircuiting)
|
86
|
-
// this could be done with a macro as the others, code used to be different
|
87
|
-
template<class Args>
|
88
|
-
class lambda_functor_base<logical_action<and_action>, Args> {
|
89
|
-
public:
|
90
|
-
Args args;
|
91
|
-
public:
|
92
|
-
explicit lambda_functor_base(const Args& a) : args(a) {}
|
93
|
-
|
94
|
-
template<class RET, CALL_TEMPLATE_ARGS>
|
95
|
-
RET call(CALL_FORMAL_ARGS) const {
|
96
|
-
return detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS) &&
|
97
|
-
detail::select(boost::tuples::get<1>(args), CALL_ACTUAL_ARGS);
|
98
|
-
}
|
99
|
-
template<class SigArgs> struct sig {
|
100
|
-
typedef typename
|
101
|
-
detail::binary_rt<logical_action<and_action>, Args, SigArgs>::type type;
|
102
|
-
};
|
103
|
-
};
|
104
|
-
|
105
|
-
// Specialization for logical or (to preserve shortcircuiting)
|
106
|
-
// this could be done with a macro as the others, code used to be different
|
107
|
-
template<class Args>
|
108
|
-
class lambda_functor_base<logical_action< or_action>, Args> {
|
109
|
-
public:
|
110
|
-
Args args;
|
111
|
-
public:
|
112
|
-
explicit lambda_functor_base(const Args& a) : args(a) {}
|
113
|
-
|
114
|
-
template<class RET, CALL_TEMPLATE_ARGS>
|
115
|
-
RET call(CALL_FORMAL_ARGS) const {
|
116
|
-
return detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS) ||
|
117
|
-
detail::select(boost::tuples::get<1>(args), CALL_ACTUAL_ARGS);
|
118
|
-
}
|
119
|
-
|
120
|
-
template<class SigArgs> struct sig {
|
121
|
-
typedef typename
|
122
|
-
detail::binary_rt<logical_action<or_action>, Args, SigArgs>::type type;
|
123
|
-
};
|
124
|
-
};
|
125
|
-
|
126
|
-
// Specialization for subscript
|
127
|
-
template<class Args>
|
128
|
-
class lambda_functor_base<other_action<subscript_action>, Args> {
|
129
|
-
public:
|
130
|
-
Args args;
|
131
|
-
public:
|
132
|
-
explicit lambda_functor_base(const Args& a) : args(a) {}
|
133
|
-
|
134
|
-
template<class RET, CALL_TEMPLATE_ARGS>
|
135
|
-
RET call(CALL_FORMAL_ARGS) const {
|
136
|
-
return detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS)
|
137
|
-
[detail::select(boost::tuples::get<1>(args), CALL_ACTUAL_ARGS)];
|
138
|
-
}
|
139
|
-
|
140
|
-
template<class SigArgs> struct sig {
|
141
|
-
typedef typename
|
142
|
-
detail::binary_rt<other_action<subscript_action>, Args, SigArgs>::type
|
143
|
-
type;
|
144
|
-
};
|
145
|
-
};
|
146
|
-
|
147
|
-
|
148
|
-
#define BOOST_LAMBDA_BINARY_ACTION(SYMBOL, ACTION_CLASS) \
|
149
|
-
template<class Args> \
|
150
|
-
class lambda_functor_base<ACTION_CLASS, Args> { \
|
151
|
-
public: \
|
152
|
-
Args args; \
|
153
|
-
public: \
|
154
|
-
explicit lambda_functor_base(const Args& a) : args(a) {} \
|
155
|
-
\
|
156
|
-
template<class RET, CALL_TEMPLATE_ARGS> \
|
157
|
-
RET call(CALL_FORMAL_ARGS) const { \
|
158
|
-
return detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS) \
|
159
|
-
SYMBOL \
|
160
|
-
detail::select(boost::tuples::get<1>(args), CALL_ACTUAL_ARGS); \
|
161
|
-
} \
|
162
|
-
template<class SigArgs> struct sig { \
|
163
|
-
typedef typename \
|
164
|
-
detail::binary_rt<ACTION_CLASS, Args, SigArgs>::type type; \
|
165
|
-
}; \
|
166
|
-
};
|
167
|
-
|
168
|
-
#define BOOST_LAMBDA_PREFIX_UNARY_ACTION(SYMBOL, ACTION_CLASS) \
|
169
|
-
template<class Args> \
|
170
|
-
class lambda_functor_base<ACTION_CLASS, Args> { \
|
171
|
-
public: \
|
172
|
-
Args args; \
|
173
|
-
public: \
|
174
|
-
explicit lambda_functor_base(const Args& a) : args(a) {} \
|
175
|
-
\
|
176
|
-
template<class RET, CALL_TEMPLATE_ARGS> \
|
177
|
-
RET call(CALL_FORMAL_ARGS) const { \
|
178
|
-
return SYMBOL \
|
179
|
-
detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS); \
|
180
|
-
} \
|
181
|
-
template<class SigArgs> struct sig { \
|
182
|
-
typedef typename \
|
183
|
-
detail::unary_rt<ACTION_CLASS, Args, SigArgs>::type type; \
|
184
|
-
}; \
|
185
|
-
};
|
186
|
-
|
187
|
-
#define BOOST_LAMBDA_POSTFIX_UNARY_ACTION(SYMBOL, ACTION_CLASS) \
|
188
|
-
template<class Args> \
|
189
|
-
class lambda_functor_base<ACTION_CLASS, Args> { \
|
190
|
-
public: \
|
191
|
-
Args args; \
|
192
|
-
public: \
|
193
|
-
explicit lambda_functor_base(const Args& a) : args(a) {} \
|
194
|
-
\
|
195
|
-
template<class RET, CALL_TEMPLATE_ARGS> \
|
196
|
-
RET call(CALL_FORMAL_ARGS) const { \
|
197
|
-
return \
|
198
|
-
detail::select(boost::tuples::get<0>(args), CALL_ACTUAL_ARGS) SYMBOL; \
|
199
|
-
} \
|
200
|
-
template<class SigArgs> struct sig { \
|
201
|
-
typedef typename \
|
202
|
-
detail::unary_rt<ACTION_CLASS, Args, SigArgs>::type type; \
|
203
|
-
}; \
|
204
|
-
};
|
205
|
-
|
206
|
-
BOOST_LAMBDA_BINARY_ACTION(+,arithmetic_action<plus_action>)
|
207
|
-
BOOST_LAMBDA_BINARY_ACTION(-,arithmetic_action<minus_action>)
|
208
|
-
BOOST_LAMBDA_BINARY_ACTION(*,arithmetic_action<multiply_action>)
|
209
|
-
BOOST_LAMBDA_BINARY_ACTION(/,arithmetic_action<divide_action>)
|
210
|
-
BOOST_LAMBDA_BINARY_ACTION(%,arithmetic_action<remainder_action>)
|
211
|
-
|
212
|
-
BOOST_LAMBDA_BINARY_ACTION(<<,bitwise_action<leftshift_action>)
|
213
|
-
BOOST_LAMBDA_BINARY_ACTION(>>,bitwise_action<rightshift_action>)
|
214
|
-
BOOST_LAMBDA_BINARY_ACTION(&,bitwise_action<and_action>)
|
215
|
-
BOOST_LAMBDA_BINARY_ACTION(|,bitwise_action<or_action>)
|
216
|
-
BOOST_LAMBDA_BINARY_ACTION(^,bitwise_action<xor_action>)
|
217
|
-
|
218
|
-
BOOST_LAMBDA_BINARY_ACTION(<,relational_action<less_action>)
|
219
|
-
BOOST_LAMBDA_BINARY_ACTION(>,relational_action<greater_action>)
|
220
|
-
BOOST_LAMBDA_BINARY_ACTION(<=,relational_action<lessorequal_action>)
|
221
|
-
BOOST_LAMBDA_BINARY_ACTION(>=,relational_action<greaterorequal_action>)
|
222
|
-
BOOST_LAMBDA_BINARY_ACTION(==,relational_action<equal_action>)
|
223
|
-
BOOST_LAMBDA_BINARY_ACTION(!=,relational_action<notequal_action>)
|
224
|
-
|
225
|
-
BOOST_LAMBDA_BINARY_ACTION(+=,arithmetic_assignment_action<plus_action>)
|
226
|
-
BOOST_LAMBDA_BINARY_ACTION(-=,arithmetic_assignment_action<minus_action>)
|
227
|
-
BOOST_LAMBDA_BINARY_ACTION(*=,arithmetic_assignment_action<multiply_action>)
|
228
|
-
BOOST_LAMBDA_BINARY_ACTION(/=,arithmetic_assignment_action<divide_action>)
|
229
|
-
BOOST_LAMBDA_BINARY_ACTION(%=,arithmetic_assignment_action<remainder_action>)
|
230
|
-
|
231
|
-
BOOST_LAMBDA_BINARY_ACTION(<<=,bitwise_assignment_action<leftshift_action>)
|
232
|
-
BOOST_LAMBDA_BINARY_ACTION(>>=,bitwise_assignment_action<rightshift_action>)
|
233
|
-
BOOST_LAMBDA_BINARY_ACTION(&=,bitwise_assignment_action<and_action>)
|
234
|
-
BOOST_LAMBDA_BINARY_ACTION(|=,bitwise_assignment_action<or_action>)
|
235
|
-
BOOST_LAMBDA_BINARY_ACTION(^=,bitwise_assignment_action<xor_action>)
|
236
|
-
|
237
|
-
BOOST_LAMBDA_BINARY_ACTION(=,other_action< assignment_action>)
|
238
|
-
|
239
|
-
|
240
|
-
BOOST_LAMBDA_PREFIX_UNARY_ACTION(+, unary_arithmetic_action<plus_action>)
|
241
|
-
BOOST_LAMBDA_PREFIX_UNARY_ACTION(-, unary_arithmetic_action<minus_action>)
|
242
|
-
BOOST_LAMBDA_PREFIX_UNARY_ACTION(~, bitwise_action<not_action>)
|
243
|
-
BOOST_LAMBDA_PREFIX_UNARY_ACTION(!, logical_action<not_action>)
|
244
|
-
BOOST_LAMBDA_PREFIX_UNARY_ACTION(++, pre_increment_decrement_action<increment_action>)
|
245
|
-
BOOST_LAMBDA_PREFIX_UNARY_ACTION(--, pre_increment_decrement_action<decrement_action>)
|
246
|
-
|
247
|
-
BOOST_LAMBDA_PREFIX_UNARY_ACTION(&,other_action<addressof_action>)
|
248
|
-
BOOST_LAMBDA_PREFIX_UNARY_ACTION(*,other_action<contentsof_action>)
|
249
|
-
|
250
|
-
BOOST_LAMBDA_POSTFIX_UNARY_ACTION(++, post_increment_decrement_action<increment_action>)
|
251
|
-
BOOST_LAMBDA_POSTFIX_UNARY_ACTION(--, post_increment_decrement_action<decrement_action>)
|
252
|
-
|
253
|
-
|
254
|
-
#undef BOOST_LAMBDA_POSTFIX_UNARY_ACTION
|
255
|
-
#undef BOOST_LAMBDA_PREFIX_UNARY_ACTION
|
256
|
-
#undef BOOST_LAMBDA_BINARY_ACTION
|
257
|
-
|
258
|
-
} // namespace lambda
|
259
|
-
} // namespace boost
|
260
|
-
|
261
|
-
#endif
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
@@ -1,917 +0,0 @@
|
|
1
|
-
// operator_return_type_traits.hpp -- Boost Lambda Library ------------------
|
2
|
-
|
3
|
-
// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
|
4
|
-
//
|
5
|
-
// Distributed under the Boost Software License, Version 1.0. (See
|
6
|
-
// accompanying file LICENSE_1_0.txt or copy at
|
7
|
-
// http://www.boost.org/LICENSE_1_0.txt)
|
8
|
-
//
|
9
|
-
// For more information, see www.boost.org
|
10
|
-
|
11
|
-
#ifndef BOOST_LAMBDA_OPERATOR_RETURN_TYPE_TRAITS_HPP
|
12
|
-
#define BOOST_LAMBDA_OPERATOR_RETURN_TYPE_TRAITS_HPP
|
13
|
-
|
14
|
-
#include "boost/lambda/detail/is_instance_of.hpp"
|
15
|
-
#include "boost/type_traits/same_traits.hpp"
|
16
|
-
|
17
|
-
#include "boost/indirect_reference.hpp"
|
18
|
-
#include "boost/detail/container_fwd.hpp"
|
19
|
-
|
20
|
-
#include <cstddef> // needed for the ptrdiff_t
|
21
|
-
#include <iosfwd> // for istream and ostream
|
22
|
-
|
23
|
-
#include <iterator> // needed for operator&
|
24
|
-
|
25
|
-
namespace boost {
|
26
|
-
namespace lambda {
|
27
|
-
namespace detail {
|
28
|
-
|
29
|
-
// -- general helper templates for type deduction ------------------
|
30
|
-
|
31
|
-
// Much of the type deduction code for standard arithmetic types from Gary Powell
|
32
|
-
|
33
|
-
template <class A> struct promote_code { static const int value = -1; };
|
34
|
-
// this means that a code is not defined for A
|
35
|
-
|
36
|
-
// -- the next 5 types are needed in if_then_else_return
|
37
|
-
// the promotion order is not important, but they must have distinct values.
|
38
|
-
template <> struct promote_code<bool> { static const int value = 10; };
|
39
|
-
template <> struct promote_code<char> { static const int value = 20; };
|
40
|
-
template <> struct promote_code<unsigned char> { static const int value = 30; };
|
41
|
-
template <> struct promote_code<signed char> { static const int value = 40; };
|
42
|
-
template <> struct promote_code<short int> { static const int value = 50; };
|
43
|
-
// ----------
|
44
|
-
|
45
|
-
template <> struct promote_code<int> { static const int value = 100; };
|
46
|
-
template <> struct promote_code<unsigned int> { static const int value = 200; };
|
47
|
-
template <> struct promote_code<long> { static const int value = 300; };
|
48
|
-
template <> struct promote_code<unsigned long> { static const int value = 400; };
|
49
|
-
|
50
|
-
template <> struct promote_code<float> { static const int value = 500; };
|
51
|
-
template <> struct promote_code<double> { static const int value = 600; };
|
52
|
-
template <> struct promote_code<long double> { static const int value = 700; };
|
53
|
-
|
54
|
-
// TODO: wchar_t
|
55
|
-
|
56
|
-
// forward delcaration of complex.
|
57
|
-
|
58
|
-
} // namespace detail
|
59
|
-
} // namespace lambda
|
60
|
-
} // namespace boost
|
61
|
-
|
62
|
-
namespace boost {
|
63
|
-
namespace lambda {
|
64
|
-
namespace detail {
|
65
|
-
|
66
|
-
template <> struct promote_code< std::complex<float> > { static const int value = 800; };
|
67
|
-
template <> struct promote_code< std::complex<double> > { static const int value = 900; };
|
68
|
-
template <> struct promote_code< std::complex<long double> > { static const int value = 1000; };
|
69
|
-
|
70
|
-
// -- int promotion -------------------------------------------
|
71
|
-
template <class T> struct promote_to_int { typedef T type; };
|
72
|
-
|
73
|
-
template <> struct promote_to_int<bool> { typedef int type; };
|
74
|
-
template <> struct promote_to_int<char> { typedef int type; };
|
75
|
-
template <> struct promote_to_int<unsigned char> { typedef int type; };
|
76
|
-
template <> struct promote_to_int<signed char> { typedef int type; };
|
77
|
-
template <> struct promote_to_int<short int> { typedef int type; };
|
78
|
-
|
79
|
-
// The unsigned short int promotion rule is this:
|
80
|
-
// unsigned short int to signed int if a signed int can hold all values
|
81
|
-
// of unsigned short int, otherwise go to unsigned int.
|
82
|
-
template <> struct promote_to_int<unsigned short int>
|
83
|
-
{
|
84
|
-
typedef
|
85
|
-
detail::IF<sizeof(int) <= sizeof(unsigned short int),
|
86
|
-
// I had the logic reversed but ">" messes up the parsing.
|
87
|
-
unsigned int,
|
88
|
-
int>::RET type;
|
89
|
-
};
|
90
|
-
|
91
|
-
|
92
|
-
// TODO: think, should there be default behaviour for non-standard types?
|
93
|
-
|
94
|
-
} // namespace detail
|
95
|
-
|
96
|
-
// ------------------------------------------
|
97
|
-
// Unary actions ----------------------------
|
98
|
-
// ------------------------------------------
|
99
|
-
|
100
|
-
template<class Act, class A>
|
101
|
-
struct plain_return_type_1 {
|
102
|
-
typedef detail::unspecified type;
|
103
|
-
};
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
template<class Act, class A>
|
108
|
-
struct plain_return_type_1<unary_arithmetic_action<Act>, A> {
|
109
|
-
typedef A type;
|
110
|
-
};
|
111
|
-
|
112
|
-
template<class Act, class A>
|
113
|
-
struct return_type_1<unary_arithmetic_action<Act>, A> {
|
114
|
-
typedef
|
115
|
-
typename plain_return_type_1<
|
116
|
-
unary_arithmetic_action<Act>,
|
117
|
-
typename detail::remove_reference_and_cv<A>::type
|
118
|
-
>::type type;
|
119
|
-
};
|
120
|
-
|
121
|
-
|
122
|
-
template<class A>
|
123
|
-
struct plain_return_type_1<bitwise_action<not_action>, A> {
|
124
|
-
typedef A type;
|
125
|
-
};
|
126
|
-
|
127
|
-
// bitwise not, operator~()
|
128
|
-
template<class A> struct return_type_1<bitwise_action<not_action>, A> {
|
129
|
-
typedef
|
130
|
-
typename plain_return_type_1<
|
131
|
-
bitwise_action<not_action>,
|
132
|
-
typename detail::remove_reference_and_cv<A>::type
|
133
|
-
>::type type;
|
134
|
-
};
|
135
|
-
|
136
|
-
|
137
|
-
// prefix increment and decrement operators return
|
138
|
-
// their argument by default as a non-const reference
|
139
|
-
template<class Act, class A>
|
140
|
-
struct plain_return_type_1<pre_increment_decrement_action<Act>, A> {
|
141
|
-
typedef A& type;
|
142
|
-
};
|
143
|
-
|
144
|
-
template<class Act, class A>
|
145
|
-
struct return_type_1<pre_increment_decrement_action<Act>, A> {
|
146
|
-
typedef
|
147
|
-
typename plain_return_type_1<
|
148
|
-
pre_increment_decrement_action<Act>,
|
149
|
-
typename detail::remove_reference_and_cv<A>::type
|
150
|
-
>::type type;
|
151
|
-
};
|
152
|
-
|
153
|
-
// post decrement just returns the same plain type.
|
154
|
-
template<class Act, class A>
|
155
|
-
struct plain_return_type_1<post_increment_decrement_action<Act>, A> {
|
156
|
-
typedef A type;
|
157
|
-
};
|
158
|
-
|
159
|
-
template<class Act, class A>
|
160
|
-
struct return_type_1<post_increment_decrement_action<Act>, A>
|
161
|
-
{
|
162
|
-
typedef
|
163
|
-
typename plain_return_type_1<
|
164
|
-
post_increment_decrement_action<Act>,
|
165
|
-
typename detail::remove_reference_and_cv<A>::type
|
166
|
-
>::type type;
|
167
|
-
};
|
168
|
-
|
169
|
-
// logical not, operator!()
|
170
|
-
template<class A>
|
171
|
-
struct plain_return_type_1<logical_action<not_action>, A> {
|
172
|
-
typedef bool type;
|
173
|
-
};
|
174
|
-
|
175
|
-
template<class A>
|
176
|
-
struct return_type_1<logical_action<not_action>, A> {
|
177
|
-
typedef
|
178
|
-
typename plain_return_type_1<
|
179
|
-
logical_action<not_action>,
|
180
|
-
typename detail::remove_reference_and_cv<A>::type
|
181
|
-
>::type type;
|
182
|
-
};
|
183
|
-
|
184
|
-
// address of action ---------------------------------------
|
185
|
-
|
186
|
-
|
187
|
-
template<class A>
|
188
|
-
struct return_type_1<other_action<addressof_action>, A> {
|
189
|
-
typedef
|
190
|
-
typename plain_return_type_1<
|
191
|
-
other_action<addressof_action>,
|
192
|
-
typename detail::remove_reference_and_cv<A>::type
|
193
|
-
>::type type1;
|
194
|
-
|
195
|
-
// If no user defined specialization for A, then return the
|
196
|
-
// cv qualified pointer to A
|
197
|
-
typedef typename detail::IF<
|
198
|
-
boost::is_same<type1, detail::unspecified>::value,
|
199
|
-
typename boost::remove_reference<A>::type*,
|
200
|
-
type1
|
201
|
-
>::RET type;
|
202
|
-
};
|
203
|
-
|
204
|
-
// contentsof action ------------------------------------
|
205
|
-
|
206
|
-
// TODO: this deduction may lead to fail directly,
|
207
|
-
// (if A has no specialization for iterator_traits and has no
|
208
|
-
// typedef A::reference.
|
209
|
-
// There is no easy way around this, cause there doesn't seem to be a way
|
210
|
-
// to test whether a class is an iterator or not.
|
211
|
-
|
212
|
-
// The default works with std::iterators.
|
213
|
-
|
214
|
-
namespace detail {
|
215
|
-
|
216
|
-
// A is a nonreference type
|
217
|
-
template <class A> struct contentsof_type {
|
218
|
-
typedef typename boost::indirect_reference<A>::type type;
|
219
|
-
};
|
220
|
-
|
221
|
-
// this is since the nullary () in lambda_functor is always instantiated
|
222
|
-
template <> struct contentsof_type<null_type> {
|
223
|
-
typedef detail::unspecified type;
|
224
|
-
};
|
225
|
-
|
226
|
-
|
227
|
-
template <class A> struct contentsof_type<const A> {
|
228
|
-
typedef typename contentsof_type<A>::type type;
|
229
|
-
};
|
230
|
-
|
231
|
-
template <class A> struct contentsof_type<volatile A> {
|
232
|
-
typedef typename contentsof_type<A>::type type;
|
233
|
-
};
|
234
|
-
|
235
|
-
template <class A> struct contentsof_type<const volatile A> {
|
236
|
-
typedef typename contentsof_type<A>::type type;
|
237
|
-
};
|
238
|
-
|
239
|
-
// standard iterator traits should take care of the pointer types
|
240
|
-
// but just to be on the safe side, we have the specializations here:
|
241
|
-
// these work even if A is cv-qualified.
|
242
|
-
template <class A> struct contentsof_type<A*> {
|
243
|
-
typedef A& type;
|
244
|
-
};
|
245
|
-
template <class A> struct contentsof_type<A* const> {
|
246
|
-
typedef A& type;
|
247
|
-
};
|
248
|
-
template <class A> struct contentsof_type<A* volatile> {
|
249
|
-
typedef A& type;
|
250
|
-
};
|
251
|
-
template <class A> struct contentsof_type<A* const volatile> {
|
252
|
-
typedef A& type;
|
253
|
-
};
|
254
|
-
|
255
|
-
template<class A, int N> struct contentsof_type<A[N]> {
|
256
|
-
typedef A& type;
|
257
|
-
};
|
258
|
-
template<class A, int N> struct contentsof_type<const A[N]> {
|
259
|
-
typedef const A& type;
|
260
|
-
};
|
261
|
-
template<class A, int N> struct contentsof_type<volatile A[N]> {
|
262
|
-
typedef volatile A& type;
|
263
|
-
};
|
264
|
-
template<class A, int N> struct contentsof_type<const volatile A[N]> {
|
265
|
-
typedef const volatile A& type;
|
266
|
-
};
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
} // end detail
|
273
|
-
|
274
|
-
template<class A>
|
275
|
-
struct return_type_1<other_action<contentsof_action>, A> {
|
276
|
-
|
277
|
-
typedef
|
278
|
-
typename plain_return_type_1<
|
279
|
-
other_action<contentsof_action>,
|
280
|
-
typename detail::remove_reference_and_cv<A>::type
|
281
|
-
>::type type1;
|
282
|
-
|
283
|
-
// If no user defined specialization for A, then return the
|
284
|
-
// cv qualified pointer to A
|
285
|
-
typedef typename
|
286
|
-
detail::IF_type<
|
287
|
-
boost::is_same<type1, detail::unspecified>::value,
|
288
|
-
detail::contentsof_type<
|
289
|
-
typename boost::remove_reference<A>::type
|
290
|
-
>,
|
291
|
-
detail::identity_mapping<type1>
|
292
|
-
>::type type;
|
293
|
-
};
|
294
|
-
|
295
|
-
|
296
|
-
// ------------------------------------------------------------------
|
297
|
-
// binary actions ---------------------------------------------------
|
298
|
-
// ------------------------------------------------------------------
|
299
|
-
|
300
|
-
// here the default case is: no user defined versions:
|
301
|
-
template <class Act, class A, class B>
|
302
|
-
struct plain_return_type_2 {
|
303
|
-
typedef detail::unspecified type;
|
304
|
-
};
|
305
|
-
|
306
|
-
namespace detail {
|
307
|
-
|
308
|
-
// error classes
|
309
|
-
class illegal_pointer_arithmetic{};
|
310
|
-
|
311
|
-
// pointer arithmetic type deductions ----------------------
|
312
|
-
// value = false means that this is not a pointer arithmetic case
|
313
|
-
// value = true means, that this can be a pointer arithmetic case, but not necessarily is
|
314
|
-
// This means, that for user defined operators for pointer types, say for some operator+(X, *Y),
|
315
|
-
// the deductions must be coded at an earliel level (return_type_2).
|
316
|
-
|
317
|
-
template<class Act, class A, class B>
|
318
|
-
struct pointer_arithmetic_traits { static const bool value = false; };
|
319
|
-
|
320
|
-
template<class A, class B>
|
321
|
-
struct pointer_arithmetic_traits<plus_action, A, B> {
|
322
|
-
|
323
|
-
typedef typename
|
324
|
-
array_to_pointer<typename boost::remove_reference<A>::type>::type AP;
|
325
|
-
typedef typename
|
326
|
-
array_to_pointer<typename boost::remove_reference<B>::type>::type BP;
|
327
|
-
|
328
|
-
static const bool is_pointer_A = boost::is_pointer<AP>::value;
|
329
|
-
static const bool is_pointer_B = boost::is_pointer<BP>::value;
|
330
|
-
|
331
|
-
static const bool value = is_pointer_A || is_pointer_B;
|
332
|
-
|
333
|
-
// can't add two pointers.
|
334
|
-
// note, that we do not check wether the other type is valid for
|
335
|
-
// addition with a pointer.
|
336
|
-
// the compiler will catch it in the apply function
|
337
|
-
|
338
|
-
typedef typename
|
339
|
-
detail::IF<
|
340
|
-
is_pointer_A && is_pointer_B,
|
341
|
-
detail::return_type_deduction_failure<
|
342
|
-
detail::illegal_pointer_arithmetic
|
343
|
-
>,
|
344
|
-
typename detail::IF<is_pointer_A, AP, BP>::RET
|
345
|
-
>::RET type;
|
346
|
-
|
347
|
-
};
|
348
|
-
|
349
|
-
template<class A, class B>
|
350
|
-
struct pointer_arithmetic_traits<minus_action, A, B> {
|
351
|
-
typedef typename
|
352
|
-
array_to_pointer<typename boost::remove_reference<A>::type>::type AP;
|
353
|
-
typedef typename
|
354
|
-
array_to_pointer<typename boost::remove_reference<B>::type>::type BP;
|
355
|
-
|
356
|
-
static const bool is_pointer_A = boost::is_pointer<AP>::value;
|
357
|
-
static const bool is_pointer_B = boost::is_pointer<BP>::value;
|
358
|
-
|
359
|
-
static const bool value = is_pointer_A || is_pointer_B;
|
360
|
-
|
361
|
-
static const bool same_pointer_type =
|
362
|
-
is_pointer_A && is_pointer_B &&
|
363
|
-
boost::is_same<
|
364
|
-
typename boost::remove_const<
|
365
|
-
typename boost::remove_pointer<
|
366
|
-
typename boost::remove_const<AP>::type
|
367
|
-
>::type
|
368
|
-
>::type,
|
369
|
-
typename boost::remove_const<
|
370
|
-
typename boost::remove_pointer<
|
371
|
-
typename boost::remove_const<BP>::type
|
372
|
-
>::type
|
373
|
-
>::type
|
374
|
-
>::value;
|
375
|
-
|
376
|
-
// ptr - ptr has type ptrdiff_t
|
377
|
-
// note, that we do not check if, in ptr - B, B is
|
378
|
-
// valid for subtraction with a pointer.
|
379
|
-
// the compiler will catch it in the apply function
|
380
|
-
|
381
|
-
typedef typename
|
382
|
-
detail::IF<
|
383
|
-
same_pointer_type, const std::ptrdiff_t,
|
384
|
-
typename detail::IF<
|
385
|
-
is_pointer_A,
|
386
|
-
AP,
|
387
|
-
detail::return_type_deduction_failure<detail::illegal_pointer_arithmetic>
|
388
|
-
>::RET
|
389
|
-
>::RET type;
|
390
|
-
};
|
391
|
-
|
392
|
-
} // namespace detail
|
393
|
-
|
394
|
-
// -- arithmetic actions ---------------------------------------------
|
395
|
-
|
396
|
-
namespace detail {
|
397
|
-
|
398
|
-
template<bool is_pointer_arithmetic, class Act, class A, class B>
|
399
|
-
struct return_type_2_arithmetic_phase_1;
|
400
|
-
|
401
|
-
template<class A, class B> struct return_type_2_arithmetic_phase_2;
|
402
|
-
template<class A, class B> struct return_type_2_arithmetic_phase_3;
|
403
|
-
|
404
|
-
} // namespace detail
|
405
|
-
|
406
|
-
|
407
|
-
// drop any qualifiers from the argument types within arithmetic_action
|
408
|
-
template<class A, class B, class Act>
|
409
|
-
struct return_type_2<arithmetic_action<Act>, A, B>
|
410
|
-
{
|
411
|
-
typedef typename detail::remove_reference_and_cv<A>::type plain_A;
|
412
|
-
typedef typename detail::remove_reference_and_cv<B>::type plain_B;
|
413
|
-
|
414
|
-
typedef typename
|
415
|
-
plain_return_type_2<arithmetic_action<Act>, plain_A, plain_B>::type type1;
|
416
|
-
|
417
|
-
// if user defined return type, do not enter the whole arithmetic deductions
|
418
|
-
typedef typename
|
419
|
-
detail::IF_type<
|
420
|
-
boost::is_same<type1, detail::unspecified>::value,
|
421
|
-
detail::return_type_2_arithmetic_phase_1<
|
422
|
-
detail::pointer_arithmetic_traits<Act, A, B>::value, Act, A, B
|
423
|
-
>,
|
424
|
-
plain_return_type_2<arithmetic_action<Act>, plain_A, plain_B>
|
425
|
-
>::type type;
|
426
|
-
};
|
427
|
-
|
428
|
-
namespace detail {
|
429
|
-
|
430
|
-
// perform integral promotion, no pointer arithmetic
|
431
|
-
template<bool is_pointer_arithmetic, class Act, class A, class B>
|
432
|
-
struct return_type_2_arithmetic_phase_1
|
433
|
-
{
|
434
|
-
typedef typename
|
435
|
-
return_type_2_arithmetic_phase_2<
|
436
|
-
typename remove_reference_and_cv<A>::type,
|
437
|
-
typename remove_reference_and_cv<B>::type
|
438
|
-
>::type type;
|
439
|
-
};
|
440
|
-
|
441
|
-
// pointer_arithmetic
|
442
|
-
template<class Act, class A, class B>
|
443
|
-
struct return_type_2_arithmetic_phase_1<true, Act, A, B>
|
444
|
-
{
|
445
|
-
typedef typename
|
446
|
-
pointer_arithmetic_traits<Act, A, B>::type type;
|
447
|
-
};
|
448
|
-
|
449
|
-
template<class A, class B>
|
450
|
-
struct return_type_2_arithmetic_phase_2 {
|
451
|
-
typedef typename
|
452
|
-
return_type_2_arithmetic_phase_3<
|
453
|
-
typename promote_to_int<A>::type,
|
454
|
-
typename promote_to_int<B>::type
|
455
|
-
>::type type;
|
456
|
-
};
|
457
|
-
|
458
|
-
// specialization for unsigned int.
|
459
|
-
// We only have to do these two specialization because the value promotion will
|
460
|
-
// take care of the other cases.
|
461
|
-
// The unsigned int promotion rule is this:
|
462
|
-
// unsigned int to long if a long can hold all values of unsigned int,
|
463
|
-
// otherwise go to unsigned long.
|
464
|
-
|
465
|
-
// struct so I don't have to type this twice.
|
466
|
-
struct promotion_of_unsigned_int
|
467
|
-
{
|
468
|
-
typedef
|
469
|
-
detail::IF<sizeof(long) <= sizeof(unsigned int),
|
470
|
-
unsigned long,
|
471
|
-
long>::RET type;
|
472
|
-
};
|
473
|
-
|
474
|
-
template<>
|
475
|
-
struct return_type_2_arithmetic_phase_2<unsigned int, long>
|
476
|
-
{
|
477
|
-
typedef promotion_of_unsigned_int::type type;
|
478
|
-
};
|
479
|
-
template<>
|
480
|
-
struct return_type_2_arithmetic_phase_2<long, unsigned int>
|
481
|
-
{
|
482
|
-
typedef promotion_of_unsigned_int::type type;
|
483
|
-
};
|
484
|
-
|
485
|
-
|
486
|
-
template<class A, class B> struct return_type_2_arithmetic_phase_3 {
|
487
|
-
enum { promote_code_A_value = promote_code<A>::value,
|
488
|
-
promote_code_B_value = promote_code<B>::value }; // enums for KCC
|
489
|
-
typedef typename
|
490
|
-
detail::IF<
|
491
|
-
promote_code_A_value == -1 || promote_code_B_value == -1,
|
492
|
-
detail::return_type_deduction_failure<return_type_2_arithmetic_phase_3>,
|
493
|
-
typename detail::IF<
|
494
|
-
((int)promote_code_A_value > (int)promote_code_B_value),
|
495
|
-
A,
|
496
|
-
B
|
497
|
-
>::RET
|
498
|
-
>::RET type;
|
499
|
-
};
|
500
|
-
|
501
|
-
} // namespace detail
|
502
|
-
|
503
|
-
// -- bitwise actions -------------------------------------------
|
504
|
-
// note: for integral types deuduction is similar to arithmetic actions.
|
505
|
-
|
506
|
-
// drop any qualifiers from the argument types within arithmetic action
|
507
|
-
template<class A, class B, class Act>
|
508
|
-
struct return_type_2<bitwise_action<Act>, A, B>
|
509
|
-
{
|
510
|
-
|
511
|
-
typedef typename detail::remove_reference_and_cv<A>::type plain_A;
|
512
|
-
typedef typename detail::remove_reference_and_cv<B>::type plain_B;
|
513
|
-
|
514
|
-
typedef typename
|
515
|
-
plain_return_type_2<bitwise_action<Act>, plain_A, plain_B>::type type1;
|
516
|
-
|
517
|
-
// if user defined return type, do not enter type deductions
|
518
|
-
typedef typename
|
519
|
-
detail::IF_type<
|
520
|
-
boost::is_same<type1, detail::unspecified>::value,
|
521
|
-
return_type_2<arithmetic_action<plus_action>, A, B>,
|
522
|
-
plain_return_type_2<bitwise_action<Act>, plain_A, plain_B>
|
523
|
-
>::type type;
|
524
|
-
|
525
|
-
// plus_action is just a random pick, has to be a concrete instance
|
526
|
-
|
527
|
-
// TODO: This check is only valid for built-in types, overloaded types might
|
528
|
-
// accept floating point operators
|
529
|
-
|
530
|
-
// bitwise operators not defined for floating point types
|
531
|
-
// these test are not strictly needed here, since the error will be caught in
|
532
|
-
// the apply function
|
533
|
-
BOOST_STATIC_ASSERT(!(boost::is_float<plain_A>::value && boost::is_float<plain_B>::value));
|
534
|
-
|
535
|
-
};
|
536
|
-
|
537
|
-
namespace detail {
|
538
|
-
|
539
|
-
#ifdef BOOST_NO_TEMPLATED_STREAMS
|
540
|
-
|
541
|
-
template<class A, class B>
|
542
|
-
struct leftshift_type {
|
543
|
-
|
544
|
-
typedef typename detail::IF<
|
545
|
-
boost::is_convertible<
|
546
|
-
typename boost::remove_reference<A>::type*,
|
547
|
-
std::ostream*
|
548
|
-
>::value,
|
549
|
-
std::ostream&,
|
550
|
-
typename detail::remove_reference_and_cv<A>::type
|
551
|
-
>::RET type;
|
552
|
-
};
|
553
|
-
|
554
|
-
template<class A, class B>
|
555
|
-
struct rightshift_type {
|
556
|
-
|
557
|
-
typedef typename detail::IF<
|
558
|
-
|
559
|
-
boost::is_convertible<
|
560
|
-
typename boost::remove_reference<A>::type*,
|
561
|
-
std::istream*
|
562
|
-
>::value,
|
563
|
-
std::istream&,
|
564
|
-
typename detail::remove_reference_and_cv<A>::type
|
565
|
-
>::RET type;
|
566
|
-
};
|
567
|
-
|
568
|
-
#else
|
569
|
-
|
570
|
-
template <class T> struct get_ostream_type {
|
571
|
-
typedef std::basic_ostream<typename T::char_type,
|
572
|
-
typename T::traits_type>& type;
|
573
|
-
};
|
574
|
-
|
575
|
-
template <class T> struct get_istream_type {
|
576
|
-
typedef std::basic_istream<typename T::char_type,
|
577
|
-
typename T::traits_type>& type;
|
578
|
-
};
|
579
|
-
|
580
|
-
template<class A, class B>
|
581
|
-
struct leftshift_type {
|
582
|
-
private:
|
583
|
-
typedef typename boost::remove_reference<A>::type plainA;
|
584
|
-
public:
|
585
|
-
typedef typename detail::IF_type<
|
586
|
-
is_instance_of_2<plainA, std::basic_ostream>::value,
|
587
|
-
get_ostream_type<plainA>, //reference to the stream
|
588
|
-
detail::remove_reference_and_cv<A>
|
589
|
-
>::type type;
|
590
|
-
};
|
591
|
-
|
592
|
-
template<class A, class B>
|
593
|
-
struct rightshift_type {
|
594
|
-
private:
|
595
|
-
typedef typename boost::remove_reference<A>::type plainA;
|
596
|
-
public:
|
597
|
-
typedef typename detail::IF_type<
|
598
|
-
is_instance_of_2<plainA, std::basic_istream>::value,
|
599
|
-
get_istream_type<plainA>, //reference to the stream
|
600
|
-
detail::remove_reference_and_cv<A>
|
601
|
-
>::type type;
|
602
|
-
};
|
603
|
-
|
604
|
-
|
605
|
-
#endif
|
606
|
-
|
607
|
-
} // end detail
|
608
|
-
|
609
|
-
// ostream
|
610
|
-
template<class A, class B>
|
611
|
-
struct return_type_2<bitwise_action<leftshift_action>, A, B>
|
612
|
-
{
|
613
|
-
typedef typename detail::remove_reference_and_cv<A>::type plain_A;
|
614
|
-
typedef typename detail::remove_reference_and_cv<B>::type plain_B;
|
615
|
-
|
616
|
-
typedef typename
|
617
|
-
plain_return_type_2<bitwise_action<leftshift_action>, plain_A, plain_B>::type type1;
|
618
|
-
|
619
|
-
// if user defined return type, do not enter type deductions
|
620
|
-
typedef typename
|
621
|
-
detail::IF_type<
|
622
|
-
boost::is_same<type1, detail::unspecified>::value,
|
623
|
-
detail::leftshift_type<A, B>,
|
624
|
-
plain_return_type_2<bitwise_action<leftshift_action>, plain_A, plain_B>
|
625
|
-
>::type type;
|
626
|
-
};
|
627
|
-
|
628
|
-
// istream
|
629
|
-
template<class A, class B>
|
630
|
-
struct return_type_2<bitwise_action<rightshift_action>, A, B>
|
631
|
-
{
|
632
|
-
typedef typename detail::remove_reference_and_cv<A>::type plain_A;
|
633
|
-
typedef typename detail::remove_reference_and_cv<B>::type plain_B;
|
634
|
-
|
635
|
-
typedef typename
|
636
|
-
plain_return_type_2<bitwise_action<rightshift_action>, plain_A, plain_B>::type type1;
|
637
|
-
|
638
|
-
// if user defined return type, do not enter type deductions
|
639
|
-
typedef typename
|
640
|
-
detail::IF_type<
|
641
|
-
boost::is_same<type1, detail::unspecified>::value,
|
642
|
-
detail::rightshift_type<A, B>,
|
643
|
-
plain_return_type_2<bitwise_action<rightshift_action>, plain_A, plain_B>
|
644
|
-
>::type type;
|
645
|
-
};
|
646
|
-
|
647
|
-
// -- logical actions ----------------------------------------
|
648
|
-
// always bool
|
649
|
-
// NOTE: this may not be true for some weird user-defined types,
|
650
|
-
template<class A, class B, class Act>
|
651
|
-
struct plain_return_type_2<logical_action<Act>, A, B> {
|
652
|
-
typedef bool type;
|
653
|
-
};
|
654
|
-
|
655
|
-
template<class A, class B, class Act>
|
656
|
-
struct return_type_2<logical_action<Act>, A, B> {
|
657
|
-
|
658
|
-
typedef typename detail::remove_reference_and_cv<A>::type plain_A;
|
659
|
-
typedef typename detail::remove_reference_and_cv<B>::type plain_B;
|
660
|
-
|
661
|
-
typedef typename
|
662
|
-
plain_return_type_2<logical_action<Act>, plain_A, plain_B>::type type;
|
663
|
-
|
664
|
-
};
|
665
|
-
|
666
|
-
|
667
|
-
// -- relational actions ----------------------------------------
|
668
|
-
// always bool
|
669
|
-
// NOTE: this may not be true for some weird user-defined types,
|
670
|
-
template<class A, class B, class Act>
|
671
|
-
struct plain_return_type_2<relational_action<Act>, A, B> {
|
672
|
-
typedef bool type;
|
673
|
-
};
|
674
|
-
|
675
|
-
template<class A, class B, class Act>
|
676
|
-
struct return_type_2<relational_action<Act>, A, B> {
|
677
|
-
|
678
|
-
typedef typename detail::remove_reference_and_cv<A>::type plain_A;
|
679
|
-
typedef typename detail::remove_reference_and_cv<B>::type plain_B;
|
680
|
-
|
681
|
-
typedef typename
|
682
|
-
plain_return_type_2<relational_action<Act>, plain_A, plain_B>::type type;
|
683
|
-
};
|
684
|
-
|
685
|
-
// Assingment actions -----------------------------------------------
|
686
|
-
// return type is the type of the first argument as reference
|
687
|
-
|
688
|
-
// note that cv-qualifiers are preserved.
|
689
|
-
// Yes, assignment operator can be const!
|
690
|
-
|
691
|
-
// NOTE: this may not be true for some weird user-defined types,
|
692
|
-
|
693
|
-
template<class A, class B, class Act>
|
694
|
-
struct return_type_2<arithmetic_assignment_action<Act>, A, B> {
|
695
|
-
|
696
|
-
typedef typename detail::remove_reference_and_cv<A>::type plain_A;
|
697
|
-
typedef typename detail::remove_reference_and_cv<B>::type plain_B;
|
698
|
-
|
699
|
-
typedef typename
|
700
|
-
plain_return_type_2<
|
701
|
-
arithmetic_assignment_action<Act>, plain_A, plain_B
|
702
|
-
>::type type1;
|
703
|
-
|
704
|
-
typedef typename
|
705
|
-
detail::IF<
|
706
|
-
boost::is_same<type1, detail::unspecified>::value,
|
707
|
-
typename boost::add_reference<A>::type,
|
708
|
-
type1
|
709
|
-
>::RET type;
|
710
|
-
};
|
711
|
-
|
712
|
-
template<class A, class B, class Act>
|
713
|
-
struct return_type_2<bitwise_assignment_action<Act>, A, B> {
|
714
|
-
|
715
|
-
typedef typename detail::remove_reference_and_cv<A>::type plain_A;
|
716
|
-
typedef typename detail::remove_reference_and_cv<B>::type plain_B;
|
717
|
-
|
718
|
-
typedef typename
|
719
|
-
plain_return_type_2<
|
720
|
-
bitwise_assignment_action<Act>, plain_A, plain_B
|
721
|
-
>::type type1;
|
722
|
-
|
723
|
-
typedef typename
|
724
|
-
detail::IF<
|
725
|
-
boost::is_same<type1, detail::unspecified>::value,
|
726
|
-
typename boost::add_reference<A>::type,
|
727
|
-
type1
|
728
|
-
>::RET type;
|
729
|
-
};
|
730
|
-
|
731
|
-
template<class A, class B>
|
732
|
-
struct return_type_2<other_action<assignment_action>, A, B> {
|
733
|
-
typedef typename detail::remove_reference_and_cv<A>::type plain_A;
|
734
|
-
typedef typename detail::remove_reference_and_cv<B>::type plain_B;
|
735
|
-
|
736
|
-
typedef typename
|
737
|
-
plain_return_type_2<
|
738
|
-
other_action<assignment_action>, plain_A, plain_B
|
739
|
-
>::type type1;
|
740
|
-
|
741
|
-
typedef typename
|
742
|
-
detail::IF<
|
743
|
-
boost::is_same<type1, detail::unspecified>::value,
|
744
|
-
typename boost::add_reference<A>::type,
|
745
|
-
type1
|
746
|
-
>::RET type;
|
747
|
-
};
|
748
|
-
|
749
|
-
// -- other actions ----------------------------------------
|
750
|
-
|
751
|
-
// comma action ----------------------------------
|
752
|
-
// Note: this may not be true for some weird user-defined types,
|
753
|
-
|
754
|
-
// NOTE! This only tries the plain_return_type_2 layer and gives
|
755
|
-
// detail::unspecified as default. If no such specialization is found, the
|
756
|
-
// type rule in the spcecialization of the return_type_2_prot is used
|
757
|
-
// to give the type of the right argument (which can be a reference too)
|
758
|
-
// (The built in operator, can return a l- or rvalue).
|
759
|
-
template<class A, class B>
|
760
|
-
struct return_type_2<other_action<comma_action>, A, B> {
|
761
|
-
|
762
|
-
typedef typename detail::remove_reference_and_cv<A>::type plain_A;
|
763
|
-
typedef typename detail::remove_reference_and_cv<B>::type plain_B;
|
764
|
-
|
765
|
-
typedef typename
|
766
|
-
plain_return_type_2<
|
767
|
-
other_action<comma_action>, plain_A, plain_B
|
768
|
-
>::type type;
|
769
|
-
};
|
770
|
-
|
771
|
-
// subscript action -----------------------------------------------
|
772
|
-
|
773
|
-
|
774
|
-
namespace detail {
|
775
|
-
// A and B are nonreference types
|
776
|
-
template <class A, class B> struct subscript_type {
|
777
|
-
typedef detail::unspecified type;
|
778
|
-
};
|
779
|
-
|
780
|
-
template <class A, class B> struct subscript_type<A*, B> {
|
781
|
-
typedef A& type;
|
782
|
-
};
|
783
|
-
template <class A, class B> struct subscript_type<A* const, B> {
|
784
|
-
typedef A& type;
|
785
|
-
};
|
786
|
-
template <class A, class B> struct subscript_type<A* volatile, B> {
|
787
|
-
typedef A& type;
|
788
|
-
};
|
789
|
-
template <class A, class B> struct subscript_type<A* const volatile, B> {
|
790
|
-
typedef A& type;
|
791
|
-
};
|
792
|
-
|
793
|
-
|
794
|
-
template<class A, class B, int N> struct subscript_type<A[N], B> {
|
795
|
-
typedef A& type;
|
796
|
-
};
|
797
|
-
|
798
|
-
// these 3 specializations are needed to make gcc <3 happy
|
799
|
-
template<class A, class B, int N> struct subscript_type<const A[N], B> {
|
800
|
-
typedef const A& type;
|
801
|
-
};
|
802
|
-
template<class A, class B, int N> struct subscript_type<volatile A[N], B> {
|
803
|
-
typedef volatile A& type;
|
804
|
-
};
|
805
|
-
template<class A, class B, int N> struct subscript_type<const volatile A[N], B> {
|
806
|
-
typedef const volatile A& type;
|
807
|
-
};
|
808
|
-
|
809
|
-
} // end detail
|
810
|
-
|
811
|
-
template<class A, class B>
|
812
|
-
struct return_type_2<other_action<subscript_action>, A, B> {
|
813
|
-
|
814
|
-
typedef typename detail::remove_reference_and_cv<A>::type plain_A;
|
815
|
-
typedef typename detail::remove_reference_and_cv<B>::type plain_B;
|
816
|
-
|
817
|
-
typedef typename boost::remove_reference<A>::type nonref_A;
|
818
|
-
typedef typename boost::remove_reference<B>::type nonref_B;
|
819
|
-
|
820
|
-
typedef typename
|
821
|
-
plain_return_type_2<
|
822
|
-
other_action<subscript_action>, plain_A, plain_B
|
823
|
-
>::type type1;
|
824
|
-
|
825
|
-
typedef typename
|
826
|
-
detail::IF_type<
|
827
|
-
boost::is_same<type1, detail::unspecified>::value,
|
828
|
-
detail::subscript_type<nonref_A, nonref_B>,
|
829
|
-
plain_return_type_2<other_action<subscript_action>, plain_A, plain_B>
|
830
|
-
>::type type;
|
831
|
-
|
832
|
-
};
|
833
|
-
|
834
|
-
template<class Key, class T, class Cmp, class Allocator, class B>
|
835
|
-
struct plain_return_type_2<other_action<subscript_action>, std::map<Key, T, Cmp, Allocator>, B> {
|
836
|
-
typedef T& type;
|
837
|
-
// T == std::map<Key, T, Cmp, Allocator>::mapped_type;
|
838
|
-
};
|
839
|
-
|
840
|
-
template<class Key, class T, class Cmp, class Allocator, class B>
|
841
|
-
struct plain_return_type_2<other_action<subscript_action>, std::multimap<Key, T, Cmp, Allocator>, B> {
|
842
|
-
typedef T& type;
|
843
|
-
// T == std::map<Key, T, Cmp, Allocator>::mapped_type;
|
844
|
-
};
|
845
|
-
|
846
|
-
// deque
|
847
|
-
template<class T, class Allocator, class B>
|
848
|
-
struct plain_return_type_2<other_action<subscript_action>, std::deque<T, Allocator>, B> {
|
849
|
-
typedef typename std::deque<T, Allocator>::reference type;
|
850
|
-
};
|
851
|
-
template<class T, class Allocator, class B>
|
852
|
-
struct plain_return_type_2<other_action<subscript_action>, const std::deque<T, Allocator>, B> {
|
853
|
-
typedef typename std::deque<T, Allocator>::const_reference type;
|
854
|
-
};
|
855
|
-
|
856
|
-
// vector
|
857
|
-
template<class T, class Allocator, class B>
|
858
|
-
struct plain_return_type_2<other_action<subscript_action>, std::vector<T, Allocator>, B> {
|
859
|
-
typedef typename std::vector<T, Allocator>::reference type;
|
860
|
-
};
|
861
|
-
template<class T, class Allocator, class B>
|
862
|
-
struct plain_return_type_2<other_action<subscript_action>, const std::vector<T, Allocator>, B> {
|
863
|
-
typedef typename std::vector<T, Allocator>::const_reference type;
|
864
|
-
};
|
865
|
-
|
866
|
-
// basic_string
|
867
|
-
template<class Char, class Traits, class Allocator, class B>
|
868
|
-
struct plain_return_type_2<other_action<subscript_action>, std::basic_string<Char, Traits, Allocator>, B> {
|
869
|
-
typedef typename std::basic_string<Char, Traits, Allocator>::reference type;
|
870
|
-
};
|
871
|
-
template<class Char, class Traits, class Allocator, class B>
|
872
|
-
struct plain_return_type_2<other_action<subscript_action>, const std::basic_string<Char, Traits, Allocator>, B> {
|
873
|
-
typedef typename std::basic_string<Char, Traits, Allocator>::const_reference type;
|
874
|
-
};
|
875
|
-
|
876
|
-
template<class Char, class Traits, class Allocator>
|
877
|
-
struct plain_return_type_2<arithmetic_action<plus_action>,
|
878
|
-
std::basic_string<Char, Traits, Allocator>,
|
879
|
-
std::basic_string<Char, Traits, Allocator> > {
|
880
|
-
typedef std::basic_string<Char, Traits, Allocator> type;
|
881
|
-
};
|
882
|
-
|
883
|
-
template<class Char, class Traits, class Allocator>
|
884
|
-
struct plain_return_type_2<arithmetic_action<plus_action>,
|
885
|
-
const Char*,
|
886
|
-
std::basic_string<Char, Traits, Allocator> > {
|
887
|
-
typedef std::basic_string<Char, Traits, Allocator> type;
|
888
|
-
};
|
889
|
-
|
890
|
-
template<class Char, class Traits, class Allocator>
|
891
|
-
struct plain_return_type_2<arithmetic_action<plus_action>,
|
892
|
-
std::basic_string<Char, Traits, Allocator>,
|
893
|
-
const Char*> {
|
894
|
-
typedef std::basic_string<Char, Traits, Allocator> type;
|
895
|
-
};
|
896
|
-
|
897
|
-
template<class Char, class Traits, class Allocator, std::size_t N>
|
898
|
-
struct plain_return_type_2<arithmetic_action<plus_action>,
|
899
|
-
Char[N],
|
900
|
-
std::basic_string<Char, Traits, Allocator> > {
|
901
|
-
typedef std::basic_string<Char, Traits, Allocator> type;
|
902
|
-
};
|
903
|
-
|
904
|
-
template<class Char, class Traits, class Allocator, std::size_t N>
|
905
|
-
struct plain_return_type_2<arithmetic_action<plus_action>,
|
906
|
-
std::basic_string<Char, Traits, Allocator>,
|
907
|
-
Char[N]> {
|
908
|
-
typedef std::basic_string<Char, Traits, Allocator> type;
|
909
|
-
};
|
910
|
-
|
911
|
-
|
912
|
-
} // namespace lambda
|
913
|
-
} // namespace boost
|
914
|
-
|
915
|
-
#endif
|
916
|
-
|
917
|
-
|