├── .gitignore ├── .travis.yml ├── Changelog.md ├── LICENSE ├── Makefile ├── README.md ├── ardb.conf ├── deps ├── .gitignore ├── cJSON │ ├── .gitignore │ ├── CMakeLists.txt │ ├── LICENSE │ ├── Makefile │ ├── README │ ├── README.md │ ├── cJSON.c │ ├── cJSON.h │ ├── cJSON_Utils.c │ ├── cJSON_Utils.h │ ├── test.c │ ├── test_utils.c │ └── tests │ │ ├── test1 │ │ ├── test2 │ │ ├── test3 │ │ ├── test4 │ │ ├── test5 │ │ └── test6 ├── cpp-btree │ ├── COPYING │ ├── Makefile │ ├── README │ ├── boost │ │ ├── config.hpp │ │ ├── config │ │ │ ├── abi │ │ │ │ ├── borland_prefix.hpp │ │ │ │ ├── borland_suffix.hpp │ │ │ │ ├── msvc_prefix.hpp │ │ │ │ └── msvc_suffix.hpp │ │ │ ├── abi_prefix.hpp │ │ │ ├── abi_suffix.hpp │ │ │ ├── auto_link.hpp │ │ │ ├── compiler │ │ │ │ ├── borland.hpp │ │ │ │ ├── clang.hpp │ │ │ │ ├── codegear.hpp │ │ │ │ ├── comeau.hpp │ │ │ │ ├── common_edg.hpp │ │ │ │ ├── compaq_cxx.hpp │ │ │ │ ├── digitalmars.hpp │ │ │ │ ├── gcc.hpp │ │ │ │ ├── gcc_xml.hpp │ │ │ │ ├── greenhills.hpp │ │ │ │ ├── hp_acc.hpp │ │ │ │ ├── intel.hpp │ │ │ │ ├── kai.hpp │ │ │ │ ├── metrowerks.hpp │ │ │ │ ├── mpw.hpp │ │ │ │ ├── nvcc.hpp │ │ │ │ ├── pathscale.hpp │ │ │ │ ├── pgi.hpp │ │ │ │ ├── sgi_mipspro.hpp │ │ │ │ ├── sunpro_cc.hpp │ │ │ │ ├── vacpp.hpp │ │ │ │ └── visualc.hpp │ │ │ ├── no_tr1 │ │ │ │ ├── cmath.hpp │ │ │ │ ├── complex.hpp │ │ │ │ ├── functional.hpp │ │ │ │ ├── memory.hpp │ │ │ │ └── utility.hpp │ │ │ ├── platform │ │ │ │ ├── aix.hpp │ │ │ │ ├── amigaos.hpp │ │ │ │ ├── beos.hpp │ │ │ │ ├── bsd.hpp │ │ │ │ ├── cygwin.hpp │ │ │ │ ├── hpux.hpp │ │ │ │ ├── irix.hpp │ │ │ │ ├── linux.hpp │ │ │ │ ├── macos.hpp │ │ │ │ ├── qnxnto.hpp │ │ │ │ ├── solaris.hpp │ │ │ │ ├── symbian.hpp │ │ │ │ ├── vms.hpp │ │ │ │ ├── vxworks.hpp │ │ │ │ └── win32.hpp │ │ │ ├── posix_features.hpp │ │ │ ├── requires_threads.hpp │ │ │ ├── select_compiler_config.hpp │ │ │ ├── select_platform_config.hpp │ │ │ ├── select_stdlib_config.hpp │ │ │ ├── stdlib │ │ │ │ ├── dinkumware.hpp │ │ │ │ ├── libcomo.hpp │ │ │ │ ├── libcpp.hpp │ │ │ │ ├── libstdcpp3.hpp │ │ │ │ ├── modena.hpp │ │ │ │ ├── msl.hpp │ │ │ │ ├── roguewave.hpp │ │ │ │ ├── sgi.hpp │ │ │ │ ├── stlport.hpp │ │ │ │ └── vacpp.hpp │ │ │ ├── suffix.hpp │ │ │ ├── user.hpp │ │ │ └── warning_disable.hpp │ │ ├── tr1 │ │ │ ├── detail │ │ │ │ ├── config.hpp │ │ │ │ └── config_all.hpp │ │ │ └── type_traits.hpp │ │ ├── type_traits.hpp │ │ ├── type_traits │ │ │ ├── add_const.hpp │ │ │ ├── add_cv.hpp │ │ │ ├── add_lvalue_reference.hpp │ │ │ ├── add_pointer.hpp │ │ │ ├── add_reference.hpp │ │ │ ├── add_rvalue_reference.hpp │ │ │ ├── add_volatile.hpp │ │ │ ├── aligned_storage.hpp │ │ │ ├── alignment_of.hpp │ │ │ ├── alignment_traits.hpp │ │ │ ├── arithmetic_traits.hpp │ │ │ ├── array_traits.hpp │ │ │ ├── broken_compiler_spec.hpp │ │ │ ├── common_type.hpp │ │ │ ├── composite_traits.hpp │ │ │ ├── conditional.hpp │ │ │ ├── config.hpp │ │ │ ├── conversion_traits.hpp │ │ │ ├── cv_traits.hpp │ │ │ ├── decay.hpp │ │ │ ├── detail │ │ │ │ ├── bool_trait_def.hpp │ │ │ │ ├── bool_trait_undef.hpp │ │ │ │ ├── common_type_imp.hpp │ │ │ │ ├── cv_traits_impl.hpp │ │ │ │ ├── false_result.hpp │ │ │ │ ├── ice_and.hpp │ │ │ │ ├── ice_eq.hpp │ │ │ │ ├── ice_not.hpp │ │ │ │ ├── ice_or.hpp │ │ │ │ ├── is_function_ptr_helper.hpp │ │ │ │ ├── is_function_ptr_tester.hpp │ │ │ │ ├── is_mem_fun_pointer_impl.hpp │ │ │ │ ├── is_mem_fun_pointer_tester.hpp │ │ │ │ ├── size_t_trait_def.hpp │ │ │ │ ├── size_t_trait_undef.hpp │ │ │ │ ├── template_arity_spec.hpp │ │ │ │ ├── type_trait_def.hpp │ │ │ │ ├── type_trait_undef.hpp │ │ │ │ ├── wrap.hpp │ │ │ │ └── yes_no_type.hpp │ │ │ ├── extent.hpp │ │ │ ├── floating_point_promotion.hpp │ │ │ ├── function_traits.hpp │ │ │ ├── has_new_operator.hpp │ │ │ ├── has_nothrow_assign.hpp │ │ │ ├── has_nothrow_constructor.hpp │ │ │ ├── has_nothrow_copy.hpp │ │ │ ├── has_nothrow_destructor.hpp │ │ │ ├── has_trivial_assign.hpp │ │ │ ├── has_trivial_constructor.hpp │ │ │ ├── has_trivial_copy.hpp │ │ │ ├── has_trivial_destructor.hpp │ │ │ ├── has_virtual_destructor.hpp │ │ │ ├── ice.hpp │ │ │ ├── integral_constant.hpp │ │ │ ├── integral_promotion.hpp │ │ │ ├── intrinsics.hpp │ │ │ ├── is_abstract.hpp │ │ │ ├── is_arithmetic.hpp │ │ │ ├── is_array.hpp │ │ │ ├── is_base_and_derived.hpp │ │ │ ├── is_base_of.hpp │ │ │ ├── is_base_of_tr1.hpp │ │ │ ├── is_class.hpp │ │ │ ├── is_complex.hpp │ │ │ ├── is_compound.hpp │ │ │ ├── is_const.hpp │ │ │ ├── is_convertible.hpp │ │ │ ├── is_empty.hpp │ │ │ ├── is_enum.hpp │ │ │ ├── is_float.hpp │ │ │ ├── is_floating_point.hpp │ │ │ ├── is_function.hpp │ │ │ ├── is_fundamental.hpp │ │ │ ├── is_integral.hpp │ │ │ ├── is_lvalue_reference.hpp │ │ │ ├── is_member_function_pointer.hpp │ │ │ ├── is_member_object_pointer.hpp │ │ │ ├── is_member_pointer.hpp │ │ │ ├── is_object.hpp │ │ │ ├── is_pod.hpp │ │ │ ├── is_pointer.hpp │ │ │ ├── is_polymorphic.hpp │ │ │ ├── is_reference.hpp │ │ │ ├── is_rvalue_reference.hpp │ │ │ ├── is_same.hpp │ │ │ ├── is_scalar.hpp │ │ │ ├── is_signed.hpp │ │ │ ├── is_stateless.hpp │ │ │ ├── is_union.hpp │ │ │ ├── is_unsigned.hpp │ │ │ ├── is_virtual_base_of.hpp │ │ │ ├── is_void.hpp │ │ │ ├── is_volatile.hpp │ │ │ ├── make_signed.hpp │ │ │ ├── make_unsigned.hpp │ │ │ ├── msvc │ │ │ │ ├── remove_all_extents.hpp │ │ │ │ ├── remove_bounds.hpp │ │ │ │ ├── remove_const.hpp │ │ │ │ ├── remove_cv.hpp │ │ │ │ ├── remove_extent.hpp │ │ │ │ ├── remove_pointer.hpp │ │ │ │ ├── remove_reference.hpp │ │ │ │ ├── remove_volatile.hpp │ │ │ │ └── typeof.hpp │ │ │ ├── object_traits.hpp │ │ │ ├── promote.hpp │ │ │ ├── rank.hpp │ │ │ ├── reference_traits.hpp │ │ │ ├── remove_all_extents.hpp │ │ │ ├── remove_bounds.hpp │ │ │ ├── remove_const.hpp │ │ │ ├── remove_cv.hpp │ │ │ ├── remove_extent.hpp │ │ │ ├── remove_pointer.hpp │ │ │ ├── remove_reference.hpp │ │ │ ├── remove_volatile.hpp │ │ │ ├── same_traits.hpp │ │ │ ├── transform_traits.hpp │ │ │ ├── transform_traits_spec.hpp │ │ │ └── type_with_alignment.hpp │ │ ├── typeof │ │ │ ├── message.hpp │ │ │ ├── native.hpp │ │ │ └── typeof.hpp │ │ └── utility │ │ │ └── declval.hpp │ ├── btree.h │ ├── btree_bench.cc │ ├── btree_config.h │ ├── btree_container.h │ ├── btree_map.h │ ├── btree_set.h │ ├── safe_btree.h │ ├── safe_btree_map.h │ └── safe_btree_set.h ├── lua │ ├── COPYRIGHT │ ├── HISTORY │ ├── INSTALL │ ├── Makefile │ ├── README │ ├── doc │ │ ├── contents.html │ │ ├── cover.png │ │ ├── logo.gif │ │ ├── lua.1 │ │ ├── lua.css │ │ ├── lua.html │ │ ├── luac.1 │ │ ├── luac.html │ │ ├── manual.css │ │ ├── manual.html │ │ └── readme.html │ ├── etc │ │ ├── Makefile │ │ ├── README │ │ ├── all.c │ │ ├── lua.hpp │ │ ├── lua.ico │ │ ├── lua.pc │ │ ├── luavs.bat │ │ ├── min.c │ │ ├── noparser.c │ │ └── strict.lua │ ├── src │ │ ├── Makefile │ │ ├── lapi.c │ │ ├── lapi.h │ │ ├── lauxlib.c │ │ ├── lauxlib.h │ │ ├── lbaselib.c │ │ ├── lcode.c │ │ ├── lcode.h │ │ ├── ldblib.c │ │ ├── ldebug.c │ │ ├── ldebug.h │ │ ├── ldo.c │ │ ├── ldo.h │ │ ├── ldump.c │ │ ├── lfunc.c │ │ ├── lfunc.h │ │ ├── lgc.c │ │ ├── lgc.h │ │ ├── linit.c │ │ ├── liolib.c │ │ ├── llex.c │ │ ├── llex.h │ │ ├── llimits.h │ │ ├── lmathlib.c │ │ ├── lmem.c │ │ ├── lmem.h │ │ ├── loadlib.c │ │ ├── lobject.c │ │ ├── lobject.h │ │ ├── lopcodes.c │ │ ├── lopcodes.h │ │ ├── loslib.c │ │ ├── lparser.c │ │ ├── lparser.h │ │ ├── lstate.c │ │ ├── lstate.h │ │ ├── lstring.c │ │ ├── lstring.h │ │ ├── lstrlib.c │ │ ├── ltable.c │ │ ├── ltable.h │ │ ├── ltablib.c │ │ ├── ltm.c │ │ ├── ltm.h │ │ ├── lua.c │ │ ├── lua.h │ │ ├── lua_cjson.c │ │ ├── lua_cmsgpack.c │ │ ├── lua_struct.c │ │ ├── luac.c │ │ ├── luaconf.h │ │ ├── lualib.h │ │ ├── lundump.c │ │ ├── lundump.h │ │ ├── lvm.c │ │ ├── lvm.h │ │ ├── lzio.c │ │ ├── lzio.h │ │ ├── print.c │ │ ├── strbuf.c │ │ └── strbuf.h │ └── test │ │ ├── README │ │ ├── bisect.lua │ │ ├── cf.lua │ │ ├── echo.lua │ │ ├── env.lua │ │ ├── factorial.lua │ │ ├── fib.lua │ │ ├── fibfor.lua │ │ ├── globals.lua │ │ ├── hello.lua │ │ ├── life.lua │ │ ├── luac.lua │ │ ├── printf.lua │ │ ├── readonly.lua │ │ ├── sieve.lua │ │ ├── sort.lua │ │ ├── table.lua │ │ ├── trace-calls.lua │ │ ├── trace-globals.lua │ │ └── xd.lua ├── sparsehash-sparsehash-2.0.3.tar.gz └── zookeeper-3.4.5.tar.gz ├── doc ├── benchmark.png └── benchmark.xlsx ├── src ├── .kv_engine ├── Makefile ├── background.cpp ├── command │ ├── blocked.cpp │ ├── connection.cpp │ ├── geo.cpp │ ├── hyperloglog.cpp │ ├── keys.cpp │ ├── lua_scripting.cpp │ ├── lua_scripting.hpp │ ├── merge.cpp │ ├── migrate.cpp │ ├── pubsub.cpp │ ├── server.cpp │ ├── slowlog.cpp │ ├── sort.cpp │ ├── t_bitset.cpp │ ├── t_hash.cpp │ ├── t_list.cpp │ ├── t_set.cpp │ ├── t_stream.cpp │ ├── t_string.cpp │ ├── t_zset.cpp │ └── transaction.cpp ├── common │ ├── buffer │ │ ├── buffer.cpp │ │ ├── buffer.hpp │ │ ├── buffer_helper.cpp │ │ ├── buffer_helper.hpp │ │ ├── struct_code_templates.hpp │ │ ├── struct_code_templates2.hpp │ │ └── struct_codec_macros.hpp │ ├── channel │ │ ├── all_includes.hpp │ │ ├── channel.cpp │ │ ├── channel.hpp │ │ ├── channel_downstream_handler.hpp │ │ ├── channel_event.hpp │ │ ├── channel_exception.hpp │ │ ├── channel_handler.hpp │ │ ├── channel_handler_context.cpp │ │ ├── channel_handler_context.hpp │ │ ├── channel_helper.cpp │ │ ├── channel_helper.hpp │ │ ├── channel_pipeline.cpp │ │ ├── channel_pipeline.hpp │ │ ├── channel_service.cpp │ │ ├── channel_service.hpp │ │ ├── channel_state_event.hpp │ │ ├── channel_upstream_handler.hpp │ │ ├── codec │ │ │ ├── delimiter_frame_decoder.cpp │ │ │ ├── delimiter_frame_decoder.hpp │ │ │ ├── dir_sync_decoder.cpp │ │ │ ├── dir_sync_decoder.hpp │ │ │ ├── frame_decoder.hpp │ │ │ ├── int_frame_decoder.hpp │ │ │ ├── int_header_frame_decoder.cpp │ │ │ ├── int_header_frame_decoder.hpp │ │ │ ├── redis_command.hpp │ │ │ ├── redis_command_codec.cpp │ │ │ ├── redis_command_codec.hpp │ │ │ ├── redis_message_codec.hpp │ │ │ ├── redis_reply.cpp │ │ │ ├── redis_reply.hpp │ │ │ ├── redis_reply_codec.cpp │ │ │ ├── redis_reply_codec.hpp │ │ │ └── stack_frame_decoder.hpp │ │ ├── exception_event.hpp │ │ ├── fifo │ │ │ ├── fifo_channel.cpp │ │ │ └── fifo_channel.hpp │ │ ├── message_event.hpp │ │ ├── redis │ │ │ ├── ae.c │ │ │ ├── ae.h │ │ │ ├── ae_epoll.cc │ │ │ ├── ae_kqueue.cc │ │ │ ├── ae_select.cc │ │ │ ├── zmalloc.c │ │ │ └── zmalloc.h │ │ ├── signal │ │ │ ├── signal_channel.cpp │ │ │ ├── signal_channel.hpp │ │ │ ├── soft_signal_channel.cpp │ │ │ └── soft_signal_channel.hpp │ │ ├── socket │ │ │ ├── clientsocket_channel.cpp │ │ │ ├── clientsocket_channel.hpp │ │ │ ├── datagram_channel.cpp │ │ │ ├── datagram_channel.hpp │ │ │ ├── serversocket_channel.cpp │ │ │ ├── serversocket_channel.hpp │ │ │ ├── socket_channel.cpp │ │ │ └── socket_channel.hpp │ │ └── timer │ │ │ ├── timer.cpp │ │ │ ├── timer.hpp │ │ │ ├── timer_channel.cpp │ │ │ ├── timer_channel.hpp │ │ │ ├── timer_task.hpp │ │ │ ├── timer_task_queue.cpp │ │ │ └── timer_task_queue.hpp │ ├── common.hpp │ ├── config.h │ ├── constants.hpp │ ├── coro │ │ ├── coro.c │ │ ├── coro.h │ │ ├── coro_channel.cpp │ │ ├── coro_channel.hpp │ │ ├── scheduler.cpp │ │ └── scheduler.hpp │ ├── debug.h │ ├── geo │ │ ├── geohash.c │ │ ├── geohash.h │ │ ├── geohash_helper.cpp │ │ └── geohash_helper.hpp │ ├── redis │ │ ├── crc64.c │ │ ├── crc64.h │ │ ├── endianconv.c │ │ ├── endianconv.h │ │ ├── intset.c │ │ ├── intset.h │ │ ├── listpack.c │ │ ├── listpack.h │ │ ├── listpack_malloc.h │ │ ├── lzf.h │ │ ├── lzfP.h │ │ ├── lzf_c.c │ │ ├── lzf_d.c │ │ ├── ziplist.c │ │ ├── ziplist.h │ │ ├── zipmap.c │ │ └── zipmap.h │ ├── runnable.hpp │ ├── thread │ │ ├── event_condition.cpp │ │ ├── event_condition.hpp │ │ ├── lock_guard.hpp │ │ ├── lock_mode.hpp │ │ ├── spin_mutex_lock.hpp │ │ ├── spin_rwlock.hpp │ │ ├── thread.cpp │ │ ├── thread.hpp │ │ ├── thread_condition.hpp │ │ ├── thread_local.hpp │ │ ├── thread_mutex.hpp │ │ └── thread_mutex_lock.hpp │ └── util │ │ ├── address.hpp │ │ ├── atomic.hpp │ │ ├── concurrent_queue.hpp │ │ ├── config_helper.cpp │ │ ├── config_helper.hpp │ │ ├── datagram_packet.cpp │ │ ├── datagram_packet.hpp │ │ ├── debug.h │ │ ├── exception │ │ ├── api_exception.cpp │ │ ├── api_exception.hpp │ │ └── exception.hpp │ │ ├── file_helper.cpp │ │ ├── file_helper.hpp │ │ ├── helpers.hpp │ │ ├── lru.hpp │ │ ├── math_helper.cpp │ │ ├── math_helper.hpp │ │ ├── mmap.cpp │ │ ├── mmap.hpp │ │ ├── murmur3.c │ │ ├── murmur3.h │ │ ├── network_helper.cpp │ │ ├── network_helper.hpp │ │ ├── rand.c │ │ ├── rand.h │ │ ├── runnable.hpp │ │ ├── sds.c │ │ ├── sds.h │ │ ├── sha1.c │ │ ├── sha1.h │ │ ├── socket_address.cpp │ │ ├── socket_address.hpp │ │ ├── socket_host_address.hpp │ │ ├── socket_inet_address.hpp │ │ ├── socket_unix_address.hpp │ │ ├── string_helper.cpp │ │ ├── string_helper.hpp │ │ ├── system_helper.cpp │ │ ├── system_helper.hpp │ │ ├── time_helper.cpp │ │ ├── time_helper.hpp │ │ ├── time_unit.hpp │ │ └── version_helper.hpp ├── config.cpp ├── config.hpp ├── context.hpp ├── cron.cpp ├── db │ ├── codec.cpp │ ├── codec.hpp │ ├── db.cpp │ ├── db.hpp │ ├── db_utils.cpp │ ├── db_utils.hpp │ ├── engine.cpp │ ├── engine.hpp │ ├── engine_factory.cpp │ ├── engine_factory.hpp │ ├── forestdb │ │ ├── forestdb_engine.cpp │ │ └── forestdb_engine.hpp │ ├── leveldb │ │ ├── leveldb_engine.cpp │ │ └── leveldb_engine.hpp │ ├── lmdb │ │ ├── lmdb_engine.cpp │ │ └── lmdb_engine.hpp │ ├── perconaft │ │ ├── perconaft_engine.cpp │ │ └── perconaft_engine.hpp │ ├── rocksdb │ │ ├── rocksdb_engine.cpp │ │ └── rocksdb_engine.hpp │ └── wiredtiger │ │ ├── wiredtiger_engine.cpp │ │ ├── wiredtiger_engine.hpp │ │ └── wiredtiger_extension.cpp ├── logger.cpp ├── logger.hpp ├── main.cpp ├── network.cpp ├── network.hpp ├── repl │ ├── master.cpp │ ├── repl.cpp │ ├── repl.hpp │ ├── slave.cpp │ ├── snapshot.cpp │ ├── snapshot.hpp │ ├── swal.c │ └── swal.h ├── statistics.cpp ├── statistics.hpp ├── tools │ └── repair.cpp ├── types.cpp └── types.hpp └── test ├── ardb-test.conf ├── commands ├── bitop_test.lua ├── geo_test.lua ├── hash_test.lua ├── hyperloglog_test.lua ├── keys_test.lua ├── list_test.lua ├── set_test.lua ├── sort_test.lua ├── string_test.lua └── zset_set.lua └── test_main.cpp /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.so 3 | *.a 4 | /.svn 5 | /.libs 6 | ardb-test* 7 | ardb-server* 8 | ardb-repair* 9 | *.bak 10 | snappy-*/ 11 | gperftools-*/ 12 | jemalloc-*/ 13 | leveldb-*/ 14 | /Debug 15 | testdb/ 16 | ~* 17 | .kv_engine 18 | core 19 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | 3 | compiler: 4 | - gcc 5 | - clang 6 | 7 | sudo: required 8 | dist: xenial 9 | 10 | addons: 11 | packages: 12 | - libbz2-dev 13 | 14 | script: 15 | - pushd src 16 | - make 17 | - ./ardb-test 18 | - storage_engine=leveldb make 19 | - ./ardb-test 20 | - storage_engine=lmdb make 21 | - ./ardb-test 22 | - popd 23 | 24 | os: 25 | - linux 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2013, yinqiwen 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of the Ardb nor the 12 | names of its contributors may be used to endorse or promote products 13 | derived from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | default: all 2 | 3 | .DEFAULT: 4 | cd src && $(MAKE) $@ 5 | -------------------------------------------------------------------------------- /deps/.gitignore: -------------------------------------------------------------------------------- 1 | lua/src/lua 2 | lua/src/luac 3 | -------------------------------------------------------------------------------- /deps/cJSON/.gitignore: -------------------------------------------------------------------------------- 1 | .svn 2 | test 3 | *.o 4 | *.a 5 | *.so 6 | *.swp 7 | *.patch 8 | tags 9 | -------------------------------------------------------------------------------- /deps/cJSON/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | set(PROJ_CJSON cJSON) 4 | 5 | project(${PROJ_CJSON} C) 6 | 7 | file(GLOB HEADERS cJSON.h) 8 | set(SOURCES cJSON.c) 9 | 10 | add_library(${PROJ_CJSON} STATIC ${HEADERS} ${SOURCES}) 11 | if (NOT WIN32) 12 | target_link_libraries(${PROJ_CJSON} m) 13 | endif() 14 | 15 | add_library(${PROJ_CJSON}.shared SHARED ${HEADERS} ${SOURCES}) 16 | set_target_properties(${PROJ_CJSON}.shared PROPERTIES OUTPUT_NAME cJSON) 17 | if (NOT WIN32) 18 | target_link_libraries(${PROJ_CJSON}.shared m) 19 | endif() 20 | 21 | 22 | set(PROJ_CJSON_UTILS cJSON_utils) 23 | 24 | project(${PROJ_CJSON_UTILS} C) 25 | 26 | file(GLOB HEADERS_UTILS cJSON_Utils.h) 27 | set(SOURCES_UTILS cJSON_Utils.c) 28 | 29 | add_library(${PROJ_CJSON_UTILS} STATIC ${HEADERS_UTILS} ${SOURCES_UTILS}) 30 | target_link_libraries(${PROJ_CJSON_UTILS} ${PROJ_CJSON}) 31 | 32 | add_library(${PROJ_CJSON_UTILS}.shared SHARED ${HEADERS_UTILS} ${SOURCES_UTILS}) 33 | set_target_properties(${PROJ_CJSON_UTILS}.shared PROPERTIES OUTPUT_NAME cJSON_utils) 34 | target_link_libraries(${PROJ_CJSON_UTILS}.shared ${PROJ_CJSON}.shared) 35 | 36 | install (TARGETS ${PROJ_CJSON} DESTINATION lib${LIB_SUFFIX}) 37 | install (TARGETS ${PROJ_CJSON}.shared DESTINATION lib${LIB_SUFFIX}) 38 | install (FILES cJSON.h DESTINATION include/cJSON) 39 | install (TARGETS ${PROJ_CJSON_UTILS} DESTINATION lib${LIB_SUFFIX}) 40 | install (TARGETS ${PROJ_CJSON_UTILS}.shared DESTINATION lib${LIB_SUFFIX}) 41 | install (FILES cJSON_Utils.h DESTINATION include/cJSON) 42 | 43 | option(ENABLE_CJSON_TEST "Enable building cJSON test" OFF) 44 | if(ENABLE_CJSON_TEST) 45 | set(TEST_CJSON cJSON_test) 46 | add_executable(${TEST_CJSON} test.c) 47 | target_link_libraries(${TEST_CJSON} ${PROJ_CJSON}.shared) 48 | 49 | set(TEST_CJSON_UTILS cJSON_test_utils) 50 | add_executable(${TEST_CJSON_UTILS} test_utils.c) 51 | target_link_libraries(${TEST_CJSON_UTILS} ${PROJ_CJSON_UTILS}.shared) 52 | endif() 53 | -------------------------------------------------------------------------------- /deps/cJSON/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 Dave Gamble 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | 21 | -------------------------------------------------------------------------------- /deps/cJSON/Makefile: -------------------------------------------------------------------------------- 1 | OBJ = cJSON.o 2 | LIBNAME = libcjson 3 | TESTS = test 4 | 5 | PREFIX ?= /usr/local 6 | INCLUDE_PATH ?= include/cjson 7 | LIBRARY_PATH ?= lib 8 | 9 | INSTALL_INCLUDE_PATH = $(DESTDIR)$(PREFIX)/$(INCLUDE_PATH) 10 | INSTALL_LIBRARY_PATH = $(DESTDIR)$(PREFIX)/$(LIBRARY_PATH) 11 | 12 | INSTALL ?= cp -a 13 | 14 | R_CFLAGS = -fpic $(CFLAGS) -Wall -Werror -Wstrict-prototypes -Wwrite-strings -D_POSIX_C_SOURCE=200112L 15 | 16 | uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo false') 17 | 18 | ## shared lib 19 | DYLIBNAME = $(LIBNAME).so 20 | DYLIBCMD = $(CC) -shared -o $(DYLIBNAME) 21 | 22 | ## create dynamic (shared) library on Darwin (base OS for MacOSX and IOS) 23 | ifeq (Darwin, $(uname_S)) 24 | DYLIBNAME = $(LIBNAME).dylib 25 | ## create dyanmic (shared) library on SunOS 26 | else ifeq (SunOS, $(uname_S)) 27 | DYLIBCMD = $(CC) -G -o $(DYLIBNAME) 28 | INSTALL = cp -r 29 | endif 30 | 31 | ## static lib 32 | STLIBNAME = $(LIBNAME).a 33 | 34 | .PHONY: all clean install 35 | 36 | all: $(DYLIBNAME) $(STLIBNAME) $(TESTS) 37 | 38 | $(DYLIBNAME): $(OBJ) 39 | $(DYLIBCMD) $< $(LDFLAGS) 40 | 41 | $(STLIBNAME): $(OBJ) 42 | ar rcs $@ $< 43 | 44 | $(OBJ): cJSON.c cJSON.h 45 | 46 | .c.o: 47 | $(CC) -ansi -pedantic -c $(R_CFLAGS) $< 48 | 49 | $(TESTS): cJSON.c cJSON.h test.c 50 | $(CC) cJSON.c test.c -o test -lm -I. 51 | 52 | install: $(DYLIBNAME) $(STLIBNAME) 53 | mkdir -p $(INSTALL_LIBRARY_PATH) $(INSTALL_INCLUDE_PATH) 54 | $(INSTALL) cJSON.h $(INSTALL_INCLUDE_PATH) 55 | $(INSTALL) $(DYLIBNAME) $(INSTALL_LIBRARY_PATH) 56 | $(INSTALL) $(STLIBNAME) $(INSTALL_LIBRARY_PATH) 57 | 58 | uninstall: 59 | rm -rf $(INSTALL_LIBRARY_PATH)/$(DYLIBNAME) 60 | rm -rf $(INSTALL_LIBRARY_PATH)/$(STLIBNAME) 61 | rm -rf $(INSTALL_INCLUDE_PATH)/cJSON.h 62 | 63 | clean: 64 | rm -rf $(DYLIBNAME) $(STLIBNAME) $(TESTS) *.o 65 | -------------------------------------------------------------------------------- /deps/cJSON/cJSON_Utils.h: -------------------------------------------------------------------------------- 1 | #include "cJSON.h" 2 | 3 | /* Implement RFC6901 (https://tools.ietf.org/html/rfc6901) JSON Pointer spec. */ 4 | cJSON *cJSONUtils_GetPointer(cJSON *object,const char *pointer); 5 | 6 | /* Implement RFC6902 (https://tools.ietf.org/html/rfc6902) JSON Patch spec. */ 7 | cJSON* cJSONUtils_GeneratePatches(cJSON *from,cJSON *to); 8 | void cJSONUtils_AddPatchToArray(cJSON *array,const char *op,const char *path,cJSON *val); /* Utility for generating patch array entries. */ 9 | int cJSONUtils_ApplyPatches(cJSON *object,cJSON *patches); /* Returns 0 for success. */ 10 | 11 | /* 12 | // Note that ApplyPatches is NOT atomic on failure. To implement an atomic ApplyPatches, use: 13 | //int cJSONUtils_AtomicApplyPatches(cJSON **object, cJSON *patches) 14 | //{ 15 | // cJSON *modme=cJSON_Duplicate(*object,1); 16 | // int error=cJSONUtils_ApplyPatches(modme,patches); 17 | // if (!error) {cJSON_Delete(*object);*object=modme;} 18 | // else cJSON_Delete(modme); 19 | // return error; 20 | //} 21 | // Code not added to library since this strategy is a LOT slower. 22 | */ 23 | 24 | char *cJSONUtils_FindPointerFromObjectTo(cJSON *object,cJSON *target); /* Given a root object and a target object, construct a pointer from one to the other. */ 25 | 26 | void cJSONUtils_SortObject(cJSON *object); /* Sorts the members of the object into alphabetical order. */ 27 | -------------------------------------------------------------------------------- /deps/cJSON/tests/test1: -------------------------------------------------------------------------------- 1 | { 2 | "glossary": { 3 | "title": "example glossary", 4 | "GlossDiv": { 5 | "title": "S", 6 | "GlossList": { 7 | "GlossEntry": { 8 | "ID": "SGML", 9 | "SortAs": "SGML", 10 | "GlossTerm": "Standard Generalized Markup Language", 11 | "Acronym": "SGML", 12 | "Abbrev": "ISO 8879:1986", 13 | "GlossDef": { 14 | "para": "A meta-markup language, used to create markup languages such as DocBook.", 15 | "GlossSeeAlso": ["GML", "XML"] 16 | }, 17 | "GlossSee": "markup" 18 | } 19 | } 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /deps/cJSON/tests/test2: -------------------------------------------------------------------------------- 1 | {"menu": { 2 | "id": "file", 3 | "value": "File", 4 | "popup": { 5 | "menuitem": [ 6 | {"value": "New", "onclick": "CreateNewDoc()"}, 7 | {"value": "Open", "onclick": "OpenDoc()"}, 8 | {"value": "Close", "onclick": "CloseDoc()"} 9 | ] 10 | } 11 | }} 12 | -------------------------------------------------------------------------------- /deps/cJSON/tests/test3: -------------------------------------------------------------------------------- 1 | {"widget": { 2 | "debug": "on", 3 | "window": { 4 | "title": "Sample Konfabulator Widget", 5 | "name": "main_window", 6 | "width": 500, 7 | "height": 500 8 | }, 9 | "image": { 10 | "src": "Images/Sun.png", 11 | "name": "sun1", 12 | "hOffset": 250, 13 | "vOffset": 250, 14 | "alignment": "center" 15 | }, 16 | "text": { 17 | "data": "Click Here", 18 | "size": 36, 19 | "style": "bold", 20 | "name": "text1", 21 | "hOffset": 250, 22 | "vOffset": 100, 23 | "alignment": "center", 24 | "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" 25 | } 26 | }} -------------------------------------------------------------------------------- /deps/cJSON/tests/test5: -------------------------------------------------------------------------------- 1 | {"menu": { 2 | "header": "SVG Viewer", 3 | "items": [ 4 | {"id": "Open"}, 5 | {"id": "OpenNew", "label": "Open New"}, 6 | null, 7 | {"id": "ZoomIn", "label": "Zoom In"}, 8 | {"id": "ZoomOut", "label": "Zoom Out"}, 9 | {"id": "OriginalView", "label": "Original View"}, 10 | null, 11 | {"id": "Quality"}, 12 | {"id": "Pause"}, 13 | {"id": "Mute"}, 14 | null, 15 | {"id": "Find", "label": "Find..."}, 16 | {"id": "FindAgain", "label": "Find Again"}, 17 | {"id": "Copy"}, 18 | {"id": "CopyAgain", "label": "Copy Again"}, 19 | {"id": "CopySVG", "label": "Copy SVG"}, 20 | {"id": "ViewSVG", "label": "View SVG"}, 21 | {"id": "ViewSource", "label": "View Source"}, 22 | {"id": "SaveAs", "label": "Save As"}, 23 | null, 24 | {"id": "Help"}, 25 | {"id": "About", "label": "About Adobe CVG Viewer..."} 26 | ] 27 | }} 28 | -------------------------------------------------------------------------------- /deps/cJSON/tests/test6: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | Application Error 10 | 11 | 12 | 15 | 16 | -------------------------------------------------------------------------------- /deps/cpp-btree/README: -------------------------------------------------------------------------------- 1 | This library is a C++ template library and, as such, there is no 2 | library to build and install. Copy the .h files and use them! 3 | 4 | See http://code.google.com/p/cpp-btree/wiki/UsageInstructions for 5 | details. 6 | 7 | ---- 8 | 9 | To build and run the provided tests, however, you will need to install 10 | CMake, the Google C++ Test framework, and the Google flags package. 11 | 12 | Download and install CMake from http://www.cmake.org 13 | 14 | Download and build the GoogleTest framework from http://code.google.com/p/googletest 15 | 16 | Download and install gflags from https://code.google.com/p/gflags 17 | 18 | export GTEST_ROOT=/path/for/gtest-x.y 19 | 20 | cmake . -Dbuild_tests=ON 21 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/abi/borland_prefix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // for C++ Builder the following options effect the ABI: 7 | // 8 | // -b (on or off - effect emum sizes) 9 | // -Vx (on or off - empty members) 10 | // -Ve (on or off - empty base classes) 11 | // -aX (alignment - 5 options). 12 | // -pX (Calling convention - 4 options) 13 | // -VmX (member pointer size and layout - 5 options) 14 | // -VC (on or off, changes name mangling) 15 | // -Vl (on or off, changes struct layout). 16 | 17 | // In addition the following warnings are sufficiently annoying (and 18 | // unfixable) to have them turned off by default: 19 | // 20 | // 8027 - functions containing [for|while] loops are not expanded inline 21 | // 8026 - functions taking class by value arguments are not expanded inline 22 | 23 | #pragma nopushoptwarn 24 | # pragma option push -a8 -Vx- -Ve- -b- -pc -Vmv -VC- -Vl- -w-8027 -w-8026 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/abi/borland_suffix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | # pragma option pop 7 | #pragma nopushoptwarn 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/abi/msvc_prefix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // 7 | // Boost binaries are built with the compiler's default ABI settings, 8 | // if the user changes their default alignment in the VS IDE then their 9 | // code will no longer be binary compatible with the bjam built binaries 10 | // unless this header is included to force Boost code into a consistent ABI. 11 | // 12 | // Note that inclusion of this header is only necessary for libraries with 13 | // separate source, header only libraries DO NOT need this as long as all 14 | // translation units are built with the same options. 15 | // 16 | #if defined(_M_X64) 17 | # pragma pack(push,16) 18 | #else 19 | # pragma pack(push,8) 20 | #endif 21 | 22 | 23 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/abi/msvc_suffix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #pragma pack(pop) 7 | 8 | 9 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/abi_prefix.hpp: -------------------------------------------------------------------------------- 1 | // abi_prefix header -------------------------------------------------------// 2 | 3 | // (c) Copyright John Maddock 2003 4 | 5 | // Use, modification and distribution are subject to the Boost Software License, 6 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 7 | // http://www.boost.org/LICENSE_1_0.txt). 8 | 9 | #ifndef BOOST_CONFIG_ABI_PREFIX_HPP 10 | # define BOOST_CONFIG_ABI_PREFIX_HPP 11 | #else 12 | # error double inclusion of header boost/config/abi_prefix.hpp is an error 13 | #endif 14 | 15 | #include 16 | 17 | // this must occur after all other includes and before any code appears: 18 | #ifdef BOOST_HAS_ABI_HEADERS 19 | # include BOOST_ABI_PREFIX 20 | #endif 21 | 22 | #if defined( __BORLANDC__ ) 23 | #pragma nopushoptwarn 24 | #endif 25 | 26 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/abi_suffix.hpp: -------------------------------------------------------------------------------- 1 | // abi_sufffix header -------------------------------------------------------// 2 | 3 | // (c) Copyright John Maddock 2003 4 | 5 | // Use, modification and distribution are subject to the Boost Software License, 6 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 7 | // http://www.boost.org/LICENSE_1_0.txt). 8 | 9 | // This header should be #included AFTER code that was preceded by a #include 10 | // . 11 | 12 | #ifndef BOOST_CONFIG_ABI_PREFIX_HPP 13 | # error Header boost/config/abi_suffix.hpp must only be used after boost/config/abi_prefix.hpp 14 | #else 15 | # undef BOOST_CONFIG_ABI_PREFIX_HPP 16 | #endif 17 | 18 | // the suffix header occurs after all of our code: 19 | #ifdef BOOST_HAS_ABI_HEADERS 20 | # include BOOST_ABI_SUFFIX 21 | #endif 22 | 23 | #if defined( __BORLANDC__ ) 24 | #pragma nopushoptwarn 25 | #endif 26 | 27 | 28 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/compiler/comeau.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001. 2 | // (C) Copyright Douglas Gregor 2001. 3 | // (C) Copyright Peter Dimov 2001. 4 | // (C) Copyright Aleksey Gurtovoy 2003. 5 | // (C) Copyright Beman Dawes 2003. 6 | // (C) Copyright Jens Maurer 2003. 7 | // Use, modification and distribution are subject to the 8 | // Boost Software License, Version 1.0. (See accompanying file 9 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 10 | 11 | // See http://www.boost.org for most recent version. 12 | 13 | // Comeau C++ compiler setup: 14 | 15 | #include "boost/config/compiler/common_edg.hpp" 16 | 17 | #if (__COMO_VERSION__ <= 4245) 18 | 19 | # if defined(_MSC_VER) && _MSC_VER <= 1300 20 | # if _MSC_VER > 100 21 | // only set this in non-strict mode: 22 | # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP 23 | # endif 24 | # endif 25 | 26 | // Void returns don't work when emulating VC 6 (Peter Dimov) 27 | // TODO: look up if this doesn't apply to the whole 12xx range 28 | # if defined(_MSC_VER) && (_MSC_VER < 1300) 29 | # define BOOST_NO_VOID_RETURNS 30 | # endif 31 | 32 | #endif // version 4245 33 | 34 | // 35 | // enable __int64 support in VC emulation mode 36 | // 37 | # if defined(_MSC_VER) && (_MSC_VER >= 1200) 38 | # define BOOST_HAS_MS_INT64 39 | # endif 40 | 41 | #define BOOST_COMPILER "Comeau compiler version " BOOST_STRINGIZE(__COMO_VERSION__) 42 | 43 | // 44 | // versions check: 45 | // we don't know Comeau prior to version 4245: 46 | #if __COMO_VERSION__ < 4245 47 | # error "Compiler not configured - please reconfigure" 48 | #endif 49 | // 50 | // last known and checked version is 4245: 51 | #if (__COMO_VERSION__ > 4245) 52 | # if defined(BOOST_ASSERT_CONFIG) 53 | # error "Unknown compiler version - please run the configure tests and report the results" 54 | # endif 55 | #endif 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/compiler/compaq_cxx.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // Tru64 C++ compiler setup (now HP): 9 | 10 | #define BOOST_COMPILER "HP Tru64 C++ " BOOST_STRINGIZE(__DECCXX_VER) 11 | 12 | #include "boost/config/compiler/common_edg.hpp" 13 | 14 | // 15 | // versions check: 16 | // Nothing to do here? 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/compiler/gcc_xml.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2006. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // GCC-XML C++ compiler setup: 9 | 10 | # if !defined(__GCCXML_GNUC__) || ((__GCCXML_GNUC__ <= 3) && (__GCCXML_GNUC_MINOR__ <= 3)) 11 | # define BOOST_NO_IS_ABSTRACT 12 | # endif 13 | 14 | // 15 | // Threading support: Turn this on unconditionally here (except for 16 | // those platforms where we can know for sure). It will get turned off again 17 | // later if no threading API is detected. 18 | // 19 | #if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(linux) && !defined(__linux) && !defined(__linux__) 20 | # define BOOST_HAS_THREADS 21 | #endif 22 | 23 | // 24 | // gcc has "long long" 25 | // 26 | #define BOOST_HAS_LONG_LONG 27 | 28 | // C++0x features: 29 | // 30 | # define BOOST_NO_CONSTEXPR 31 | # define BOOST_NO_NULLPTR 32 | # define BOOST_NO_TEMPLATE_ALIASES 33 | # define BOOST_NO_DECLTYPE 34 | # define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS 35 | # define BOOST_NO_RVALUE_REFERENCES 36 | # define BOOST_NO_STATIC_ASSERT 37 | # define BOOST_NO_VARIADIC_TEMPLATES 38 | # define BOOST_NO_VARIADIC_MACROS 39 | # define BOOST_NO_AUTO_DECLARATIONS 40 | # define BOOST_NO_AUTO_MULTIDECLARATIONS 41 | # define BOOST_NO_CHAR16_T 42 | # define BOOST_NO_CHAR32_T 43 | # define BOOST_NO_DEFAULTED_FUNCTIONS 44 | # define BOOST_NO_DELETED_FUNCTIONS 45 | # define BOOST_NO_INITIALIZER_LISTS 46 | # define BOOST_NO_SCOPED_ENUMS 47 | # define BOOST_NO_SFINAE_EXPR 48 | # define BOOST_NO_SCOPED_ENUMS 49 | # define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS 50 | # define BOOST_NO_LAMBDAS 51 | # define BOOST_NO_RAW_LITERALS 52 | # define BOOST_NO_UNICODE_LITERALS 53 | 54 | #define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__ 55 | 56 | 57 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/compiler/greenhills.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // Greenhills C++ compiler setup: 9 | 10 | #define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs) 11 | 12 | #include "boost/config/compiler/common_edg.hpp" 13 | 14 | // 15 | // versions check: 16 | // we don't support Greenhills prior to version 0: 17 | #if __ghs < 0 18 | # error "Compiler not supported or configured - please reconfigure" 19 | #endif 20 | // 21 | // last known and checked version is 0: 22 | #if (__ghs > 0) 23 | # if defined(BOOST_ASSERT_CONFIG) 24 | # error "Unknown compiler version - please run the configure tests and report the results" 25 | # endif 26 | #endif 27 | 28 | 29 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/compiler/kai.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001. 2 | // (C) Copyright David Abrahams 2002. 3 | // (C) Copyright Aleksey Gurtovoy 2002. 4 | // Use, modification and distribution are subject to the 5 | // Boost Software License, Version 1.0. (See accompanying file 6 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 7 | 8 | // See http://www.boost.org for most recent version. 9 | 10 | // Kai C++ compiler setup: 11 | 12 | #include "boost/config/compiler/common_edg.hpp" 13 | 14 | # if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG) 15 | // at least on Sun, the contents of is not in namespace std 16 | # define BOOST_NO_STDC_NAMESPACE 17 | # endif 18 | 19 | // see also common_edg.hpp which needs a special check for __KCC 20 | # if !defined(_EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) 21 | # define BOOST_NO_EXCEPTIONS 22 | # endif 23 | 24 | // 25 | // last known and checked version is 4001: 26 | #if (__KCC_VERSION > 4001) 27 | # if defined(BOOST_ASSERT_CONFIG) 28 | # error "Unknown compiler version - please run the configure tests and report the results" 29 | # endif 30 | #endif 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/compiler/nvcc.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Eric Jourdanneau, Joel Falcou 2010 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // NVIDIA CUDA C++ compiler setup 9 | 10 | #ifndef BOOST_COMPILER 11 | # define BOOST_COMPILER "NVIDIA CUDA C++ Compiler" 12 | #endif 13 | 14 | // NVIDIA Specific support 15 | // BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device 16 | #define BOOST_GPU_ENABLED __host__ __device__ 17 | 18 | // Boost support macro for NVCC 19 | // NVCC Basically behaves like some flavor of MSVC6 + some specific quirks 20 | #ifdef __GNUC__ 21 | 22 | #include 23 | 24 | #elif defined(_MSC_VER) 25 | 26 | #include 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/compiler/sgi_mipspro.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2002. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // SGI C++ compiler setup: 9 | 10 | #define BOOST_COMPILER "SGI Irix compiler version " BOOST_STRINGIZE(_COMPILER_VERSION) 11 | 12 | #include "boost/config/compiler/common_edg.hpp" 13 | 14 | // 15 | // Threading support: 16 | // Turn this on unconditionally here, it will get turned off again later 17 | // if no threading API is detected. 18 | // 19 | #define BOOST_HAS_THREADS 20 | #define BOOST_NO_TWO_PHASE_NAME_LOOKUP 21 | 22 | #undef BOOST_NO_SWPRINTF 23 | #undef BOOST_DEDUCED_TYPENAME 24 | 25 | // 26 | // version check: 27 | // probably nothing to do here? 28 | 29 | 30 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/no_tr1/cmath.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2008. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | // 6 | // The aim of this header is just to include but to do 7 | // so in a way that does not result in recursive inclusion of 8 | // the Boost TR1 components if boost/tr1/tr1/cmath is in the 9 | // include search path. We have to do this to avoid circular 10 | // dependencies: 11 | // 12 | 13 | #ifndef BOOST_CONFIG_CMATH 14 | # define BOOST_CONFIG_CMATH 15 | 16 | # ifndef BOOST_TR1_NO_RECURSION 17 | # define BOOST_TR1_NO_RECURSION 18 | # define BOOST_CONFIG_NO_CMATH_RECURSION 19 | # endif 20 | 21 | # include 22 | 23 | # ifdef BOOST_CONFIG_NO_CMATH_RECURSION 24 | # undef BOOST_TR1_NO_RECURSION 25 | # undef BOOST_CONFIG_NO_CMATH_RECURSION 26 | # endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/no_tr1/complex.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2005. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | // 6 | // The aim of this header is just to include but to do 7 | // so in a way that does not result in recursive inclusion of 8 | // the Boost TR1 components if boost/tr1/tr1/complex is in the 9 | // include search path. We have to do this to avoid circular 10 | // dependencies: 11 | // 12 | 13 | #ifndef BOOST_CONFIG_COMPLEX 14 | # define BOOST_CONFIG_COMPLEX 15 | 16 | # ifndef BOOST_TR1_NO_RECURSION 17 | # define BOOST_TR1_NO_RECURSION 18 | # define BOOST_CONFIG_NO_COMPLEX_RECURSION 19 | # endif 20 | 21 | # include 22 | 23 | # ifdef BOOST_CONFIG_NO_COMPLEX_RECURSION 24 | # undef BOOST_TR1_NO_RECURSION 25 | # undef BOOST_CONFIG_NO_COMPLEX_RECURSION 26 | # endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/no_tr1/functional.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2005. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | // 6 | // The aim of this header is just to include but to do 7 | // so in a way that does not result in recursive inclusion of 8 | // the Boost TR1 components if boost/tr1/tr1/functional is in the 9 | // include search path. We have to do this to avoid circular 10 | // dependencies: 11 | // 12 | 13 | #ifndef BOOST_CONFIG_FUNCTIONAL 14 | # define BOOST_CONFIG_FUNCTIONAL 15 | 16 | # ifndef BOOST_TR1_NO_RECURSION 17 | # define BOOST_TR1_NO_RECURSION 18 | # define BOOST_CONFIG_NO_FUNCTIONAL_RECURSION 19 | # endif 20 | 21 | # include 22 | 23 | # ifdef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION 24 | # undef BOOST_TR1_NO_RECURSION 25 | # undef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION 26 | # endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/no_tr1/memory.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2005. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | // 6 | // The aim of this header is just to include but to do 7 | // so in a way that does not result in recursive inclusion of 8 | // the Boost TR1 components if boost/tr1/tr1/memory is in the 9 | // include search path. We have to do this to avoid circular 10 | // dependencies: 11 | // 12 | 13 | #ifndef BOOST_CONFIG_MEMORY 14 | # define BOOST_CONFIG_MEMORY 15 | 16 | # ifndef BOOST_TR1_NO_RECURSION 17 | # define BOOST_TR1_NO_RECURSION 18 | # define BOOST_CONFIG_NO_MEMORY_RECURSION 19 | # endif 20 | 21 | # include 22 | 23 | # ifdef BOOST_CONFIG_NO_MEMORY_RECURSION 24 | # undef BOOST_TR1_NO_RECURSION 25 | # undef BOOST_CONFIG_NO_MEMORY_RECURSION 26 | # endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/no_tr1/utility.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2005. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | // 6 | // The aim of this header is just to include but to do 7 | // so in a way that does not result in recursive inclusion of 8 | // the Boost TR1 components if boost/tr1/tr1/utility is in the 9 | // include search path. We have to do this to avoid circular 10 | // dependencies: 11 | // 12 | 13 | #ifndef BOOST_CONFIG_UTILITY 14 | # define BOOST_CONFIG_UTILITY 15 | 16 | # ifndef BOOST_TR1_NO_RECURSION 17 | # define BOOST_TR1_NO_RECURSION 18 | # define BOOST_CONFIG_NO_UTILITY_RECURSION 19 | # endif 20 | 21 | # include 22 | 23 | # ifdef BOOST_CONFIG_NO_UTILITY_RECURSION 24 | # undef BOOST_TR1_NO_RECURSION 25 | # undef BOOST_CONFIG_NO_UTILITY_RECURSION 26 | # endif 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/platform/aix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2002. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // IBM/Aix specific config options: 9 | 10 | #define BOOST_PLATFORM "IBM Aix" 11 | 12 | #define BOOST_HAS_UNISTD_H 13 | #define BOOST_HAS_NL_TYPES_H 14 | #define BOOST_HAS_NANOSLEEP 15 | #define BOOST_HAS_CLOCK_GETTIME 16 | 17 | // This needs support in "boost/cstdint.hpp" exactly like FreeBSD. 18 | // This platform has header named which includes all 19 | // the things needed. 20 | #define BOOST_HAS_STDINT_H 21 | 22 | // Threading API's: 23 | #define BOOST_HAS_PTHREADS 24 | #define BOOST_HAS_PTHREAD_DELAY_NP 25 | #define BOOST_HAS_SCHED_YIELD 26 | //#define BOOST_HAS_PTHREAD_YIELD 27 | 28 | // boilerplate code: 29 | #include 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/platform/amigaos.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2002. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | #define BOOST_PLATFORM "AmigaOS" 9 | 10 | #define BOOST_DISABLE_THREADS 11 | #define BOOST_NO_CWCHAR 12 | #define BOOST_NO_STD_WSTRING 13 | #define BOOST_NO_INTRINSIC_WCHAR_T 14 | 15 | 16 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/platform/beos.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // BeOS specific config options: 9 | 10 | #define BOOST_PLATFORM "BeOS" 11 | 12 | #define BOOST_NO_CWCHAR 13 | #define BOOST_NO_CWCTYPE 14 | #define BOOST_HAS_UNISTD_H 15 | 16 | #define BOOST_HAS_BETHREADS 17 | 18 | #ifndef BOOST_DISABLE_THREADS 19 | # define BOOST_HAS_THREADS 20 | #endif 21 | 22 | // boilerplate code: 23 | #include 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/platform/cygwin.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2003. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // cygwin specific config options: 9 | 10 | #define BOOST_PLATFORM "Cygwin" 11 | #define BOOST_HAS_DIRENT_H 12 | #define BOOST_HAS_LOG1P 13 | #define BOOST_HAS_EXPM1 14 | 15 | // 16 | // Threading API: 17 | // See if we have POSIX threads, if we do use them, otherwise 18 | // revert to native Win threads. 19 | #define BOOST_HAS_UNISTD_H 20 | #include 21 | #if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) 22 | # define BOOST_HAS_PTHREADS 23 | # define BOOST_HAS_SCHED_YIELD 24 | # define BOOST_HAS_GETTIMEOFDAY 25 | # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE 26 | # define BOOST_HAS_SIGACTION 27 | #else 28 | # if !defined(BOOST_HAS_WINTHREADS) 29 | # define BOOST_HAS_WINTHREADS 30 | # endif 31 | # define BOOST_HAS_FTIME 32 | #endif 33 | 34 | // 35 | // find out if we have a stdint.h, there should be a better way to do this: 36 | // 37 | #include 38 | #ifdef _STDINT_H 39 | #define BOOST_HAS_STDINT_H 40 | #endif 41 | 42 | /// Cygwin has no fenv.h 43 | #define BOOST_NO_FENV_H 44 | 45 | // boilerplate code: 46 | #include 47 | 48 | // 49 | // Cygwin lies about XSI conformance, there is no nl_types.h: 50 | // 51 | #ifdef BOOST_HAS_NL_TYPES_H 52 | # undef BOOST_HAS_NL_TYPES_H 53 | #endif 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/platform/irix.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2003. 2 | // (C) Copyright Jens Maurer 2003. 3 | // Use, modification and distribution are subject to the 4 | // Boost Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | 8 | // See http://www.boost.org for most recent version. 9 | 10 | // SGI Irix specific config options: 11 | 12 | #define BOOST_PLATFORM "SGI Irix" 13 | 14 | #define BOOST_NO_SWPRINTF 15 | // 16 | // these are not auto detected by POSIX feature tests: 17 | // 18 | #define BOOST_HAS_GETTIMEOFDAY 19 | #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE 20 | 21 | #ifdef __GNUC__ 22 | // GNU C on IRIX does not support threads (checked up to gcc 3.3) 23 | # define BOOST_DISABLE_THREADS 24 | #endif 25 | 26 | // boilerplate code: 27 | #define BOOST_HAS_UNISTD_H 28 | #include 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/platform/qnxnto.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Jim Douglas 2005. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // QNX specific config options: 9 | 10 | #define BOOST_PLATFORM "QNX" 11 | 12 | #define BOOST_HAS_UNISTD_H 13 | #include 14 | 15 | // QNX claims XOpen version 5 compatibility, but doesn't have an nl_types.h 16 | // or log1p and expm1: 17 | #undef BOOST_HAS_NL_TYPES_H 18 | #undef BOOST_HAS_LOG1P 19 | #undef BOOST_HAS_EXPM1 20 | 21 | #define BOOST_HAS_PTHREADS 22 | #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE 23 | 24 | #define BOOST_HAS_GETTIMEOFDAY 25 | #define BOOST_HAS_CLOCK_GETTIME 26 | #define BOOST_HAS_NANOSLEEP 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/platform/solaris.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2003. 2 | // (C) Copyright Jens Maurer 2003. 3 | // Use, modification and distribution are subject to the 4 | // Boost Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | 7 | // See http://www.boost.org for most recent version. 8 | 9 | // sun specific config options: 10 | 11 | #define BOOST_PLATFORM "Sun Solaris" 12 | 13 | #define BOOST_HAS_GETTIMEOFDAY 14 | 15 | // boilerplate code: 16 | #define BOOST_HAS_UNISTD_H 17 | #include 18 | 19 | // 20 | // pthreads don't actually work with gcc unless _PTHREADS is defined: 21 | // 22 | #if defined(__GNUC__) && defined(_POSIX_THREADS) && !defined(_PTHREADS) 23 | # undef BOOST_HAS_PTHREADS 24 | #endif 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/platform/vms.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Artyom Beilis 2010. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef BOOST_CONFIG_PLATFORM_VMS_HPP 7 | #define BOOST_CONFIG_PLATFORM_VMS_HPP 8 | 9 | #define BOOST_PLATFORM "OpenVMS" 10 | 11 | #undef BOOST_HAS_STDINT_H 12 | #define BOOST_HAS_UNISTD_H 13 | #define BOOST_HAS_NL_TYPES_H 14 | #define BOOST_HAS_GETTIMEOFDAY 15 | #define BOOST_HAS_DIRENT_H 16 | #define BOOST_HAS_PTHREADS 17 | #define BOOST_HAS_NANOSLEEP 18 | #define BOOST_HAS_CLOCK_GETTIME 19 | #define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE 20 | #define BOOST_HAS_LOG1P 21 | #define BOOST_HAS_EXPM1 22 | #define BOOST_HAS_THREADS 23 | #undef BOOST_HAS_SCHED_YIELD 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/platform/vxworks.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Dustin Spicuzza 2009. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // vxWorks specific config options: 9 | 10 | #define BOOST_PLATFORM "vxWorks" 11 | 12 | #define BOOST_NO_CWCHAR 13 | #define BOOST_NO_INTRINSIC_WCHAR_T 14 | 15 | #if defined(__GNUC__) && defined(__STRICT_ANSI__) 16 | #define BOOST_NO_INT64_T 17 | #endif 18 | 19 | #define BOOST_HAS_UNISTD_H 20 | 21 | // these allow posix_features to work, since vxWorks doesn't 22 | // define them itself 23 | #define _POSIX_TIMERS 1 24 | #define _POSIX_THREADS 1 25 | 26 | // vxworks doesn't work with asio serial ports 27 | #define BOOST_ASIO_DISABLE_SERIAL_PORT 28 | 29 | // boilerplate code: 30 | #include 31 | 32 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/stdlib/libcpp.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Christopher Jefferson 2011. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // config for libc++ 9 | // Might need more in here later. 10 | 11 | #if !defined(_LIBCPP_VERSION) 12 | # include 13 | # if !defined(_LIBCPP_VERSION) 14 | # error "This is not libc++!" 15 | # endif 16 | #endif 17 | 18 | #define BOOST_STDLIB "libc++ version " BOOST_STRINGIZE(_LIBCPP_VERSION) 19 | 20 | #define BOOST_HAS_THREADS 21 | 22 | #define BOOST_NO_0X_HDR_CONCEPTS 23 | #define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS 24 | #define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS 25 | #define BOOST_NO_0X_HDR_MEMORY_CONCEPTS 26 | 27 | #ifdef _LIBCPP_HAS_NO_VARIADICS 28 | # define BOOST_NO_0X_HDR_TUPLE 29 | #endif 30 | 31 | // libc++ uses a non-standard messages_base 32 | #define BOOST_NO_STD_MESSAGES 33 | 34 | // --- end --- 35 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/stdlib/modena.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Jens Maurer 2001. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | // Modena C++ standard library (comes with KAI C++) 9 | 10 | #if !defined(MSIPL_COMPILE_H) 11 | # include 12 | # if !defined(__MSIPL_COMPILE_H) 13 | # error "This is not the Modena C++ library!" 14 | # endif 15 | #endif 16 | 17 | #ifndef MSIPL_NL_TYPES 18 | #define BOOST_NO_STD_MESSAGES 19 | #endif 20 | 21 | #ifndef MSIPL_WCHART 22 | #define BOOST_NO_STD_WSTRING 23 | #endif 24 | 25 | // C++0x headers not yet implemented 26 | // 27 | # define BOOST_NO_0X_HDR_ARRAY 28 | # define BOOST_NO_0X_HDR_CHRONO 29 | # define BOOST_NO_0X_HDR_CODECVT 30 | # define BOOST_NO_0X_HDR_CONCEPTS 31 | # define BOOST_NO_0X_HDR_CONDITION_VARIABLE 32 | # define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS 33 | # define BOOST_NO_0X_HDR_FORWARD_LIST 34 | # define BOOST_NO_0X_HDR_FUTURE 35 | # define BOOST_NO_0X_HDR_INITIALIZER_LIST 36 | # define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS 37 | # define BOOST_NO_0X_HDR_MEMORY_CONCEPTS 38 | # define BOOST_NO_0X_HDR_MUTEX 39 | # define BOOST_NO_0X_HDR_RANDOM 40 | # define BOOST_NO_0X_HDR_RATIO 41 | # define BOOST_NO_0X_HDR_REGEX 42 | # define BOOST_NO_0X_HDR_SYSTEM_ERROR 43 | # define BOOST_NO_0X_HDR_THREAD 44 | # define BOOST_NO_0X_HDR_TUPLE 45 | # define BOOST_NO_0X_HDR_TYPE_TRAITS 46 | # define BOOST_NO_0X_HDR_TYPEINDEX 47 | # define BOOST_NO_STD_UNORDERED // deprecated; see following 48 | # define BOOST_NO_0X_HDR_UNORDERED_MAP 49 | # define BOOST_NO_0X_HDR_UNORDERED_SET 50 | # define BOOST_NO_NUMERIC_LIMITS_LOWEST 51 | 52 | #define BOOST_STDLIB "Modena C++ standard library" 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/stdlib/vacpp.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2001 - 2002. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | // See http://www.boost.org for most recent version. 7 | 8 | #if __IBMCPP__ <= 501 9 | # define BOOST_NO_STD_ALLOCATOR 10 | #endif 11 | 12 | #define BOOST_HAS_MACRO_USE_FACET 13 | #define BOOST_NO_STD_MESSAGES 14 | 15 | // Apple doesn't seem to reliably defined a *unix* macro 16 | #if !defined(CYGWIN) && ( defined(__unix__) \ 17 | || defined(__unix) \ 18 | || defined(unix) \ 19 | || defined(__APPLE__) \ 20 | || defined(__APPLE) \ 21 | || defined(APPLE)) 22 | # include 23 | #endif 24 | 25 | // C++0x headers not yet implemented 26 | // 27 | # define BOOST_NO_0X_HDR_ARRAY 28 | # define BOOST_NO_0X_HDR_CHRONO 29 | # define BOOST_NO_0X_HDR_CODECVT 30 | # define BOOST_NO_0X_HDR_CONCEPTS 31 | # define BOOST_NO_0X_HDR_CONDITION_VARIABLE 32 | # define BOOST_NO_0X_HDR_CONTAINER_CONCEPTS 33 | # define BOOST_NO_0X_HDR_FORWARD_LIST 34 | # define BOOST_NO_0X_HDR_FUTURE 35 | # define BOOST_NO_0X_HDR_INITIALIZER_LIST 36 | # define BOOST_NO_0X_HDR_ITERATOR_CONCEPTS 37 | # define BOOST_NO_0X_HDR_MEMORY_CONCEPTS 38 | # define BOOST_NO_0X_HDR_MUTEX 39 | # define BOOST_NO_0X_HDR_RANDOM 40 | # define BOOST_NO_0X_HDR_RATIO 41 | # define BOOST_NO_0X_HDR_REGEX 42 | # define BOOST_NO_0X_HDR_SYSTEM_ERROR 43 | # define BOOST_NO_0X_HDR_THREAD 44 | # define BOOST_NO_0X_HDR_TUPLE 45 | # define BOOST_NO_0X_HDR_TYPE_TRAITS 46 | # define BOOST_NO_0X_HDR_TYPEINDEX 47 | # define BOOST_NO_STD_UNORDERED // deprecated; see following 48 | # define BOOST_NO_0X_HDR_UNORDERED_MAP 49 | # define BOOST_NO_0X_HDR_UNORDERED_SET 50 | # define BOOST_NO_NUMERIC_LIMITS_LOWEST 51 | 52 | #define BOOST_STDLIB "Visual Age default standard library" 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/config/warning_disable.hpp: -------------------------------------------------------------------------------- 1 | // Copyright John Maddock 2008 2 | // Use, modification, and distribution is subject to the Boost Software 3 | // License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 4 | // http://www.boost.org/LICENSE_1_0.txt) 5 | // 6 | // This file exists to turn off some overly-pedantic warning emitted 7 | // by certain compilers. You should include this header only in: 8 | // 9 | // * A test case, before any other headers, or, 10 | // * A library source file before any other headers. 11 | // 12 | // IT SHOULD NOT BE INCLUDED BY ANY BOOST HEADER. 13 | // 14 | // YOU SHOULD NOT INCLUDE IT IF YOU CAN REASONABLY FIX THE WARNING. 15 | // 16 | // The only warnings disabled here are those that are: 17 | // 18 | // * Quite unreasonably pedantic. 19 | // * Generally only emitted by a single compiler. 20 | // * Can't easily be fixed: for example if the vendors own std lib 21 | // code emits these warnings! 22 | // 23 | // Note that THIS HEADER MUST NOT INCLUDE ANY OTHER HEADERS: 24 | // not even std library ones! Doing so may turn the warning 25 | // off too late to be of any use. For example the VC++ C4996 26 | // warning can be omitted from if that header is included 27 | // before or by this one :-( 28 | // 29 | 30 | #ifndef BOOST_CONFIG_WARNING_DISABLE_HPP 31 | #define BOOST_CONFIG_WARNING_DISABLE_HPP 32 | 33 | #if defined(_MSC_VER) && (_MSC_VER >= 1400) 34 | // Error 'function': was declared deprecated 35 | // http://msdn2.microsoft.com/en-us/library/ttcz0bys(VS.80).aspx 36 | // This error is emitted when you use some perfectly conforming 37 | // std lib functions in a perfectly correct way, and also by 38 | // some of Microsoft's own std lib code ! 39 | # pragma warning(disable:4996) 40 | #endif 41 | #if defined(__INTEL_COMPILER) || defined(__ICL) 42 | // As above: gives warning when a "deprecated" 43 | // std library function is encountered. 44 | # pragma warning(disable:1786) 45 | #endif 46 | 47 | #endif // BOOST_CONFIG_WARNING_DISABLE_HPP 48 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/add_const.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard 3 | // Hinnant & John Maddock 2000. 4 | // Use, modification and distribution are subject to the Boost Software License, 5 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt). 7 | // 8 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 9 | 10 | #ifndef BOOST_TT_ADD_CONST_HPP_INCLUDED 11 | #define BOOST_TT_ADD_CONST_HPP_INCLUDED 12 | 13 | #include 14 | 15 | // should be the last #include 16 | #include 17 | 18 | namespace boost { 19 | 20 | // * convert a type T to const type - add_const 21 | // this is not required since the result is always 22 | // the same as "T const", but it does suppress warnings 23 | // from some compilers: 24 | 25 | #if defined(BOOST_MSVC) 26 | // This bogus warning will appear when add_const is applied to a 27 | // const volatile reference because we can't detect const volatile 28 | // references with MSVC6. 29 | # pragma warning(push) 30 | # pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored 31 | #endif 32 | 33 | BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_const,T,T const) 34 | 35 | #if defined(BOOST_MSVC) 36 | # pragma warning(pop) 37 | #endif 38 | 39 | #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION 40 | BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_const,T&,T&) 41 | #endif 42 | 43 | } // namespace boost 44 | 45 | #include 46 | 47 | #endif // BOOST_TT_ADD_CONST_HPP_INCLUDED 48 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/add_cv.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard 3 | // Hinnant & John Maddock 2000. 4 | // Use, modification and distribution are subject to the Boost Software License, 5 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt). 7 | // 8 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 9 | 10 | 11 | #ifndef BOOST_TT_ADD_CV_HPP_INCLUDED 12 | #define BOOST_TT_ADD_CV_HPP_INCLUDED 13 | 14 | #include 15 | 16 | // should be the last #include 17 | #include 18 | 19 | namespace boost { 20 | 21 | // * convert a type T to a const volatile type - add_cv 22 | // this is not required since the result is always 23 | // the same as "T const volatile", but it does suppress warnings 24 | // from some compilers: 25 | 26 | #if defined(BOOST_MSVC) 27 | // This bogus warning will appear when add_volatile is applied to a 28 | // const volatile reference because we can't detect const volatile 29 | // references with MSVC6. 30 | # pragma warning(push) 31 | # pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored 32 | #endif 33 | 34 | BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_cv,T,T const volatile) 35 | 36 | #if defined(BOOST_MSVC) 37 | # pragma warning(pop) 38 | #endif 39 | 40 | #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION 41 | BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_cv,T&,T&) 42 | #endif 43 | 44 | } // namespace boost 45 | 46 | #include 47 | 48 | #endif // BOOST_TT_ADD_CV_HPP_INCLUDED 49 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/add_lvalue_reference.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2010 John Maddock 2 | 3 | // Distributed under the Boost Software License, Version 1.0. 4 | // See http://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifndef BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP 7 | #define BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP 8 | 9 | #include 10 | 11 | // should be the last #include 12 | #include 13 | 14 | namespace boost{ 15 | 16 | BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_lvalue_reference,T,typename boost::add_reference::type) 17 | 18 | #ifndef BOOST_NO_RVALUE_REFERENCES 19 | BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_lvalue_reference,T&&,T&) 20 | #endif 21 | 22 | } 23 | 24 | #include 25 | 26 | #endif // BOOST_TYPE_TRAITS_EXT_ADD_LVALUE_REFERENCE__HPP 27 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/add_pointer.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_ADD_POINTER_HPP_INCLUDED 10 | #define BOOST_TT_ADD_POINTER_HPP_INCLUDED 11 | 12 | #include 13 | 14 | // should be the last #include 15 | #include 16 | 17 | namespace boost { 18 | 19 | namespace detail { 20 | 21 | #if defined(__BORLANDC__) && (__BORLANDC__ < 0x5A0) 22 | // 23 | // For some reason this implementation stops Borlands compiler 24 | // from dropping cv-qualifiers, it still fails with references 25 | // to arrays for some reason though (shrug...) (JM 20021104) 26 | // 27 | template 28 | struct add_pointer_impl 29 | { 30 | typedef T* type; 31 | }; 32 | template 33 | struct add_pointer_impl 34 | { 35 | typedef T* type; 36 | }; 37 | template 38 | struct add_pointer_impl 39 | { 40 | typedef T* type; 41 | }; 42 | template 43 | struct add_pointer_impl 44 | { 45 | typedef T* type; 46 | }; 47 | template 48 | struct add_pointer_impl 49 | { 50 | typedef T* type; 51 | }; 52 | 53 | #else 54 | 55 | template 56 | struct add_pointer_impl 57 | { 58 | typedef typename remove_reference::type no_ref_type; 59 | typedef no_ref_type* type; 60 | }; 61 | 62 | #endif 63 | 64 | } // namespace detail 65 | 66 | BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_pointer,T,typename boost::detail::add_pointer_impl::type) 67 | 68 | } // namespace boost 69 | 70 | #include 71 | 72 | #endif // BOOST_TT_ADD_POINTER_HPP_INCLUDED 73 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/add_rvalue_reference.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinqiwen/ardb/9f703a6b9c3430e30aba2286240e44570994efe6/deps/cpp-btree/boost/type_traits/add_rvalue_reference.hpp -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/add_volatile.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard 3 | // Hinnant & John Maddock 2000. 4 | // Use, modification and distribution are subject to the Boost Software License, 5 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt). 7 | // 8 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 9 | 10 | #ifndef BOOST_TT_ADD_VOLATILE_HPP_INCLUDED 11 | #define BOOST_TT_ADD_VOLATILE_HPP_INCLUDED 12 | 13 | #include 14 | 15 | // should be the last #include 16 | #include 17 | 18 | namespace boost { 19 | 20 | // * convert a type T to volatile type - add_volatile 21 | // this is not required since the result is always 22 | // the same as "T volatile", but it does suppress warnings 23 | // from some compilers: 24 | 25 | #if defined(BOOST_MSVC) 26 | // This bogus warning will appear when add_volatile is applied to a 27 | // const volatile reference because we can't detect const volatile 28 | // references with MSVC6. 29 | # pragma warning(push) 30 | # pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored 31 | #endif 32 | 33 | BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_volatile,T,T volatile) 34 | 35 | #if defined(BOOST_MSVC) 36 | # pragma warning(pop) 37 | #endif 38 | 39 | #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION 40 | BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,add_volatile,T&,T&) 41 | #endif 42 | 43 | } // namespace boost 44 | 45 | #include 46 | 47 | #endif // BOOST_TT_ADD_VOLATILE_HPP_INCLUDED 48 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/aligned_storage.hpp: -------------------------------------------------------------------------------- 1 | 2 | // Copyright (C) John Maddock 2005. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED 10 | # define BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED 11 | # include 12 | #endif // BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED 13 | 14 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/alignment_traits.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_ALIGNMENT_TRAITS_HPP_INCLUDED 10 | #define BOOST_TT_ALIGNMENT_TRAITS_HPP_INCLUDED 11 | 12 | #include 13 | #include 14 | 15 | #endif // BOOST_TT_ALIGNMENT_TRAITS_HPP_INCLUDED 16 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/arithmetic_traits.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 2 | // Use, modification and distribution are subject to the Boost Software License, 3 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 4 | // http://www.boost.org/LICENSE_1_0.txt). 5 | // 6 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 7 | // 8 | // defines traits classes for arithmetic types: 9 | // is_void, is_integral, is_float, is_arithmetic, is_fundamental. 10 | 11 | #ifndef BOOST_TT_ARITHMETIC_TRAITS_HPP_INCLUDED 12 | #define BOOST_TT_ARITHMETIC_TRAITS_HPP_INCLUDED 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #endif // BOOST_TT_ARITHMETIC_TRAITS_HPP_INCLUDED 21 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/array_traits.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard 2 | // Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | 10 | #ifndef BOOST_TT_ARRAY_TRAITS_HPP_INCLUDED 11 | #define BOOST_TT_ARRAY_TRAITS_HPP_INCLUDED 12 | 13 | #include 14 | 15 | #endif // BOOST_TT_ARRAY_TRAITS_HPP_INCLUDED 16 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/composite_traits.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard 2 | // Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | // 9 | // defines traits classes for composite types: 10 | // is_array, is_pointer, is_reference, is_member_pointer, is_enum, is_union. 11 | // 12 | 13 | #ifndef BOOST_TT_COMPOSITE_TRAITS_HPP_INCLUDED 14 | #define BOOST_TT_COMPOSITE_TRAITS_HPP_INCLUDED 15 | 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #endif // BOOST_TT_COMPOSITE_TRAITS_HPP_INCLUDED 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/conditional.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright John Maddock 2010. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | 10 | #ifndef BOOST_TT_CONDITIONAL_HPP_INCLUDED 11 | #define BOOST_TT_CONDITIONAL_HPP_INCLUDED 12 | 13 | #include 14 | 15 | namespace boost { 16 | 17 | template 18 | struct conditional : public mpl::if_c 19 | { 20 | }; 21 | 22 | } // namespace boost 23 | 24 | 25 | #endif // BOOST_TT_CONDITIONAL_HPP_INCLUDED 26 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/conversion_traits.hpp: -------------------------------------------------------------------------------- 1 | 2 | // Copyright 2000 John Maddock (john@johnmaddock.co.uk) 3 | // Copyright 2000 Jeremy Siek (jsiek@lsc.nd.edu) 4 | // Copyright 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi) 5 | // 6 | // Use, modification and distribution are subject to the Boost Software License, 7 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 8 | // http://www.boost.org/LICENSE_1_0.txt). 9 | // 10 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 11 | 12 | #ifndef BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED 13 | #define BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED 14 | 15 | #include 16 | 17 | #endif // BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED 18 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/cv_traits.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard 2 | // Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | // 9 | // defines traits classes for cv-qualified types: 10 | // is_const, is_volatile, remove_const, remove_volatile, remove_cv. 11 | 12 | #ifndef BOOST_TT_CV_TRAITS_HPP_INCLUDED 13 | #define BOOST_TT_CV_TRAITS_HPP_INCLUDED 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | 24 | #endif // BOOST_TT_CV_TRAITS_HPP_INCLUDED 25 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/decay.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock & Thorsten Ottosen 2005. 2 | // Use, modification and distribution are subject to the Boost Software License, 3 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 4 | // http://www.boost.org/LICENSE_1_0.txt). 5 | // 6 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 7 | 8 | 9 | #ifndef BOOST_TT_DECAY_HPP_INCLUDED 10 | #define BOOST_TT_DECAY_HPP_INCLUDED 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | namespace boost 22 | { 23 | 24 | template< class T > 25 | struct decay 26 | { 27 | private: 28 | typedef BOOST_DEDUCED_TYPENAME remove_reference::type Ty; 29 | public: 30 | typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< 31 | is_array, 32 | mpl::identity::type*>, 33 | BOOST_DEDUCED_TYPENAME mpl::eval_if< 34 | is_function, 35 | add_pointer, 36 | mpl::identity 37 | > 38 | >::type type; 39 | }; 40 | 41 | } // namespace boost 42 | 43 | 44 | #endif // BOOST_TT_DECAY_HPP_INCLUDED 45 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/detail/bool_trait_undef.hpp: -------------------------------------------------------------------------------- 1 | 2 | // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION 3 | 4 | // Copyright Aleksey Gurtovoy 2002-2004 5 | // 6 | // Distributed under the Boost Software License, Version 1.0. 7 | // (See accompanying file LICENSE_1_0.txt or copy at 8 | // http://www.boost.org/LICENSE_1_0.txt) 9 | 10 | // $Source$ 11 | // $Date: 2004-09-02 11:41:37 -0400 (Thu, 02 Sep 2004) $ 12 | // $Revision: 24874 $ 13 | 14 | #undef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL 15 | #undef BOOST_TT_AUX_BOOL_C_BASE 16 | #undef BOOST_TT_AUX_BOOL_TRAIT_DEF1 17 | #undef BOOST_TT_AUX_BOOL_TRAIT_DEF2 18 | #undef BOOST_TT_AUX_BOOL_TRAIT_SPEC1 19 | #undef BOOST_TT_AUX_BOOL_TRAIT_SPEC2 20 | #undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1 21 | #undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2 22 | #undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1 23 | #undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2 24 | #undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1 25 | #undef BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2 26 | #undef BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1 27 | #undef BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1 28 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/detail/false_result.hpp: -------------------------------------------------------------------------------- 1 | // Copyright David Abrahams 2002. 2 | // Use, modification and distribution are subject to the Boost Software License, 3 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 4 | // http://www.boost.org/LICENSE_1_0.txt). 5 | // 6 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 7 | 8 | 9 | #ifndef BOOST_TT_DETAIL_FALSE_RESULT_HPP_INCLUDED 10 | #define BOOST_TT_DETAIL_FALSE_RESULT_HPP_INCLUDED 11 | 12 | #include 13 | 14 | namespace boost { 15 | namespace type_traits { 16 | 17 | // Utility class which always "returns" false 18 | struct false_result 19 | { 20 | template struct result_ 21 | { 22 | BOOST_STATIC_CONSTANT(bool, value = false); 23 | }; 24 | }; 25 | 26 | }} // namespace boost::type_traits 27 | 28 | #endif // BOOST_TT_DETAIL_FALSE_RESULT_HPP_INCLUDED 29 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/detail/ice_and.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock and Steve Cleary 2000. 2 | // 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_DETAIL_ICE_AND_HPP_INCLUDED 10 | #define BOOST_TT_DETAIL_ICE_AND_HPP_INCLUDED 11 | 12 | #include 13 | 14 | namespace boost { 15 | namespace type_traits { 16 | 17 | template 18 | struct ice_and; 19 | 20 | template 21 | struct ice_and 22 | { 23 | BOOST_STATIC_CONSTANT(bool, value = false); 24 | }; 25 | 26 | template <> 27 | struct ice_and 28 | { 29 | BOOST_STATIC_CONSTANT(bool, value = true); 30 | }; 31 | 32 | } // namespace type_traits 33 | } // namespace boost 34 | 35 | #endif // BOOST_TT_DETAIL_ICE_AND_HPP_INCLUDED 36 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/detail/ice_eq.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock and Steve Cleary 2000. 2 | // Use, modification and distribution are subject to the Boost Software License, 3 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 4 | // http://www.boost.org/LICENSE_1_0.txt). 5 | // 6 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 7 | 8 | #ifndef BOOST_TT_DETAIL_ICE_EQ_HPP_INCLUDED 9 | #define BOOST_TT_DETAIL_ICE_EQ_HPP_INCLUDED 10 | 11 | #include 12 | 13 | namespace boost { 14 | namespace type_traits { 15 | 16 | template 17 | struct ice_eq 18 | { 19 | BOOST_STATIC_CONSTANT(bool, value = (b1 == b2)); 20 | }; 21 | 22 | template 23 | struct ice_ne 24 | { 25 | BOOST_STATIC_CONSTANT(bool, value = (b1 != b2)); 26 | }; 27 | 28 | #ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION 29 | template bool const ice_eq::value; 30 | template bool const ice_ne::value; 31 | #endif 32 | 33 | } // namespace type_traits 34 | } // namespace boost 35 | 36 | #endif // BOOST_TT_DETAIL_ICE_EQ_HPP_INCLUDED 37 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/detail/ice_not.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock and Steve Cleary 2000. 2 | // Use, modification and distribution are subject to the Boost Software License, 3 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 4 | // http://www.boost.org/LICENSE_1_0.txt). 5 | // 6 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 7 | 8 | #ifndef BOOST_TT_DETAIL_ICE_NOT_HPP_INCLUDED 9 | #define BOOST_TT_DETAIL_ICE_NOT_HPP_INCLUDED 10 | 11 | #include 12 | 13 | namespace boost { 14 | namespace type_traits { 15 | 16 | template 17 | struct ice_not 18 | { 19 | BOOST_STATIC_CONSTANT(bool, value = true); 20 | }; 21 | 22 | template <> 23 | struct ice_not 24 | { 25 | BOOST_STATIC_CONSTANT(bool, value = false); 26 | }; 27 | 28 | } // namespace type_traits 29 | } // namespace boost 30 | 31 | #endif // BOOST_TT_DETAIL_ICE_NOT_HPP_INCLUDED 32 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/detail/ice_or.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock and Steve Cleary 2000. 2 | // Use, modification and distribution are subject to the Boost Software License, 3 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 4 | // http://www.boost.org/LICENSE_1_0.txt). 5 | // 6 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 7 | 8 | #ifndef BOOST_TT_DETAIL_ICE_OR_HPP_INCLUDED 9 | #define BOOST_TT_DETAIL_ICE_OR_HPP_INCLUDED 10 | 11 | #include 12 | 13 | namespace boost { 14 | namespace type_traits { 15 | 16 | template 17 | struct ice_or; 18 | 19 | template 20 | struct ice_or 21 | { 22 | BOOST_STATIC_CONSTANT(bool, value = true); 23 | }; 24 | 25 | template <> 26 | struct ice_or 27 | { 28 | BOOST_STATIC_CONSTANT(bool, value = false); 29 | }; 30 | 31 | } // namespace type_traits 32 | } // namespace boost 33 | 34 | #endif // BOOST_TT_DETAIL_ICE_OR_HPP_INCLUDED 35 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/detail/size_t_trait_def.hpp: -------------------------------------------------------------------------------- 1 | 2 | // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION 3 | 4 | // Copyright Aleksey Gurtovoy 2002-2004 5 | // 6 | // Distributed under the Boost Software License, Version 1.0. 7 | // (See accompanying file LICENSE_1_0.txt or copy at 8 | // http://www.boost.org/LICENSE_1_0.txt) 9 | 10 | // $Source$ 11 | // $Date: 2005-08-25 12:27:28 -0400 (Thu, 25 Aug 2005) $ 12 | // $Revision: 30670 $ 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | #include 20 | 21 | #if !defined(BOOST_MSVC) || BOOST_MSVC >= 1300 22 | # define BOOST_TT_AUX_SIZE_T_BASE(C) ::boost::integral_constant 23 | # define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) /**/ 24 | #else 25 | # define BOOST_TT_AUX_SIZE_T_BASE(C) ::boost::mpl::size_t 26 | # define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ 27 | typedef ::boost::mpl::size_t base_; \ 28 | using base_::value; \ 29 | /**/ 30 | #endif 31 | 32 | 33 | #define BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(trait,T,C) \ 34 | template< typename T > struct trait \ 35 | : BOOST_TT_AUX_SIZE_T_BASE(C) \ 36 | { \ 37 | BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ 38 | BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ 39 | }; \ 40 | \ 41 | BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ 42 | /**/ 43 | 44 | #define BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1(trait,spec,C) \ 45 | template<> struct trait \ 46 | : BOOST_TT_AUX_SIZE_T_BASE(C) \ 47 | { \ 48 | BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ 49 | BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \ 50 | }; \ 51 | /**/ 52 | 53 | #define BOOST_TT_AUX_SIZE_T_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,C) \ 54 | template< param > struct trait \ 55 | : BOOST_TT_AUX_SIZE_T_BASE(C) \ 56 | { \ 57 | }; \ 58 | /**/ 59 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/detail/size_t_trait_undef.hpp: -------------------------------------------------------------------------------- 1 | 2 | // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION 3 | 4 | // Copyright Aleksey Gurtovoy 2002-2004 5 | // 6 | // Distributed under the Boost Software License, Version 1.0. 7 | // (See accompanying file LICENSE_1_0.txt or copy at 8 | // http://www.boost.org/LICENSE_1_0.txt) 9 | 10 | // $Source$ 11 | // $Date: 2004-09-02 11:41:37 -0400 (Thu, 02 Sep 2004) $ 12 | // $Revision: 24874 $ 13 | 14 | #undef BOOST_TT_AUX_SIZE_T_TRAIT_DEF1 15 | #undef BOOST_TT_AUX_SIZE_T_TRAIT_SPEC1 16 | #undef BOOST_TT_AUX_SIZE_T_TRAIT_PARTIAL_SPEC1_1 17 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/detail/template_arity_spec.hpp: -------------------------------------------------------------------------------- 1 | 2 | // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION 3 | 4 | // Copyright Aleksey Gurtovoy 2002-2004 5 | // 6 | // Distributed under the Boost Software License, Version 1.0. 7 | // (See accompanying file LICENSE_1_0.txt or copy at 8 | // http://www.boost.org/LICENSE_1_0.txt) 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | #if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \ 17 | && defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION) 18 | # define BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(i, name) \ 19 | namespace mpl { namespace aux { \ 20 | template< BOOST_MPL_PP_PARAMS(i, typename T) > \ 21 | struct template_arity< \ 22 | name< BOOST_MPL_PP_PARAMS(i, T) > \ 23 | > \ 24 | : int_ \ 25 | { \ 26 | }; \ 27 | }} \ 28 | /**/ 29 | #else 30 | # define BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(i, name) /**/ 31 | #endif 32 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/detail/type_trait_def.hpp: -------------------------------------------------------------------------------- 1 | 2 | // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION 3 | 4 | // Copyright Aleksey Gurtovoy 2002-2004 5 | // 6 | // Distributed under the Boost Software License, Version 1.0. 7 | // (See accompanying file LICENSE_1_0.txt or copy at 8 | // http://www.boost.org/LICENSE_1_0.txt) 9 | 10 | // $Source$ 11 | // $Date: 2004-09-02 11:41:37 -0400 (Thu, 02 Sep 2004) $ 12 | // $Revision: 24874 $ 13 | 14 | #include 15 | #include 16 | 17 | #define BOOST_TT_AUX_TYPE_TRAIT_DEF1(trait,T,result) \ 18 | template< typename T > struct trait \ 19 | { \ 20 | typedef result type; \ 21 | BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ 22 | }; \ 23 | \ 24 | BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ 25 | /**/ 26 | 27 | #define BOOST_TT_AUX_TYPE_TRAIT_SPEC1(trait,spec,result) \ 28 | template<> struct trait \ 29 | { \ 30 | typedef result type; \ 31 | BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \ 32 | }; \ 33 | /**/ 34 | 35 | #define BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(trait,spec,result) \ 36 | template<> struct trait##_impl \ 37 | { \ 38 | typedef result type; \ 39 | }; \ 40 | /**/ 41 | 42 | #define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,result) \ 43 | template< param > struct trait \ 44 | { \ 45 | typedef result type; \ 46 | }; \ 47 | /**/ 48 | 49 | #define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,spec,result) \ 50 | template< param1, param2 > struct trait \ 51 | { \ 52 | typedef result; \ 53 | }; \ 54 | /**/ 55 | 56 | #define BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(param,trait,spec,result) \ 57 | template< param > struct trait##_impl \ 58 | { \ 59 | typedef result type; \ 60 | }; \ 61 | /**/ 62 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/detail/type_trait_undef.hpp: -------------------------------------------------------------------------------- 1 | 2 | // NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION 3 | 4 | // Copyright Aleksey Gurtovoy 2002-2004 5 | // 6 | // Distributed under the Boost Software License, Version 1.0. 7 | // (See accompanying file LICENSE_1_0.txt or copy at 8 | // http://www.boost.org/LICENSE_1_0.txt) 9 | 10 | // $Source$ 11 | // $Date: 2004-09-02 11:41:37 -0400 (Thu, 02 Sep 2004) $ 12 | // $Revision: 24874 $ 13 | 14 | #undef BOOST_TT_AUX_TYPE_TRAIT_DEF1 15 | #undef BOOST_TT_AUX_TYPE_TRAIT_SPEC1 16 | #undef BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1 17 | #undef BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1 18 | #undef BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2 19 | #undef BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1 20 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/detail/wrap.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright David Abrahams 2002. 2 | // Use, modification and distribution are subject to the Boost Software License, 3 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 4 | // http://www.boost.org/LICENSE_1_0.txt). 5 | // 6 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 7 | 8 | #ifndef BOOST_TT_DETAIL_WRAP_HPP_INCLUDED 9 | #define BOOST_TT_DETAIL_WRAP_HPP_INCLUDED 10 | 11 | namespace boost { 12 | namespace type_traits { 13 | 14 | template struct wrap {}; 15 | 16 | }} // namespace boost::type_traits 17 | 18 | #endif // BOOST_TT_DETAIL_WRAP_HPP_INCLUDED 19 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/detail/yes_no_type.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright John Maddock and Steve Cleary 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | // 9 | // macros and helpers for working with integral-constant-expressions. 10 | 11 | #ifndef BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED 12 | #define BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED 13 | 14 | namespace boost { 15 | namespace type_traits { 16 | 17 | typedef char yes_type; 18 | struct no_type 19 | { 20 | char padding[8]; 21 | }; 22 | 23 | } // namespace type_traits 24 | } // namespace boost 25 | 26 | #endif // BOOST_TT_DETAIL_YES_NO_TYPE_HPP_INCLUDED 27 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/has_nothrow_assign.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED 10 | #define BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED 11 | 12 | #include 13 | 14 | // should be the last #include 15 | #include 16 | 17 | namespace boost { 18 | 19 | namespace detail{ 20 | 21 | template 22 | struct has_nothrow_assign_imp{ 23 | BOOST_STATIC_CONSTANT(bool, value = 24 | (::boost::type_traits::ice_or< 25 | ::boost::has_trivial_assign::value, 26 | BOOST_HAS_NOTHROW_ASSIGN(T) 27 | >::value)); 28 | }; 29 | 30 | } 31 | 32 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_assign,T,::boost::detail::has_nothrow_assign_imp::value) 33 | 34 | } // namespace boost 35 | 36 | #include 37 | 38 | #endif // BOOST_TT_HAS_NOTHROW_ASSIGN_HPP_INCLUDED 39 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/has_nothrow_constructor.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED 10 | #define BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED 11 | 12 | #include 13 | 14 | // should be the last #include 15 | #include 16 | 17 | namespace boost { 18 | 19 | namespace detail{ 20 | 21 | template 22 | struct has_nothrow_constructor_imp{ 23 | BOOST_STATIC_CONSTANT(bool, value = 24 | (::boost::type_traits::ice_or< 25 | ::boost::has_trivial_constructor::value, 26 | BOOST_HAS_NOTHROW_CONSTRUCTOR(T) 27 | >::value)); 28 | }; 29 | 30 | } 31 | 32 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_constructor,T,::boost::detail::has_nothrow_constructor_imp::value) 33 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_default_constructor,T,::boost::detail::has_nothrow_constructor_imp::value) 34 | 35 | } // namespace boost 36 | 37 | #include 38 | 39 | #endif // BOOST_TT_HAS_NOTHROW_CONSTRUCTOR_HPP_INCLUDED 40 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/has_nothrow_copy.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED 10 | #define BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED 11 | 12 | #include 13 | 14 | // should be the last #include 15 | #include 16 | 17 | namespace boost { 18 | 19 | namespace detail{ 20 | 21 | template 22 | struct has_nothrow_copy_imp{ 23 | BOOST_STATIC_CONSTANT(bool, value = 24 | (::boost::type_traits::ice_or< 25 | ::boost::has_trivial_copy::value, 26 | BOOST_HAS_NOTHROW_COPY(T) 27 | >::value)); 28 | }; 29 | 30 | } 31 | 32 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_copy,T,::boost::detail::has_nothrow_copy_imp::value) 33 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_copy_constructor,T,::boost::detail::has_nothrow_copy_imp::value) 34 | 35 | } // namespace boost 36 | 37 | #include 38 | 39 | #endif // BOOST_TT_HAS_NOTHROW_COPY_HPP_INCLUDED 40 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/has_nothrow_destructor.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_HAS_NOTHROW_DESTRUCTOR_HPP_INCLUDED 10 | #define BOOST_TT_HAS_NOTHROW_DESTRUCTOR_HPP_INCLUDED 11 | 12 | #include 13 | 14 | // should be the last #include 15 | #include 16 | 17 | namespace boost { 18 | 19 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_destructor,T,::boost::has_trivial_destructor::value) 20 | 21 | } // namespace boost 22 | 23 | #include 24 | 25 | #endif // BOOST_TT_HAS_NOTHROW_DESTRUCTOR_HPP_INCLUDED 26 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/has_trivial_assign.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED 10 | #define BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | // should be the last #include 22 | #include 23 | 24 | namespace boost { 25 | 26 | namespace detail { 27 | 28 | template 29 | struct has_trivial_assign_impl 30 | { 31 | BOOST_STATIC_CONSTANT(bool, value = 32 | (::boost::type_traits::ice_and< 33 | ::boost::type_traits::ice_or< 34 | ::boost::is_pod::value, 35 | BOOST_HAS_TRIVIAL_ASSIGN(T) 36 | >::value, 37 | ::boost::type_traits::ice_not< ::boost::is_const::value >::value, 38 | ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value 39 | >::value)); 40 | }; 41 | 42 | } // namespace detail 43 | 44 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_assign,T,::boost::detail::has_trivial_assign_impl::value) 45 | 46 | } // namespace boost 47 | 48 | #include 49 | 50 | #endif // BOOST_TT_HAS_TRIVIAL_ASSIGN_HPP_INCLUDED 51 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/has_trivial_constructor.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED 10 | #define BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | // should be the last #include 18 | #include 19 | 20 | namespace boost { 21 | 22 | namespace detail { 23 | 24 | template 25 | struct has_trivial_ctor_impl 26 | { 27 | BOOST_STATIC_CONSTANT(bool, value = 28 | (::boost::type_traits::ice_or< 29 | ::boost::is_pod::value, 30 | BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) 31 | >::value)); 32 | }; 33 | 34 | } // namespace detail 35 | 36 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_constructor,T,::boost::detail::has_trivial_ctor_impl::value) 37 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_default_constructor,T,::boost::detail::has_trivial_ctor_impl::value) 38 | 39 | } // namespace boost 40 | 41 | #include 42 | 43 | #endif // BOOST_TT_HAS_TRIVIAL_CONSTRUCTOR_HPP_INCLUDED 44 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/has_trivial_copy.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED 10 | #define BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | // should be the last #include 21 | #include 22 | 23 | namespace boost { 24 | 25 | namespace detail { 26 | 27 | template 28 | struct has_trivial_copy_impl 29 | { 30 | BOOST_STATIC_CONSTANT(bool, value = 31 | (::boost::type_traits::ice_and< 32 | ::boost::type_traits::ice_or< 33 | ::boost::is_pod::value, 34 | BOOST_HAS_TRIVIAL_COPY(T) 35 | >::value, 36 | ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value 37 | >::value)); 38 | }; 39 | 40 | } // namespace detail 41 | 42 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_copy,T,::boost::detail::has_trivial_copy_impl::value) 43 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_copy_constructor,T,::boost::detail::has_trivial_copy_impl::value) 44 | 45 | } // namespace boost 46 | 47 | #include 48 | 49 | #endif // BOOST_TT_HAS_TRIVIAL_COPY_HPP_INCLUDED 50 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/has_trivial_destructor.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED 10 | #define BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | // should be the last #include 18 | #include 19 | 20 | namespace boost { 21 | 22 | namespace detail { 23 | 24 | template 25 | struct has_trivial_dtor_impl 26 | { 27 | BOOST_STATIC_CONSTANT(bool, value = 28 | (::boost::type_traits::ice_or< 29 | ::boost::is_pod::value, 30 | BOOST_HAS_TRIVIAL_DESTRUCTOR(T) 31 | >::value)); 32 | }; 33 | 34 | } // namespace detail 35 | 36 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_destructor,T,::boost::detail::has_trivial_dtor_impl::value) 37 | 38 | } // namespace boost 39 | 40 | #include 41 | 42 | #endif // BOOST_TT_HAS_TRIVIAL_DESTRUCTOR_HPP_INCLUDED 43 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/has_virtual_destructor.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright John Maddock 2005. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | 10 | #ifndef BOOST_TT_HAS_VIRTUAL_DESTRUCTOR_HPP_INCLUDED 11 | #define BOOST_TT_HAS_VIRTUAL_DESTRUCTOR_HPP_INCLUDED 12 | 13 | #include 14 | // should be the last #include 15 | #include 16 | 17 | namespace boost { 18 | 19 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_virtual_destructor,T,BOOST_HAS_VIRTUAL_DESTRUCTOR(T)) 20 | 21 | } // namespace boost 22 | 23 | #include 24 | 25 | #endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED 26 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/ice.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright John Maddock and Steve Cleary 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | // 9 | // macros and helpers for working with integral-constant-expressions. 10 | 11 | #ifndef BOOST_TT_ICE_HPP_INCLUDED 12 | #define BOOST_TT_ICE_HPP_INCLUDED 13 | 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #endif // BOOST_TT_ICE_HPP_INCLUDED 21 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/integral_constant.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2005. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef BOOST_TYPE_TRAITS_INTEGRAL_CONSTANT_HPP 7 | #define BOOST_TYPE_TRAITS_INTEGRAL_CONSTANT_HPP 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | namespace boost{ 14 | 15 | #if defined(BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) || defined(__BORLANDC__) 16 | template 17 | #else 18 | template 19 | #endif 20 | struct integral_constant : public mpl::integral_c 21 | { 22 | typedef integral_constant type; 23 | }; 24 | 25 | template<> struct integral_constant : public mpl::true_ 26 | { 27 | #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) 28 | # pragma warning(push) 29 | # pragma warning(disable:4097) 30 | typedef mpl::true_ base_; 31 | using base_::value; 32 | # pragma warning(pop) 33 | #endif 34 | typedef integral_constant type; 35 | }; 36 | template<> struct integral_constant : public mpl::false_ 37 | { 38 | #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) 39 | # pragma warning(push) 40 | # pragma warning(disable:4097) 41 | typedef mpl::false_ base_; 42 | using base_::value; 43 | # pragma warning(pop) 44 | #endif 45 | typedef integral_constant type; 46 | }; 47 | 48 | typedef integral_constant true_type; 49 | typedef integral_constant false_type; 50 | 51 | } 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/is_arithmetic.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED 10 | #define BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED 11 | 12 | #if !defined( __CODEGEARC__ ) 13 | #include 14 | #include 15 | #include 16 | #include 17 | #endif 18 | 19 | // should be the last #include 20 | #include 21 | 22 | namespace boost { 23 | 24 | #if !defined(__CODEGEARC__) 25 | namespace detail { 26 | 27 | template< typename T > 28 | struct is_arithmetic_impl 29 | { 30 | BOOST_STATIC_CONSTANT(bool, value = 31 | (::boost::type_traits::ice_or< 32 | ::boost::is_integral::value, 33 | ::boost::is_float::value 34 | >::value)); 35 | }; 36 | 37 | } // namespace detail 38 | #endif 39 | 40 | //* is a type T an arithmetic type described in the standard (3.9.1p8) 41 | #if defined(__CODEGEARC__) 42 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_arithmetic,T,__is_arithmetic(T)) 43 | #else 44 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_arithmetic,T,::boost::detail::is_arithmetic_impl::value) 45 | #endif 46 | 47 | } // namespace boost 48 | 49 | #include 50 | 51 | #endif // BOOST_TT_IS_ARITHMETIC_HPP_INCLUDED 52 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/is_base_of.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Rani Sharoni 2003-2005. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_IS_BASE_OF_HPP_INCLUDED 10 | #define BOOST_TT_IS_BASE_OF_HPP_INCLUDED 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | // should be the last #include 19 | #include 20 | 21 | namespace boost { 22 | 23 | namespace detail{ 24 | template 25 | struct is_base_of_imp 26 | { 27 | typedef typename remove_cv::type ncvB; 28 | typedef typename remove_cv::type ncvD; 29 | BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< 30 | (::boost::detail::is_base_and_derived_impl::value), 31 | (::boost::type_traits::ice_and< ::boost::is_same::value, ::boost::is_class::value>::value)>::value)); 32 | }; 33 | } 34 | 35 | BOOST_TT_AUX_BOOL_TRAIT_DEF2( 36 | is_base_of 37 | , Base 38 | , Derived 39 | , (::boost::detail::is_base_of_imp::value)) 40 | 41 | #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION 42 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base&,Derived,false) 43 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base,Derived&,false) 44 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base&,Derived&,false) 45 | #endif 46 | 47 | } // namespace boost 48 | 49 | #include 50 | 51 | #endif // BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED 52 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/is_base_of_tr1.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Rani Sharoni 2003-2005. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_IS_BASE_OF_TR1_HPP_INCLUDED 10 | #define BOOST_TT_IS_BASE_OF_TR1_HPP_INCLUDED 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | // should be the last #include 18 | #include 19 | 20 | namespace boost { namespace tr1{ 21 | 22 | namespace detail{ 23 | template 24 | struct is_base_of_imp 25 | { 26 | typedef typename remove_cv::type ncvB; 27 | typedef typename remove_cv::type ncvD; 28 | BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< 29 | (::boost::detail::is_base_and_derived_impl::value), 30 | (::boost::is_same::value)>::value)); 31 | }; 32 | } 33 | 34 | BOOST_TT_AUX_BOOL_TRAIT_DEF2( 35 | is_base_of 36 | , Base 37 | , Derived 38 | , (::boost::tr1::detail::is_base_of_imp::value)) 39 | 40 | #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION 41 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base&,Derived,false) 42 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base,Derived&,false) 43 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_of,Base&,Derived&,false) 44 | #endif 45 | 46 | } } // namespace boost 47 | 48 | #include 49 | 50 | #endif // BOOST_TT_IS_BASE_OF_TR1_HPP_INCLUDED 51 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/is_complex.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright John Maddock 2007. 2 | // Use, modification and distribution are subject to the Boost Software License, 3 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 4 | // http://www.boost.org/LICENSE_1_0.txt). 5 | // 6 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 7 | 8 | #ifndef BOOST_TT_IS_COMPLEX_HPP 9 | #define BOOST_TT_IS_COMPLEX_HPP 10 | 11 | #include 12 | #include 13 | // should be the last #include 14 | #include 15 | 16 | 17 | namespace boost { 18 | namespace detail{ 19 | 20 | struct is_convertible_from_tester 21 | { 22 | template 23 | is_convertible_from_tester(const std::complex&); 24 | }; 25 | 26 | } 27 | 28 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_complex,T,(::boost::is_convertible::value)) 29 | 30 | } // namespace boost 31 | 32 | #include 33 | 34 | #endif //BOOST_TT_IS_COMPLEX_HPP 35 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/is_compound.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_IS_COMPOUND_HPP_INCLUDED 10 | #define BOOST_TT_IS_COMPOUND_HPP_INCLUDED 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | // should be the last #include 17 | #include 18 | 19 | namespace boost { 20 | 21 | #if !defined( __CODEGEARC__ ) 22 | namespace detail { 23 | 24 | template 25 | struct is_compound_impl 26 | { 27 | BOOST_STATIC_CONSTANT(bool, value = 28 | (::boost::type_traits::ice_not< 29 | ::boost::is_fundamental::value 30 | >::value)); 31 | }; 32 | 33 | } // namespace detail 34 | #endif // !defined( __CODEGEARC__ ) 35 | 36 | #if defined( __CODEGEARC__ ) 37 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_compound,T,__is_compound(T)) 38 | #else 39 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_compound,T,::boost::detail::is_compound_impl::value) 40 | #endif 41 | 42 | } // namespace boost 43 | 44 | #include 45 | 46 | #endif // BOOST_TT_IS_COMPOUND_HPP_INCLUDED 47 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/is_float.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED 10 | #define BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED 11 | 12 | // should be the last #include 13 | #include 14 | 15 | namespace boost { 16 | 17 | //* is a type T a floating-point type described in the standard (3.9.1p8) 18 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_float,T,false) 19 | BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_float,float,true) 20 | BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_float,double,true) 21 | BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_float,long double,true) 22 | 23 | } // namespace boost 24 | 25 | #include 26 | 27 | #endif // BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED 28 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/is_floating_point.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000-2005. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED 10 | #define BOOST_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED 11 | 12 | // should be the last #include 13 | #include 14 | 15 | namespace boost { 16 | 17 | //* is a type T a floating-point type described in the standard (3.9.1p8) 18 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_floating_point,T,false) 19 | BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_floating_point,float,true) 20 | BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_floating_point,double,true) 21 | BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_floating_point,long double,true) 22 | 23 | } // namespace boost 24 | 25 | #include 26 | 27 | #endif // BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED 28 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/is_fundamental.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED 10 | #define BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | // should be the last #include 17 | #include 18 | 19 | namespace boost { 20 | 21 | namespace detail { 22 | 23 | template 24 | struct is_fundamental_impl 25 | : ::boost::type_traits::ice_or< 26 | ::boost::is_arithmetic::value 27 | , ::boost::is_void::value 28 | > 29 | { 30 | }; 31 | 32 | } // namespace detail 33 | 34 | //* is a type T a fundamental type described in the standard (3.9.1) 35 | #if defined( __CODEGEARC__ ) 36 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_fundamental,T,__is_fundamental(T)) 37 | #else 38 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_fundamental,T,::boost::detail::is_fundamental_impl::value) 39 | #endif 40 | 41 | } // namespace boost 42 | 43 | #include 44 | 45 | #endif // BOOST_TT_IS_FUNDAMENTAL_HPP_INCLUDED 46 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/is_member_object_pointer.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright John Maddock 2005. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | 10 | #ifndef BOOST_TT_IS_MEMBER_OBJECT_POINTER_HPP_INCLUDED 11 | #define BOOST_TT_IS_MEMBER_OBJECT_POINTER_HPP_INCLUDED 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | // should be the last #include 20 | #include 21 | 22 | namespace boost { 23 | 24 | namespace detail{ 25 | 26 | template 27 | struct is_member_object_pointer_impl 28 | { 29 | BOOST_STATIC_CONSTANT( 30 | bool, value = (::boost::type_traits::ice_and< 31 | ::boost::is_member_pointer::value, 32 | ::boost::type_traits::ice_not< 33 | ::boost::is_member_function_pointer::value 34 | >::value 35 | >::value )); 36 | }; 37 | 38 | } // namespace detail 39 | 40 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_object_pointer,T,::boost::detail::is_member_object_pointer_impl::value) 41 | 42 | } // namespace boost 43 | 44 | #include 45 | 46 | #endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED 47 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/is_object.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_IS_OBJECT_HPP_INCLUDED 10 | #define BOOST_TT_IS_OBJECT_HPP_INCLUDED 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | // should be the last #include 20 | #include 21 | 22 | namespace boost { 23 | 24 | namespace detail { 25 | 26 | template 27 | struct is_object_impl 28 | { 29 | #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION 30 | BOOST_STATIC_CONSTANT(bool, value = 31 | (::boost::type_traits::ice_and< 32 | ::boost::type_traits::ice_not< ::boost::is_reference::value>::value, 33 | ::boost::type_traits::ice_not< ::boost::is_void::value>::value, 34 | ::boost::type_traits::ice_not< ::boost::is_function::value>::value 35 | >::value)); 36 | #else 37 | BOOST_STATIC_CONSTANT(bool, value = 38 | (::boost::type_traits::ice_and< 39 | ::boost::type_traits::ice_not< ::boost::is_reference::value>::value, 40 | ::boost::type_traits::ice_not< ::boost::is_void::value>::value 41 | >::value)); 42 | #endif 43 | }; 44 | 45 | } // namespace detail 46 | 47 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_object,T,::boost::detail::is_object_impl::value) 48 | 49 | } // namespace boost 50 | 51 | #include 52 | 53 | #endif // BOOST_TT_IS_OBJECT_HPP_INCLUDED 54 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/is_reference.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, 3 | // Howard Hinnant and John Maddock 2000, 2010. 4 | // (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 5 | 6 | // Use, modification and distribution are subject to the Boost Software License, 7 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 8 | // http://www.boost.org/LICENSE_1_0.txt). 9 | // 10 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 11 | 12 | #ifndef BOOST_TT_IS_REFERENCE_HPP_INCLUDED 13 | #define BOOST_TT_IS_REFERENCE_HPP_INCLUDED 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | // should be the last #include 21 | #include 22 | 23 | namespace boost { 24 | 25 | namespace detail { 26 | 27 | template 28 | struct is_reference_impl 29 | { 30 | BOOST_STATIC_CONSTANT(bool, value = 31 | (::boost::type_traits::ice_or< 32 | ::boost::is_lvalue_reference::value, ::boost::is_rvalue_reference::value 33 | >::value)); 34 | }; 35 | 36 | } // namespace detail 37 | 38 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_reference,T,::boost::detail::is_reference_impl::value) 39 | 40 | } // namespace boost 41 | 42 | #include 43 | 44 | #endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED 45 | 46 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/is_rvalue_reference.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) John Maddock 2010. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED 10 | #define BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED 11 | 12 | #include 13 | 14 | // should be the last #include 15 | #include 16 | 17 | namespace boost { 18 | 19 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_rvalue_reference,T,false) 20 | #ifndef BOOST_NO_RVALUE_REFERENCES 21 | BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_rvalue_reference,T&&,true) 22 | #endif 23 | 24 | } // namespace boost 25 | 26 | #include 27 | 28 | #endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED 29 | 30 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/is_stateless.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_IS_STATELESS_HPP_INCLUDED 10 | #define BOOST_TT_IS_STATELESS_HPP_INCLUDED 11 | 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | // should be the last #include 21 | #include 22 | 23 | namespace boost { 24 | 25 | namespace detail { 26 | 27 | template 28 | struct is_stateless_impl 29 | { 30 | BOOST_STATIC_CONSTANT(bool, value = 31 | (::boost::type_traits::ice_and< 32 | ::boost::has_trivial_constructor::value, 33 | ::boost::has_trivial_copy::value, 34 | ::boost::has_trivial_destructor::value, 35 | ::boost::is_class::value, 36 | ::boost::is_empty::value 37 | >::value)); 38 | }; 39 | 40 | } // namespace detail 41 | 42 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_stateless,T,::boost::detail::is_stateless_impl::value) 43 | 44 | } // namespace boost 45 | 46 | #include 47 | 48 | #endif // BOOST_TT_IS_STATELESS_HPP_INCLUDED 49 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/is_union.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard 3 | // Hinnant & John Maddock 2000. 4 | // Use, modification and distribution are subject to the Boost Software License, 5 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 6 | // http://www.boost.org/LICENSE_1_0.txt). 7 | // 8 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 9 | 10 | 11 | #ifndef BOOST_TT_IS_UNION_HPP_INCLUDED 12 | #define BOOST_TT_IS_UNION_HPP_INCLUDED 13 | 14 | #include 15 | #include 16 | #include 17 | 18 | // should be the last #include 19 | #include 20 | 21 | namespace boost { 22 | 23 | namespace detail { 24 | #ifndef __GNUC__ 25 | template struct is_union_impl 26 | { 27 | typedef typename remove_cv::type cvt; 28 | BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(cvt)); 29 | }; 30 | #else 31 | // 32 | // using remove_cv here generates a whole load of needless 33 | // warnings with gcc, since it doesn't do any good with gcc 34 | // in any case (at least at present), just remove it: 35 | // 36 | template struct is_union_impl 37 | { 38 | BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(T)); 39 | }; 40 | #endif 41 | } // namespace detail 42 | 43 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_union,T,::boost::detail::is_union_impl::value) 44 | 45 | } // namespace boost 46 | 47 | #include 48 | 49 | #endif // BOOST_TT_IS_UNION_HPP_INCLUDED 50 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/is_void.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_IS_VOID_HPP_INCLUDED 10 | #define BOOST_TT_IS_VOID_HPP_INCLUDED 11 | 12 | #include 13 | 14 | // should be the last #include 15 | #include 16 | 17 | namespace boost { 18 | 19 | //* is a type T void - is_void 20 | #if defined( __CODEGEARC__ ) 21 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_void,T,__is_void(T)) 22 | #else 23 | BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_void,T,false) 24 | BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void,true) 25 | 26 | #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS 27 | BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void const,true) 28 | BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void volatile,true) 29 | BOOST_TT_AUX_BOOL_TRAIT_SPEC1(is_void,void const volatile,true) 30 | #endif 31 | 32 | #endif // non-CodeGear implementation 33 | 34 | } // namespace boost 35 | 36 | #include 37 | 38 | #endif // BOOST_TT_IS_VOID_HPP_INCLUDED 39 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/msvc/remove_all_extents.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2004 Peder Holt 2 | // Use, modification and distribution is subject to the Boost Software 3 | // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_ALL_EXTENT_HOLT_2004_0827 6 | #define BOOST_TYPE_TRAITS_MSVC_REMOVE_ALL_EXTENT_HOLT_2004_0827 7 | 8 | #include 9 | #include 10 | 11 | namespace boost { 12 | template 13 | struct remove_all_extents; 14 | 15 | namespace detail { 16 | template 17 | struct remove_all_extents_impl_typeof { 18 | template 19 | struct inner { 20 | typedef T type; 21 | }; 22 | }; 23 | template<> 24 | struct remove_all_extents_impl_typeof { 25 | template 26 | struct inner { 27 | template 28 | static msvc_register_type test(U[]); 29 | static msvc_register_type test(...); 30 | BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( *((T*)NULL) ) )); 31 | typedef typename msvc_extract_type::id2type::type reduced_type; 32 | typedef typename remove_all_extents::type type; 33 | }; 34 | }; 35 | } //namespace detail 36 | 37 | template 38 | struct remove_all_extents { 39 | typedef typename boost::detail::remove_all_extents_impl_typeof< 40 | boost::is_array::value 41 | >::template inner >::type type; 42 | BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_all_extents,T) 43 | }; 44 | } //namespace boost 45 | 46 | #endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 47 | 48 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/msvc/remove_bounds.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2004 Peder Holt 2 | // Use, modification and distribution is subject to the Boost Software 3 | // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 6 | #define BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 7 | 8 | #include 9 | #include 10 | 11 | namespace boost { 12 | namespace detail { 13 | template 14 | struct remove_bounds_impl_typeof { 15 | template 16 | struct inner { 17 | typedef T type; 18 | }; 19 | }; 20 | template<> 21 | struct remove_bounds_impl_typeof { 22 | template 23 | struct inner { 24 | template 25 | static msvc_register_type test(U[]); 26 | static msvc_register_type test(...); 27 | BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( *((T*)NULL) ) )); 28 | typedef typename msvc_extract_type::id2type::type type; 29 | }; 30 | }; 31 | } //namespace detail 32 | 33 | template 34 | struct remove_bounds { 35 | typedef typename boost::detail::remove_bounds_impl_typeof< 36 | boost::is_array::value 37 | >::template inner >::type type; 38 | BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_bounds,T) 39 | }; 40 | } //namespace boost 41 | 42 | #endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 43 | 44 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/msvc/remove_extent.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2004 Peder Holt 2 | // Use, modification and distribution is subject to the Boost Software 3 | // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_EXTENT_HOLT_2004_0827 6 | #define BOOST_TYPE_TRAITS_MSVC_REMOVE_EXTENT_HOLT_2004_0827 7 | 8 | #include 9 | #include 10 | 11 | namespace boost { 12 | namespace detail { 13 | template 14 | struct remove_extent_impl_typeof { 15 | template 16 | struct inner { 17 | typedef T type; 18 | }; 19 | }; 20 | template<> 21 | struct remove_extent_impl_typeof { 22 | template 23 | struct inner { 24 | template 25 | static msvc_register_type test(U[]); 26 | static msvc_register_type test(...); 27 | BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( *((T*)NULL) ) )); 28 | typedef typename msvc_extract_type::id2type::type type; 29 | }; 30 | }; 31 | } //namespace detail 32 | 33 | template 34 | struct remove_extent { 35 | typedef typename boost::detail::remove_extent_impl_typeof< 36 | boost::is_array::value 37 | >::template inner >::type type; 38 | BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_extent,T) 39 | }; 40 | } //namespace boost 41 | 42 | #endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 43 | 44 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/msvc/remove_pointer.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2004 Peder Holt 2 | // Use, modification and distribution is subject to the Boost Software 3 | // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_POINTER_HOLT_2004_0827 6 | #define BOOST_TYPE_TRAITS_MSVC_REMOVE_POINTER_HOLT_2004_0827 7 | 8 | #include 9 | #include 10 | 11 | namespace boost { 12 | namespace detail { 13 | template 14 | struct remove_pointer_impl_typeof { 15 | template 16 | struct inner { 17 | typedef T type; 18 | }; 19 | }; 20 | template<> 21 | struct remove_pointer_impl_typeof { 22 | template 23 | struct inner { 24 | template 25 | static msvc_register_type test(U*); 26 | static msvc_register_type test(...); 27 | BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( *((T*)NULL) ) )); 28 | typedef typename msvc_extract_type::id2type::type type; 29 | }; 30 | }; 31 | } //namespace detail 32 | 33 | template 34 | struct remove_pointer { 35 | typedef typename boost::detail::remove_pointer_impl_typeof< 36 | boost::is_pointer::value 37 | >::template inner >::type type; 38 | BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_pointer,T) 39 | }; 40 | } //namespace boost 41 | 42 | #endif //BOOST_TYPE_TRAITS_REMOVE_POINTER_HOLT_2004_0827 43 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/msvc/remove_reference.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2004 Peder Holt 2 | // Use, modification and distribution is subject to the Boost Software 3 | // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_REFERENCE_HOLT_2004_0827 6 | #define BOOST_TYPE_TRAITS_MSVC_REMOVE_REFERENCE_HOLT_2004_0827 7 | 8 | #include 9 | #include 10 | 11 | namespace boost { 12 | namespace detail { 13 | template 14 | struct remove_reference_impl_typeof { 15 | template 16 | struct inner { 17 | typedef T type; 18 | }; 19 | }; 20 | template<> 21 | struct remove_reference_impl_typeof { 22 | template 23 | struct inner { 24 | template 25 | static msvc_register_type test(U&(*)()); 26 | static msvc_register_type test(...); 27 | BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (T(*)())(NULL) ) )); 28 | typedef typename msvc_extract_type::id2type::type type; 29 | }; 30 | }; 31 | } //namespace detail 32 | 33 | template 34 | struct remove_reference { 35 | typedef typename boost::detail::remove_reference_impl_typeof< 36 | boost::is_reference::value 37 | >::template inner >::type type; 38 | BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_reference,T) 39 | }; 40 | } //namespace boost 41 | 42 | #endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_REFERENCE_HOLT_2004_0827 43 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/msvc/typeof.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2004 Peder Holt 2 | // Use, modification and distribution is subject to the Boost Software 3 | // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #ifndef BOOST_TYPETRAITS_MSVC_TYPEOF_HPP 6 | #define BOOST_TYPETRAITS_MSVC_TYPEOF_HPP 7 | 8 | #include 9 | #include 10 | 11 | namespace boost { namespace detail { 12 | # if BOOST_WORKAROUND(BOOST_MSVC,==1300) 13 | template 14 | struct msvc_extract_type 15 | { 16 | template 17 | struct id2type_impl; 18 | 19 | typedef id2type_impl id2type; 20 | }; 21 | 22 | template 23 | struct msvc_register_type : msvc_extract_type 24 | { 25 | template<> 26 | struct id2type_impl //VC7.0 specific bugfeature 27 | { 28 | typedef T type; 29 | }; 30 | }; 31 | # else 32 | template 33 | struct msvc_extract_type 34 | { 35 | struct id2type; 36 | }; 37 | 38 | template 39 | struct msvc_register_type : msvc_extract_type 40 | { 41 | typedef msvc_extract_type base_type; 42 | struct base_type::id2type // This uses nice VC6.5 and VC7.1 bugfeature 43 | { 44 | typedef T type; 45 | }; 46 | }; 47 | # endif 48 | }} 49 | 50 | #endif //BOOST_TYPETRAITS_MSVC_TYPEOF_IMPL_HPP 51 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/object_traits.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 2 | // Use, modification and distribution are subject to the Boost Software License, 3 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 4 | // http://www.boost.org/LICENSE_1_0.txt). 5 | // 6 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 7 | // 8 | // defines object traits classes: 9 | // is_object, is_scalar, is_class, is_compound, is_pod, 10 | // has_trivial_constructor, has_trivial_copy, has_trivial_assign, 11 | // has_trivial_destructor, is_empty. 12 | // 13 | 14 | #ifndef BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED 15 | #define BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED 16 | 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #endif // BOOST_TT_OBJECT_TRAITS_HPP_INLCUDED 34 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/promote.hpp: -------------------------------------------------------------------------------- 1 | // Copyright 2005 Alexander Nasonov. 2 | // Distributed under the Boost Software License, Version 1.0. (See 3 | // accompanying file LICENSE_1_0.txt or copy at 4 | // http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef FILE_boost_type_traits_promote_hpp_INCLUDED 7 | #define FILE_boost_type_traits_promote_hpp_INCLUDED 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | // Should be the last #include 14 | #include 15 | 16 | namespace boost { 17 | 18 | namespace detail { 19 | 20 | template 21 | struct promote_impl 22 | : integral_promotion< 23 | BOOST_DEDUCED_TYPENAME floating_point_promotion::type 24 | > 25 | { 26 | }; 27 | 28 | } 29 | 30 | BOOST_TT_AUX_TYPE_TRAIT_DEF1( 31 | promote 32 | , T 33 | , BOOST_DEDUCED_TYPENAME boost::detail::promote_impl::type 34 | ) 35 | } 36 | 37 | #include 38 | 39 | #endif // #ifndef FILE_boost_type_traits_promote_hpp_INCLUDED 40 | 41 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/reference_traits.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright David Abrahams Steve Cleary, Beman Dawes, Howard 2 | // Hinnant & John Maddock 2000-2002. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | 10 | #ifndef BOOST_TT_REFERENCE_TRAITS_HPP_INCLUDED 11 | #define BOOST_TT_REFERENCE_TRAITS_HPP_INCLUDED 12 | 13 | #include 14 | 15 | #endif // BOOST_TT_REFERENCE_TRAITS_HPP_INCLUDED 16 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/remove_pointer.hpp: -------------------------------------------------------------------------------- 1 | 2 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_REMOVE_POINTER_HPP_INCLUDED 10 | #define BOOST_TT_REMOVE_POINTER_HPP_INCLUDED 11 | 12 | #include 13 | #include 14 | #include 15 | 16 | #if BOOST_WORKAROUND(BOOST_MSVC,<=1300) 17 | #include 18 | #endif 19 | 20 | // should be the last #include 21 | #include 22 | 23 | namespace boost { 24 | 25 | #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION 26 | 27 | BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,T) 28 | BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T*,T) 29 | BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const,T) 30 | BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* volatile,T) 31 | BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const volatile,T) 32 | 33 | #elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300) 34 | 35 | BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename boost::detail::remove_pointer_impl::type) 36 | 37 | #endif 38 | 39 | } // namespace boost 40 | 41 | #include 42 | 43 | #endif // BOOST_TT_REMOVE_POINTER_HPP_INCLUDED 44 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/same_traits.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Steve Cleary, Beman Dawes, Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. 2 | // Use, modification and distribution are subject to the Boost Software License, 3 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 4 | // http://www.boost.org/LICENSE_1_0.txt). 5 | // 6 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 7 | // 8 | // defines is_same: 9 | 10 | #ifndef BOOST_TT_SAME_TRAITS_HPP_INCLUDED 11 | #define BOOST_TT_SAME_TRAITS_HPP_INCLUDED 12 | 13 | #include 14 | 15 | #endif // BOOST_TT_SAME_TRAITS_HPP_INCLUDED 16 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/transform_traits.hpp: -------------------------------------------------------------------------------- 1 | // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. 2 | // Use, modification and distribution are subject to the Boost Software License, 3 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 4 | // http://www.boost.org/LICENSE_1_0.txt). 5 | // 6 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 7 | // 8 | // defines traits classes for transforming one type to another: 9 | // remove_reference, add_reference, remove_bounds, remove_pointer. 10 | // 11 | 12 | #ifndef BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED 13 | #define BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | #include 20 | 21 | #endif // BOOST_TT_TRANSFORM_TRAITS_HPP_INCLUDED 22 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/type_traits/transform_traits_spec.hpp: -------------------------------------------------------------------------------- 1 | 2 | // Copyright 2001 Aleksey Gurtovoy. 3 | // Use, modification and distribution are subject to the Boost Software License, 4 | // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at 5 | // http://www.boost.org/LICENSE_1_0.txt). 6 | // 7 | // See http://www.boost.org/libs/type_traits for most recent version including documentation. 8 | 9 | #ifndef BOOST_TT_TRANSFORM_TRAITS_SPEC_HPP_INCLUDED 10 | #define BOOST_TT_TRANSFORM_TRAITS_SPEC_HPP_INCLUDED 11 | 12 | #include 13 | 14 | #endif // BOOST_TT_TRANSFORM_TRAITS_SPEC_HPP_INCLUDED 15 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/typeof/message.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2005 Arkadiy Vertleyb 2 | // Use, modification and distribution is subject to the Boost Software 3 | // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #if defined(_MSC_VER) && defined BOOST_TYPEOF_MESSAGES 6 | # pragma message(BOOST_TYPEOF_TEXT) 7 | #endif 8 | #undef BOOST_TYPEOF_TEXT 9 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/typeof/native.hpp: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2006 Arkadiy Vertleyb 2 | // Use, modification and distribution is subject to the Boost Software 3 | // License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) 4 | 5 | #ifndef BOOST_TYPEOF_NATIVE_HPP_INCLUDED 6 | #define BOOST_TYPEOF_NATIVE_HPP_INCLUDED 7 | 8 | #ifndef MSVC_TYPEOF_HACK 9 | 10 | #ifdef BOOST_NO_SFINAE 11 | 12 | namespace boost { namespace type_of { 13 | 14 | template 15 | T& ensure_obj(const T&); 16 | 17 | }} 18 | 19 | #else 20 | 21 | #include 22 | #include 23 | 24 | namespace boost { namespace type_of { 25 | # ifdef BOOST_NO_SFINAE 26 | template 27 | T& ensure_obj(const T&); 28 | # else 29 | template 30 | typename enable_if, T&>::type 31 | ensure_obj(T&); 32 | 33 | template 34 | typename disable_if, T&>::type 35 | ensure_obj(const T&); 36 | # endif 37 | }} 38 | 39 | #endif//BOOST_NO_SFINAE 40 | 41 | #define BOOST_TYPEOF(expr) BOOST_TYPEOF_KEYWORD(boost::type_of::ensure_obj(expr)) 42 | #define BOOST_TYPEOF_TPL BOOST_TYPEOF 43 | 44 | #define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \ 45 | struct name {\ 46 | typedef BOOST_TYPEOF_TPL(expr) type;\ 47 | }; 48 | 49 | #define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \ 50 | struct name {\ 51 | typedef BOOST_TYPEOF(expr) type;\ 52 | }; 53 | 54 | #endif//MSVC_TYPEOF_HACK 55 | 56 | #define BOOST_TYPEOF_REGISTER_TYPE(x) 57 | #define BOOST_TYPEOF_REGISTER_TEMPLATE(x, params) 58 | 59 | #endif//BOOST_TYPEOF_NATIVE_HPP_INCLUDED 60 | 61 | -------------------------------------------------------------------------------- /deps/cpp-btree/boost/utility/declval.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinqiwen/ardb/9f703a6b9c3430e30aba2286240e44570994efe6/deps/cpp-btree/boost/utility/declval.hpp -------------------------------------------------------------------------------- /deps/cpp-btree/btree_config.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013, Tencent Inc. 2 | // All rights reserved. 3 | // 4 | // Author: CHEN Feng 5 | // Created: 2013-04-08 6 | 7 | #ifndef CPP_BTREE_CONFIG_H 8 | #define CPP_BTREE_CONFIG_H 9 | #pragma once 10 | 11 | #if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) || \ 12 | (_MSC_VER >= 1600) 13 | #define CPP_BTREE_CXX11 1 14 | #endif 15 | 16 | #if __GNUC__ 17 | #define GNUC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) 18 | #if GNUC_VERSION >= 40100 19 | #define HAVE_STD_TR1 20 | #endif 21 | #endif 22 | 23 | // Config the type_traits 24 | #ifdef CPP_BTREE_CXX11 25 | # define CPP_BTREE_TYPE_TRAITS_HEADER 26 | # define CPP_BTREE_TYPE_TRAITS_NS std 27 | #else // CPP_BTREE_CXX11 28 | // For pre-c++11 compilers, tr1::type_traits is usually available. 29 | # ifdef _MSC_VER 30 | #define CPP_BTREE_TYPE_TRAITS_HEADER 31 | # elif defined(HAVE_STD_TR1) && !defined(__APPLE__) 32 | #define CPP_BTREE_TYPE_TRAITS_HEADER 33 | # else 34 | # define CPP_BTREE_TYPE_TRAITS_HEADER 35 | # endif 36 | #define CPP_BTREE_TYPE_TRAITS_NS std::tr1 37 | #endif // CPP_BTREE_CXX11 38 | 39 | // Allow user override the size_type of btree containers. 40 | // Define CPP_BTREE_SIZE_TYPE to be size_t make it total compatible with STL. 41 | #ifndef CPP_BTREE_SIZE_TYPE 42 | #define CPP_BTREE_SIZE_TYPE ssize_t 43 | #endif 44 | 45 | #endif // CPP_BTREE_CONFIG_H 46 | -------------------------------------------------------------------------------- /deps/lua/COPYRIGHT: -------------------------------------------------------------------------------- 1 | Lua License 2 | ----------- 3 | 4 | Lua is licensed under the terms of the MIT license reproduced below. 5 | This means that Lua is free software and can be used for both academic 6 | and commercial purposes at absolutely no cost. 7 | 8 | For details and rationale, see http://www.lua.org/license.html . 9 | 10 | =============================================================================== 11 | 12 | Copyright (C) 1994-2012 Lua.org, PUC-Rio. 13 | 14 | Permission is hereby granted, free of charge, to any person obtaining a copy 15 | of this software and associated documentation files (the "Software"), to deal 16 | in the Software without restriction, including without limitation the rights 17 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 18 | copies of the Software, and to permit persons to whom the Software is 19 | furnished to do so, subject to the following conditions: 20 | 21 | The above copyright notice and this permission notice shall be included in 22 | all copies or substantial portions of the Software. 23 | 24 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 25 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 26 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 27 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 28 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 29 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 30 | THE SOFTWARE. 31 | 32 | =============================================================================== 33 | 34 | (end of COPYRIGHT) 35 | -------------------------------------------------------------------------------- /deps/lua/README: -------------------------------------------------------------------------------- 1 | README for Lua 5.1 2 | 3 | See INSTALL for installation instructions. 4 | See HISTORY for a summary of changes since the last released version. 5 | 6 | * What is Lua? 7 | ------------ 8 | Lua is a powerful, light-weight programming language designed for extending 9 | applications. Lua is also frequently used as a general-purpose, stand-alone 10 | language. Lua is free software. 11 | 12 | For complete information, visit Lua's web site at http://www.lua.org/ . 13 | For an executive summary, see http://www.lua.org/about.html . 14 | 15 | Lua has been used in many different projects around the world. 16 | For a short list, see http://www.lua.org/uses.html . 17 | 18 | * Availability 19 | ------------ 20 | Lua is freely available for both academic and commercial purposes. 21 | See COPYRIGHT and http://www.lua.org/license.html for details. 22 | Lua can be downloaded at http://www.lua.org/download.html . 23 | 24 | * Installation 25 | ------------ 26 | Lua is implemented in pure ANSI C, and compiles unmodified in all known 27 | platforms that have an ANSI C compiler. In most Unix-like platforms, simply 28 | do "make" with a suitable target. See INSTALL for detailed instructions. 29 | 30 | * Origin 31 | ------ 32 | Lua is developed at Lua.org, a laboratory of the Department of Computer 33 | Science of PUC-Rio (the Pontifical Catholic University of Rio de Janeiro 34 | in Brazil). 35 | For more information about the authors, see http://www.lua.org/authors.html . 36 | 37 | (end of README) 38 | -------------------------------------------------------------------------------- /deps/lua/doc/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinqiwen/ardb/9f703a6b9c3430e30aba2286240e44570994efe6/deps/lua/doc/cover.png -------------------------------------------------------------------------------- /deps/lua/doc/logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinqiwen/ardb/9f703a6b9c3430e30aba2286240e44570994efe6/deps/lua/doc/logo.gif -------------------------------------------------------------------------------- /deps/lua/doc/lua.css: -------------------------------------------------------------------------------- 1 | body { 2 | color: #000000 ; 3 | background-color: #FFFFFF ; 4 | font-family: Helvetica, Arial, sans-serif ; 5 | text-align: justify ; 6 | margin-right: 30px ; 7 | margin-left: 30px ; 8 | } 9 | 10 | h1, h2, h3, h4 { 11 | font-family: Verdana, Geneva, sans-serif ; 12 | font-weight: normal ; 13 | font-style: italic ; 14 | } 15 | 16 | h2 { 17 | padding-top: 0.4em ; 18 | padding-bottom: 0.4em ; 19 | padding-left: 30px ; 20 | padding-right: 30px ; 21 | margin-left: -30px ; 22 | background-color: #E0E0FF ; 23 | } 24 | 25 | h3 { 26 | padding-left: 0.5em ; 27 | border-left: solid #E0E0FF 1em ; 28 | } 29 | 30 | table h3 { 31 | padding-left: 0px ; 32 | border-left: none ; 33 | } 34 | 35 | a:link { 36 | color: #000080 ; 37 | background-color: inherit ; 38 | text-decoration: none ; 39 | } 40 | 41 | a:visited { 42 | background-color: inherit ; 43 | text-decoration: none ; 44 | } 45 | 46 | a:link:hover, a:visited:hover { 47 | color: #000080 ; 48 | background-color: #E0E0FF ; 49 | } 50 | 51 | a:link:active, a:visited:active { 52 | color: #FF0000 ; 53 | } 54 | 55 | hr { 56 | border: 0 ; 57 | height: 1px ; 58 | color: #a0a0a0 ; 59 | background-color: #a0a0a0 ; 60 | } 61 | 62 | :target { 63 | background-color: #F8F8F8 ; 64 | padding: 8px ; 65 | border: solid #a0a0a0 2px ; 66 | } 67 | 68 | .footer { 69 | color: gray ; 70 | font-size: small ; 71 | } 72 | 73 | input[type=text] { 74 | border: solid #a0a0a0 2px ; 75 | border-radius: 2em ; 76 | -moz-border-radius: 2em ; 77 | background-image: url('images/search.png') ; 78 | background-repeat: no-repeat; 79 | background-position: 4px center ; 80 | padding-left: 20px ; 81 | height: 2em ; 82 | } 83 | 84 | -------------------------------------------------------------------------------- /deps/lua/doc/manual.css: -------------------------------------------------------------------------------- 1 | h3 code { 2 | font-family: inherit ; 3 | font-size: inherit ; 4 | } 5 | 6 | pre, code { 7 | font-size: 12pt ; 8 | } 9 | 10 | span.apii { 11 | float: right ; 12 | font-family: inherit ; 13 | font-style: normal ; 14 | font-size: small ; 15 | color: gray ; 16 | } 17 | 18 | p+h1, ul+h1 { 19 | padding-top: 0.4em ; 20 | padding-bottom: 0.4em ; 21 | padding-left: 30px ; 22 | margin-left: -30px ; 23 | background-color: #E0E0FF ; 24 | } 25 | -------------------------------------------------------------------------------- /deps/lua/doc/readme.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Lua documentation 4 | 5 | 6 | 7 | 8 | 9 |
10 |

11 | Lua 12 | Documentation 13 |

14 | 15 | This is the documentation included in the source distribution of Lua 5.1.5. 16 | 17 | 25 | 26 | Lua's 27 | official web site 28 | contains updated documentation, 29 | especially the 30 | reference manual. 31 |

32 | 33 |


34 | 35 | Last update: 36 | Fri Feb 3 09:44:42 BRST 2012 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /deps/lua/etc/Makefile: -------------------------------------------------------------------------------- 1 | # makefile for Lua etc 2 | 3 | TOP= .. 4 | LIB= $(TOP)/src 5 | INC= $(TOP)/src 6 | BIN= $(TOP)/src 7 | SRC= $(TOP)/src 8 | TST= $(TOP)/test 9 | 10 | CC= gcc 11 | CFLAGS= -O2 -Wall -I$(INC) $(MYCFLAGS) 12 | MYCFLAGS= 13 | MYLDFLAGS= -Wl,-E 14 | MYLIBS= -lm 15 | #MYLIBS= -lm -Wl,-E -ldl -lreadline -lhistory -lncurses 16 | RM= rm -f 17 | 18 | default: 19 | @echo 'Please choose a target: min noparser one strict clean' 20 | 21 | min: min.c 22 | $(CC) $(CFLAGS) $@.c -L$(LIB) -llua $(MYLIBS) 23 | echo 'print"Hello there!"' | ./a.out 24 | 25 | noparser: noparser.o 26 | $(CC) noparser.o $(SRC)/lua.o -L$(LIB) -llua $(MYLIBS) 27 | $(BIN)/luac $(TST)/hello.lua 28 | -./a.out luac.out 29 | -./a.out -e'a=1' 30 | 31 | one: 32 | $(CC) $(CFLAGS) all.c $(MYLIBS) 33 | ./a.out $(TST)/hello.lua 34 | 35 | strict: 36 | -$(BIN)/lua -e 'print(a);b=2' 37 | -$(BIN)/lua -lstrict -e 'print(a)' 38 | -$(BIN)/lua -e 'function f() b=2 end f()' 39 | -$(BIN)/lua -lstrict -e 'function f() b=2 end f()' 40 | 41 | clean: 42 | $(RM) a.out core core.* *.o luac.out 43 | 44 | .PHONY: default min noparser one strict clean 45 | -------------------------------------------------------------------------------- /deps/lua/etc/README: -------------------------------------------------------------------------------- 1 | This directory contains some useful files and code. 2 | Unlike the code in ../src, everything here is in the public domain. 3 | 4 | If any of the makes fail, you're probably not using the same libraries 5 | used to build Lua. Set MYLIBS in Makefile accordingly. 6 | 7 | all.c 8 | Full Lua interpreter in a single file. 9 | Do "make one" for a demo. 10 | 11 | lua.hpp 12 | Lua header files for C++ using 'extern "C"'. 13 | 14 | lua.ico 15 | A Lua icon for Windows (and web sites: save as favicon.ico). 16 | Drawn by hand by Markus Gritsch . 17 | 18 | lua.pc 19 | pkg-config data for Lua 20 | 21 | luavs.bat 22 | Script to build Lua under "Visual Studio .NET Command Prompt". 23 | Run it from the toplevel as etc\luavs.bat. 24 | 25 | min.c 26 | A minimal Lua interpreter. 27 | Good for learning and for starting your own. 28 | Do "make min" for a demo. 29 | 30 | noparser.c 31 | Linking with noparser.o avoids loading the parsing modules in lualib.a. 32 | Do "make noparser" for a demo. 33 | 34 | strict.lua 35 | Traps uses of undeclared global variables. 36 | Do "make strict" for a demo. 37 | 38 | -------------------------------------------------------------------------------- /deps/lua/etc/all.c: -------------------------------------------------------------------------------- 1 | /* 2 | * all.c -- Lua core, libraries and interpreter in a single file 3 | */ 4 | 5 | #define luaall_c 6 | 7 | #include "lapi.c" 8 | #include "lcode.c" 9 | #include "ldebug.c" 10 | #include "ldo.c" 11 | #include "ldump.c" 12 | #include "lfunc.c" 13 | #include "lgc.c" 14 | #include "llex.c" 15 | #include "lmem.c" 16 | #include "lobject.c" 17 | #include "lopcodes.c" 18 | #include "lparser.c" 19 | #include "lstate.c" 20 | #include "lstring.c" 21 | #include "ltable.c" 22 | #include "ltm.c" 23 | #include "lundump.c" 24 | #include "lvm.c" 25 | #include "lzio.c" 26 | 27 | #include "lauxlib.c" 28 | #include "lbaselib.c" 29 | #include "ldblib.c" 30 | #include "liolib.c" 31 | #include "linit.c" 32 | #include "lmathlib.c" 33 | #include "loadlib.c" 34 | #include "loslib.c" 35 | #include "lstrlib.c" 36 | #include "ltablib.c" 37 | 38 | #include "lua.c" 39 | -------------------------------------------------------------------------------- /deps/lua/etc/lua.hpp: -------------------------------------------------------------------------------- 1 | // lua.hpp 2 | // Lua header files for C++ 3 | // <> not supplied automatically because Lua also compiles as C++ 4 | 5 | extern "C" { 6 | #include "lua.h" 7 | #include "lualib.h" 8 | #include "lauxlib.h" 9 | } 10 | -------------------------------------------------------------------------------- /deps/lua/etc/lua.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinqiwen/ardb/9f703a6b9c3430e30aba2286240e44570994efe6/deps/lua/etc/lua.ico -------------------------------------------------------------------------------- /deps/lua/etc/lua.pc: -------------------------------------------------------------------------------- 1 | # lua.pc -- pkg-config data for Lua 2 | 3 | # vars from install Makefile 4 | 5 | # grep '^V=' ../Makefile 6 | V= 5.1 7 | # grep '^R=' ../Makefile 8 | R= 5.1.5 9 | 10 | # grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/' 11 | prefix= /usr/local 12 | INSTALL_BIN= ${prefix}/bin 13 | INSTALL_INC= ${prefix}/include 14 | INSTALL_LIB= ${prefix}/lib 15 | INSTALL_MAN= ${prefix}/man/man1 16 | INSTALL_LMOD= ${prefix}/share/lua/${V} 17 | INSTALL_CMOD= ${prefix}/lib/lua/${V} 18 | 19 | # canonical vars 20 | exec_prefix=${prefix} 21 | libdir=${exec_prefix}/lib 22 | includedir=${prefix}/include 23 | 24 | Name: Lua 25 | Description: An Extensible Extension Language 26 | Version: ${R} 27 | Requires: 28 | Libs: -L${libdir} -llua -lm 29 | Cflags: -I${includedir} 30 | 31 | # (end of lua.pc) 32 | -------------------------------------------------------------------------------- /deps/lua/etc/luavs.bat: -------------------------------------------------------------------------------- 1 | @rem Script to build Lua under "Visual Studio .NET Command Prompt". 2 | @rem Do not run from this directory; run it from the toplevel: etc\luavs.bat . 3 | @rem It creates lua51.dll, lua51.lib, lua.exe, and luac.exe in src. 4 | @rem (contributed by David Manura and Mike Pall) 5 | 6 | @setlocal 7 | @set MYCOMPILE=cl /nologo /MD /O2 /W3 /c /D_CRT_SECURE_NO_DEPRECATE 8 | @set MYLINK=link /nologo 9 | @set MYMT=mt /nologo 10 | 11 | cd src 12 | %MYCOMPILE% /DLUA_BUILD_AS_DLL l*.c 13 | del lua.obj luac.obj 14 | %MYLINK% /DLL /out:lua51.dll l*.obj 15 | if exist lua51.dll.manifest^ 16 | %MYMT% -manifest lua51.dll.manifest -outputresource:lua51.dll;2 17 | %MYCOMPILE% /DLUA_BUILD_AS_DLL lua.c 18 | %MYLINK% /out:lua.exe lua.obj lua51.lib 19 | if exist lua.exe.manifest^ 20 | %MYMT% -manifest lua.exe.manifest -outputresource:lua.exe 21 | %MYCOMPILE% l*.c print.c 22 | del lua.obj linit.obj lbaselib.obj ldblib.obj liolib.obj lmathlib.obj^ 23 | loslib.obj ltablib.obj lstrlib.obj loadlib.obj 24 | %MYLINK% /out:luac.exe *.obj 25 | if exist luac.exe.manifest^ 26 | %MYMT% -manifest luac.exe.manifest -outputresource:luac.exe 27 | del *.obj *.manifest 28 | cd .. 29 | -------------------------------------------------------------------------------- /deps/lua/etc/min.c: -------------------------------------------------------------------------------- 1 | /* 2 | * min.c -- a minimal Lua interpreter 3 | * loads stdin only with minimal error handling. 4 | * no interaction, and no standard library, only a "print" function. 5 | */ 6 | 7 | #include 8 | 9 | #include "lua.h" 10 | #include "lauxlib.h" 11 | 12 | static int print(lua_State *L) 13 | { 14 | int n=lua_gettop(L); 15 | int i; 16 | for (i=1; i<=n; i++) 17 | { 18 | if (i>1) printf("\t"); 19 | if (lua_isstring(L,i)) 20 | printf("%s",lua_tostring(L,i)); 21 | else if (lua_isnil(L,i)) 22 | printf("%s","nil"); 23 | else if (lua_isboolean(L,i)) 24 | printf("%s",lua_toboolean(L,i) ? "true" : "false"); 25 | else 26 | printf("%s:%p",luaL_typename(L,i),lua_topointer(L,i)); 27 | } 28 | printf("\n"); 29 | return 0; 30 | } 31 | 32 | int main(void) 33 | { 34 | lua_State *L=lua_open(); 35 | lua_register(L,"print",print); 36 | if (luaL_dofile(L,NULL)!=0) fprintf(stderr,"%s\n",lua_tostring(L,-1)); 37 | lua_close(L); 38 | return 0; 39 | } 40 | -------------------------------------------------------------------------------- /deps/lua/etc/noparser.c: -------------------------------------------------------------------------------- 1 | /* 2 | * The code below can be used to make a Lua core that does not contain the 3 | * parsing modules (lcode, llex, lparser), which represent 35% of the total core. 4 | * You'll only be able to load binary files and strings, precompiled with luac. 5 | * (Of course, you'll have to build luac with the original parsing modules!) 6 | * 7 | * To use this module, simply compile it ("make noparser" does that) and list 8 | * its object file before the Lua libraries. The linker should then not load 9 | * the parsing modules. To try it, do "make luab". 10 | * 11 | * If you also want to avoid the dump module (ldump.o), define NODUMP. 12 | * #define NODUMP 13 | */ 14 | 15 | #define LUA_CORE 16 | 17 | #include "llex.h" 18 | #include "lparser.h" 19 | #include "lzio.h" 20 | 21 | LUAI_FUNC void luaX_init (lua_State *L) { 22 | UNUSED(L); 23 | } 24 | 25 | LUAI_FUNC Proto *luaY_parser (lua_State *L, ZIO *z, Mbuffer *buff, const char *name) { 26 | UNUSED(z); 27 | UNUSED(buff); 28 | UNUSED(name); 29 | lua_pushliteral(L,"parser not loaded"); 30 | lua_error(L); 31 | return NULL; 32 | } 33 | 34 | #ifdef NODUMP 35 | #include "lundump.h" 36 | 37 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip) { 38 | UNUSED(f); 39 | UNUSED(w); 40 | UNUSED(data); 41 | UNUSED(strip); 42 | #if 1 43 | UNUSED(L); 44 | return 0; 45 | #else 46 | lua_pushliteral(L,"dumper not loaded"); 47 | lua_error(L); 48 | #endif 49 | } 50 | #endif 51 | -------------------------------------------------------------------------------- /deps/lua/etc/strict.lua: -------------------------------------------------------------------------------- 1 | -- 2 | -- strict.lua 3 | -- checks uses of undeclared global variables 4 | -- All global variables must be 'declared' through a regular assignment 5 | -- (even assigning nil will do) in a main chunk before being used 6 | -- anywhere or assigned to inside a function. 7 | -- 8 | 9 | local getinfo, error, rawset, rawget = debug.getinfo, error, rawset, rawget 10 | 11 | local mt = getmetatable(_G) 12 | if mt == nil then 13 | mt = {} 14 | setmetatable(_G, mt) 15 | end 16 | 17 | mt.__declared = {} 18 | 19 | local function what () 20 | local d = getinfo(3, "S") 21 | return d and d.what or "C" 22 | end 23 | 24 | mt.__newindex = function (t, n, v) 25 | if not mt.__declared[n] then 26 | local w = what() 27 | if w ~= "main" and w ~= "C" then 28 | error("assign to undeclared variable '"..n.."'", 2) 29 | end 30 | mt.__declared[n] = true 31 | end 32 | rawset(t, n, v) 33 | end 34 | 35 | mt.__index = function (t, n) 36 | if not mt.__declared[n] and what() ~= "C" then 37 | error("variable '"..n.."' is not declared", 2) 38 | end 39 | return rawget(t, n) 40 | end 41 | 42 | -------------------------------------------------------------------------------- /deps/lua/src/lapi.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lapi.h,v 2.2.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Auxiliary functions from Lua API 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lapi_h 8 | #define lapi_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | LUAI_FUNC void luaA_pushobject (lua_State *L, const TValue *o); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /deps/lua/src/ldebug.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ldebug.h,v 2.3.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Auxiliary functions from Debug Interface module 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ldebug_h 8 | #define ldebug_h 9 | 10 | 11 | #include "lstate.h" 12 | 13 | 14 | #define pcRel(pc, p) (cast(int, (pc) - (p)->code) - 1) 15 | 16 | #define getline(f,pc) (((f)->lineinfo) ? (f)->lineinfo[pc] : 0) 17 | 18 | #define resethookcount(L) (L->hookcount = L->basehookcount) 19 | 20 | 21 | LUAI_FUNC void luaG_typeerror (lua_State *L, const TValue *o, 22 | const char *opname); 23 | LUAI_FUNC void luaG_concaterror (lua_State *L, StkId p1, StkId p2); 24 | LUAI_FUNC void luaG_aritherror (lua_State *L, const TValue *p1, 25 | const TValue *p2); 26 | LUAI_FUNC int luaG_ordererror (lua_State *L, const TValue *p1, 27 | const TValue *p2); 28 | LUAI_FUNC void luaG_runerror (lua_State *L, const char *fmt, ...); 29 | LUAI_FUNC void luaG_errormsg (lua_State *L); 30 | LUAI_FUNC int luaG_checkcode (const Proto *pt); 31 | LUAI_FUNC int luaG_checkopenop (Instruction i); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /deps/lua/src/lfunc.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lfunc.h,v 2.4.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Auxiliary functions to manipulate prototypes and closures 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lfunc_h 8 | #define lfunc_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | #define sizeCclosure(n) (cast(int, sizeof(CClosure)) + \ 15 | cast(int, sizeof(TValue)*((n)-1))) 16 | 17 | #define sizeLclosure(n) (cast(int, sizeof(LClosure)) + \ 18 | cast(int, sizeof(TValue *)*((n)-1))) 19 | 20 | 21 | LUAI_FUNC Proto *luaF_newproto (lua_State *L); 22 | LUAI_FUNC Closure *luaF_newCclosure (lua_State *L, int nelems, Table *e); 23 | LUAI_FUNC Closure *luaF_newLclosure (lua_State *L, int nelems, Table *e); 24 | LUAI_FUNC UpVal *luaF_newupval (lua_State *L); 25 | LUAI_FUNC UpVal *luaF_findupval (lua_State *L, StkId level); 26 | LUAI_FUNC void luaF_close (lua_State *L, StkId level); 27 | LUAI_FUNC void luaF_freeproto (lua_State *L, Proto *f); 28 | LUAI_FUNC void luaF_freeclosure (lua_State *L, Closure *c); 29 | LUAI_FUNC void luaF_freeupval (lua_State *L, UpVal *uv); 30 | LUAI_FUNC const char *luaF_getlocalname (const Proto *func, int local_number, 31 | int pc); 32 | 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /deps/lua/src/linit.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: linit.c,v 1.14.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Initialization of libraries for lua.c 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #define linit_c 9 | #define LUA_LIB 10 | 11 | #include "lua.h" 12 | 13 | #include "lualib.h" 14 | #include "lauxlib.h" 15 | 16 | 17 | static const luaL_Reg lualibs[] = { 18 | {"", luaopen_base}, 19 | {LUA_LOADLIBNAME, luaopen_package}, 20 | {LUA_TABLIBNAME, luaopen_table}, 21 | {LUA_IOLIBNAME, luaopen_io}, 22 | {LUA_OSLIBNAME, luaopen_os}, 23 | {LUA_STRLIBNAME, luaopen_string}, 24 | {LUA_MATHLIBNAME, luaopen_math}, 25 | {LUA_DBLIBNAME, luaopen_debug}, 26 | {NULL, NULL} 27 | }; 28 | 29 | 30 | LUALIB_API void luaL_openlibs (lua_State *L) { 31 | const luaL_Reg *lib = lualibs; 32 | for (; lib->func; lib++) { 33 | lua_pushcfunction(L, lib->func); 34 | lua_pushstring(L, lib->name); 35 | lua_call(L, 1, 0); 36 | } 37 | } 38 | 39 | -------------------------------------------------------------------------------- /deps/lua/src/lmem.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lmem.h,v 1.31.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Interface to Memory Manager 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lmem_h 8 | #define lmem_h 9 | 10 | 11 | #include 12 | 13 | #include "llimits.h" 14 | #include "lua.h" 15 | 16 | #define MEMERRMSG "not enough memory" 17 | 18 | 19 | #define luaM_reallocv(L,b,on,n,e) \ 20 | ((cast(size_t, (n)+1) <= MAX_SIZET/(e)) ? /* +1 to avoid warnings */ \ 21 | luaM_realloc_(L, (b), (on)*(e), (n)*(e)) : \ 22 | luaM_toobig(L)) 23 | 24 | #define luaM_freemem(L, b, s) luaM_realloc_(L, (b), (s), 0) 25 | #define luaM_free(L, b) luaM_realloc_(L, (b), sizeof(*(b)), 0) 26 | #define luaM_freearray(L, b, n, t) luaM_reallocv(L, (b), n, 0, sizeof(t)) 27 | 28 | #define luaM_malloc(L,t) luaM_realloc_(L, NULL, 0, (t)) 29 | #define luaM_new(L,t) cast(t *, luaM_malloc(L, sizeof(t))) 30 | #define luaM_newvector(L,n,t) \ 31 | cast(t *, luaM_reallocv(L, NULL, 0, n, sizeof(t))) 32 | 33 | #define luaM_growvector(L,v,nelems,size,t,limit,e) \ 34 | if ((nelems)+1 > (size)) \ 35 | ((v)=cast(t *, luaM_growaux_(L,v,&(size),sizeof(t),limit,e))) 36 | 37 | #define luaM_reallocvector(L, v,oldn,n,t) \ 38 | ((v)=cast(t *, luaM_reallocv(L, v, oldn, n, sizeof(t)))) 39 | 40 | 41 | LUAI_FUNC void *luaM_realloc_ (lua_State *L, void *block, size_t oldsize, 42 | size_t size); 43 | LUAI_FUNC void *luaM_toobig (lua_State *L); 44 | LUAI_FUNC void *luaM_growaux_ (lua_State *L, void *block, int *size, 45 | size_t size_elem, int limit, 46 | const char *errormsg); 47 | 48 | #endif 49 | 50 | -------------------------------------------------------------------------------- /deps/lua/src/lstring.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lstring.h,v 1.43.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** String table (keep all strings handled by Lua) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lstring_h 8 | #define lstring_h 9 | 10 | 11 | #include "lgc.h" 12 | #include "lobject.h" 13 | #include "lstate.h" 14 | 15 | 16 | #define sizestring(s) (sizeof(union TString)+((s)->len+1)*sizeof(char)) 17 | 18 | #define sizeudata(u) (sizeof(union Udata)+(u)->len) 19 | 20 | #define luaS_new(L, s) (luaS_newlstr(L, s, strlen(s))) 21 | #define luaS_newliteral(L, s) (luaS_newlstr(L, "" s, \ 22 | (sizeof(s)/sizeof(char))-1)) 23 | 24 | #define luaS_fix(s) l_setbit((s)->tsv.marked, FIXEDBIT) 25 | 26 | LUAI_FUNC void luaS_resize (lua_State *L, int newsize); 27 | LUAI_FUNC Udata *luaS_newudata (lua_State *L, size_t s, Table *e); 28 | LUAI_FUNC TString *luaS_newlstr (lua_State *L, const char *str, size_t l); 29 | 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /deps/lua/src/ltable.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltable.h,v 2.10.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Lua tables (hash) 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ltable_h 8 | #define ltable_h 9 | 10 | #include "lobject.h" 11 | 12 | 13 | #define gnode(t,i) (&(t)->node[i]) 14 | #define gkey(n) (&(n)->i_key.nk) 15 | #define gval(n) (&(n)->i_val) 16 | #define gnext(n) ((n)->i_key.nk.next) 17 | 18 | #define key2tval(n) (&(n)->i_key.tvk) 19 | 20 | 21 | LUAI_FUNC const TValue *luaH_getnum (Table *t, int key); 22 | LUAI_FUNC TValue *luaH_setnum (lua_State *L, Table *t, int key); 23 | LUAI_FUNC const TValue *luaH_getstr (Table *t, TString *key); 24 | LUAI_FUNC TValue *luaH_setstr (lua_State *L, Table *t, TString *key); 25 | LUAI_FUNC const TValue *luaH_get (Table *t, const TValue *key); 26 | LUAI_FUNC TValue *luaH_set (lua_State *L, Table *t, const TValue *key); 27 | LUAI_FUNC Table *luaH_new (lua_State *L, int narray, int lnhash); 28 | LUAI_FUNC void luaH_resizearray (lua_State *L, Table *t, int nasize); 29 | LUAI_FUNC void luaH_free (lua_State *L, Table *t); 30 | LUAI_FUNC int luaH_next (lua_State *L, Table *t, StkId key); 31 | LUAI_FUNC int luaH_getn (Table *t); 32 | 33 | 34 | #if defined(LUA_DEBUG) 35 | LUAI_FUNC Node *luaH_mainposition (const Table *t, const TValue *key); 36 | LUAI_FUNC int luaH_isdummy (Node *n); 37 | #endif 38 | 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /deps/lua/src/ltm.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltm.c,v 2.8.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Tag methods 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #include 9 | 10 | #define ltm_c 11 | #define LUA_CORE 12 | 13 | #include "lua.h" 14 | 15 | #include "lobject.h" 16 | #include "lstate.h" 17 | #include "lstring.h" 18 | #include "ltable.h" 19 | #include "ltm.h" 20 | 21 | 22 | 23 | const char *const luaT_typenames[] = { 24 | "nil", "boolean", "userdata", "number", 25 | "string", "table", "function", "userdata", "thread", 26 | "proto", "upval" 27 | }; 28 | 29 | 30 | void luaT_init (lua_State *L) { 31 | static const char *const luaT_eventname[] = { /* ORDER TM */ 32 | "__index", "__newindex", 33 | "__gc", "__mode", "__eq", 34 | "__add", "__sub", "__mul", "__div", "__mod", 35 | "__pow", "__unm", "__len", "__lt", "__le", 36 | "__concat", "__call" 37 | }; 38 | int i; 39 | for (i=0; itmname[i] = luaS_new(L, luaT_eventname[i]); 41 | luaS_fix(G(L)->tmname[i]); /* never collect these names */ 42 | } 43 | } 44 | 45 | 46 | /* 47 | ** function to be used with macro "fasttm": optimized for absence of 48 | ** tag methods 49 | */ 50 | const TValue *luaT_gettm (Table *events, TMS event, TString *ename) { 51 | const TValue *tm = luaH_getstr(events, ename); 52 | lua_assert(event <= TM_EQ); 53 | if (ttisnil(tm)) { /* no tag method? */ 54 | events->flags |= cast_byte(1u<metatable; 66 | break; 67 | case LUA_TUSERDATA: 68 | mt = uvalue(o)->metatable; 69 | break; 70 | default: 71 | mt = G(L)->mt[ttype(o)]; 72 | } 73 | return (mt ? luaH_getstr(mt, G(L)->tmname[event]) : luaO_nilobject); 74 | } 75 | 76 | -------------------------------------------------------------------------------- /deps/lua/src/ltm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: ltm.h,v 2.6.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Tag methods 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef ltm_h 8 | #define ltm_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | /* 15 | * WARNING: if you change the order of this enumeration, 16 | * grep "ORDER TM" 17 | */ 18 | typedef enum { 19 | TM_INDEX, 20 | TM_NEWINDEX, 21 | TM_GC, 22 | TM_MODE, 23 | TM_EQ, /* last tag method with `fast' access */ 24 | TM_ADD, 25 | TM_SUB, 26 | TM_MUL, 27 | TM_DIV, 28 | TM_MOD, 29 | TM_POW, 30 | TM_UNM, 31 | TM_LEN, 32 | TM_LT, 33 | TM_LE, 34 | TM_CONCAT, 35 | TM_CALL, 36 | TM_N /* number of elements in the enum */ 37 | } TMS; 38 | 39 | 40 | 41 | #define gfasttm(g,et,e) ((et) == NULL ? NULL : \ 42 | ((et)->flags & (1u<<(e))) ? NULL : luaT_gettm(et, e, (g)->tmname[e])) 43 | 44 | #define fasttm(l,et,e) gfasttm(G(l), et, e) 45 | 46 | LUAI_DATA const char *const luaT_typenames[]; 47 | 48 | 49 | LUAI_FUNC const TValue *luaT_gettm (Table *events, TMS event, TString *ename); 50 | LUAI_FUNC const TValue *luaT_gettmbyobj (lua_State *L, const TValue *o, 51 | TMS event); 52 | LUAI_FUNC void luaT_init (lua_State *L); 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /deps/lua/src/lualib.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lualib.h,v 1.36.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Lua standard libraries 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lualib_h 9 | #define lualib_h 10 | 11 | #include "lua.h" 12 | 13 | 14 | /* Key to file-handle type */ 15 | #define LUA_FILEHANDLE "FILE*" 16 | 17 | 18 | #define LUA_COLIBNAME "coroutine" 19 | LUALIB_API int (luaopen_base) (lua_State *L); 20 | 21 | #define LUA_TABLIBNAME "table" 22 | LUALIB_API int (luaopen_table) (lua_State *L); 23 | 24 | #define LUA_IOLIBNAME "io" 25 | LUALIB_API int (luaopen_io) (lua_State *L); 26 | 27 | #define LUA_OSLIBNAME "os" 28 | LUALIB_API int (luaopen_os) (lua_State *L); 29 | 30 | #define LUA_STRLIBNAME "string" 31 | LUALIB_API int (luaopen_string) (lua_State *L); 32 | 33 | #define LUA_MATHLIBNAME "math" 34 | LUALIB_API int (luaopen_math) (lua_State *L); 35 | 36 | #define LUA_DBLIBNAME "debug" 37 | LUALIB_API int (luaopen_debug) (lua_State *L); 38 | 39 | #define LUA_LOADLIBNAME "package" 40 | LUALIB_API int (luaopen_package) (lua_State *L); 41 | 42 | 43 | /* open all previous libraries */ 44 | LUALIB_API void (luaL_openlibs) (lua_State *L); 45 | 46 | 47 | 48 | #ifndef lua_assert 49 | #define lua_assert(x) ((void)0) 50 | #endif 51 | 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /deps/lua/src/lundump.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lundump.h,v 1.37.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** load precompiled Lua chunks 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lundump_h 8 | #define lundump_h 9 | 10 | #include "lobject.h" 11 | #include "lzio.h" 12 | 13 | /* load one chunk; from lundump.c */ 14 | LUAI_FUNC Proto* luaU_undump (lua_State* L, ZIO* Z, Mbuffer* buff, const char* name); 15 | 16 | /* make header; from lundump.c */ 17 | LUAI_FUNC void luaU_header (char* h); 18 | 19 | /* dump one chunk; from ldump.c */ 20 | LUAI_FUNC int luaU_dump (lua_State* L, const Proto* f, lua_Writer w, void* data, int strip); 21 | 22 | #ifdef luac_c 23 | /* print one chunk; from print.c */ 24 | LUAI_FUNC void luaU_print (const Proto* f, int full); 25 | #endif 26 | 27 | /* for header of binary files -- this is Lua 5.1 */ 28 | #define LUAC_VERSION 0x51 29 | 30 | /* for header of binary files -- this is the official format */ 31 | #define LUAC_FORMAT 0 32 | 33 | /* size of header of binary files */ 34 | #define LUAC_HEADERSIZE 12 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /deps/lua/src/lvm.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lvm.h,v 2.5.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Lua virtual machine 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lvm_h 8 | #define lvm_h 9 | 10 | 11 | #include "ldo.h" 12 | #include "lobject.h" 13 | #include "ltm.h" 14 | 15 | 16 | #define tostring(L,o) ((ttype(o) == LUA_TSTRING) || (luaV_tostring(L, o))) 17 | 18 | #define tonumber(o,n) (ttype(o) == LUA_TNUMBER || \ 19 | (((o) = luaV_tonumber(o,n)) != NULL)) 20 | 21 | #define equalobj(L,o1,o2) \ 22 | (ttype(o1) == ttype(o2) && luaV_equalval(L, o1, o2)) 23 | 24 | 25 | LUAI_FUNC int luaV_lessthan (lua_State *L, const TValue *l, const TValue *r); 26 | LUAI_FUNC int luaV_equalval (lua_State *L, const TValue *t1, const TValue *t2); 27 | LUAI_FUNC const TValue *luaV_tonumber (const TValue *obj, TValue *n); 28 | LUAI_FUNC int luaV_tostring (lua_State *L, StkId obj); 29 | LUAI_FUNC void luaV_gettable (lua_State *L, const TValue *t, TValue *key, 30 | StkId val); 31 | LUAI_FUNC void luaV_settable (lua_State *L, const TValue *t, TValue *key, 32 | StkId val); 33 | LUAI_FUNC void luaV_execute (lua_State *L, int nexeccalls); 34 | LUAI_FUNC void luaV_concat (lua_State *L, int total, int last); 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /deps/lua/src/lzio.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lzio.c,v 1.31.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** a generic input stream interface 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #include 9 | 10 | #define lzio_c 11 | #define LUA_CORE 12 | 13 | #include "lua.h" 14 | 15 | #include "llimits.h" 16 | #include "lmem.h" 17 | #include "lstate.h" 18 | #include "lzio.h" 19 | 20 | 21 | int luaZ_fill (ZIO *z) { 22 | size_t size; 23 | lua_State *L = z->L; 24 | const char *buff; 25 | lua_unlock(L); 26 | buff = z->reader(L, z->data, &size); 27 | lua_lock(L); 28 | if (buff == NULL || size == 0) return EOZ; 29 | z->n = size - 1; 30 | z->p = buff; 31 | return char2int(*(z->p++)); 32 | } 33 | 34 | 35 | int luaZ_lookahead (ZIO *z) { 36 | if (z->n == 0) { 37 | if (luaZ_fill(z) == EOZ) 38 | return EOZ; 39 | else { 40 | z->n++; /* luaZ_fill removed first byte; put back it */ 41 | z->p--; 42 | } 43 | } 44 | return char2int(*z->p); 45 | } 46 | 47 | 48 | void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, void *data) { 49 | z->L = L; 50 | z->reader = reader; 51 | z->data = data; 52 | z->n = 0; 53 | z->p = NULL; 54 | } 55 | 56 | 57 | /* --------------------------------------------------------------- read --- */ 58 | size_t luaZ_read (ZIO *z, void *b, size_t n) { 59 | while (n) { 60 | size_t m; 61 | if (luaZ_lookahead(z) == EOZ) 62 | return n; /* return number of missing bytes */ 63 | m = (n <= z->n) ? n : z->n; /* min. between n and z->n */ 64 | memcpy(b, z->p, m); 65 | z->n -= m; 66 | z->p += m; 67 | b = (char *)b + m; 68 | n -= m; 69 | } 70 | return 0; 71 | } 72 | 73 | /* ------------------------------------------------------------------------ */ 74 | char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n) { 75 | if (n > buff->buffsize) { 76 | if (n < LUA_MINBUFFER) n = LUA_MINBUFFER; 77 | luaZ_resizebuffer(L, buff, n); 78 | } 79 | return buff->buffer; 80 | } 81 | 82 | 83 | -------------------------------------------------------------------------------- /deps/lua/src/lzio.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lzio.h,v 1.21.1.1 2007/12/27 13:02:25 roberto Exp $ 3 | ** Buffered streams 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | 8 | #ifndef lzio_h 9 | #define lzio_h 10 | 11 | #include "lua.h" 12 | 13 | #include "lmem.h" 14 | 15 | 16 | #define EOZ (-1) /* end of stream */ 17 | 18 | typedef struct Zio ZIO; 19 | 20 | #define char2int(c) cast(int, cast(unsigned char, (c))) 21 | 22 | #define zgetc(z) (((z)->n--)>0 ? char2int(*(z)->p++) : luaZ_fill(z)) 23 | 24 | typedef struct Mbuffer { 25 | char *buffer; 26 | size_t n; 27 | size_t buffsize; 28 | } Mbuffer; 29 | 30 | #define luaZ_initbuffer(L, buff) ((buff)->buffer = NULL, (buff)->buffsize = 0) 31 | 32 | #define luaZ_buffer(buff) ((buff)->buffer) 33 | #define luaZ_sizebuffer(buff) ((buff)->buffsize) 34 | #define luaZ_bufflen(buff) ((buff)->n) 35 | 36 | #define luaZ_resetbuffer(buff) ((buff)->n = 0) 37 | 38 | 39 | #define luaZ_resizebuffer(L, buff, size) \ 40 | (luaM_reallocvector(L, (buff)->buffer, (buff)->buffsize, size, char), \ 41 | (buff)->buffsize = size) 42 | 43 | #define luaZ_freebuffer(L, buff) luaZ_resizebuffer(L, buff, 0) 44 | 45 | 46 | LUAI_FUNC char *luaZ_openspace (lua_State *L, Mbuffer *buff, size_t n); 47 | LUAI_FUNC void luaZ_init (lua_State *L, ZIO *z, lua_Reader reader, 48 | void *data); 49 | LUAI_FUNC size_t luaZ_read (ZIO* z, void* b, size_t n); /* read next n bytes */ 50 | LUAI_FUNC int luaZ_lookahead (ZIO *z); 51 | 52 | 53 | 54 | /* --------- Private Part ------------------ */ 55 | 56 | struct Zio { 57 | size_t n; /* bytes still unread */ 58 | const char *p; /* current position in buffer */ 59 | lua_Reader reader; 60 | void* data; /* additional data */ 61 | lua_State *L; /* Lua state (for reader) */ 62 | }; 63 | 64 | 65 | LUAI_FUNC int luaZ_fill (ZIO *z); 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /deps/lua/test/README: -------------------------------------------------------------------------------- 1 | These are simple tests for Lua. Some of them contain useful code. 2 | They are meant to be run to make sure Lua is built correctly and also 3 | to be read, to see how Lua programs look. 4 | 5 | Here is a one-line summary of each program: 6 | 7 | bisect.lua bisection method for solving non-linear equations 8 | cf.lua temperature conversion table (celsius to farenheit) 9 | echo.lua echo command line arguments 10 | env.lua environment variables as automatic global variables 11 | factorial.lua factorial without recursion 12 | fib.lua fibonacci function with cache 13 | fibfor.lua fibonacci numbers with coroutines and generators 14 | globals.lua report global variable usage 15 | hello.lua the first program in every language 16 | life.lua Conway's Game of Life 17 | luac.lua bare-bones luac 18 | printf.lua an implementation of printf 19 | readonly.lua make global variables readonly 20 | sieve.lua the sieve of of Eratosthenes programmed with coroutines 21 | sort.lua two implementations of a sort function 22 | table.lua make table, grouping all data for the same item 23 | trace-calls.lua trace calls 24 | trace-globals.lua trace assigments to global variables 25 | xd.lua hex dump 26 | 27 | -------------------------------------------------------------------------------- /deps/lua/test/bisect.lua: -------------------------------------------------------------------------------- 1 | -- bisection method for solving non-linear equations 2 | 3 | delta=1e-6 -- tolerance 4 | 5 | function bisect(f,a,b,fa,fb) 6 | local c=(a+b)/2 7 | io.write(n," c=",c," a=",a," b=",b,"\n") 8 | if c==a or c==b or math.abs(a-b)y end) 58 | show("after reverse selection sort",x) 59 | qsort(x,1,n,function (x,y) return x>> ",string.rep(" ",level)) 9 | if t~=nil and t.currentline>=0 then io.write(t.short_src,":",t.currentline," ") end 10 | t=debug.getinfo(2) 11 | if event=="call" then 12 | level=level+1 13 | else 14 | level=level-1 if level<0 then level=0 end 15 | end 16 | if t.what=="main" then 17 | if event=="call" then 18 | io.write("begin ",t.short_src) 19 | else 20 | io.write("end ",t.short_src) 21 | end 22 | elseif t.what=="Lua" then 23 | -- table.foreach(t,print) 24 | io.write(event," ",t.name or "(Lua)"," <",t.linedefined,":",t.short_src,">") 25 | else 26 | io.write(event," ",t.name or "(C)"," [",t.what,"] ") 27 | end 28 | io.write("\n") 29 | end 30 | 31 | debug.sethook(hook,"cr") 32 | level=0 33 | -------------------------------------------------------------------------------- /deps/lua/test/trace-globals.lua: -------------------------------------------------------------------------------- 1 | -- trace assigments to global variables 2 | 3 | do 4 | -- a tostring that quotes strings. note the use of the original tostring. 5 | local _tostring=tostring 6 | local tostring=function(a) 7 | if type(a)=="string" then 8 | return string.format("%q",a) 9 | else 10 | return _tostring(a) 11 | end 12 | end 13 | 14 | local log=function (name,old,new) 15 | local t=debug.getinfo(3,"Sl") 16 | local line=t.currentline 17 | io.write(t.short_src) 18 | if line>=0 then io.write(":",line) end 19 | io.write(": ",name," is now ",tostring(new)," (was ",tostring(old),")","\n") 20 | end 21 | 22 | local g={} 23 | local set=function (t,name,value) 24 | log(name,g[name],value) 25 | g[name]=value 26 | end 27 | setmetatable(getfenv(),{__index=g,__newindex=set}) 28 | end 29 | 30 | -- an example 31 | 32 | a=1 33 | b=2 34 | a=10 35 | b=20 36 | b=nil 37 | b=200 38 | print(a,b,c) 39 | -------------------------------------------------------------------------------- /deps/lua/test/xd.lua: -------------------------------------------------------------------------------- 1 | -- hex dump 2 | -- usage: lua xd.lua < file 3 | 4 | local offset=0 5 | while true do 6 | local s=io.read(16) 7 | if s==nil then return end 8 | io.write(string.format("%08X ",offset)) 9 | string.gsub(s,"(.)", 10 | function (c) io.write(string.format("%02X ",string.byte(c))) end) 11 | io.write(string.rep(" ",3*(16-string.len(s)))) 12 | io.write(" ",string.gsub(s,"%c","."),"\n") 13 | offset=offset+16 14 | end 15 | -------------------------------------------------------------------------------- /deps/sparsehash-sparsehash-2.0.3.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinqiwen/ardb/9f703a6b9c3430e30aba2286240e44570994efe6/deps/sparsehash-sparsehash-2.0.3.tar.gz -------------------------------------------------------------------------------- /deps/zookeeper-3.4.5.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinqiwen/ardb/9f703a6b9c3430e30aba2286240e44570994efe6/deps/zookeeper-3.4.5.tar.gz -------------------------------------------------------------------------------- /doc/benchmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinqiwen/ardb/9f703a6b9c3430e30aba2286240e44570994efe6/doc/benchmark.png -------------------------------------------------------------------------------- /doc/benchmark.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinqiwen/ardb/9f703a6b9c3430e30aba2286240e44570994efe6/doc/benchmark.xlsx -------------------------------------------------------------------------------- /src/.kv_engine: -------------------------------------------------------------------------------- 1 | rocksdb 2 | -------------------------------------------------------------------------------- /src/common/channel/redis/zmalloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009-2010, Salvatore Sanfilippo 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of Redis nor the names of its contributors may be used 14 | * to endorse or promote products derived from this software without 15 | * specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef _ZMALLOC_H 31 | #define _ZMALLOC_H 32 | 33 | void *zmalloc(size_t size); 34 | void *zrealloc(void *ptr, size_t size); 35 | void zfree(void *ptr); 36 | char *zstrdup(const char *s); 37 | size_t zmalloc_used_memory(void); 38 | void zmalloc_enable_thread_safeness(void); 39 | 40 | #endif /* _ZMALLOC_H */ 41 | -------------------------------------------------------------------------------- /src/common/channel/socket/clientsocket_channel.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright (c) 2013-2013, yinqiwen 3 | *All rights reserved. 4 | * 5 | *Redistribution and use in source and binary forms, with or without 6 | *modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of Redis nor the names of its contributors may be used 14 | * to endorse or promote products derived from this software without 15 | * specific prior written permission. 16 | * 17 | *THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | *AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | *IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | *ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | *BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | *CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | *SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | *INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | *CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | *ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | *THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #include "channel/all_includes.hpp" 31 | 32 | using namespace ardb; 33 | 34 | ClientSocketChannel::~ClientSocketChannel() 35 | { 36 | //m_service.GetEventChannelService().DestroyEventChannel( 37 | // m_event_channel); 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/common/constants.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright (c) 2013-2013, yinqiwen 3 | *All rights reserved. 4 | * 5 | *Redistribution and use in source and binary forms, with or without 6 | *modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of Redis nor the names of its contributors may be used 14 | * to endorse or promote products derived from this software without 15 | * specific prior written permission. 16 | * 17 | *THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | *AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | *IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | *ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | *BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | *CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | *SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | *INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | *CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | *ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | *THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef CONSTANTS_HPP_ 31 | #define CONSTANTS_HPP_ 32 | 33 | #ifndef ARDB_VERSION 34 | #define ARDB_VERSION "0.7.2" 35 | #endif 36 | 37 | #define ARDB_FORMAT_VERSION 1 38 | 39 | #endif /* CONSTANTS_HPP_ */ 40 | -------------------------------------------------------------------------------- /src/common/redis/crc64.h: -------------------------------------------------------------------------------- 1 | #ifndef CRC64_H 2 | #define CRC64_H 3 | #ifdef __cplusplus 4 | extern "C" 5 | { 6 | #endif 7 | #include 8 | 9 | uint64_t crc64(uint64_t crc, const unsigned char *s, uint64_t l); 10 | #ifdef __cplusplus 11 | } 12 | #endif 13 | #endif 14 | -------------------------------------------------------------------------------- /src/common/thread/lock_mode.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright (c) 2013-2014, yinqiwen 3 | *All rights reserved. 4 | * 5 | *Redistribution and use in source and binary forms, with or without 6 | *modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of Redis nor the names of its contributors may be used 14 | * to endorse or promote products derived from this software without 15 | * specific prior written permission. 16 | * 17 | *THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | *AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | *IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | *ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | *BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | *CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | *SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | *INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | *CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | *ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | *THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef LOCK_MODE_HPP_ 31 | #define LOCK_MODE_HPP_ 32 | 33 | namespace ardb 34 | { 35 | enum LockMode 36 | { 37 | INVALID_LOCK, READ_LOCK, WRITE_LOCK 38 | }; 39 | } 40 | 41 | #endif /* LOCK_MODE_HPP_ */ 42 | -------------------------------------------------------------------------------- /src/common/util/address.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright (c) 2013-2013, yinqiwen 3 | *All rights reserved. 4 | * 5 | *Redistribution and use in source and binary forms, with or without 6 | *modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of Redis nor the names of its contributors may be used 14 | * to endorse or promote products derived from this software without 15 | * specific prior written permission. 16 | * 17 | *THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | *AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | *IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | *ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | *BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | *CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | *SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | *INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | *CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | *ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | *THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef NOVA_ADDRESS_HPP_ 31 | #define NOVA_ADDRESS_HPP_ 32 | namespace ardb 33 | { 34 | //Just a tag interface 35 | class Address 36 | { 37 | public: 38 | virtual const std::string& ToString(std::string& str) const = 0 ; 39 | virtual ~Address() 40 | { 41 | } 42 | }; 43 | } 44 | 45 | #endif /* ADDRESS_HPP_ */ 46 | -------------------------------------------------------------------------------- /src/common/util/mmap.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * mmap.cpp 3 | * 4 | * Created on: Author: wqy 5 | */ 6 | 7 | #include "mmap.hpp" 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | namespace ardb 16 | { 17 | int MMapBuf::Init(const std::string& path, uint64 size, int advice_flag) 18 | { 19 | int fd = open(path.c_str(), O_CREAT | O_RDWR, S_IRUSR | S_IWUSR); 20 | if (fd < 0) 21 | { 22 | const char* err = strerror(errno); 23 | ERROR_LOG("Failed to open replication state file:%s for reason:%s", path.c_str(), err); 24 | return -1; 25 | } 26 | if (-1 == ftruncate(fd, size)) 27 | { 28 | const char* err = strerror(errno); 29 | ERROR_LOG("Failed to truncate mmap file:%s for reason:%s", path.c_str(), err); 30 | close(fd); 31 | return false; 32 | } 33 | char* mbuf = (char*) mmap(NULL, size, 34 | PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 35 | close(fd); 36 | if (mbuf == MAP_FAILED) 37 | { 38 | const char* err = strerror(errno); 39 | ERROR_LOG("Failed to mmap file:%s for reason:%s", path.c_str(), err); 40 | return -1; 41 | } 42 | else 43 | { 44 | m_buf = mbuf; 45 | m_size = size; 46 | madvise(m_buf, m_size, advice_flag); 47 | } 48 | return 0; 49 | } 50 | 51 | MMapBuf::~MMapBuf() 52 | { 53 | if (NULL != m_buf) 54 | { 55 | munmap(m_buf, m_size); 56 | } 57 | } 58 | 59 | } 60 | 61 | -------------------------------------------------------------------------------- /src/common/util/mmap.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * mmap.hpp 3 | * 4 | * Author: wqy 5 | */ 6 | 7 | #ifndef MMAP_HPP_ 8 | #define MMAP_HPP_ 9 | #include "common.hpp" 10 | 11 | namespace ardb 12 | { 13 | class MMapBuf 14 | { 15 | public: 16 | char* m_buf; 17 | uint64 m_size; 18 | public: 19 | MMapBuf() : 20 | m_buf(0), m_size(0) 21 | { 22 | } 23 | int Init(const std::string& path, uint64 size, int advice_flag); 24 | ~MMapBuf(); 25 | }; 26 | } 27 | 28 | #endif /* MMAP_HPP_ */ 29 | -------------------------------------------------------------------------------- /src/common/util/murmur3.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // MurmurHash3 was written by Austin Appleby, and is placed in the 3 | // public domain. The author hereby disclaims copyright to this source 4 | // code. 5 | 6 | #ifndef _MURMURHASH3_H_ 7 | #define _MURMURHASH3_H_ 8 | 9 | #include 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | //----------------------------------------------------------------------------- 16 | 17 | void MurmurHash3_x86_32 (const void *key, int len, uint32_t seed, void *out); 18 | 19 | void MurmurHash3_x86_128(const void *key, int len, uint32_t seed, void *out); 20 | 21 | void MurmurHash3_x64_128(const void *key, int len, uint32_t seed, void *out); 22 | 23 | //----------------------------------------------------------------------------- 24 | 25 | #ifdef __cplusplus 26 | } 27 | #endif 28 | 29 | #endif // _MURMURHASH3_H_ 30 | -------------------------------------------------------------------------------- /src/common/util/socket_address.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright (c) 2013-2013, yinqiwen 3 | *All rights reserved. 4 | * 5 | *Redistribution and use in source and binary forms, with or without 6 | *modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of Redis nor the names of its contributors may be used 14 | * to endorse or promote products derived from this software without 15 | * specific prior written permission. 16 | * 17 | *THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | *AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | *IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | *ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | *BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | *CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | *SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | *INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | *CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | *ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | *THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #include "network_helper.hpp" 31 | #include "socket_address.hpp" 32 | 33 | using namespace ardb; 34 | 35 | SocketAddress::SocketAddress(const string& host, uint32 port) : 36 | SocketHostAddress(host, port), m_inet_addr(get_inet_address(host, port)) 37 | { 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/common/util/time_unit.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright (c) 2013-2013, yinqiwen 3 | *All rights reserved. 4 | * 5 | *Redistribution and use in source and binary forms, with or without 6 | *modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of Redis nor the names of its contributors may be used 14 | * to endorse or promote products derived from this software without 15 | * specific prior written permission. 16 | * 17 | *THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | *AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | *IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | *ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | *BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | *CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | *SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | *INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | *CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | *ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | *THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef NOVA_TIMEUNIT_HPP_ 31 | #define NOVA_TIMEUNIT_HPP_ 32 | 33 | namespace ardb 34 | { 35 | enum TimeUnit 36 | { 37 | NANOS, MICROS, MILLIS, SECONDS, MINUTES, HOURS, DAYS 38 | }; 39 | } 40 | 41 | #endif /* TIMEUNIT_HPP_ */ 42 | -------------------------------------------------------------------------------- /src/common/util/version_helper.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * version_helper.hpp 3 | * 4 | * Author: wqy 5 | */ 6 | 7 | #ifndef VERSION_HELPER_HPP_ 8 | #define VERSION_HELPER_HPP_ 9 | 10 | #include 11 | #include 12 | #include "common.hpp" 13 | 14 | namespace ardb 15 | { 16 | template 17 | void parse_version(int result[N], const std::string& input) 18 | { 19 | std::istringstream parser(input); 20 | parser >> result[0]; 21 | for (uint32 idx = 1; idx < N; idx++) 22 | { 23 | parser.get(); //Skip period 24 | parser >> result[idx]; 25 | } 26 | } 27 | 28 | template 29 | int compare_version(const std::string& a, const std::string& b) 30 | { 31 | int parsedA[N], parsedB[N]; 32 | parse_version(parsedA, a); 33 | parse_version(parsedB, b); 34 | for (uint32 i = 0; i < N; i++) 35 | { 36 | if (parsedA[i] != parsedB[i]) 37 | { 38 | return parsedA[i] - parsedB[i]; 39 | } 40 | } 41 | return 0; 42 | } 43 | } 44 | 45 | #endif /* VERSION_HELPER_HPP_ */ 46 | -------------------------------------------------------------------------------- /src/db/engine_factory.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | *Copyright (c) 2013-2018, yinqiwen 3 | *All rights reserved. 4 | * 5 | *Redistribution and use in source and binary forms, with or without 6 | *modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright notice, 9 | * this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of Redis nor the names of its contributors may be used 14 | * to endorse or promote products derived from this software without 15 | * specific prior written permission. 16 | * 17 | *THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | *AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | *IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | *ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 21 | *BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | *CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | *SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | *INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | *CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | *ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | *THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | 31 | #ifndef SRC_DB_ENGINE_FACTORY_HPP_ 32 | #define SRC_DB_ENGINE_FACTORY_HPP_ 33 | 34 | #include "engine.hpp" 35 | 36 | OP_NAMESPACE_BEGIN 37 | Engine* create_engine(); 38 | OP_NAMESPACE_END 39 | 40 | #endif /* SRC_DB_ENGINE_FACTORY_HPP_ */ 41 | -------------------------------------------------------------------------------- /test/commands/bitop_test.lua: -------------------------------------------------------------------------------- 1 | --[[ --]] 2 | ardb.call("del", "key1", "key2") 3 | ardb.call("mset2", "key1", "foobar", "key2", "abcdef") 4 | local s = ardb.call("bitop", "and", "dest", "key1", "key2") 5 | ardb.assert2(s == 6, s) 6 | 7 | ardb.call("del", "mykey") 8 | s = ardb.call("setbit", "mykey", "7", "1") 9 | ardb.assert2(s == 0, s) 10 | s = ardb.call("getbit", "mykey", "7") 11 | ardb.assert2(s == 1, s) 12 | s = ardb.call("setbit", "mykey", "7", "0") 13 | ardb.assert2(s == 1, s) -------------------------------------------------------------------------------- /test/commands/geo_test.lua: -------------------------------------------------------------------------------- 1 | --[[ --]] 2 | ardb.call("del", "mygeo") 3 | local s = ardb.call("geoadd", "mygeo", "13.361389", "38.115556", "Palermo", "15.087269", "37.502669", "Catania") 4 | ardb.assert2(s == 2, s) 5 | s = ardb.call("geodist", "mygeo", "Palermo", "Catania") 6 | ardb.assert2(s == "166274.1510", s) 7 | s = ardb.call("geohash", "mygeo", "Palermo", "Catania") 8 | ardb.assert2(s[1] == "sqc8b49rny0", s) 9 | ardb.assert2(s[2] == "sqdtr74hyu0", s) 10 | s = ardb.call("GEORADIUS", "mygeo", "15", "37", "100", "km", "withdist", "WITHCOORD") 11 | ardb.assert2(s[1][1] == "Catania", s[1]) 12 | ardb.assert2(s[1][2] == "56.4413", s[1]) 13 | ardb.assert2(s[1][3][1] == "15.087267458438873", s[1][3]) 14 | ardb.assert2(s[1][3][2] == "37.502668961281628", s[1][3]) 15 | s = ardb.call("GEORADIUS", "mygeo", "15", "37", "200", "km") 16 | ardb.assert2(s[1] == "Palermo", s) 17 | ardb.assert2(s[2] == "Catania", s) 18 | ardb.call("geoadd", "mygeo", "13.583333", "37.316667", "Agrigento") 19 | s = ardb.call("GEORADIUSBYMEMBER", "mygeo", "Agrigento", "100", "km") 20 | ardb.assert2(s[1] == "Agrigento", s) 21 | ardb.assert2(s[2] == "Palermo", s) -------------------------------------------------------------------------------- /test/commands/hyperloglog_test.lua: -------------------------------------------------------------------------------- 1 | ardb.call("del", "hll", "some-other-hll") 2 | local s = ardb.call("pfadd", "hll", "foo", "bar", "zap") 3 | ardb.assert2(s == 1, s) 4 | s = ardb.call("pfadd", "hll", "zap", "zap", "zap") 5 | ardb.assert2(s == 0, s) 6 | s = ardb.call("pfadd", "hll", "foo", "bar") 7 | ardb.assert2(s == 0, s) 8 | s = ardb.call("pfcount", "hll") 9 | ardb.assert2(s == 3, s) 10 | s = ardb.call("pfadd2", "some-other-hll", "1", "2", "3") 11 | ardb.assert2(s["ok"] == "OK", s) 12 | s = ardb.call("pfcount", "hll", "some-other-hll") 13 | ardb.assert2(s == 6, s) 14 | 15 | ardb.call("del", "hll1", "hll2", "hll3") 16 | ardb.call("pfadd", "hll1", "foo", "bar", "zap", "a") 17 | ardb.call("pfadd", "hll2", "a", "b", "c", "foo") 18 | s = ardb.call("pfmerge", "hll3", "hll1", "hll2") 19 | ardb.assert2(s["ok"] == "OK", s) 20 | s = ardb.call("pfcount", "hll3") 21 | ardb.assert2(s == 6, s) 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /test/commands/keys_test.lua: -------------------------------------------------------------------------------- 1 | --[[ --]] 2 | local s = ardb.call("echo", "hello,world") 3 | ardb.assert2(s == "hello,world", s) --------------------------------------------------------------------------------