diff --git a/.gitignore b/.gitignore index 96554f95..f6cf801c 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ third_party/protobuf/* # Build artifacts build_linux/* build_msvc/* +build_mac/* third_party/zynamics/binexport # Auto-generated diff --git a/CMakeLists.txt b/CMakeLists.txt index 9dff01d6..097be29f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2011-2017 Google Inc. All Rights Reserved. +# Copyright 2011-2018 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -33,7 +33,6 @@ find_package(IdaSdk REQUIRED) find_package(OpenSSL 1.0.2 REQUIRED) find_package(PostgreSQL 9.5 REQUIRED) find_package(Protobuf 3.0.0 REQUIRED) -include(cctz.cmake) include(googletest.cmake) include(absl.cmake) @@ -73,8 +72,6 @@ target_include_directories(binexport_base INTERFACE ${PROJECT_SOURCE_DIR}/stubs ${PROJECT_BINARY_DIR}/src_include ${PROJECT_BINARY_DIR}/gen_include - ${absl_src_dir} - ${cctz_src_dir}/include ${Boost_INCLUDE_DIR} ${PostgreSQL_INCLUDE_DIRS} ${Protobuf_INCLUDE_DIRS} @@ -83,29 +80,31 @@ target_link_libraries(binexport_base INTERFACE ${Protobuf_LIBRARIES} # Same as protobuf::libprotobuf ) -# Interface library to be used by all tests +# Interface library to be used by tests that don't need data files add_library(binexport_test INTERFACE) target_link_libraries(binexport_test INTERFACE gtest_main + gmock ) # BinExport format version 2 proto library protobuf_generate_cpp(binexport2_proto binexport2_proto_h binexport2.proto) -add_library(binexport_proto STATIC - ${binexport2_proto_h} - ${binexport2_proto} -) -target_link_libraries(binexport_proto PUBLIC - binexport_base -) # Utility library code shared with BinDiff add_library(binexport_shared STATIC - filesystem_util.cc - timer.h + ${binexport2_proto_h} + ${binexport2_proto} + binexport.cc + binexport.h + util/format.cc + util/format.h + util/timer.h + util/filesystem.cc + util/filesystem.h ) target_link_libraries(binexport_shared PUBLIC absl::strings + absl::time binexport_base ) if(WIN32) @@ -114,45 +113,35 @@ if(WIN32) ) endif() add_executable(binexport_shared_test - filesystem_util_test.cc - timer_test.cc + util/filesystem_test.cc + util/format_test.cc + util/timer_test.cc ) target_link_libraries(binexport_shared_test PUBLIC binexport_test binexport_shared ) -add_test(BinExportTests binexport_shared_test) +add_test(BinExportSharedTests binexport_shared_test) # binexport2dump tool add_subdirectory(tools) # Code shared with the BinDiff plugin -add_library(binexport_plugin_shared STATIC +add_ida_library(binexport_plugin_shared STATIC hash.cc hash.h - hex_codec.cc - hex_codec.h ida/digest.cc ida/digest.h ida/log.cc ida/log.h ) -target_compile_definitions(binexport_plugin_shared PUBLIC - ${IdaSdk_PLATFORM} - __IDP__ - USE_DANGEROUS_FUNCTIONS - USE_STANDARD_FILE_FUNCTIONS) -target_include_directories(binexport_plugin_shared PUBLIC - ${IdaSdk_INCLUDE_DIRS} -) -target_link_libraries(binexport_plugin_shared PUBLIC +ida_target_link_libraries(binexport_plugin_shared PUBLIC absl::time binexport_base - OpenSSL::Crypto ) -set(binexport_plugin_name binexport${RELEASE}) -add_ida_plugin(${binexport_plugin_name} EA64 +set(binexport_plugin_name binexport${binexport_VERSION_MAJOR}) +add_ida_plugin(${binexport_plugin_name} address_references.cc address_references.h base_types.cc @@ -163,8 +152,6 @@ add_ida_plugin(${binexport_plugin_name} EA64 binexport2_writer.h call_graph.cc call_graph.h - chain_writer.cc - chain_writer.h comment.cc comment.h database_writer.cc @@ -226,15 +213,6 @@ add_ida_plugin(${binexport_plugin_name} EA64 x86_nop.cc x86_nop.h ) -set(binexport_libraries ${IdaSdk_LIBRARIES} - absl::strings - absl::time - binexport_proto - binexport_shared - binexport_plugin_shared - ${PostgreSQL_LIBRARIES} - # OpenSSL must come after PostgreSQL - OpenSSL::SSL) if(WIN32) list(APPEND binexport_libraries crypt32.lib secur32.lib @@ -242,19 +220,54 @@ if(WIN32) ws2_32.lib wldap32.lib) endif() -target_link_libraries(${binexport_plugin_name}${_plx} - ${binexport_libraries} -) -target_link_libraries(${binexport_plugin_name}${_plx64} +ida_target_link_libraries(${binexport_plugin_name} + absl::strings + absl::time + absl::optional + absl::bad_optional_access + binexport_shared + binexport_plugin_shared + ${PostgreSQL_LIBRARIES} + # OpenSSL must come after PostgreSQL + OpenSSL::SSL ${binexport_libraries} ) -set_target_properties( - ${binexport_plugin_name}${_plx} - ${binexport_plugin_name}${_plx64} +set_ida_target_properties(${binexport_plugin_name} PROPERTIES POSITION_INDEPENDENT_CODE ON ) -install(TARGETS ${binexport_plugin_name}${_plx} - ${binexport_plugin_name}${_plx64} - ARCHIVE DESTINATION binexport-prefix - RUNTIME DESTINATION binexport-prefix - LIBRARY DESTINATION binexport-prefix) +ida_install(TARGETS ${binexport_plugin_name} + ARCHIVE DESTINATION binexport-prefix + RUNTIME DESTINATION binexport-prefix + LIBRARY DESTINATION binexport-prefix) + +# Experimental BinExport reader library +add_library(binexport_reader STATIC + reader/call_graph.cc + reader/call_graph.h + reader/flow_graph.cc + reader/flow_graph.h + reader/graph_utility.h + reader/instruction.cc + reader/instruction.h +) +target_link_libraries(binexport_reader PUBLIC + absl::strings + binexport_shared +) +add_executable(binexport_reader_test + reader/call_graph_test.cc + reader/flow_graph_test.cc + reader/graph_utility_test.cc + reader/instruction_test.cc + reader/reader_test_util.cc + reader/reader_test_util.h +) +target_link_libraries(binexport_reader_test PUBLIC + gtest + gmock + binexport_reader +) +add_test( + NAME BinExportReaderTests + COMMAND binexport_reader_test ${PROJECT_SOURCE_DIR}/reader +) diff --git a/FindIdaSdk.cmake b/FindIdaSdk.cmake index 3ad4939c..d60ae8f0 100644 --- a/FindIdaSdk.cmake +++ b/FindIdaSdk.cmake @@ -1,4 +1,4 @@ -# Copyright 2011-2017 Google Inc. All Rights Reserved. +# Copyright 2011-2018 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ # FindIdaSdk # ---------- # -# Locates and configures the IDA Pro SDK. +# Locates and configures the IDA Pro SDK. Only support version 7.0 or hight. # # Use this module by invoking find_package with the form: # @@ -33,37 +33,36 @@ # # IdaSdk_ROOT_DIR - Preferred installation prefix # -# Starting with IDA 7.0 SDK, all builds are 64-bit by default. For -# compatibility with 6.95, which is 32-bit, users can tell this module to -# configure the build using these variables: +# Example (this assumes Windows): # -# IdaSdk_COMPILE_32BIT - Always compile 32-bit binaries -# IdaSdk_LEGACY_FILE_EXTENSIONS - For IDA up until 6.95, use the special -# platform-specific file extensions -# (plx/pmc/plw etc.). -# -# Example: -# -# set(IdaSdk_COMPILE_32BIT ON) -# set(IdaSdk_LEGACY_FILE_EXTENSIONS ON) # find_package(IdaSdk REQUIRED) # include_directories(${IdaSdk_INCLUDE_DIRS}) # -# # Builds target plugin32.plx -# add_ida_plugin(plugin32 myplugin.cc) -# # Builds targets plugin.plx and plugin.plx64 -# add_ida_plugin(plugin EA64 myplugin.cc) -# # Builds target plugin64.plx64 -# add_ida_plugin(plugin64 NOEA32 EA64 myplugin.cc) +# # Builds targets plugin.dll and plugin64.dll +# add_ida_plugin(plugin myplugin.cc) +# # Builds target plugin64.dll +# add_ida_plugin(plugin NOEA32 myplugin.cc) +# # Builds target plugin.dll +# add_ida_plugin(plugin NOEA64 myplugin.cc) +# +# Builds targets ldr.dll and ldr64.dll +# add_ida_loader(ldr myloader.cc) +# +# For platform-agnostic build files, the variables _so, and _so64 are +# available (and map to .dll, .so, .dylib as necessary): # -# Builds targets ldr.llx and ldr64.llx64 -# add_ida_loader(ldr EA64 myloader.cc) +# add_ida_plugin(plugin myplugin.cc) +# target_link_libraries(plugin${_so} ssl) +# target_link_libraries(plugin${_so64} ssl) # -# For platform-agnostic build files, the variables _plx, _plx64, _llx and -# _llx64 are available: -# add_ida_plugin(plugin EA64 myplugin.cc) -# target_link_libraries(plugin${_plx} ssl) -# target_link_libraries(plugin${_plx64} ssl) +# To avoid the duplication above, these functions, which mimic the built-in +# ones, are also defined: +# +# add_ida_library( NOEA64|NOEA64 ...) <=> add_libary() +# ida_target_link_libraries(...) <=> target_link_libraries() +# ida_target_include_directories(...) <=> target_include_directories() +# set_ida_target_properties(...) <=> set_target_properties() +# ida_install(...) <=> install() include(CMakeParseArguments) include(FindPackageHandleStandardArgs) @@ -83,124 +82,195 @@ find_package_handle_standard_args( FAIL_MESSAGE "IDA SDK not found, try setting IdaSdk_ROOT_DIR") # Define some platform specific variables for later use. -if(NOT IdaSdk_LEGACY_FILE_EXTENSIONS) - set(_plx ${CMAKE_SHARED_LIBRARY_SUFFIX}) - set(_plx64 64${CMAKE_SHARED_LIBRARY_SUFFIX}) # An additional "64" - set(_llx ${CMAKE_SHARED_LIBRARY_SUFFIX}) - set(_llx64 64${CMAKE_SHARED_LIBRARY_SUFFIX}) # An additional "64" -endif() +set(_so ${CMAKE_SHARED_LIBRARY_SUFFIX}) +set(_so64 64${CMAKE_SHARED_LIBRARY_SUFFIX}) # An additional "64" +# _plx, _plx64, _llx, _llx64 are kept to stay compatible with older +# CMakeLists.txt files. +set(_plx ${CMAKE_SHARED_LIBRARY_SUFFIX}) +set(_plx64 64${CMAKE_SHARED_LIBRARY_SUFFIX}) # An additional "64" +set(_llx ${CMAKE_SHARED_LIBRARY_SUFFIX}) +set(_llx64 64${CMAKE_SHARED_LIBRARY_SUFFIX}) # An additional "64" if(APPLE) set(IdaSdk_PLATFORM __MAC__) - if(IdaSdk_LEGACY_FILE_EXTENSIONS) - set(_plx .pmc) - set(_plx64 .pmc64) # No extra "64" - set(_llx .lmc) - set(_llx64 64.lmc64) # An additional "64" - endif() elseif(UNIX) set(IdaSdk_PLATFORM __LINUX__) - if(IdaSdk_LEGACY_FILE_EXTENSIONS) - set(_plx .plx) - set(_plx64 .plx64) # No extra "64" - set(_llx .llx) - set(_llx64 64.llx64) # An additional "64" - endif() + set(_ida_compile_options -m64) elseif(WIN32) set(IdaSdk_PLATFORM __NT__) - if(IdaSdk_LEGACY_FILE_EXTENSIONS) - set(_plx .plw) - set(_plx64 .p64) # No extra "64" - set(_llx .ldw) - set(_llx64 64.l64) # An additional "64" - endif() else() message(FATAL_ERROR "Unsupported system type: ${CMAKE_SYSTEM_NAME}") endif() -function(_ida_plugin name ea64 link_script) # ARGN contains sources - # Define a module with the specified sources. - add_library(${name} MODULE ${ARGN}) - - # Support for 64-bit addresses. - if(ea64) - target_compile_definitions(${name} PUBLIC __EA64__) +function(_ida_common_target_settings t ea64) + if(ea64) # Support for 64-bit addresses. + target_compile_definitions(${t} PUBLIC __EA64__) endif() + # Add the necessary __IDP__ define and allow to use "dangerous" and standard + # file functions. + target_compile_definitions(${t} PUBLIC ${IdaSdk_PLATFORM} + __X64__ + __IDP__ + USE_DANGEROUS_FUNCTIONS + USE_STANDARD_FILE_FUNCTIONS) + target_include_directories(${t} PUBLIC ${IdaSdk_INCLUDE_DIRS}) +endfunction() - # Build 64-bit by default. - if(NOT IdaSdk_COMPILE_32BIT) - target_compile_definitions(${name} PUBLIC __X64__) +function(_ida_plugin name ea64 link_script) # ARGN contains sources + if(ea64) + set(t ${name}${_so64}) + else() + set(t ${name}${_so}) endif() - # Add the necessary __IDP__ define and allow to use "dangerous" and standard - # file functions. - target_compile_definitions(${name} PUBLIC - ${IdaSdk_PLATFORM} - __IDP__ - USE_DANGEROUS_FUNCTIONS - USE_STANDARD_FILE_FUNCTIONS) + # Define a module with the specified sources. + add_library(${t} MODULE ${ARGN}) + _ida_common_target_settings(${t} ${ea64}) - set_target_properties(${name} PROPERTIES PREFIX "" SUFFIX "") + set_target_properties(${t} PROPERTIES PREFIX "" SUFFIX "") if(UNIX) - if(NOT IdaSdk_COMPILE_32BIT) - set(_ida_cflag -m64) - else() - set(_ida_cflag -m32) - endif() - # Always use the linker script needed for IDA. - target_compile_options(${name} PUBLIC ${_ida_cflag}) + target_compile_options(${t} PUBLIC ${_ida_compile_options}) if(APPLE) - target_link_libraries(${name} ${_ida_cflag} - -Wl,-flat_namespace - -Wl,-undefined,warning - -Wl,-exported_symbol,_PLUGIN) + target_link_libraries(${t} ${_ida_compile_options} + -Wl,-flat_namespace + -Wl,-undefined,warning + -Wl,-exported_symbol,_PLUGIN) else() - set(script_flag ) - target_link_libraries(${name} - ${_ida_cflag} -Wl,--version-script ${IdaSdk_DIR}/${link_script}) + # Always use the linker script needed for IDA. + target_link_libraries(${t} ${_ida_compile_options} + -Wl,--version-script ${IdaSdk_DIR}/${link_script}) endif() # For qrefcnt_obj_t in ida.hpp - target_compile_options(${name} PUBLIC -Wno-non-virtual-dtor) + # TODO(cblichmann): This belongs in an interface library instead. + target_compile_options(${t} PUBLIC -Wno-non-virtual-dtor) elseif(WIN32) - if(NOT IdaSdk_COMPILE_32BIT) - set(_ida_prefix x64) - else() - set(_ida_prefix x86) - endif() if(ea64) - set(IdaSdk_LIBRARY ${IdaSdk_DIR}/lib/${_ida_prefix}_win_vc_64/ida.lib) + target_link_libraries(${t} ${IdaSdk_DIR}/lib/x64_win_vc_64/ida.lib) else() - set(IdaSdk_LIBRARY ${IdaSdk_DIR}/lib/${_ida_prefix}_win_vc_32/ida.lib) + target_link_libraries(${t} ${IdaSdk_DIR}/lib/x64_win_vc_32/ida.lib) endif() - target_link_libraries(${name} ${IdaSdk_LIBRARY}) + endif() +endfunction() + +macro(_ida_check_bitness) + if(opt_NOEA32 AND opt_NOEA64) + message(FATAL_ERROR "NOEA32 and NOEA64 cannot be used at the same time") + endif() +endmacro() + +function(_ida_library name ea64) + if(ea64) + set(t ${name}_ea32) + else() + set(t ${name}_ea64) + endif() + + # Define the actual library. + add_library(${t} ${ARGN}) + _ida_common_target_settings(${t} ${ea64}) +endfunction() + +function(add_ida_library name) + cmake_parse_arguments(PARSE_ARGV 1 opt "NOEA32;NOEA64" "" "") + _ida_check_bitness(opt_NOEA32 opt_NOEA64) + + if(NOT DEFINED(opt_NOEA32)) + _ida_library(${name} FALSE ${opt_UNPARSED_ARGUMENTS}) + endif() + if(NOT DEFINED(opt_NOEA64)) + _ida_library(${name} TRUE ${opt_UNPARSED_ARGUMENTS}) endif() endfunction() function(add_ida_plugin name) - set(options NOEA32 EA64) - cmake_parse_arguments(add_ida_plugin "${options}" "" "" ${ARGN}) + cmake_parse_arguments(PARSE_ARGV 1 opt "NOEA32;NOEA64" "" "") + _ida_check_bitness(opt_NOEA32 opt_NOEA64) - if(NOT DEFINED(add_ida_plugin_NOEA32)) - _ida_plugin(${name}${_plx} FALSE plugins/plugin.script - ${add_ida_plugin_UNPARSED_ARGUMENTS}) + if(NOT opt_NOEA32) + _ida_plugin(${name} FALSE plugins/plugin.script ${opt_UNPARSED_ARGUMENTS}) endif() - if(add_ida_plugin_EA64) - _ida_plugin(${name}${_plx64} TRUE plugins/plugin.script - ${add_ida_plugin_UNPARSED_ARGUMENTS}) + if(NOT opt_NOEA64) + _ida_plugin(${name} TRUE plugins/plugin.script ${opt_UNPARSED_ARGUMENTS}) endif() endfunction() function(add_ida_loader name) - set(options NOEA32 EA64) - cmake_parse_arguments(add_ida_loader "${options}" "" "" ${ARGN}) + cmake_parse_arguments(PARSE_ARGV 1 opt "NOEA32;NOEA64" "" "") + _ida_check_bitness(opt_NOEA32 opt_NOEA64) - if(NOT DEFINED(add_ida_loader_NOEA32)) - _ida_plugin(${name}${_llx} FALSE ldr/ldr.script - ${add_ida_loader_UNPARSED_ARGUMENTS}) + if(NOT opt_NOEA32) + _ida_plugin(${name} FALSE ldr/ldr.script ${opt_UNPARSED_ARGUMENTS}) endif() - if(add_ida_loader_EA64) - _ida_plugin(${name}${_llx64} TRUE ldr/ldr.script - ${add_ida_loader_UNPARSED_ARGUMENTS}) + if(NOT opt_NOEA64) + _ida_plugin(${name} TRUE ldr/ldr.script ${opt_UNPARSED_ARGUMENTS}) endif() endfunction() +function(ida_target_link_libraries name) + foreach(item IN LISTS ARGN) + if(TARGET ${item}_ea32) + list(APPEND args ${item}_ea32) + elseif(TARGET ${item}_ea64) + list(APPEND args ${item}_ea64) + else() + list(APPEND args ${item}) + endif() + endforeach() + foreach(target ${name}${_so} + ${name}${_so64} + ${name}_ea32 + ${name}_ea64) + if(TARGET ${target}) + target_link_libraries(${target} ${args}) + set(added TRUE) + endif() + endforeach() + if (NOT added) + message(FATAL_ERROR "No such target: ${name}") + endif() +endfunction() + +function(ida_target_include_directories name) + foreach(target ${name}${_so} + ${name}${_so64} + ${name}_ea32 + ${name}_ea64) + if(TARGET ${target}) + target_include_directories(${target} ${ARGN}) + set(added TRUE) + endif() + endforeach() + if (NOT added) + message(FATAL_ERROR "No such target: ${name}") + endif() +endfunction() + +function(set_ida_target_properties name) + foreach(target ${name}${_so} + ${name}${_so64} + ${name}_ea32 + ${name}_ea64) + if(TARGET ${target}) + set_target_properties(${target} ${ARGN}) + set(added TRUE) + endif() + endforeach() + if (NOT added) + message(FATAL_ERROR "No such target: ${name}") + endif() +endfunction() + +function(ida_install) + foreach(item IN LISTS ARGN) + if(TARGET ${item}${_so} AND TARGET ${item}${_so64}) + list(APPEND args ${item}${_so} ${item}${_so64}) + elseif(TARGET ${item}${_so}) + list(APPEND args ${item}${_so}) + elseif(TARGET ${item}${_so64}) + list(APPEND args ${item}${_so64}) + else() + list(APPEND args ${item}) + endif() + endforeach() + install(${args}) +endfunction() diff --git a/README.md b/README.md index 47df958d..82938ddc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # BinExport [![Build Status](https://api.travis-ci.org/google/binexport.svg?branch=master)](https://travis-ci.org/google/binexport) [![Coverity Scan Build Status](https://scan.coverity.com/projects/8977/badge.svg)](https://scan.coverity.com/projects/google-binexport) -Copyright 2011-2017 Google Inc. +Copyright 2011-2018 Google LLC. Disclaimer: This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google. @@ -106,12 +106,12 @@ The BinExport plugin registers the IDC functions below. The function names are versioned in order to support side-by-side installation of different versions (i.e. BinDiff's BinExport 8). -| IDC Function name | Exports to | Arguments | -| ---------------------- | -------------------- | -------------------------------------------- | -| BinExport2Sql10 | PostgreSQL database | host, port, database, schema, user, password | -| BinExport2Diff10 | Protocol Buffer | filename | -| BinExport2Text10 | Text file dump | filename | -| BinExport2Statistics10 | Statistics text file | filename | +| IDC Function name | Exports to | Arguments | +| ------------------- | -------------------- | -------------------------------------------- | +| BinExportSql | PostgreSQL database | host, port, database, schema, user, password | +| BinExportDiff | Protocol Buffer | filename | +| BinExportText | Text file dump | filename | +| BinExportStatistics | Statistics text file | filename | BinExport also supports exporting to a database via the `RunPlugin()` IDC function: @@ -136,7 +136,7 @@ The option flags are the same as IDC (listed above). import idaapi idc_lang = idaapi.find_extlang_by_name("idc") idaapi.run_statements( - 'BinExport2Sql10("{}", {}, "{}", "{}", "{}", "{}")'.format( + 'BinExportSql("{}", {}, "{}", "{}", "{}", "{}")'.format( "host", 5432, "database", "public", "user", "pass"), idc_lang) ``` @@ -145,16 +145,16 @@ idaapi.run_statements( BinExport defines the following plugin options, that can be specified on IDA's command line: -| Option | Description | -| -------------------------------- | ----------------------------------------------- | -| `-OExporterHost:` | Database server to connect to | -| `-OExporterPort:` | Port to connect to. PostgreSQL default is 5432. | -| `-OExporterUser:` | User name | -| `-OExporterPassword:` | Password | -| `-OExporterDatabase:` | Database to use | -| `-OExporterSchema:` | Database schema. BinNavi only uses "public". | -| `-OExporterLogFile:` | Log messages to a file | -| `-OExporterAlsoLogToStdErr:TRUE` | If specified, also log to standard error | +| Option | Description | +| --------------------------------- | ----------------------------------------------- | +| `-OBinExportHost:` | Database server to connect to | +| `-OBinExportPort:` | Port to connect to. PostgreSQL default is 5432. | +| `-OBinExportUser:` | User name | +| `-OBinExportPassword:` | Password | +| `-OBinExportDatabase:` | Database to use | +| `-OBinExportSchema:` | Database schema. BinNavi only uses "public". | +| `-OBinExportLogFile:` | Log messages to a file | +| `-OBinExportAlsoLogToStdErr:TRUE` | If specified, also log to standard error | Note that these options must come before any files. @@ -165,7 +165,7 @@ Note that these options must come before any files. As we support exporting into PostgreSQL databases as well as a Protocol Buffer based format, there are quite a few dependencies to satisfy: -* Boost 1.55.0 or higher (a partial copy of 1.61.0 ships in +* Boost 1.61.0 or higher (a partial copy of 1.61.0 ships in `third_party/boost_parts`) * [CMake](https://cmake.org/download/) 3.7.2 or higher * GCC 4.8 or a recent version of Clang on Linux/macOS. On Windows, use the @@ -182,7 +182,8 @@ based format, there are quite a few dependencies to satisfy: #### Prerequisites -The preferred build environment is Ubuntu 14.04 LTS (64-bit Intel). +The preferred build environment is Ubuntu 14.04 LTS (64-bit Intel). Debian +Testing (version 10, "Buster") is also supported. This should install all the necessary packages: @@ -362,7 +363,7 @@ if not exist build_msvc mkdir build_msvc cd build_msvc cmake ../cmake -DIdaSdk_ROOT_DIR=%cd%\..\third_party\idasdk ^ -G "Visual Studio 15 2017 Win64" -cmake --build . --config Release -- /clp:NoSummary;ForceNoAlign /v:minimal +cmake --build . --config Release --install -- /clp:NoSummary;ForceNoAlign /v:minimal ``` For Visual Studio 2015 replace the `-G` argument with `"Visual Studio 14 2015 diff --git a/absl.cmake b/absl.cmake index 960f1120..e74dd099 100644 --- a/absl.cmake +++ b/absl.cmake @@ -1,4 +1,4 @@ -# Copyright 2011-2017 Google Inc. All Rights Reserved. +# Copyright 2011-2018 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,4 +18,35 @@ find_path(absl_src_dir HINTS ${ABSL_ROOT_DIR} PATHS ${PROJECT_BINARY_DIR}/absl ) -add_subdirectory(${absl_src_dir}) +add_subdirectory(${absl_src_dir} ${PROJECT_BINARY_DIR}/absl + EXCLUDE_FROM_ALL) + +if(WIN32) + foreach(target absl_base + absl_algorithm + absl_container + absl_debugging + absl_hash + absl_memory + absl_meta + absl_numeric + absl_strings + absl_synchronization + absl_time + absl_utility) + if(MSVC) + target_compile_options(${target} PRIVATE + /wd4005 # macro-redefinition + /wd4068 # unknown pragma + /wd4244 # conversion from 'type1' to 'type2' + /wd4267 # conversion from 'size_t' to 'type2' + /wd4800 # force value to bool 'true' or 'false' (performance warning) + ) + endif() + target_compile_definitions(${target} PRIVATE + /DNOMINMAX + /DWIN32_LEAN_AND_MEAN=1 + /D_CRT_SECURE_NO_WARNINGS + ) + endforeach() +endif() diff --git a/address_references.cc b/address_references.cc index a83a38fd..d8f183c3 100644 --- a/address_references.cc +++ b/address_references.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/address_references.h b/address_references.h index 2074ed79..7dafe6b5 100644 --- a/address_references.h +++ b/address_references.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/hex_codec.h b/architectures.h similarity index 53% rename from hex_codec.h rename to architectures.h index 3259608c..860b5508 100644 --- a/hex_codec.h +++ b/architectures.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,15 +12,22 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef THIRD_PARTY_ZYNAMICS_BINEXPORT_HEX_CODEC_H_ -#define THIRD_PARTY_ZYNAMICS_BINEXPORT_HEX_CODEC_H_ +#ifndef THIRD_PARTY_ZYNAMICS_BINEXPORT_ARCHITECTURES_H_ +#define THIRD_PARTY_ZYNAMICS_BINEXPORT_ARCHITECTURES_H_ -#include "third_party/zynamics/binexport/types.h" +namespace security { +namespace binexport { -// Fast encoding/decoding of big hex strings. -// TODO(cblichmann): Replace this with Abseil's -// BytesToHexString()/HexStringToBytes(). -string EncodeHex(const string& line); -string DecodeHex(const string& line); +enum class Architecture { + kArm, + kAArch64, + kDex, + kMsil, + kX86Arch32, + kX86Arch64, +}; -#endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_HEX_CODEC_H_ +} // namespace binexport +} // namespace security + +#endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_ARCHITECTURES_H_ diff --git a/base_types.cc b/base_types.cc index 315a3007..27d14835 100644 --- a/base_types.cc +++ b/base_types.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -33,12 +33,12 @@ bool SortMemberTypes(const MemberType* lhs, const MemberType* rhs) { // The database sequences need to start with one. // Otherwise the initialization in BinNavi can fail. -unsigned int BaseType::NextTypeId() { - static unsigned int type_id = 1; +uint32 BaseType::NextTypeId() { + static uint32 type_id = 1; return type_id++; } -unsigned int BaseType::GetId() const { +uint32 BaseType::GetId() const { return id_; } @@ -140,8 +140,8 @@ const MemberType* BaseType::ResolveMember(const BaseType* base_type, return IsWithinMember(*cit, offset) ? *cit : nullptr; } -unsigned int MemberType::NextTypeId() { - static unsigned int member_id = 1; +uint32 MemberType::NextTypeId() { + static uint32 member_id = 1; return member_id++; } diff --git a/base_types.h b/base_types.h index 9493658e..d697ad24 100644 --- a/base_types.h +++ b/base_types.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -49,12 +49,12 @@ class BaseType { pointer_(nullptr), category_(kAtomic) {} - typedef std::vector BaseTypes; - typedef std::vector MemberTypes; - typedef std::vector MemberIds; + using BaseTypes = std::vector; + using MemberTypes = std::vector; + using MemberIds = std::vector; // Returns the database id of this base type. - unsigned int GetId() const; + uint32 GetId() const; void SetName(const string& name); const string& GetName() const; @@ -78,7 +78,7 @@ class BaseType { static const MemberType* ResolveMember(const BaseType* base_type, int offset); private: - unsigned int id_; + uint32 id_; // The name of this type. string name_; // The size of this type in bits. @@ -92,7 +92,7 @@ class BaseType { // own the MemberType instances. Instead, the types container owns them. MemberTypes members_; TypeCategory category_; - static unsigned int NextTypeId(); + static uint32 NextTypeId(); }; // Represents an element of a compound type. @@ -110,7 +110,7 @@ struct MemberType { num_elements(DB_NULL_VALUE) {} // The corresponding id in the database. - unsigned int id; + uint32 id; // The name of the member. string name; // The type of this member. @@ -130,7 +130,7 @@ struct MemberType { int num_elements; private: - static unsigned int NextTypeId(); + static uint32 NextTypeId(); }; #endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_BASE_TYPES_H_ diff --git a/basic_block.cc b/basic_block.cc index 4252ee1e..3e9dfd3b 100644 --- a/basic_block.cc +++ b/basic_block.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/basic_block.h b/basic_block.h index be62bb1a..8a1c1fdc 100644 --- a/basic_block.h +++ b/basic_block.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/binexport.cc b/binexport.cc new file mode 100644 index 00000000..c64c36b4 --- /dev/null +++ b/binexport.cc @@ -0,0 +1,65 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "base/logging.h" +#include "third_party/zynamics/binexport/binexport.h" + +namespace security { +namespace binexport { + +Address GetInstructionAddress(const BinExport2& proto, int index) { + // Either the instruction has an address stored directly or we keep iterating + // previous instructions until we find one that does, adding the correct + // offset. This assumes that there will always be a previous instruction with + // an absolute address. + const BinExport2::Instruction* instruction = &proto.instruction(index); + if (instruction->has_address()) { + return instruction->address(); + } + int delta = 0; + for (--index; index >= 0; --index) { + instruction = &proto.instruction(index); + delta += instruction->raw_bytes().size(); + if (instruction->has_address()) { + return instruction->address() + delta; + } + } + LOG(QFATAL) << "Invalid instruction index"; + return 0; // Not reached. +} + +std::vector
GetAllInstructionAddresses(const BinExport2& proto) { + std::vector
result; + if (proto.instruction_size() == 0) { + return result; + } + QCHECK(proto.instruction(0).has_address()); + result.reserve(proto.instruction_size()); + Address address = 0; + Address next_address = 0; + for (const auto& instruction : proto.instruction()) { + if (instruction.has_address()) { + address = instruction.address(); + next_address = address + instruction.raw_bytes().size(); + } else { + address = next_address; + next_address += instruction.raw_bytes().size(); + } + result.push_back(address); + } + return result; +} + +} // namespace binexport +} // namespace security diff --git a/binexport.h b/binexport.h new file mode 100644 index 00000000..cb2e9f02 --- /dev/null +++ b/binexport.h @@ -0,0 +1,50 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This file provide a set of commonly used utility functions to work with +// BinExport2 protos. + +#ifndef THIRD_PARTY_ZYNAMICS_BINEXPORT_BINEXPORT_H_ +#define THIRD_PARTY_ZYNAMICS_BINEXPORT_BINEXPORT_H_ + +#include + +#include "third_party/zynamics/binexport/binexport2.pb.h" +#include "third_party/zynamics/binexport/types.h" + +namespace security { + +// This namespace collects functions that work directly with BinExport2 protocol +// buffers, similar to a class with just static methods. +namespace binexport { + +// Returns the address for an instruction. Takes care of instructions without an +// address (that are part of a continuous run of instructions, for example). +// Aborts the process with a fatal error, if no address can be found for the +// instruction. Note that this should note happen with well-formed BinExport2 +// protos. If the specified index is out of bounds, the behavior is undefined. +Address GetInstructionAddress(const BinExport2& proto, int index); + +// Like above, but returns the addresses for all instructions in a BinExport2 +// proto. This function is more efficient than calling GetInstructionAddress() +// repeatedly in a loop. The trade-off is that the returned vector will store +// all addresses, unlike the BinExport2 proto itself which only stores the +// beginning of continuous instruction runs. +std::vector
GetAllInstructionAddresses(const BinExport2& proto); + +} // namespace binexport + +} // namespace security + +#endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_BINEXPORT_H_ diff --git a/binexport2.proto b/binexport2.proto index 8290eaef..c5419957 100644 --- a/binexport2.proto +++ b/binexport2.proto @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/binexport2_writer.cc b/binexport2_writer.cc index 2bbfd629..51d03a98 100644 --- a/binexport2_writer.cc +++ b/binexport2_writer.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -389,10 +389,10 @@ void WriteFlowGraphs(const FlowGraph& flow_graph, BinExport2* proto) { proto_flow_graph->mutable_edge()->Reserve(function.GetEdges().size()); for (const FlowGraphEdge& edge : function.GetEdges()) { BinExport2::FlowGraph::Edge* proto_edge = proto_flow_graph->add_edge(); - const BasicBlock* source = - CHECK_NOTNULL(function.GetBasicBlockForAddress(edge.source)); - const BasicBlock* target = - CHECK_NOTNULL(function.GetBasicBlockForAddress(edge.target)); + const BasicBlock* source = function.GetBasicBlockForAddress(edge.source); + CHECK(source != nullptr); + const BasicBlock* target = function.GetBasicBlockForAddress(edge.target); + CHECK(target != nullptr); proto_edge->set_source_basic_block_index(source->id()); proto_edge->set_target_basic_block_index(target->id()); @@ -535,7 +535,8 @@ void WriteCallGraph(const CallGraph& call_graph, const FlowGraph& flow_graph, proto_call_graph->mutable_edge()->Reserve(call_graph.GetEdges().size()); for (const EdgeInfo& edge : call_graph.GetEdges()) { BinExport2::CallGraph::Edge* proto_edge(proto_call_graph->add_edge()); - const uint64 source_address(CHECK_NOTNULL(edge.function_)->GetEntryPoint()); + CHECK(edge.function_ != nullptr); + const uint64 source_address(edge.function_->GetEntryPoint()); const uint64 target_address(edge.target_); proto_edge->set_source_vertex_index( GetVertexIndex(*proto_call_graph, source_address)); @@ -577,7 +578,7 @@ void WriteStrings( } string content; - // TODO(timkornau): Add support for UTF16 strings. + // TODO(timkornau): Add support for UCS-2 strings. if (reference.kind_ != TYPE_DATA_STRING) { continue; } @@ -649,10 +650,10 @@ void WriteComments( std::make_pair(comment.address_, 0)); QCHECK(instruction != instruction_indices.end()); proto_comment->set_instruction_index(instruction->second); - // TODO(user) Fill these properly once we actually have - // operand/expression comments. - // proto_comment->set_instruction_operand_index(0); - // proto_comment->set_operand_expression_index(0); + // TODO(cblichmann): Fill these properly once we actually have + // operand/expression comments. + // proto_comment->set_instruction_operand_index(0); + // proto_comment->set_operand_expression_index(0); proto_comment->set_string_table_index(new_comment.first->second); } } @@ -754,7 +755,7 @@ util::Status WriteProtoToFile(const string& filename, BinExport2* proto) { if (!proto->SerializeToOstream(&stream)) { return util::Status( - util::error::UNKNOWN, + absl::StatusCode::kUnknown, absl::StrCat("Error serializing data to: '", filename, "'.")); } return util::OkStatus(); diff --git a/binexport2_writer.h b/binexport2_writer.h index 9a176fe0..b2d51059 100644 --- a/binexport2_writer.h +++ b/binexport2_writer.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,10 +23,9 @@ class BinExport2Writer : public Writer { public: // Note: This writer expects executable_hash to be hex encoded, not the raw // bytes of the digest. - explicit BinExport2Writer(const string& result_filename, - const string& executable_filename, - const string& executable_hash, - const string& architecture); + BinExport2Writer(const string& result_filename, + const string& executable_filename, + const string& executable_hash, const string& architecture); util::Status Write(const CallGraph& call_graph, const FlowGraph& flow_graph, const Instructions& instructions, diff --git a/binexport_test.cc b/binexport_test.cc new file mode 100644 index 00000000..31bc55f8 --- /dev/null +++ b/binexport_test.cc @@ -0,0 +1,57 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "third_party/zynamics/binexport/binexport.h" + +#include +#include + +using ::testing::Eq; + +namespace security { +namespace binexport { +namespace { + +Address AddInstruction(Address start_address, int8 size, BinExport2* proto) { + auto* instruction = proto->add_instruction(); + if (start_address != 0) { + instruction->set_address(start_address); + } + instruction->mutable_raw_bytes()->resize(size, 'A'); + return start_address + size; +} + +TEST(BinExportTest, TestInstructionAddress) { + BinExport2 proto; + AddInstruction(/*start_address=*/0x10000000, /*size=*/4, &proto); + AddInstruction(/*start_address=*/0, /*size=*/8, &proto); + AddInstruction(/*start_address=*/0, /*size=*/4, &proto); + AddInstruction(/*start_address=*/0, /*size=*/8, &proto); + AddInstruction(/*start_address=*/0x10000100, /*size=*/4, &proto); + AddInstruction(/*start_address=*/0, /*size=*/8, &proto); + AddInstruction(/*start_address=*/0, /*size=*/4, &proto); + AddInstruction(/*start_address=*/0, /*size=*/8, &proto); + AddInstruction(/*start_address=*/0x20000000, /*size=*/4, &proto); + AddInstruction(/*start_address=*/0x20000004, /*size=*/4, &proto); + AddInstruction(/*start_address=*/0x20000008, /*size=*/4, &proto); + + EXPECT_THAT(GetInstructionAddress(proto, 0), Eq(0x10000000)); + EXPECT_THAT(GetInstructionAddress(proto, 3), Eq(0x10000010)); + EXPECT_THAT(GetInstructionAddress(proto, 7), Eq(0x10000110)); + EXPECT_THAT(GetInstructionAddress(proto, 9), Eq(0x20000004)); +} + +} // namespace +} // namespace binexport +} // namespace security diff --git a/call_graph.cc b/call_graph.cc index 4f5ed58d..8cefa3fd 100644 --- a/call_graph.cc +++ b/call_graph.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/call_graph.h b/call_graph.h index 111b7522..e9dd80a5 100644 --- a/call_graph.h +++ b/call_graph.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/cctz.cmake b/cctz.cmake deleted file mode 100644 index e62e4528..00000000 --- a/cctz.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2011-2017 Google Inc. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# CCTZ needed by Abseil's time library -find_path(cctz_src_dir - include/cctz/civil_time.h - HINTS ${CCTZ_ROOT_DIR} - PATHS ${PROJECT_BINARY_DIR}/cctz -) -set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) -set(BUILD_TESTING OFF CACHE BOOL "" FORCE) -add_subdirectory(${cctz_src_dir}) diff --git a/chain_writer.cc b/chain_writer.cc deleted file mode 100644 index 2a2f672a..00000000 --- a/chain_writer.cc +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "third_party/zynamics/binexport/chain_writer.h" - -ChainWriter::Writers& ChainWriter::GetWriters() { return writers_; } - -void ChainWriter::Clear() { Writers().swap(writers_); } - -void ChainWriter::AddWriter(std::shared_ptr writer) { - writers_.push_back(writer); -} - -util::Status ChainWriter::Write(const CallGraph& call_graph, - const FlowGraph& flow_graph, - const Instructions& instructions, - const AddressReferences& address_references, - const TypeSystem* type_system, - const AddressSpace& address_space) { - bool success = true; - for (auto& writer : writers_) { - if (!writer->Write(call_graph, flow_graph, instructions, address_references, - type_system, address_space) - .ok()) { - success = false; - } - } - return success ? ::util::OkStatus() - : util::Status(util::error::UNKNOWN, - "At least one of the chained writers failed."); -} diff --git a/chain_writer.h b/chain_writer.h deleted file mode 100644 index 0a0abb97..00000000 --- a/chain_writer.h +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#ifndef THIRD_PARTY_ZYNAMICS_BINEXPORT_CHAIN_WRITER_H_ -#define THIRD_PARTY_ZYNAMICS_BINEXPORT_CHAIN_WRITER_H_ - -#include -#include - -#include "third_party/zynamics/binexport/writer.h" - -class ChainWriter : public Writer { - public: - typedef std::vector> Writers; - - void AddWriter(std::shared_ptr writer); - Writers& GetWriters(); - void Clear(); - util::Status Write(const CallGraph& call_graph, const FlowGraph& flow_graph, - const Instructions& instructions, - const AddressReferences& address_references, - const TypeSystem* type_system, - const AddressSpace& address_space) override; - - private: - Writers writers_; -}; - -#endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_CHAIN_WRITER_H_ diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index f5831735..bb610e4c 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2011-2017 Google Inc. All Rights Reserved. +# Copyright 2011-2018 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,6 @@ list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} include(ExternalProject) include(absl.cmake) -include(cctz.cmake) include(googletest.cmake) include(openssl.cmake) include(postgresql.cmake) # Depends on openssl @@ -33,7 +32,6 @@ string(REPLACE ";" "^^" CMAKE_PREFIX_PATH_ALT_SEP "${CMAKE_PREFIX_PATH}") ExternalProject_Add(binexport DEPENDS absl - cctz googletest openssl postgresql @@ -44,7 +42,6 @@ ExternalProject_Add(binexport CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH_ALT_SEP}" "-DABSL_ROOT_DIR=${CMAKE_CURRENT_BINARY_DIR}/absl" - "-DCCTZ_ROOT_DIR=${CMAKE_CURRENT_BINARY_DIR}/cctz" "-DGOOGLETEST_ROOT_DIR=${CMAKE_CURRENT_BINARY_DIR}/googletest" "-DIdaSdk_DIR=${IdaSdk_ROOT_DIR}" "-DBUILD_TESTING=OFF" diff --git a/cmake/absl.cmake b/cmake/absl.cmake index b55f75c6..674435e4 100644 --- a/cmake/absl.cmake +++ b/cmake/absl.cmake @@ -1,4 +1,4 @@ -# Copyright 2011-2017 Google Inc. All Rights Reserved. +# Copyright 2011-2018 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ ExternalProject_Add(absl GIT_REPOSITORY https://github.com/abseil/abseil-cpp.git - GIT_TAG 99b92c87365aa3af68f3cc7818efb6126985fe4c + GIT_TAG f21d187b80e3b7f08fb279775ea9c8b48c636030 SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/absl # Just use CMake to clone into directory CONFIGURE_COMMAND "" diff --git a/cmake/cctz.cmake b/cmake/cctz.cmake deleted file mode 100644 index 25155c21..00000000 --- a/cmake/cctz.cmake +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2011-2017 Google Inc. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -ExternalProject_Add(cctz - GIT_REPOSITORY https://github.com/google/cctz.git - GIT_TAG a59b930afc821e5f5a0b868dfee56482075db185 - SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/cctz - # Just use CMake to clone into directory - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND "" -) diff --git a/cmake/googletest.cmake b/cmake/googletest.cmake index 92c108bf..fb332355 100644 --- a/cmake/googletest.cmake +++ b/cmake/googletest.cmake @@ -1,4 +1,4 @@ -# Copyright 2011-2017 Google Inc. All Rights Reserved. +# Copyright 2011-2018 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,7 +14,8 @@ ExternalProject_Add(googletest GIT_REPOSITORY https://github.com/google/googletest.git - GIT_TAG release-1.8.0 + # Snapshot from 2018-01-29, includes VS 2017 fixes + GIT_TAG 798cc4a78a51677a50be0faa1a530197ada435a2 SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/googletest # Just use CMake to clone into directory CONFIGURE_COMMAND "" diff --git a/cmake/openssl.cmake b/cmake/openssl.cmake index f3d2bec3..a3cd0c36 100644 --- a/cmake/openssl.cmake +++ b/cmake/openssl.cmake @@ -1,4 +1,4 @@ -# Copyright 2011-2017 Google Inc. All Rights Reserved. +# Copyright 2011-2018 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cmake/postgresql.cmake b/cmake/postgresql.cmake index b403b568..895481ce 100644 --- a/cmake/postgresql.cmake +++ b/cmake/postgresql.cmake @@ -1,4 +1,4 @@ -# Copyright 2011-2017 Google Inc. All Rights Reserved. +# Copyright 2011-2018 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -85,8 +85,8 @@ endif() ExternalProject_Add(postgresql DEPENDS openssl - URL https://ftp.postgresql.org/pub/source/v9.6.1/postgresql-9.6.1.tar.bz2 - URL_HASH SHA256=e5101e0a49141fc12a7018c6dad594694d3a3325f5ab71e93e0e51bd94e51fcd + URL https://ftp.postgresql.org/pub/source/v9.6.6/postgresql-9.6.6.tar.gz + URL_HASH SHA256=53e1cd5fdff5f45415ae9d5b645177275265a3e800c86becbb94ce183a3a5061 PREFIX ${postgresql_dir} CONFIGURE_COMMAND ${POSTGRESQL_CONFIGURE_COMMAND} BUILD_COMMAND ${POSTGRESQL_BUILD_COMMAND} diff --git a/cmake/protobuf.cmake b/cmake/protobuf.cmake index 8aa33624..fbe4bb03 100644 --- a/cmake/protobuf.cmake +++ b/cmake/protobuf.cmake @@ -1,4 +1,4 @@ -# Copyright 2011-2017 Google Inc. All Rights Reserved. +# Copyright 2011-2018 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -25,12 +25,13 @@ ExternalProject_Add(protobuf -Dprotobuf_BUILD_SHARED_LIBS=OFF -Dprotobuf_WITH_ZLIB=OFF ) +set(_pb_stubs_src "/src/google/protobuf/stubs") +set(_pb_stubs_inst "/include/google/protobuf/stubs") ExternalProject_Add_Step(protobuf copy-stub-headers COMMAND - "${CMAKE_COMMAND}" -E copy - "/src/google/protobuf/stubs/stringprintf.h" - "/include/google/protobuf/stubs/" && - "${CMAKE_COMMAND}" -E copy - "/src/google/protobuf/stubs/strutil.h" - "/include/google/protobuf/stubs/" DEPENDEES install) + "${CMAKE_COMMAND}" -E copy "${_pb_stubs_src}/status_macros.h" "${_pb_stubs_inst}/" && + "${CMAKE_COMMAND}" -E copy "${_pb_stubs_src}/statusor.h" "${_pb_stubs_inst}/" && + "${CMAKE_COMMAND}" -E copy "${_pb_stubs_src}/stringprintf.h" "${_pb_stubs_inst}/" && + "${CMAKE_COMMAND}" -E copy "${_pb_stubs_src}/strutil.h" "${_pb_stubs_inst}/" + DEPENDEES install) ExternalProject_Get_Property(protobuf INSTALL_DIR) list(APPEND CMAKE_PREFIX_PATH ${INSTALL_DIR}) diff --git a/comment.cc b/comment.cc index 1a6ba493..95f2fcb9 100644 --- a/comment.cc +++ b/comment.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,10 +14,9 @@ #include "third_party/zynamics/binexport/comment.h" -#include - #include "base/logging.h" #include "third_party/absl/strings/str_cat.h" +#include "third_party/zynamics/binexport/util/format.h" bool SortComments(const Comment& lhs, const Comment& rhs) { if (lhs.address_ == rhs.address_) { @@ -37,8 +36,9 @@ Comment::Comment(Address address, size_t operand_num, const string* comment, repeatable_(repeatable), type_(type) { if (comment && comment->size() >= 4096) { - LOG(INFO) << "Excessively long comment at " - << absl::StrCat(absl::Hex(address, absl::kZeroPad8)) << ", " - << comment->size() << " bytes: " << *comment; + LOG(INFO) << absl::StrCat("Excessively long comment at ", + security::binexport::FormatAddress(address), ", ", + comment->size(), ": ", comment->substr(0, 128), + "..."); } } diff --git a/comment.h b/comment.h index 0a479033..0ae809c7 100644 --- a/comment.h +++ b/comment.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/copts.cmake b/copts.cmake index b90a78ef..9cb928cc 100644 --- a/copts.cmake +++ b/copts.cmake @@ -1,4 +1,4 @@ -# Copyright 2011-2017 Google Inc. All Rights Reserved. +# Copyright 2011-2018 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,6 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +set(CMAKE_CXX_STANDARD_REQUIRED TRUE) +set(CMAKE_CXX_STANDARD 11) + set(CMAKE_SKIP_BUILD_RPATH TRUE) set(CMAKE_POSITION_INDEPENDENT_CODE TRUE) @@ -42,7 +45,6 @@ endif() if(UNIX) add_compile_options(-Wno-deprecated) - list(APPEND CMAKE_CXX_FLAGS --std=c++11) elseif(WIN32) add_definitions( # Do not define min/max macros which collide with std::min()/std::max() diff --git a/database_writer.cc b/database_writer.cc index 7f22f353..a89327ac 100644 --- a/database_writer.cc +++ b/database_writer.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,13 +21,13 @@ #include #include "base/logging.h" +#include "third_party/absl/strings/escaping.h" #include "third_party/absl/strings/str_cat.h" #include "third_party/absl/strings/str_replace.h" #include "third_party/absl/strings/str_split.h" #include "third_party/zynamics/binexport/base_types.h" #include "third_party/zynamics/binexport/call_graph.h" #include "third_party/zynamics/binexport/flow_graph.h" -#include "third_party/zynamics/binexport/hex_codec.h" #include "third_party/zynamics/binexport/initialize_constraints_postgresql_sql.h" #include "third_party/zynamics/binexport/initialize_indices_postgresql_sql.h" #include "third_party/zynamics/binexport/initialize_tables_postgresql_sql.h" @@ -38,13 +38,6 @@ namespace { -string EncodeHash(const string& hash) { - if (hash.size() <= 20) { - return EncodeHex(hash); - } - return hash; -} - // Creates a string representation for the base type id of the corresponding // stack frame of the given function. Returns "null" if no such stack frame // exists. @@ -232,8 +225,8 @@ void DatabaseWriter::PrepareDatabase(const string& md5, const string& sha1, "$5::varchar, $6::int, $7::varchar, $8::varchar, '', NOW())", Parameters() << static_cast(module_id_) << module_name << architecture << static_cast(base_address) - << program_version_ << static_cast(kDbVersion) - << EncodeHash(md5) << EncodeHash(sha1)); + << program_version_ << static_cast(kDbVersion) << md5 + << sha1); } void DatabaseWriter::InsertAddressComments(const CallGraph& call_graph) { @@ -356,7 +349,7 @@ void DatabaseWriter::InsertFlowGraphs(const CallGraph& call_graph, instruction_query << "(" << static_cast(instruction.GetAddress()) << "," << database_.EscapeLiteral(mnemonic) << ",decode('" - << EncodeHex(instruction.GetBytes()) << "','hex')" + << absl::BytesToHexString(instruction.GetBytes()) << "','hex')" << ")," << kFlushQuery; int operand_sequence = 0; diff --git a/database_writer.h b/database_writer.h index 72c21d3a..9ee03bad 100644 --- a/database_writer.h +++ b/database_writer.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -25,14 +25,14 @@ class CallGraph; class DatabaseWriter : public Writer { public: - typedef enum { + enum InternalStatement { INIT_TABLES, INIT_CONSTRAINTS, INIT_INDICES, MAINTENANCE, - } InternalStatement; + }; - typedef std::map AddressSpaceIds; + using AddressSpaceIds = std::map; DatabaseWriter(const string& schema, const string& module_name, int module_id, const string& md5, const string& sha1, diff --git a/dump_writer.cc b/dump_writer.cc index b7b9f187..9da33eb7 100644 --- a/dump_writer.cc +++ b/dump_writer.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/dump_writer.h b/dump_writer.h index 251ce182..1bbc990e 100644 --- a/dump_writer.h +++ b/dump_writer.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/edge.cc b/edge.cc index 12e96099..47327293 100644 --- a/edge.cc +++ b/edge.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/edge.h b/edge.h index baa28838..05c67d72 100644 --- a/edge.h +++ b/edge.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/entry_point.cc b/entry_point.cc index 195cbbeb..6a5e91d0 100644 --- a/entry_point.cc +++ b/entry_point.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/entry_point.h b/entry_point.h index 54e22e08..39bda3cd 100644 --- a/entry_point.h +++ b/entry_point.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/expression.cc b/expression.cc index 7f3ddad0..478fa217 100644 --- a/expression.cc +++ b/expression.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/expression.h b/expression.h index 84d5a29d..9d9fc5fe 100644 --- a/expression.h +++ b/expression.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -22,6 +22,8 @@ #include #include +#include "third_party/absl/strings/str_cat.h" +#include "third_party/absl/strings/string_view.h" #include "third_party/zynamics/binexport/types.h" #pragma pack(push, 1) @@ -69,6 +71,73 @@ class Expression { static void EmptyCache(); static const ExpressionCache& GetExpressions(); + class Builder { + public: + explicit Builder(Expression::Type type) : type_(type) {} + + Builder& AtPosition(uint16 position) { + position_ = position; + return *this; + } + + Builder& SetRelocatable(bool relocatable) { + relocatable_ = relocatable; + return *this; + } + + Builder& WithParent(Expression* parent) { + parent_ = parent; + return *this; + } + + static Builder Operator(absl::string_view symbol) { + return Builder(Expression::TYPE_OPERATOR).SetSymbol(symbol); + } + + static Builder Register(absl::string_view symbol) { + return Builder(Expression::TYPE_REGISTER).SetSymbol(symbol); + } + + static Builder ImmediateInt(uint64 immediate) { + return Builder(Expression::TYPE_IMMEDIATE_INT).SetImmediate(immediate); + } + + static Builder SizePrefix(absl::string_view size_prefix) { + return Builder(Expression::TYPE_SIZEPREFIX).SetSymbol(size_prefix); + } + + static Builder SizePrefix(int size_in_bits) { + return SizePrefix(absl::StrCat("b", size_in_bits / 8)); + } + + static Builder Dereference() { + return Builder(Expression::TYPE_DEREFERENCE).SetSymbol("["); + } + + Expression* Build() { + return Expression::Create(parent_, std::move(symbol_), immediate_, type_, + position_, relocatable_); + } + + private: + Builder SetSymbol(absl::string_view symbol) { + symbol_ = string(symbol); + return *this; + } + + Builder SetImmediate(uint64 immediate) { + immediate_ = immediate; + return *this; + } + + string symbol_ = ""; + uint64 immediate_ = 0; + uint16 position_ = 0; + bool relocatable_ = false; + Expression::Type type_; + Expression* parent_ = nullptr; + }; + private: // The constructor is private for two reasons: // - We want to make sure expressions can only be created on the heap. diff --git a/flow_analyzer.cc b/flow_analyzer.cc index 2e7d8370..cfc2face 100644 --- a/flow_analyzer.cc +++ b/flow_analyzer.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/flow_analyzer.h b/flow_analyzer.h index d479de6b..3134ab50 100644 --- a/flow_analyzer.h +++ b/flow_analyzer.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/flow_graph.cc b/flow_graph.cc index 5f33c55d..6d6f6fde 100644 --- a/flow_graph.cc +++ b/flow_graph.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -75,11 +75,9 @@ void FlowGraph::MarkOrphanInstructions(Instructions* instructions) const { LOG(WARNING) << absl::StrCat( absl::Hex(instruction.GetAddress(), absl::kZeroPad8), " is reachable from function ", - absl::StrCat( - absl::Hex(function.second->GetEntryPoint(), absl::kZeroPad8)), + absl::Hex(function.second->GetEntryPoint(), absl::kZeroPad8), " basic block ", - absl::StrCat( - absl::Hex(basic_block->GetEntryPoint(), absl::kZeroPad8)), + absl::Hex(basic_block->GetEntryPoint(), absl::kZeroPad8), " but invalid!"); continue; } @@ -360,7 +358,7 @@ void FlowGraph::CreateBasicBlocks(Instructions* instructions, } // Add the new synthetic edges. - std::copy(new_edges.begin(), new_edges.end(), std::back_inserter(edges_)); + edges_.insert(edges_.end(), new_edges.begin(), new_edges.end()); std::sort(edges_.begin(), edges_.end()); } @@ -481,12 +479,14 @@ void FlowGraph::FinalizeFunctions(CallGraph* call_graph) { [](const FlowGraphEdge& edge, Address address) { return edge.source < address; }); + uint64 dropped_edges = 0; for (; edge != edges_.end() && edge->source == source_address; ++edge) { if (!BasicBlock::Find(edge->target)) { - LOG(INFO) << absl::StrCat( + DLOG(INFO) << absl::StrCat( "Dropping edge ", absl::Hex(edge->source, absl::kZeroPad8), " -> ", absl::Hex(edge->target, absl::kZeroPad8), " because the target address is invalid."); + ++dropped_edges; continue; } if (done_edges.insert(*edge).second) { @@ -494,6 +494,10 @@ void FlowGraph::FinalizeFunctions(CallGraph* call_graph) { address_stack.push(edge->target); } } + LOG_IF(INFO, dropped_edges > 0) << absl::StrCat( + "Dropped ", dropped_edges, + " edges because the target address is invalid (current basic block ", + absl::Hex(address, absl::kZeroPad8), ")."); } if (function_basic_blocks.size() >= kMaxFunctionBasicBlocks || function->GetEdges().size() >= kMaxFunctionEdges || diff --git a/flow_graph.h b/flow_graph.h index cb6dd492..ec0abc4d 100644 --- a/flow_graph.h +++ b/flow_graph.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/function.cc b/function.cc index 2c2ca509..19cd4dd7 100644 --- a/function.cc +++ b/function.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ #include // NOLINT #include // NOLINT +#include // NOLINT #include // NOLINT #include "base/logging.h" @@ -243,15 +244,14 @@ void Function::FixEdges() { void Function::GetBackEdges( std::vector* back_edges) const { - typedef boost::compressed_sparse_row_graph< + using LocalGraph = boost::compressed_sparse_row_graph< boost::bidirectionalS, boost::property, - boost::property> LocalGraph; - typedef boost::graph_traits::vertex_descriptor LocalVertex; - typedef std::pair LocalEdge; - typedef std::vector LocalEdges; + boost::property>; + using LocalVertex = boost::graph_traits::vertex_descriptor; + using LocalEdge = std::pair; back_edges->clear(); - LocalEdges local_edges; + std::vector local_edges; local_edges.reserve(edges_.size()); for (const auto& edge : edges_) { auto source_index = GetBasicBlockIndexForAddress(edge.source); @@ -262,15 +262,16 @@ void Function::GetBackEdges( basic_blocks_[target_index]->GetEntryPoint() == edge.target); local_edges.emplace_back(source_index, target_index); } - // TODO(user) Use edges_are_sorted (they are, after all, already sorted - // by source index) + // TODO(cblichmann): Use edges_are_sorted (they are, after all, already sorted + // by source index). const LocalGraph graph(boost::edges_are_unsorted_multi_pass, local_edges.begin(), local_edges.end(), basic_blocks_.size()); std::vector dominator_nodes( num_vertices(graph), boost::graph_traits::null_vertex()); boost::lengauer_tarjan_dominator_tree( - graph, + // Need boost::filtered_graph<> to satisfy Boost.Graph concept. + boost::make_filtered_graph(graph, boost::keep_all()), boost::vertex(GetBasicBlockIndexForAddress(GetEntryPoint()), graph), make_iterator_property_map(dominator_nodes.begin(), get(boost::vertex_index, graph))); diff --git a/function.h b/function.h index 53e8a265..8c5b57e1 100644 --- a/function.h +++ b/function.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/googletest.cmake b/googletest.cmake index a59aeefa..0d40ec77 100644 --- a/googletest.cmake +++ b/googletest.cmake @@ -1,4 +1,4 @@ -# Copyright 2011-2017 Google Inc. All Rights Reserved. +# Copyright 2011-2018 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -19,4 +19,6 @@ find_path(googletest_src_dir PATHS ${PROJECT_BINARY_DIR}/googletest ) set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) -add_subdirectory(${googletest_src_dir} EXCLUDE_FROM_ALL) +message("${googletest_src_dir}") +add_subdirectory(${googletest_src_dir} ${PROJECT_BINARY_DIR}/googletest + EXCLUDE_FROM_ALL) diff --git a/hash.cc b/hash.cc index 9fbcd0d5..a2570789 100644 --- a/hash.cc +++ b/hash.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/hash.h b/hash.h index d58b65d7..df835853 100644 --- a/hash.h +++ b/hash.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/hex_codec.cc b/hex_codec.cc deleted file mode 100644 index 36f995d9..00000000 --- a/hex_codec.cc +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "third_party/zynamics/binexport/hex_codec.h" - -#include - -string EncodeHex(const string& line) { - static const char kLookup[] = "0123456789ABCDEF"; - - if (line.empty()) { - return string(); - } - string result; - result.resize(line.size() * 2); - for (int i = 0, j = 0, end = line.size(); i < end; ++i) { - auto c = line[i]; - result[j++] = kLookup[(c & 0xF0) >> 4]; - result[j++] = kLookup[c & 0x0F]; - } - return result; -} - -string DecodeHex(const string& line) { - static const uint8 kLookup[] = { - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, // 0123456789 - 0, 0, 0, 0, 0, 0, 0, // :;<=>?@ (gap) - 10, 11, 12, 13, 14, 15, // ABCDEF - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // GHIJKLMNOPQRS (gap) - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // TUVWXYZ[/]^_` (gap) - 10, 11, 12, 13, 14, 15 // abcdef - }; - - if (line.empty()) { - return string(); - } - string result; - result.resize(line.size() >> 1); - for (int i = 0, j = 0, end = line.size(); i < end;) { - auto& c = result[j++]; - c = kLookup[line[i++]] << 4; - c |= kLookup[line[i++]]; - } - return result; -} diff --git a/ida/arm.cc b/ida/arm.cc index 3ab8be25..a3238959 100644 --- a/ida/arm.cc +++ b/ida/arm.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,13 +17,13 @@ #include #include -#include "third_party/zynamics/binexport/ida/begin_idasdk.h" // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include "third_party/zynamics/binexport/ida/end_idasdk.h" // NOLINT +#include "third_party/zynamics/binexport/ida/begin_idasdk.inc" // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include "third_party/zynamics/binexport/ida/end_idasdk.inc" // NOLINT #include "base/logging.h" #include "third_party/absl/strings/str_cat.h" @@ -832,7 +832,7 @@ Instruction ParseInstructionIdaArm(const insn_t& instruction, if (instruction.itype == ARM_vcvt || instruction.itype == ARM_vcvtr || instruction.itype == ARM_vcvtb || instruction.itype == ARM_vcvtt) { - switch (neon_datatype_t(instruction.Op1.specflag1)) { + switch (neon_datatype_t(instruction.ops[0].specflag1)) { case 0x0: break; // DT_NONE = 0, case 0x1: diff --git a/ida/arm.h b/ida/arm.h index 0c7a54a3..2ed7400d 100644 --- a/ida/arm.h +++ b/ida/arm.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ida/begin_idasdk.h b/ida/begin_idasdk.inc similarity index 62% rename from ida/begin_idasdk.h rename to ida/begin_idasdk.inc index 9ba803df..5f84bfb2 100644 --- a/ida/begin_idasdk.h +++ b/ida/begin_idasdk.inc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -13,11 +13,14 @@ // limitations under the License. // Allow to safely include IDA's pro.h. In order to work, any IDA Pro header -// must be included between includes of begin_idasdk.h (this file) and -// end_idasdk.h (which undoes the preprocessor changes from this file). - -#ifndef THIRD_PARTY_ZYNAMICS_BINEXPORT_IDA_IDASDK_BEGIN_H_ -#define THIRD_PARTY_ZYNAMICS_BINEXPORT_IDA_IDASDK_BEGIN_H_ +// must be included between includes of begin_idasdk.inc (this file) and +// end_idasdk.inc (which undoes the preprocessor changes from this file). +// +// Note: There is no header guard in this file, we rely on the one in IDA's +// pro.h to provide the basic types IDA plugins need. Other than that, +// we do want to support the case where IDA plugin code includes other +// headers that need to include IDA headers. Using include guards here +// would prevent that. // Alias IDA-specific integer types which conflict with the ones defined by // Protocol Buffers/Abseil. @@ -33,6 +36,5 @@ #define int128 ida_int128 #define uint128 ida_uint128 +// Now include the problematic header, end_idasdk.inc will clean up again. #include - -#endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_IDA_IDASDK_BEGIN_H_ diff --git a/ida/dalvik.cc b/ida/dalvik.cc index 85264e09..59b8cbb3 100644 --- a/ida/dalvik.cc +++ b/ida/dalvik.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,16 +18,16 @@ #include #include -#include "third_party/zynamics/binexport/ida/begin_idasdk.h" // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include "third_party/zynamics/binexport/ida/end_idasdk.h" // NOLINT +#include "third_party/zynamics/binexport/ida/begin_idasdk.inc" // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include "third_party/zynamics/binexport/ida/end_idasdk.inc" // NOLINT #include "base/logging.h" #include "third_party/absl/strings/str_cat.h" diff --git a/ida/dalvik.h b/ida/dalvik.h index 8d7052a3..5f858b0b 100644 --- a/ida/dalvik.h +++ b/ida/dalvik.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ida/digest.cc b/ida/digest.cc index 852be535..1c76164d 100644 --- a/ida/digest.cc +++ b/ida/digest.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,21 +14,33 @@ #include "third_party/zynamics/binexport/ida/digest.h" -#include -#include +#include "third_party/zynamics/binexport/ida/begin_idasdk.inc" // NOLINT +#include // NOLINT +#include "third_party/zynamics/binexport/ida/end_idasdk.inc" // NOLINT #include "base/integral_types.h" +#include "third_party/absl/strings/ascii.h" +#include "third_party/absl/strings/escaping.h" +#include "util/task/status.h" -string Md5(const string& data) { - string digest(MD5_DIGEST_LENGTH, '\0'); - MD5(reinterpret_cast(data.data()), data.size(), - reinterpret_cast(&digest[0])); - return digest; +util::StatusOr GetInputFileSha256() { + constexpr int kBinarySha256Length = 32; + unsigned char hash[kBinarySha256Length]; + if (!retrieve_input_file_sha256(hash)) { + return util::Status{absl::StatusCode::kInternal, + "Failed to load SHA256 hash of input file"}; + } + return absl::AsciiStrToLower(absl::BytesToHexString(absl::string_view( + reinterpret_cast(hash), kBinarySha256Length))); } -string Sha1(const string& data) { - string digest(SHA_DIGEST_LENGTH, '\0'); - SHA1(reinterpret_cast(data.data()), data.size(), - reinterpret_cast(&digest[0])); - return digest; +util::StatusOr GetInputFileMd5() { + constexpr int kBinaryMd5Length = 16; + unsigned char hash[kBinaryMd5Length]; + if (!retrieve_input_file_md5(hash)) { + return util::Status{absl::StatusCode::kInternal, + "Failed to load SHA256 hash of input file"}; + } + return absl::AsciiStrToLower(absl::BytesToHexString(absl::string_view( + reinterpret_cast(hash), kBinaryMd5Length))); } diff --git a/ida/digest.h b/ida/digest.h index bbe3a7ad..e1216701 100644 --- a/ida/digest.h +++ b/ida/digest.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,8 +16,16 @@ #define THIRD_PARTY_ZYNAMICS_BINEXPORT_IDA_DIGEST_H_ #include "third_party/zynamics/binexport/types.h" +#include "util/task/statusor.h" + +// Returns the lowercase hex string of the SHA256 hash of the original input +// file for the current IDB. +util::StatusOr GetInputFileSha256(); + +// Returns the MD5 hash of the original input file for the current IDB. Like +// GetInputFileSha256(), the result is a lowercase hex string. This function +// exists to support the legacy MD5 field in the BinExport database schema. +util::StatusOr GetInputFileMd5(); -string Md5(const string& data); -string Sha1(const string& data); #endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_IDA_DIGEST_H_ diff --git a/ida/end_idasdk.h b/ida/end_idasdk.inc similarity index 66% rename from ida/end_idasdk.h rename to ida/end_idasdk.inc index 39ea3010..8ce14de0 100644 --- a/ida/end_idasdk.h +++ b/ida/end_idasdk.inc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,11 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -// Forward header to safely include IDA's pro.h. In order to work, this must be -// included before including any IDA Pro headers. - -#ifndef THIRD_PARTY_ZYNAMICS_BINEXPORT_IDA_IDASDK_END_H_ -#define THIRD_PARTY_ZYNAMICS_BINEXPORT_IDA_IDASDK_END_H_ +// Companion header to begin_idasdk.inc. In order to work, this must be +// included after including any IDA Pro headers. #undef uint128 #undef int128 @@ -30,4 +27,13 @@ #undef sint8 #undef int8 -#endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_IDA_IDASDK_END_H_ +// Undefine the operand shortcuts Op1-Op8, as those pollute the global +// namespace. +#undef Op8 +#undef Op7 +#undef Op6 +#undef Op5 +#undef Op4 +#undef Op3 +#undef Op2 +#undef Op1 diff --git a/ida/generic.cc b/ida/generic.cc index 19cde59a..f3ded355 100644 --- a/ida/generic.cc +++ b/ida/generic.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,11 +16,11 @@ #include -#include "third_party/zynamics/binexport/ida/begin_idasdk.h" // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include "third_party/zynamics/binexport/ida/end_idasdk.h" // NOLINT +#include "third_party/zynamics/binexport/ida/begin_idasdk.inc" // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include "third_party/zynamics/binexport/ida/end_idasdk.inc" // NOLINT #include "third_party/absl/strings/ascii.h" #include "third_party/absl/strings/string_view.h" diff --git a/ida/generic.h b/ida/generic.h index 41de9ec5..8da7e76d 100644 --- a/ida/generic.h +++ b/ida/generic.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ida/log.cc b/ida/log.cc index f342c0f3..3b2692f7 100644 --- a/ida/log.cc +++ b/ida/log.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,11 +19,13 @@ #include #include #include +#include +#include #include // NOLINT -#include "third_party/zynamics/binexport/ida/begin_idasdk.h" // NOLINT -#include // NOLINT -#include "third_party/zynamics/binexport/ida/end_idasdk.h" // NOLINT +#include "third_party/zynamics/binexport/ida/begin_idasdk.inc" // NOLINT +#include // NOLINT +#include "third_party/zynamics/binexport/ida/end_idasdk.inc" // NOLINT #include "base/logging.h" #include "third_party/absl/strings/str_cat.h" @@ -34,7 +36,7 @@ namespace { static LogHandler* g_old_log_handler = nullptr; static FILE* g_log_file = nullptr; -static LoggingOptions g_logging_options; +static auto* g_logging_options = new LoggingOptions{}; class IdaExecutor : public exec_request_t { public: @@ -67,7 +69,7 @@ const char* const LogLevelToCStr(LogLevel level) { // Logs a single log message. Should be executed on the IDA main thread. void LogLine(LogLevel level, const char* filename, int line, const string& message) { - if (g_logging_options.alsologtostderr() || g_log_file != nullptr) { + if (g_logging_options->alsologtostderr || g_log_file != nullptr) { // Filename always has Unix path separators, so this works on Windows, too. const char* basename = strrchr(filename, '/'); if (*basename != '\0') { @@ -75,16 +77,18 @@ void LogLine(LogLevel level, const char* filename, int line, } // Prepare log line - char thread_id[8]{}; - std::snprintf(thread_id, sizeof(thread_id), "%7u", - std::this_thread::get_id()); - string formatted = - absl::StrCat(LogLevelToCStr(level), - absl::FormatTime("%m%d %T" /* "0125 16:09:42.992535" */, - absl::Now(), absl::LocalTimeZone()), - thread_id, "[", basename, ":", line, "] ", message); - - if (g_logging_options.alsologtostderr()) { + std::ostringstream thread_id; + enum { kThreadIdWidth = 7 }; + thread_id << std::setw(kThreadIdWidth) << std::setfill(' ') + << std::this_thread::get_id(); + string formatted = absl::StrCat( + LogLevelToCStr(level), + absl::FormatTime("%m%d %R:%E6S" /* "0125 16:09:42.992535" */, + absl::Now(), absl::LocalTimeZone()), + " ", thread_id.str().substr(0, kThreadIdWidth), " ", basename, ":", + line, "] ", message, "\n"); + + if (g_logging_options->alsologtostderr) { fputs(formatted.c_str(), stderr); fflush(stderr); } @@ -109,9 +113,9 @@ void IdaLogHandler(LogLevel level, const char* filename, int line, bool InitLogging(const LoggingOptions& options) { ShutdownLogging(); - g_logging_options = options; - if (!g_logging_options.log_filename().empty()) { - const char* log_filename = g_logging_options.log_filename().c_str(); + *g_logging_options = options; + if (!g_logging_options->log_filename.empty()) { + const char* log_filename = g_logging_options->log_filename.c_str(); g_log_file = fopen(log_filename, "a"); if (!g_log_file) { msg("Could not open log file: \"%s\": %s\n", log_filename, diff --git a/ida/log.h b/ida/log.h index 305aa152..21e9dfa7 100644 --- a/ida/log.h +++ b/ida/log.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,23 +17,19 @@ #include "third_party/zynamics/binexport/types.h" -class LoggingOptions { - public: - LoggingOptions() = default; - - void set_alsologtostderr(bool value) { alsologtostderr_ = value; } - - bool alsologtostderr() const { return alsologtostderr_; } - - void set_log_filename(const string& filename) { - log_filename_ = filename; +struct LoggingOptions { + LoggingOptions& set_alsologtostderr(bool value) { + alsologtostderr = value; + return *this; } - const string& log_filename() const { return log_filename_; } + LoggingOptions& set_log_filename(const string& filename) { + log_filename = filename; + return *this; + } - private: - bool alsologtostderr_ = false; - string log_filename_; + bool alsologtostderr = false; + string log_filename; }; // Initializes logging. Not thread safe. diff --git a/ida/main_plugin.cc b/ida/main_plugin.cc index 1c793f14..74727494 100644 --- a/ida/main_plugin.cc +++ b/ida/main_plugin.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,78 +12,62 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "third_party/zynamics/binexport/ida/begin_idasdk.h" // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include "third_party/zynamics/binexport/ida/end_idasdk.h" // NOLINT +#include "third_party/zynamics/binexport/ida/begin_idasdk.inc" // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include "third_party/zynamics/binexport/ida/end_idasdk.inc" // NOLINT #include "base/logging.h" +#include "third_party/absl/base/attributes.h" #include "third_party/absl/strings/ascii.h" +#include "third_party/absl/strings/escaping.h" #include "third_party/absl/strings/numbers.h" #include "third_party/absl/strings/str_cat.h" #include "third_party/absl/time/time.h" #include "third_party/zynamics/binexport/binexport2_writer.h" #include "third_party/zynamics/binexport/call_graph.h" -#include "third_party/zynamics/binexport/chain_writer.h" #include "third_party/zynamics/binexport/database_writer.h" #include "third_party/zynamics/binexport/dump_writer.h" #include "third_party/zynamics/binexport/entry_point.h" -#include "third_party/zynamics/binexport/filesystem_util.h" +#include "third_party/zynamics/binexport/util/filesystem.h" #include "third_party/zynamics/binexport/flow_analyzer.h" #include "third_party/zynamics/binexport/flow_graph.h" -#include "third_party/zynamics/binexport/hex_codec.h" +#include "third_party/zynamics/binexport/util/format.h" #include "third_party/zynamics/binexport/ida/digest.h" #include "third_party/zynamics/binexport/ida/log.h" #include "third_party/zynamics/binexport/ida/names.h" #include "third_party/zynamics/binexport/ida/ui.h" #include "third_party/zynamics/binexport/instruction.h" #include "third_party/zynamics/binexport/statistics_writer.h" -#include "third_party/zynamics/binexport/timer.h" +#include "third_party/zynamics/binexport/util/timer.h" #include "third_party/zynamics/binexport/version.h" #include "third_party/zynamics/binexport/virtual_memory.h" +namespace security { +namespace binexport { namespace { string GetArgument(const char* name) { const char* option = - get_plugin_options(absl::StrCat("Exporter", name).c_str()); + get_plugin_options(absl::StrCat("BinExport", name).c_str()); + if (option == nullptr) { + // Try old name as well. + get_plugin_options(absl::StrCat("Exporter", name).c_str()); + } return option ? option : ""; } -static const char kBinExportSql[] = "BinExport2Sql" BINEXPORT_RELEASE; -static const char kBinExportDiff[] = "BinExport2Diff" BINEXPORT_RELEASE; -static const char kBinExportText[] = "BinExport2Text" BINEXPORT_RELEASE; -static const char kBinExportStatistics[] = - "BinExport2Statistics" BINEXPORT_RELEASE; -static const char kName[] = "BinExport " BINEXPORT_RELEASE; -static const char kCopyright[] = - "(c)2004-2011 zynamics GmbH, (c)2011-2017 Google Inc."; -static const char kComment[] = - "Export to SQL RE-DB, BinDiff binary or text dump"; -static const char kHotKey[] = ""; - -enum ExportMode { kDatabase = 1, kBinary = 2, kText = 3, kStatistics = 4 }; - -string GetDataForHash() { - string data; - for (segment_t* segment = get_first_seg(); - segment != 0 && data.size() < (32 << 20 /* 32 MiB */); - segment = get_next_seg(segment->start_ea)) { - // Truncate segments longer than 1MB so we don't produce too long a string. - for (ea_t address = segment->start_ea; - address < std::min(segment->end_ea, segment->start_ea + (1 << 20)); - ++address) { - if (get_flags(address)) { - // check whether address is loaded - data += get_byte(address); - } - } - } - return data; -} +constexpr char kName[] = "BinExport " BINEXPORT_RELEASE; +constexpr char kCopyright[] = + "(c)2004-2011 zynamics GmbH, (c)2011-2018 Google LLC."; +constexpr char kComment[] = "Export to SQL RE-DB, BinDiff binary or text dump"; +constexpr char kHotKey[] = ""; + +enum class ExportMode { kSql = 1, kBinary = 2, kText = 3, kStatistics = 4 }; string GetDefaultName(ExportMode mode) { string new_extension; @@ -97,14 +81,14 @@ string GetDefaultName(ExportMode mode) { case ExportMode::kStatistics: new_extension = ".statistics"; break; - case ExportMode::kDatabase: + case ExportMode::kSql: // No extension for database export. break; } return ReplaceFileExtension(GetModuleName(), new_extension); } -void ExportDatabase(ChainWriter& writer) { +void ExportIdb(Writer* writer) { LOG(INFO) << GetModuleName() << ": starting export"; WaitBox wait_box("exporting database..."); Timer<> timer; @@ -134,34 +118,41 @@ void ExportDatabase(ChainWriter& writer) { Instructions instructions; FlowGraph flow_graph; CallGraph call_graph; - AnalyzeFlowIda(&entry_points, &modules, &writer, &instructions, &flow_graph, + AnalyzeFlowIda(&entry_points, &modules, writer, &instructions, &flow_graph, &call_graph); LOG(INFO) << absl::StrCat( GetModuleName(), ": exported ", flow_graph.GetFunctions().size(), " functions with ", instructions.size(), " instructions in ", - absl::FormatDuration(absl::Seconds(timer.elapsed()))); + HumanReadableDuration(timer.elapsed())); } -int ExportDatabase(const string& schema_name, - const string& connection_string) { - ChainWriter writer; +int ExportSql(absl::string_view schema_name, + absl::string_view connection_string) { try { - const string data(GetDataForHash()); - auto database_writer(std::make_shared( - schema_name /* Database */, GetModuleName(), 0 /* Module id */, - EncodeHex(Md5(data)), EncodeHex(Sha1(data)), GetArchitectureName(), - GetImageBase(), kName /* Version string */, - !connection_string.empty() ? connection_string - : GetArgument("ConnectionString"))); + auto sha256_or = GetInputFileSha256(); + auto md5_or = GetInputFileMd5(); + if (!sha256_or.ok() || !md5_or.ok()) { + throw std::runtime_error{"Failed to load input file hashes"}; + } + DatabaseWriter writer{string(schema_name) /* Database */, + GetModuleName(), + /*module_id=*/0, + md5_or.ValueOrDie(), + sha256_or.ValueOrDie(), + GetArchitectureName().value(), + GetImageBase(), + kName /* Version string */, + !connection_string.empty() + ? string(connection_string) + : GetArgument("ConnectionString")}; int query_size = 0; - database_writer->set_query_size( + writer.set_query_size( absl::SimpleAtoi(GetArgument("QuerySize"), &query_size) ? query_size : 32 << 20 /* 32 MiB */); - writer.AddWriter(database_writer); - ExportDatabase(writer); + ExportIdb(&writer); } catch (const std::exception& error) { LOG(INFO) << "Error exporting: " << error.what(); warning("Error exporting: %s\n", error.what()); @@ -176,11 +167,13 @@ int ExportDatabase(const string& schema_name, int ExportBinary(const string& filename) { try { - const string hash = Sha1(GetDataForHash()); - ChainWriter writer; - writer.AddWriter(std::make_shared( - filename, GetModuleName(), EncodeHex(hash), GetArchitectureName())); - ExportDatabase(writer); + auto sha256_or = GetInputFileSha256(); + if (!sha256_or.ok()) { + throw std::runtime_error{sha256_or.status().error_message()}; + } + BinExport2Writer writer{filename, GetModuleName(), sha256_or.ValueOrDie(), + GetArchitectureName().value()}; + ExportIdb(&writer); } catch (const std::exception& error) { LOG(INFO) << "Error exporting: " << error.what(); warning("Error exporting: %s\n", error.what()); @@ -196,7 +189,7 @@ int ExportBinary(const string& filename) { void idaapi ButtonBinaryExport(TWidget** /* fields */, int) { const auto name(GetDefaultName(ExportMode::kBinary)); const char* filename = ask_file( - /*for_saving=*/true, name.c_str(), + /*for_saving=*/true, name.c_str(), "%s", absl::StrCat("FILTER BinExport v2 files|*.BinExport|All files|", kAllFilesFilter, "\nExport to BinExport v2") .c_str()); @@ -214,10 +207,9 @@ void idaapi ButtonBinaryExport(TWidget** /* fields */, int) { int ExportText(const string& filename) { try { - std::ofstream file(filename.c_str()); - ChainWriter writer; - writer.AddWriter(std::make_shared(file)); - ExportDatabase(writer); + std::ofstream file(filename); + DumpWriter writer{file}; + ExportIdb(&writer); } catch (const std::exception& error) { LOG(INFO) << "Error exporting: " << error.what(); warning("Error exporting: %s\n", error.what()); @@ -233,7 +225,7 @@ int ExportText(const string& filename) { void idaapi ButtonTextExport(TWidget** /* fields */, int) { const auto name = GetDefaultName(ExportMode::kText); const char* filename = ask_file( - /*for_saving=*/true, name.c_str(), + /*for_saving=*/true, name.c_str(), "%s", absl::StrCat("FILTER Text files|*.txt|All files|", kAllFilesFilter, "\nExport to Text") .c_str()); @@ -251,10 +243,9 @@ void idaapi ButtonTextExport(TWidget** /* fields */, int) { int ExportStatistics(const string& filename) { try { - std::ofstream file(filename.c_str()); - ChainWriter writer; - writer.AddWriter(std::make_shared(file)); - ExportDatabase(writer); + std::ofstream file(filename); + StatisticsWriter writer{file}; + ExportIdb(&writer); } catch (const std::exception& error) { LOG(INFO) << "Error exporting: " << error.what(); warning("Error exporting: %s\n", error.what()); @@ -270,7 +261,7 @@ int ExportStatistics(const string& filename) { void idaapi ButtonStatisticsExport(TWidget** /* fields */, int) { const auto name = GetDefaultName(ExportMode::kStatistics); const char* filename = ask_file( - /*for_saving=*/true, name.c_str(), + /*for_saving=*/true, name.c_str(), "%s", absl::StrCat("FILTER BinExport Statistics|*.statistics|All files|", kAllFilesFilter, "\nExport Statistics") .c_str()); @@ -292,8 +283,8 @@ const char* GetDialog() { "BUTTON YES Close\n" // This is actually the OK button "BUTTON CANCEL NONE\n" "HELP\n" - "See https://github.com/google/binexport/blob/master/README.md for " - "details on how to build/install/use this plugin.\n" + "See https://github.com/google/binexport/ for details on how to " + "build/install and use this plugin.\n" "ENDHELP\n", kName, "\n\n\n" @@ -304,13 +295,11 @@ const char* GetDialog() { } int DoExport(ExportMode mode, string name, - const string& connection_string) { + absl::string_view connection_string) { if (name.empty()) { - try { - name = GetTempDirectory("BinExport", true); - } catch (...) { - name = absl::StrCat(".", kPathSeparator); - } + auto temp_or = GetOrCreateTempDirectory("BinExport"); + name = + temp_or.ok() ? temp_or.ValueOrDie() : absl::StrCat(".", kPathSeparator); } if (IsDirectory(name) && connection_string.empty()) { name = JoinPath(name, GetDefaultName(mode)); @@ -318,8 +307,8 @@ int DoExport(ExportMode mode, string name, Instruction::SetBitness(GetArchitectureBitness()); switch (mode) { - case ExportMode::kDatabase: - return ExportDatabase(name, connection_string); + case ExportMode::kSql: + return ExportSql(name, connection_string); case ExportMode::kBinary: return ExportBinary(name); case ExportMode::kText: @@ -327,75 +316,128 @@ int DoExport(ExportMode mode, string name, case ExportMode::kStatistics: return ExportStatistics(name); default: - LOG(INFO) << "Error: Invalid export: " << mode; + LOG(INFO) << "Error: Invalid export mode: " << static_cast(mode); return -1; } } -error_t idaapi IdcBinExport2Diff(idc_value_t* argument, idc_value_t*) { - return DoExport(ExportMode::kBinary, string(argument[0].c_str()), - /* connection_string = */ ""); +error_t idaapi IdcBinExportBinary(idc_value_t* argument, idc_value_t*) { + return DoExport(ExportMode::kBinary, argument[0].c_str(), + /*connection_string=*/""); } -static const char kBinExport2DiffIdcArgs[] = {VT_STR, 0}; -static const ext_idcfunc_t kBinExport2DiffIdcFunc = { - "BinExport2Diff", IdcBinExport2Diff, kBinExport2DiffIdcArgs, nullptr, 0, +static const char kBinExportBinaryIdcArgs[] = {VT_STR, 0}; +static const ext_idcfunc_t kBinExportBinaryIdcFunc = { + "BinExportBinary", IdcBinExportBinary, kBinExportBinaryIdcArgs, nullptr, 0, EXTFUN_BASE}; -error_t idaapi IdcBinExport2Text(idc_value_t* argument, idc_value_t*) { - return DoExport(ExportMode::kText, string(argument[0].c_str()), - /* connection_string = */ ""); +error_t idaapi IdcBinExportText(idc_value_t* argument, idc_value_t*) { + return DoExport(ExportMode::kText, argument[0].c_str(), + /*connection_string=*/""); } -static const char kBinExport2TextIdcArgs[] = {VT_STR, 0}; -static const ext_idcfunc_t kBinExport2TextIdcFunc = { - "BinExport2Text", IdcBinExport2Text, kBinExport2TextIdcArgs, nullptr, 0, +static const char kBinExportTextIdcArgs[] = {VT_STR, 0}; +static const ext_idcfunc_t kBinExportTextIdcFunc = { + "BinExportText", IdcBinExportText, kBinExportTextIdcArgs, nullptr, 0, EXTFUN_BASE}; -error_t idaapi IdcBinExport2Statistics(idc_value_t* argument, idc_value_t*) { - return DoExport(ExportMode::kStatistics, string(argument[0].c_str()), - /* connection_string = */ ""); +error_t idaapi IdcBinExportStatistics(idc_value_t* argument, idc_value_t*) { + return DoExport(ExportMode::kStatistics, argument[0].c_str(), + /*connection_string=*/""); } -static const char kBinExport2StatisticsIdcArgs[] = {VT_STR, 0}; -static const ext_idcfunc_t kBinExport2StatisticsIdcFunc = { - "BinExport2Statistics", - IdcBinExport2Statistics, - kBinExport2StatisticsIdcArgs, +static const char kBinExportStatisticsIdcArgs[] = {VT_STR, 0}; +static const ext_idcfunc_t kBinExportStatisticsIdcFunc = { + "BinExportStatistics", + IdcBinExportStatistics, + kBinExportStatisticsIdcArgs, nullptr, 0, EXTFUN_BASE}; -error_t idaapi IdcBinExport2Sql(idc_value_t* argument, idc_value_t*) { +error_t idaapi IdcBinExportSql(idc_value_t* argument, idc_value_t*) { if (argument[0].vtype != VT_STR || argument[1].vtype != VT_LONG || argument[2].vtype != VT_STR || argument[3].vtype != VT_STR || argument[4].vtype != VT_STR || argument[5].vtype != VT_STR) { - LOG(INFO) << "Error (BinExport2Sql): required arguments are missing or " + LOG(INFO) << "Error (BinExportSql): required arguments are missing or " "have the wrong type."; LOG(INFO) << "Usage:"; - LOG(INFO) - << " BinExport2Sql('host', port, 'database', 'schema', 'user', " - "'password')"; + LOG(INFO) << " BinExportSql('host', port, 'database', 'schema', 'user', " + "'password')"; return -1; } string connection_string = absl::StrCat( "host='", argument[0].c_str(), "' port='", argument[1].num, "' dbname='", argument[2].c_str(), "' user='", argument[4].c_str(), "' password='", argument[5].c_str(), "'"); - if (DoExport(ExportMode::kDatabase, argument[3].c_str(), connection_string) == + if (DoExport(ExportMode::kSql, argument[3].c_str(), connection_string) == -1) { return -1; } return eOk; } -static const char kBinExport2SqlIdcArgs[] = {VT_STR /* Host */, - VT_LONG /* Port */, - VT_STR /* Database */, - VT_STR /* Schema */, - VT_STR /* User */, - VT_STR /* Password */, - 0}; -static const ext_idcfunc_t kBinExport2SqlIdcFunc = { - "BinExport2Sql", IdcBinExport2Sql, kBinExport2SqlIdcArgs, nullptr, 0, +static const char kBinExportSqlIdcArgs[] = {VT_STR /* Host */, + VT_LONG /* Port */, + VT_STR /* Database */, + VT_STR /* Schema */, + VT_STR /* User */, + VT_STR /* Password */, + 0}; +static const ext_idcfunc_t kBinExportSqlIdcFunc = { + "BinExportSql", IdcBinExportSql, kBinExportSqlIdcArgs, nullptr, 0, EXTFUN_BASE}; +// Builds a database connection string from the plugin arguments given on the +// command-line. +// Note: This function does not escape any of the strings it gets passed in. +string GetConnectionStringFromArguments() { + // See section 32.1.1.1. ("Keyword/Value Connection Strings") at + // https://www.postgresql.org/docs/9.6/static/libpq-connect.html + return absl::StrCat("host='", GetArgument("Host"), "' user='", + GetArgument("User"), "' password='", + GetArgument("Password"), "' port='", GetArgument("Port"), + "' dbname='" + GetArgument("Database") + "'"); +} + +ssize_t idaapi UiHook(void*, int event_id, va_list arguments) { + if (event_id != ui_ready_to_run) { + return 0; + } + + Instruction::SetBitness(GetArchitectureBitness()); + + // If IDA was invoked with -OBinExportAutoAction:, wait for auto + // analysis to finish, then invoke the requested action and exit. + const string auto_action = absl::AsciiStrToUpper(GetArgument("AutoAction")); + if (auto_action.empty()) { + return 0; + } + auto_wait(); + + if (auto_action == absl::AsciiStrToUpper(kBinExportSqlIdcFunc.name)) { + DoExport(ExportMode::kSql, GetArgument("Schema"), + GetConnectionStringFromArguments()); + } else if (auto_action == + absl::AsciiStrToUpper(kBinExportBinaryIdcFunc.name)) { + DoExport(ExportMode::kBinary, GetArgument("Module"), + /*connection_string=*/""); + } else if (auto_action == absl::AsciiStrToUpper(kBinExportTextIdcFunc.name)) { + DoExport(ExportMode::kText, GetArgument("Module"), + /*connection_string=*/""); + } else if (auto_action == + absl::AsciiStrToUpper(kBinExportStatisticsIdcFunc.name)) { + DoExport(ExportMode::kStatistics, GetArgument("Module"), + /*connection_string=*/""); + } else { + LOG(INFO) << "Invalid argument for AutoAction: " << auto_action; + } + + // Do not save the database on exit. This simply deletes the unpacked database + // and prevents IDA >= 7.1 from segfaulting if '-A' is specified at the same + // time. + set_database_flag(DBFL_KILL); + qexit(0); + + return 0; // Not reached +} + int idaapi PluginInit() { LoggingOptions options; options.set_alsologtostderr( @@ -413,19 +455,23 @@ int idaapi PluginInit() { << "), " << kCopyright; addon_info_t addon_info; - addon_info.cb = sizeof(addon_info_t); addon_info.id = "com.google.binexport"; addon_info.name = kName; addon_info.producer = "Google"; - addon_info.version = BINEXPORT_RELEASE " @ " BINEXPORT_REVISION; + addon_info.version = BINEXPORT_RELEASE " @" BINEXPORT_REVISION; addon_info.url = "https://github.com/google/binexport"; addon_info.freeform = kCopyright; register_addon(&addon_info); - if (!add_idc_func(kBinExport2DiffIdcFunc) || - !add_idc_func(kBinExport2TextIdcFunc) || - !add_idc_func(kBinExport2StatisticsIdcFunc) || - !add_idc_func(kBinExport2SqlIdcFunc)) { + if (!hook_to_notification_point(HT_UI, UiHook, /*user_data=*/nullptr)) { + LOG(INFO) << "Internal error: hook_to_notification_point() failed"; + return PLUGIN_SKIP; + } + + if (!add_idc_func(kBinExportSqlIdcFunc) || + !add_idc_func(kBinExportBinaryIdcFunc) || + !add_idc_func(kBinExportTextIdcFunc) || + !add_idc_func(kBinExportStatisticsIdcFunc)) { LOG(INFO) << "Error registering IDC extension, skipping BinExport plugin"; return PLUGIN_SKIP; } @@ -434,6 +480,7 @@ int idaapi PluginInit() { } void idaapi PluginTerminate() { + unhook_from_notification_point(HT_UI, UiHook, /*user_data=*/nullptr); ShutdownLogging(); } @@ -443,21 +490,15 @@ bool idaapi PluginRun(size_t argument) { return false; } - try { - GetArchitectureName(); - } catch (const std::exception&) { - LOG(INFO) << "Warning: Exporting for unknown CPU architecture (Id: " - << ph.id << ", " << GetArchitectureBitness() << "-bit)"; - } + LOG_IF(INFO, !GetArchitectureName()) + << "Warning: Exporting for unknown CPU architecture (Id: " << ph.id + << ", " << GetArchitectureBitness() << "-bit)"; try { if (argument) { string connection_string; string module; if (!GetArgument("Host").empty()) { - connection_string = - "host='" + GetArgument("Host") + "' user='" + GetArgument("User") + - "' password='" + GetArgument("Password") + "' port='" + - GetArgument("Port") + "' dbname='" + GetArgument("Database") + "'"; + connection_string = GetConnectionStringFromArguments(); module = GetArgument("Schema"); } else { module = GetArgument("Module"); @@ -476,17 +517,17 @@ bool idaapi PluginRun(size_t argument) { } } // namespace +} // namespace binexport +} // namespace security -extern "C" { plugin_t PLUGIN = { IDP_INTERFACE_VERSION, - PLUGIN_FIX, // Plugin flags - PluginInit, // Initialize - PluginTerminate, // Terminate - PluginRun, // Invoke plugin - kComment, // Statusline text - nullptr, // Multi-line help about the plugin, unused - kName, // Preferred short name of the plugin. - kHotKey // Preferred hotkey to run the plugin. + PLUGIN_FIX, // Plugin flags + security::binexport::PluginInit, // Initialize + security::binexport::PluginTerminate, // Terminate + security::binexport::PluginRun, // Invoke plugin + security::binexport::kComment, // Statusline text + nullptr, // Multi-line help about the plugin, unused + security::binexport::kName, // Preferred short name of the plugin. + security::binexport::kHotKey // Preferred hotkey to run the plugin. }; -} // extern "C" diff --git a/ida/metapc.cc b/ida/metapc.cc index f4c6ea66..a46f1f86 100644 --- a/ida/metapc.cc +++ b/ida/metapc.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,11 +18,11 @@ #include #include -#include "third_party/zynamics/binexport/ida/begin_idasdk.h" // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include "third_party/zynamics/binexport/ida/end_idasdk.h" // NOLINT +#include "third_party/zynamics/binexport/ida/begin_idasdk.inc" // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include "third_party/zynamics/binexport/ida/end_idasdk.inc" // NOLINT #include "base/logging.h" #include "third_party/absl/strings/str_cat.h" @@ -35,9 +35,9 @@ namespace { bool IsStringInstruction(const string& mnemonic) { - static std::set instructions = {"ins", "outs", "movs", "cmps", - "stos", "lods", "scas"}; - return instructions.find(mnemonic.substr(0, 4)) != instructions.end(); + static auto* instructions = new std::set{ + "ins", "outs", "movs", "cmps", "stos", "lods", "scas"}; + return instructions->find(mnemonic.substr(0, 4)) != instructions->end(); } string GetSegmentSelector(const op_t& operand) { @@ -90,11 +90,10 @@ string GetExtendedRegisterName(const op_t& operand) { // mov ax, word ss:[edx + 16] size_t GetSibOperandSize(Address address) { const segment_t* segment = getseg(static_cast(address)); - // fucking IDA: 0 = 16, 1 = 32, 2 = 64 + // IDA: 0 = 16, 1 = 32, 2 = 64 return (16 << segment->bitness) >> 3; } -// Warning: this function uses the global cmd! string GetSibBase(const insn_t& instruction, const op_t& operand) { const size_t opsize = GetSibOperandSize(instruction.ea); string name = GetRegisterName(x86_base(instruction, operand), opsize); @@ -106,9 +105,7 @@ string GetSibBase(const insn_t& instruction, const op_t& operand) { return name; } -string GetSibIndex( - const insn_t& instruction, - const op_t& operand) { // @warning: this function uses the global cmd! +string GetSibIndex(const insn_t& instruction, const op_t& operand) { const int index = x86_index(instruction, operand); size_t opsize = GetSibOperandSize(instruction.ea); if (opsize <= 1) { @@ -153,9 +150,8 @@ void HandlePhraseExpression(Expressions* expressions, FlowGraph* flow_graph, base = "di"; break; case 6: - base = "sword (@bug!)"; - break; // @bug: this should probably be a value retrieved from - // somewhere + base = "bp"; + break; case 7: base = "bx"; break; diff --git a/ida/metapc.h b/ida/metapc.h index a384e8c4..64a964a5 100644 --- a/ida/metapc.h +++ b/ida/metapc.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ida/mips.cc b/ida/mips.cc index 7c5b2afa..76338337 100644 --- a/ida/mips.cc +++ b/ida/mips.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,13 +17,13 @@ #include #include -#include "third_party/zynamics/binexport/ida/begin_idasdk.h" // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include "third_party/zynamics/binexport/ida/end_idasdk.h" // NOLINT +#include "third_party/zynamics/binexport/ida/begin_idasdk.inc" // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include "third_party/zynamics/binexport/ida/end_idasdk.inc" // NOLINT #include "base/logging.h" #include "third_party/absl/strings/str_cat.h" diff --git a/ida/mips.h b/ida/mips.h index dae19302..523759ea 100644 --- a/ida/mips.h +++ b/ida/mips.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ida/names.cc b/ida/names.cc index 92d340a4..6f04cd88 100644 --- a/ida/names.cc +++ b/ida/names.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,18 +20,18 @@ #include #include -#include "third_party/zynamics/binexport/ida/begin_idasdk.h" // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include "third_party/zynamics/binexport/ida/end_idasdk.h" // NOLINT +#include "third_party/zynamics/binexport/ida/begin_idasdk.inc" // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include "third_party/zynamics/binexport/ida/end_idasdk.inc" // NOLINT #include "base/logging.h" #include "third_party/absl/strings/ascii.h" @@ -40,9 +40,10 @@ #include "third_party/zynamics/binexport/address_references.h" #include "third_party/zynamics/binexport/base_types.h" #include "third_party/zynamics/binexport/call_graph.h" -#include "third_party/zynamics/binexport/filesystem_util.h" +#include "third_party/zynamics/binexport/util/filesystem.h" #include "third_party/zynamics/binexport/flow_analyzer.h" #include "third_party/zynamics/binexport/flow_graph.h" +#include "third_party/zynamics/binexport/util/format.h" #include "third_party/zynamics/binexport/ida/arm.h" #include "third_party/zynamics/binexport/ida/dalvik.h" #include "third_party/zynamics/binexport/ida/generic.h" @@ -50,12 +51,14 @@ #include "third_party/zynamics/binexport/ida/mips.h" #include "third_party/zynamics/binexport/ida/ppc.h" #include "third_party/zynamics/binexport/ida/types_container.h" -#include "third_party/zynamics/binexport/timer.h" +#include "third_party/zynamics/binexport/util/timer.h" #include "third_party/zynamics/binexport/type_system.h" #include "third_party/zynamics/binexport/virtual_memory.h" #include "third_party/zynamics/binexport/writer.h" #include "third_party/zynamics/binexport/x86_nop.h" +using security::binexport::HumanReadableDuration; + enum Architecture { kX86 = 0, kArm, @@ -107,7 +110,7 @@ Architecture GetArchitecture() { return kGeneric; } -string GetArchitectureName() { +absl::optional GetArchitectureName() { string architecture; switch (GetArchitecture()) { case kX86: @@ -129,15 +132,12 @@ string GetArchitectureName() { architecture = "GENERIC"; break; default: - throw std::runtime_error("unsupported processor"); - } - if (inf.is_64bit()) { - architecture += "-64"; - } else if (inf.is_32bit()) { - architecture += "-32"; - } else { - architecture += "-32"; + return {}; } + // This is not strictly correct, i.e. for 16-bit archs and also for 128-bit + // archs, but is what IDA supports. This needs to be changed if IDA introduces + // is_128bit(). + absl::StrAppend(&architecture, inf.is_64bit() ? "-64" : "-32"); return architecture; } @@ -850,8 +850,8 @@ void AnalyzeFlowIda(EntryPoints* entry_points, const ModuleMap* modules, const auto writing_time = absl::Seconds(timer.elapsed()); LOG(INFO) << absl::StrCat( - GetModuleName(), ": ", absl::FormatDuration(processing_time), - " processing, ", absl::FormatDuration(writing_time), " writing"); + GetModuleName(), ": ", HumanReadableDuration(processing_time), + " processing, ", HumanReadableDuration(writing_time), " writing"); } void GetRegularComments(Address address, Comments* comments) { @@ -874,23 +874,25 @@ void GetRegularComments(Address address, Comments* comments) { void GetEnumComments(Address address, Comments* comments) { // @bug: there is an get_enum_cmt // function in IDA as well! - unsigned char serial; + uint8 serial; if (is_enum0(get_flags(address))) { - if (int id = get_enum_id(&serial, address, 0) != BADNODE) { + int id = get_enum_id(&serial, address, 0); + if (id != BADNODE) { qstring ida_name(get_enum_name(id)); - comments->emplace_back(address, 0, - CallGraph::CacheString(string( - ida_name.c_str(), ida_name.length())), - Comment::ENUM, false); + comments->emplace_back( + address, 0, + CallGraph::CacheString(string(ida_name.c_str(), ida_name.length())), + Comment::ENUM, false); } } if (is_enum1(get_flags(address))) { - if (int id = get_enum_id(&serial, address, 1) != BADNODE) { + int id = get_enum_id(&serial, address, 1); + if (id != BADNODE) { qstring ida_name(get_enum_name(id)); - comments->emplace_back(address, 1, - CallGraph::CacheString(string( - ida_name.c_str(), ida_name.length())), - Comment::ENUM, false); + comments->emplace_back( + address, 1, + CallGraph::CacheString(string(ida_name.c_str(), ida_name.length())), + Comment::ENUM, false); } } } diff --git a/ida/names.h b/ida/names.h index fd3019a4..057443b8 100644 --- a/ida/names.h +++ b/ida/names.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ #include #include +#include "third_party/absl/types/optional.h" #include "third_party/zynamics/binexport/comment.h" #include "third_party/zynamics/binexport/entry_point.h" #include "third_party/zynamics/binexport/instruction.h" @@ -56,7 +57,9 @@ Name GetName(Address address, Address immediate, uint8 operand_num, bool user_names_only); string GetName(Address address, bool user_names_only); string GetModuleName(); -string GetArchitectureName(); + +absl::optional GetArchitectureName(); + int GetArchitectureBitness(); string GetSizePrefix(const size_t size_in_bytes); diff --git a/ida/ppc.cc b/ida/ppc.cc index 93757f93..f0726be0 100644 --- a/ida/ppc.cc +++ b/ida/ppc.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,11 +18,11 @@ #include #include -#include "third_party/zynamics/binexport/ida/begin_idasdk.h" // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include "third_party/zynamics/binexport/ida/end_idasdk.h" // NOLINT +#include "third_party/zynamics/binexport/ida/begin_idasdk.inc" // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include "third_party/zynamics/binexport/ida/end_idasdk.inc" // NOLINT #include "base/logging.h" #include "third_party/absl/strings/str_cat.h" diff --git a/ida/ppc.h b/ida/ppc.h index 20b14493..abc6f537 100644 --- a/ida/ppc.h +++ b/ida/ppc.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ida/pro_forward.h b/ida/pro_forward.h index 902ed7c5..484fcc68 100644 --- a/ida/pro_forward.h +++ b/ida/pro_forward.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ida/types_container.cc b/ida/types_container.cc index 33e7e0db..8c0dd143 100644 --- a/ida/types_container.cc +++ b/ida/types_container.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -16,15 +16,15 @@ #include -#include "third_party/zynamics/binexport/ida/begin_idasdk.h" // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include // NOLINT -#include "third_party/zynamics/binexport/ida/end_idasdk.h" // NOLINT +#include "third_party/zynamics/binexport/ida/begin_idasdk.inc" // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include // NOLINT +#include "third_party/zynamics/binexport/ida/end_idasdk.inc" // NOLINT #include "base/logging.h" #include "third_party/absl/strings/str_cat.h" @@ -575,8 +575,8 @@ TypesContainer::TypeReference IdaTypesContainer::CreateStackReference( } const BaseType* base_type = GetStackFrame(function->start_ea); if (!base_type) { - LOG(INFO) << absl::StrCat("Stack frame corrupted, function: ", - absl::Hex(function->start_ea, absl::kZeroPad8)); + DLOG(INFO) << absl::StrCat("Stack frame corrupted, function: ", + absl::Hex(function->start_ea, absl::kZeroPad8)); return TypeReference::CreateEmptyReference(); } diff --git a/ida/types_container.h b/ida/types_container.h index a7e65bb0..83c7aedd 100644 --- a/ida/types_container.h +++ b/ida/types_container.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/ida/ui.cc b/ida/ui.cc index 8740d81a..632532fc 100644 --- a/ida/ui.cc +++ b/ida/ui.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -12,10 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "third_party/zynamics/binexport/ida/begin_idasdk.h" // NOLINT -#include // NOLINT -#include "third_party/zynamics/binexport/ida/end_idasdk.h" // NOLINT - #include "third_party/zynamics/binexport/ida/ui.h" #include "third_party/zynamics/binexport/types.h" diff --git a/ida/ui.h b/ida/ui.h index ae9e1389..fab99cb6 100644 --- a/ida/ui.h +++ b/ida/ui.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -15,9 +15,14 @@ #ifndef THIRD_PARTY_ZYNAMICS_BINEXPORT_IDA_UI_H_ #define THIRD_PARTY_ZYNAMICS_BINEXPORT_IDA_UI_H_ +#include "third_party/zynamics/binexport/ida/begin_idasdk.inc" // NOLINT +#include // NOLINT +#include // NOLINT +#include "third_party/zynamics/binexport/ida/end_idasdk.inc" // NOLINT + #include "third_party/absl/strings/string_view.h" -// Small RAII class that displays an wait message for long-running actions. +// Small RAII class that displays a wait message for long-running actions. class WaitBox { public: enum Cancellable { kNoCancel, kCancellable }; @@ -34,4 +39,41 @@ class WaitBox { bool cancellable_; }; +// Base class using CRTP that makes working with UI actions easier. +// Example usage: +// class MyAction : public ActionHandler { +// int idaapi activate(action_activation_ctx*) override { +// msg("Hello from MyAction!\n"); +// return false; // Do not refresh +// } +// }; +// Then in plugin init: +// register_action(MyAction::MakeActionDesc("plugin:myaction", "Say Hello", +// /*shortcut=*/"", /*tooltip=*/"", +// /*icon=*/-1): +// attach_action_to_menu("File/QuickStart", "plugin:myaction", SETMENU_APP); +// +template +class ActionHandler : public action_handler_t { + public: + // Creates a new action description for this action handler class. + static action_desc_t MakeActionDesc(const char* name, const char* label, + const char* shortcut, const char* tooltip, + int icon) { + return ACTION_DESC_LITERAL(name, label, T::GetInstance(), shortcut, tooltip, + icon); + } + + private: + static T* GetInstance() { + static auto* instance = new T(); + return instance; + } + + action_state_t idaapi update(action_update_ctx_t* context) override { + // Return a sensible default + return AST_ENABLE_FOR_IDB; + } +}; + #endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_IDA_UI_H_ diff --git a/initialize_constraints_postgresql_sql.h b/initialize_constraints_postgresql_sql.h index 2724a070..ef23aa1a 100644 --- a/initialize_constraints_postgresql_sql.h +++ b/initialize_constraints_postgresql_sql.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/initialize_indices_postgresql_sql.h b/initialize_indices_postgresql_sql.h index 6d2ab70b..30b3e626 100644 --- a/initialize_indices_postgresql_sql.h +++ b/initialize_indices_postgresql_sql.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/initialize_tables_postgresql_sql.h b/initialize_tables_postgresql_sql.h index 97d58881..92f4708e 100644 --- a/initialize_tables_postgresql_sql.h +++ b/initialize_tables_postgresql_sql.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/instruction.cc b/instruction.cc index fe19da31..cf5c61f5 100644 --- a/instruction.cc +++ b/instruction.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -42,7 +42,8 @@ typedef std::vector> Tree; // checked for their sign. void RenderExpression(std::ostream* stream, const TreeNode& node, int substitution_id, const string& substitution) { - const auto& expression = *CHECK_NOTNULL(node.expression); + CHECK(node.expression != nullptr); + const auto& expression = *node.expression; if (expression.GetId() == substitution_id) { *stream << substitution; return; @@ -450,7 +451,7 @@ void Instruction::SetExported(bool exported) { } } -void Instruction::SetFlag(unsigned char flag, bool value) { +void Instruction::SetFlag(uint8 flag, bool value) { if (value) { (*flags_)[address_] |= flag; } else { @@ -458,7 +459,7 @@ void Instruction::SetFlag(unsigned char flag, bool value) { } } -bool Instruction::HasFlag(unsigned char flag) const { +bool Instruction::HasFlag(uint8 flag) const { return ((*flags_)[address_] & flag) != 0; } diff --git a/instruction.h b/instruction.h index 14575d48..1d1ca53f 100644 --- a/instruction.h +++ b/instruction.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -113,8 +113,8 @@ class Instruction { bool IsExported() const; static bool IsExported(Address address); void SetExported(bool exported); - void SetFlag(unsigned char flag, bool value); - bool HasFlag(unsigned char flag) const; + void SetFlag(uint8 flag, bool value); + bool HasFlag(uint8 flag) const; private: const string* mnemonic_; // 4|8 + overhead in stringcache diff --git a/library_manager.cc b/library_manager.cc index 6caa7b03..8b2b1684 100644 --- a/library_manager.cc +++ b/library_manager.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/library_manager.h b/library_manager.h index 77c8e057..83a8cc8b 100644 --- a/library_manager.h +++ b/library_manager.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/maintenance_postgresql_sql.h b/maintenance_postgresql_sql.h index ab8cc76b..13d1d73a 100644 --- a/maintenance_postgresql_sql.h +++ b/maintenance_postgresql_sql.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/nested_iterator.h b/nested_iterator.h index de4474f3..89b3c1ca 100644 --- a/nested_iterator.h +++ b/nested_iterator.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/operand.cc b/operand.cc index e19ca49d..dbd6cfdd 100644 --- a/operand.cc +++ b/operand.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/operand.h b/operand.h index 42d6e7ff..5d2f9c21 100644 --- a/operand.h +++ b/operand.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/postgresql.cc b/postgresql.cc index c0810653..2c2d4a04 100644 --- a/postgresql.cc +++ b/postgresql.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/postgresql.h b/postgresql.h index 2e6bfd62..a41bc119 100644 --- a/postgresql.h +++ b/postgresql.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/query_builder.cc b/query_builder.cc index a19252c7..be14f6b9 100644 --- a/query_builder.cc +++ b/query_builder.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -43,11 +43,10 @@ QueryBuilder& operator<<(QueryBuilder& builder, const Terminator&) { // Buffer overrun, create new query. builder.database_->Execute( builder.current_query_.str() - .substr(0, - static_cast(builder.last_flush_position_) - 1) + .substr(0, static_cast(builder.last_flush_position_) - 1) .c_str()); string query = builder.current_query_.str().substr( - static_cast(builder.last_flush_position_)); + static_cast(builder.last_flush_position_)); builder.current_query_.str(""); builder.current_query_ << builder.base_query_ << query; builder.last_flush_position_ = builder.current_query_.tellp(); @@ -66,4 +65,3 @@ QueryBuilder& operator<<(QueryBuilder& builder, int64 value) { builder.current_query_ << value; return builder; } - diff --git a/query_builder.h b/query_builder.h index 8b87a4d3..a59a56d1 100644 --- a/query_builder.h +++ b/query_builder.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/range.h b/range.h index eb1c6b61..91daedc9 100644 --- a/range.h +++ b/range.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/reader/call_graph.cc b/reader/call_graph.cc new file mode 100644 index 00000000..259971c6 --- /dev/null +++ b/reader/call_graph.cc @@ -0,0 +1,151 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "third_party/zynamics/binexport/reader/call_graph.h" + +#include +#include +#include + +#include "base/logging.h" +#include "third_party/absl/memory/memory.h" +#include "third_party/absl/strings/str_cat.h" +#include "third_party/zynamics/binexport/reader/graph_utility.h" + +namespace security { +namespace binexport { + +CallGraph::Vertex CallGraph::GetVertex(Address address) const { + return security::binexport::GetVertex(*this, address); +} + +void AssignVertexProperties( + const std::vector& vertex_properties, + CallGraph::Graph* graph) { + CallGraph::VertexIterator vertices_it; + CallGraph::VertexIterator vertices_end; + CallGraph::Graph& graph_ref = *graph; + int j = 0; + for (boost::tie(vertices_it, vertices_end) = boost::vertices(*graph); + vertices_it != vertices_end; ++vertices_it, ++j) { + graph_ref[*vertices_it] = vertex_properties[j]; + } +} + +void VertexPropertyFromVertexProto(const BinExport2::CallGraph::Vertex& vertex, + const BinExport2& proto, + CallGraph::VertexProperty* vertex_property) { + vertex_property->address = vertex.address(); + vertex_property->flags = 0; + if (vertex.has_demangled_name()) { + vertex_property->demangled_name = vertex.demangled_name(); + vertex_property->flags |= CallGraph::kVertexName; + vertex_property->flags |= CallGraph::kVertexDemangledName; + } + if (vertex.has_mangled_name()) { + vertex_property->name = vertex.mangled_name(); + vertex_property->flags |= CallGraph::kVertexName; + } + if (!(vertex_property->flags & CallGraph::kVertexName)) { + vertex_property->name = absl::StrCat("sub_", absl::Hex(vertex.address())); + } + if (vertex.has_module_index()) { + vertex_property->module_name = proto.module(vertex.module_index()).name(); + } + switch (vertex.type()) { + case BinExport2::CallGraph::Vertex::NORMAL: + break; + case BinExport2::CallGraph::Vertex::LIBRARY: + vertex_property->flags |= CallGraph::kVertexLibrary; + if (vertex.has_library_index()) { + vertex_property->library_name = + proto.library(vertex.library_index()).name(); + } + break; + case BinExport2::CallGraph::Vertex::THUNK: + vertex_property->flags |= CallGraph::kVertexThunk; + break; + case BinExport2::CallGraph::Vertex::IMPORTED: + vertex_property->flags |= CallGraph::kVertexImported; + break; + case BinExport2::CallGraph::Vertex::INVALID: + vertex_property->flags |= CallGraph::kVertexInvalid; + break; + } +} + +bool CallGraph::IsValidEntryPoint(Address address) const { + return IsValidEntryPoint(GetVertex(address)); +} + +bool CallGraph::IsValidEntryPoint(Vertex vertex) const { + constexpr uint32 is_valid_function_mask = + kVertexLibrary | kVertexThunk | kVertexImported | kVertexInvalid; + if (vertex == VertexTypeTraits::kInvalidVertex) { + return false; + } + const uint32 function_flags = graph()[vertex].flags; + return (function_flags & is_valid_function_mask) == 0; +} + +std::unique_ptr CallGraph::FromBinExport2Proto( + const BinExport2& proto) { + const BinExport2::CallGraph& call_graph_proto(proto.call_graph()); + std::vector vertex_properties; + vertex_properties.reserve(call_graph_proto.vertex_size()); + std::vector
vertex_addresses; + vertex_addresses.reserve(call_graph_proto.vertex_size()); + + for (const auto& vertex : call_graph_proto.vertex()) { + VertexProperty vertex_property; + VertexPropertyFromVertexProto(vertex, proto, &vertex_property); + vertex_properties.push_back(vertex_property); + vertex_addresses.push_back(vertex_property.address); + } + QCHECK(std::is_sorted(vertex_addresses.begin(), vertex_addresses.end())) + << "CallGraph nodes not sorted by address"; + + // Find corresponding edge index for source and target address. + std::vector> edges; + edges.reserve(call_graph_proto.edge_size()); + for (const auto& edge : call_graph_proto.edge()) { + const Address source_address = + call_graph_proto.vertex(edge.source_vertex_index()).address(); + const Address target_address = + call_graph_proto.vertex(edge.target_vertex_index()).address(); + const auto source = std::lower_bound( + vertex_addresses.begin(), vertex_addresses.end(), source_address); + const auto target = std::lower_bound( + vertex_addresses.begin(), vertex_addresses.end(), target_address); + if (source != vertex_addresses.end() && target != vertex_addresses.end()) { + edges.emplace_back(source - vertex_addresses.begin(), + target - vertex_addresses.begin()); + } + } + + auto call_graph = absl::make_unique(); + call_graph->graph_ = + Graph(boost::edges_are_unsorted_multi_pass, edges.begin(), edges.end(), + call_graph_proto.vertex_size()); + + AssignVertexProperties(vertex_properties, &call_graph->graph_); + return call_graph; +} + +Address CallGraph::GetAddress(Vertex vertex) const { + return graph_[vertex].address; +} + +} // namespace binexport +} // namespace security diff --git a/reader/call_graph.h b/reader/call_graph.h new file mode 100644 index 00000000..1b5aea4d --- /dev/null +++ b/reader/call_graph.h @@ -0,0 +1,113 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// A class to convert and store a BinExport::Callgraph protocol buffer into a +// Boost compressed sparse row graph. + +#ifndef THIRD_PARTY_ZYNAMICS_BINEXPORT_READER_CALL_GRAPH_H_ +#define THIRD_PARTY_ZYNAMICS_BINEXPORT_READER_CALL_GRAPH_H_ + +#include +#include + +#include // NOLINT + +#include "base/integral_types.h" +#include "base/macros.h" +#include "third_party/zynamics/binexport/binexport2.pb.h" +#include "third_party/zynamics/binexport/types.h" + +namespace security { +namespace binexport { + +class CallGraph { + public: + CallGraph() = default; + + CallGraph(const CallGraph&) = delete; + CallGraph& operator=(const CallGraph&) = delete; + + struct VertexProperty { + Address address; // Function address. + string name; // Function name. + string demangled_name; // Demangled function name. + uint32 flags; // Function flags. + string library_name; // Library name. + string module_name; // Module name. + + VertexProperty(Address address, const string& name, + const string& demangled_name, uint32 flags, + const string& library_name, const string& module_name) + : address(address), + name(name), + demangled_name(demangled_name), + flags(flags), + library_name(library_name), + module_name(module_name) {} + VertexProperty() : VertexProperty(0, "", "", 0, "", "") {} + }; + + enum { // vertex flags + kVertexLibrary = 1 << 0, // Library function. + kVertexThunk = 1 << 1, // Thunk function, e.g trampoline, + kVertexImported = 1 << 2, // Imported functions, e.g without code. + kVertexInvalid = 1 << 3, // Invalid function. + kVertexName = 1 << 4, // Has a non auto generated name. + kVertexDemangledName = 1 << 5, // Has a C++ demangled name. + }; + + using Graph = boost::compressed_sparse_row_graph< + boost::bidirectionalS, // Iterate in and out edges. + VertexProperty, // The information per vertex. + boost::no_property, // The information per edge. + boost::no_property, // Use no graph properties. + uint32, // Index type for vertices. + uint32>; // Index type for edges. + + using Vertex = boost::graph_traits::vertex_descriptor; + using VertexIterator = boost::graph_traits::vertex_iterator; + using Edge = boost::graph_traits::edge_descriptor; + using EdgeIterator = boost::graph_traits::edge_iterator; + using OutEdgeIterator = boost::graph_traits::out_edge_iterator; + using InEdgeIterator = boost::graph_traits::in_edge_iterator; + using AdjacencyIterator = boost::graph_traits::adjacency_iterator; + + // Factory method to read and initialize a call graph from a BinExport2 + // protocol buffer. + static std::unique_ptr FromBinExport2Proto( + const BinExport2& proto); + + const Graph& graph() const { return graph_; } + + // Get the address of a vertex. + Address GetAddress(Vertex vertex) const; + + // Returns true if the input corresponds to a valid non-library, + // non-thunk, non-imported function. The overload taking an Address + // CHECK-fails if the address does not correspond to a vertex in the + // callgraph. + bool IsValidEntryPoint(Address address) const; + bool IsValidEntryPoint(Vertex vertex) const; + + // Get a vertex by its address. + Vertex GetVertex(Address address) const; + + private: + Graph graph_; +}; + +} // namespace binexport +} // namespace security + +#endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_READER_CALL_GRAPH_H_ diff --git a/reader/call_graph_test.cc b/reader/call_graph_test.cc new file mode 100644 index 00000000..11b86279 --- /dev/null +++ b/reader/call_graph_test.cc @@ -0,0 +1,74 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Tests the functionality of the CallGraph class. + +#include "third_party/zynamics/binexport/reader/call_graph.h" + +#include "base/logging.h" +#include +#include +#include "third_party/absl/strings/str_cat.h" +#include "third_party/zynamics/binexport/reader/graph_utility.h" +#include "third_party/zynamics/binexport/reader/reader_test_util.h" + +namespace security { +namespace binexport { +namespace { + +using ::testing::Eq; + +static constexpr char kBinExport2Item[] = + "0000500ed9f688a309ee2176462eb978efa9a2fb80fcceb5d8fd08168ea50dfd." + "BinExport"; + +class CallGraphTest : public testing::Test { + protected: + void SetUp() override { + QCHECK_OK(GetBinExportProtoForTesting(kBinExport2Item, &proto_)); + call_graph_ = CallGraph::FromBinExport2Proto(proto_); + } + + std::unique_ptr call_graph_; + BinExport2 proto_; +}; + +TEST_F(CallGraphTest, ReadValidData) { + EXPECT_THAT(boost::num_vertices(call_graph_->graph()), + Eq(proto_.call_graph().vertex_size())); + EXPECT_THAT(boost::num_edges(call_graph_->graph()), + Eq(proto_.call_graph().edge_size())); +} + +TEST_F(CallGraphTest, ValidateVertex) { + int counter = 0; + for (const auto& vertex : proto_.call_graph().vertex()) { + if (IsValidVertex(call_graph_->GetVertex(vertex.address()))) { + ++counter; + } + } + EXPECT_THAT(counter, Eq(proto_.call_graph().vertex_size())); +} + +TEST_F(CallGraphTest, GetVertexGetAddress) { + for (const auto& vertex : proto_.call_graph().vertex()) { + const auto address = vertex.address(); + EXPECT_THAT(call_graph_->GetAddress(call_graph_->GetVertex(address)), + Eq(address)); + } +} + +} // namespace +} // namespace binexport +} // namespace security diff --git a/reader/flow_graph.cc b/reader/flow_graph.cc new file mode 100644 index 00000000..a15456a8 --- /dev/null +++ b/reader/flow_graph.cc @@ -0,0 +1,241 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "third_party/zynamics/binexport/reader/flow_graph.h" + +#include +#include +#include + +#include // NOLINT + +#include "base/logging.h" +#include "third_party/absl/memory/memory.h" +#include "third_party/zynamics/binexport/reader/graph_utility.h" +#include "third_party/zynamics/binexport/types.h" + +namespace security { +namespace binexport { +namespace { + +absl::optional GetSupportedArchitecture(const BinExport2& proto) { + const string& architecture = proto.meta_information().architecture_name(); + if (architecture == "arm") { + return Architecture::kArm; + } + if (architecture == "aarch64") { + return Architecture::kAArch64; + } + if (architecture == "dex") { + return Architecture::kDex; + } + if (architecture == "msil") { + return Architecture::kMsil; + } + if (architecture == "x86-32") { + return Architecture::kX86Arch32; + } + if (architecture == "x86-64") { + return Architecture::kX86Arch64; + } + return absl::nullopt; +} + +uint32 GetEdgeTypeFromProto(BinExport2::FlowGraph::Edge::Type type) { + switch (type) { + case BinExport2::FlowGraph::Edge::CONDITION_TRUE: + return FlowGraph::kEdgeTrue; + case BinExport2::FlowGraph::Edge::CONDITION_FALSE: + return FlowGraph::kEdgeFalse; + case BinExport2::FlowGraph::Edge::UNCONDITIONAL: + return FlowGraph::kEdgeUnconditional; + case BinExport2::FlowGraph::Edge::SWITCH: + return FlowGraph::kEdgeSwitch; + default: + LOG(QFATAL) << "Invalid edge type: " << type; + } +} + +void EdgesFromEdgeProto( + const BinExport2& proto, const BinExport2::FlowGraph& flow_graph_proto, + const std::vector
& addresses, + const std::vector& instruction_addresses, + std::vector>* edges, + std::vector* edge_properties) { + for (const auto& edge : flow_graph_proto.edge()) { + const Address source_address = + instruction_addresses[proto.basic_block(edge.source_basic_block_index()) + .instruction_index(0) + .begin_index()]; + const Address target_address = + instruction_addresses[proto.basic_block(edge.target_basic_block_index()) + .instruction_index(0) + .begin_index()]; + const auto source = + std::lower_bound(addresses.begin(), addresses.end(), source_address); + const auto target = + std::lower_bound(addresses.begin(), addresses.end(), target_address); + if (source != addresses.end() && target != addresses.end()) { + edges->emplace_back(source - addresses.begin(), + target - addresses.begin()); + FlowGraph::EdgeProperty edge_property; + edge_property.flags |= GetEdgeTypeFromProto(edge.type()); + if (edge.is_back_edge()) { + edge_property.flags |= FlowGraph::kEdgeLoop; + } + edge_properties->push_back(edge_property); + } + } +} + +void AssignVertexProperties( + const std::vector& vertex_properties, + FlowGraph::Graph* graph) { + FlowGraph::VertexIterator vertices_it; + FlowGraph::VertexIterator vertices_end; + FlowGraph::Graph& graph_ref = *graph; + int j = 0; + for (boost::tie(vertices_it, vertices_end) = boost::vertices(*graph); + vertices_it != vertices_end; ++vertices_it, ++j) { + graph_ref[*vertices_it] = vertex_properties[j]; + } +} + +void AssignEdgeProperties( + const std::vector& edge_properties, + FlowGraph::Graph* graph) { + FlowGraph::EdgeIterator edges_it; + FlowGraph::EdgeIterator edges_end; + FlowGraph::Graph& graph_ref = *graph; + int j = 0; + for (boost::tie(edges_it, edges_end) = boost::edges(*graph); + edges_it != edges_end; ++edges_it, ++j) { + graph_ref[*edges_it] = edge_properties[j]; + } +} + +} // namespace + +FlowGraph::FlowGraph() : entry_point_address_(0) {} + +FlowGraph::Vertex FlowGraph::GetVertex(Address address) const { + return security::binexport::GetVertex(*this, address); +} + +std::unique_ptr FlowGraph::FromBinExport2Proto( + const BinExport2& proto, const BinExport2::FlowGraph& flow_graph_proto, + const std::vector
& instruction_addresses) { + auto flow_graph = absl::make_unique(); + int entry_instruction_index = + proto.basic_block(flow_graph_proto.entry_basic_block_index()) + .instruction_index(0) + .begin_index(); + flow_graph->entry_point_address_ = + instruction_addresses[entry_instruction_index]; + + std::vector vertices; + vertices.reserve(flow_graph_proto.basic_block_index_size()); + std::vector
addresses; + addresses.reserve(flow_graph_proto.basic_block_index_size()); + + for (int basic_block_index : flow_graph_proto.basic_block_index()) { + const BinExport2::BasicBlock& basic_block_proto( + proto.basic_block(basic_block_index)); + VertexProperty vertex_property; + vertex_property.instruction_start = flow_graph->instructions_.size(); + QCHECK(basic_block_proto.instruction_index_size()); + for (const auto& instruction_interval : + basic_block_proto.instruction_index()) { + const int instruction_end_index(instruction_interval.has_end_index() + ? instruction_interval.end_index() + : instruction_interval.begin_index() + + 1); + for (int instruction_index = instruction_interval.begin_index(); + instruction_index < instruction_end_index; ++instruction_index) { + const auto& instruction_proto(proto.instruction(instruction_index)); + Address instruction_address = instruction_addresses[instruction_index]; + const string& mnemonic( + proto.mnemonic(instruction_proto.mnemonic_index()).name()); + flow_graph->instructions_.emplace_back(instruction_address, mnemonic); + + auto& instruction = flow_graph->instructions_.back(); + instruction.set_operands({instruction_proto.operand_index().begin(), + instruction_proto.operand_index().end()}); + instruction.set_call_targets({instruction_proto.call_target().begin(), + instruction_proto.call_target().end()}); + } + } + addresses.push_back( + flow_graph->instructions_[vertex_property.instruction_start].address()); + vertices.push_back(vertex_property); + } + + CHECK(std::is_sorted(addresses.begin(), addresses.end())) + << "Flow graph nodes not sorted by address."; + + std::vector> edges; + edges.reserve(flow_graph_proto.edge_size()); + std::vector edge_properties; + edge_properties.reserve(flow_graph_proto.edge_size()); + EdgesFromEdgeProto(proto, flow_graph_proto, addresses, instruction_addresses, + &edges, &edge_properties); + flow_graph->graph_ = Graph(boost::edges_are_unsorted_multi_pass, + edges.begin(), edges.end(), addresses.size()); + flow_graph->architecture_ = GetSupportedArchitecture(proto); + AssignVertexProperties(vertices, &flow_graph->graph_); + AssignEdgeProperties(edge_properties, &flow_graph->graph_); + return flow_graph; +} + +size_t FlowGraph::GetVertexCount() const { return num_vertices(graph_); } +size_t FlowGraph::GetEdgeCount() const { return num_edges(graph_); } +size_t FlowGraph::GetInstructionCount() const { return instructions_.size(); } + +Address FlowGraph::GetAddress(Vertex vertex) const { + return GetInstructions(vertex).first->address(); +} + +std::pair +FlowGraph::GetInstructions(Vertex vertex) const { + return {instructions_.begin() + graph_[vertex].instruction_start, + GetVertexCount() != vertex + 1 + ? instructions_.begin() + graph_[vertex + 1].instruction_start + : instructions_.end()}; +} + +bool FlowGraph::IsExitNode(Vertex vertex) const { + if (boost::out_degree(vertex, graph_)) { + // Basic block has outgoing flow edges - it cannot possibly be an exit node. + return false; + } + + Instructions::const_iterator instructions_it, instructions_end; + boost::tie(instructions_it, instructions_end) = GetInstructions(vertex); + if (instructions_it == instructions_end) { + // Basic block doesn't have any instructions. + return true; + } + + // TODO(b/114701180) - if last instruction is call to a known function, this + // is an exit node (optimized tail call pattern). + + // If last instruction is a jump to unknown location, this is probably + // unrecognized switch pattern (or similar) - return false. Otherwise true. + const Instruction& last_instruction = *(--instructions_end); + return !IsJumpInstruction(last_instruction, architecture_); +} + +} // namespace binexport +} // namespace security diff --git a/reader/flow_graph.h b/reader/flow_graph.h new file mode 100644 index 00000000..2df448f6 --- /dev/null +++ b/reader/flow_graph.h @@ -0,0 +1,165 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// A class to convert and store a BinExport::Flowgraph protocol buffer in a +// Boost graph. + +#ifndef THIRD_PARTY_ZYNAMICS_BINEXPORT_READER_FLOW_GRAPH_H_ +#define THIRD_PARTY_ZYNAMICS_BINEXPORT_READER_FLOW_GRAPH_H_ + +#include +#include +#include +#include + +#include //NOLINT +#include // NOLINT + +#include "base/integral_types.h" +#include "base/macros.h" +#include "third_party/absl/types/optional.h" +#include "third_party/zynamics/binexport/binexport2.pb.h" +#include "third_party/zynamics/binexport/reader/instruction.h" +#include "third_party/zynamics/binexport/types.h" +#include "third_party/zynamics/binexport/architectures.h" + +namespace security { +namespace binexport { + +class FlowGraph { + public: + FlowGraph(); + + FlowGraph(const FlowGraph&) = delete; + FlowGraph& operator=(const FlowGraph&) = delete; + + // TODO(cblichmann): Future extension point: This should be a template + // argument. BinDiff has VertexInfo with different fields. + struct VertexProperty { + VertexProperty() = default; + + // Start index of instructions in instruction vector. + uint32 instruction_start = std::numeric_limits::max(); + }; + + enum EdgeType { + kEdgeUnconditional = 1 << 0, // unconditional edge. + kEdgeTrue = 1 << 1, // conditional jump true case. + kEdgeFalse = 1 << 2, // conditional jump false case. + kEdgeSwitch = 1 << 3, // switch jump edge. + kEdgeLoop = 1 << 4, // loop back edge (as in Lengauer-Tarjan). + }; + + struct EdgeProperty { + EdgeProperty() = default; + + uint32 flags = 0; + }; + + using Graph = boost::compressed_sparse_row_graph< + boost::bidirectionalS, // Iterate in and out edges. + VertexProperty, // The information per vertex. + EdgeProperty, // The information per edge. + boost::no_property, // Use no graph properties. + uint32, // Index type for vertices. + uint32>; // Index type for edges. + + using Vertex = boost::graph_traits::vertex_descriptor; + using VertexIterator = boost::graph_traits::vertex_iterator; + using Edge = boost::graph_traits::edge_descriptor; + using EdgeIterator = boost::graph_traits::edge_iterator; + using OutEdgeIterator = boost::graph_traits::out_edge_iterator; + using InEdgeIterator = boost::graph_traits::in_edge_iterator; + using AdjacencyIterator = boost::graph_traits::adjacency_iterator; + + using UndirectedGraph = + boost::adjacency_list; + + // Factory method to read and initialize a flow graph (BinExport2). + static std::unique_ptr FromBinExport2Proto( + const BinExport2& proto, const BinExport2::FlowGraph& flow_graph_proto, + const std::vector& instruction_addresses); + + // Returns the graph of this flow graph. + const Graph& graph() const { return graph_; } + + // Returns the entry point address of the flow graph. + const Address& entry_point_address() const { return entry_point_address_; } + + // Returns the start address of the given vertex. + Address GetAddress(Vertex vertex) const; + + // Returns the instructions for the given vertex. + std::pair + GetInstructions(Vertex vertex) const; + + // Computes the call targets for the given vertex. + template + void GetCallTargets(Vertex vertex, OutputIterator call_targets) const; + + // Returns true if vertex is an exit node from a function. This usually + // happens when block doesn't have any outgoing flow edges, but there are + // exceptions - like when block ends with unrecognised jump to register. + bool IsExitNode(Vertex vertex) const; + + // Returns the number of vertices in this flow graph. + size_t GetVertexCount() const; + + // Returns the number of edges of this flow graph. + size_t GetEdgeCount() const; + + // Returns the number of instruction in this flow graph. + size_t GetInstructionCount() const; + + // Returns the instructions in this flow graph. + const Instructions& instructions() const { return instructions_; } + + // Returns the vertex with the given address. + Vertex GetVertex(Address address) const; + + private: + // Boost graph representing the structure of the flow graph. + Graph graph_; + + // Entry point address for this flow graph. Each flow graph only has a single + // entry point. + Address entry_point_address_; + + // Instructions of this flow graph. Instructions are stored for the whole flow + // graph rather than keeping a list for each graph vertex. To access + // instructions for a single vertex use the FlowGraph::GetInstructions(Vertex + // vertex) function. + Instructions instructions_; + + // Architecture of instructions in this flow graph. + absl::optional architecture_; +}; + +template +void FlowGraph::GetCallTargets(Vertex vertex, + OutputIterator call_targets) const { + Instructions::const_iterator it; + Instructions::const_iterator end; + for (std::tie(it, end) = GetInstructions(vertex); it != end; ++it) { + for (const auto& target : it->call_targets()) { + *call_targets++ = target; + } + } +} + +} // namespace binexport +} // namespace security + +#endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_READER_FLOW_GRAPH_H_ diff --git a/reader/flow_graph_test.cc b/reader/flow_graph_test.cc new file mode 100644 index 00000000..e6fb2cbe --- /dev/null +++ b/reader/flow_graph_test.cc @@ -0,0 +1,160 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "third_party/zynamics/binexport/reader/flow_graph.h" + +#include +#include +#include "base/logging.h" +#include "third_party/absl/strings/str_cat.h" +#include "third_party/zynamics/binexport/binexport.h" +#include "third_party/zynamics/binexport/reader/graph_utility.h" +#include "third_party/zynamics/binexport/reader/instruction.h" +#include "third_party/zynamics/binexport/reader/reader_test_util.h" + +namespace security { +namespace binexport { +namespace { + +using ::testing::Eq; + +static constexpr char kBinExport2Item[] = + "0000500ed9f688a309ee2176462eb978efa9a2fb80fcceb5d8fd08168ea50dfd." + "BinExport"; + +class FlowGraphTest : public testing::Test { + protected: + void SetUp() override { + QCHECK_OK(GetBinExportProtoForTesting(kBinExport2Item, &proto_)); + flow_graph_ = FlowGraph::FromBinExport2Proto( + proto_, proto_.flow_graph(0), + binexport::GetAllInstructionAddresses(proto_)); + } + + std::unique_ptr flow_graph_; + BinExport2 proto_; +}; + +// Tests if the setup produced a valid flow graph representation. The test is +// checking if the FromProto function produced a valid output for the protocol +// buffer specified in the setup method. If the parsing and conversion has been +// successful the test is successful. +TEST_F(FlowGraphTest, ReadValidData) { + EXPECT_EQ(proto_.flow_graph(0).edge_size(), flow_graph_->GetEdgeCount()); + EXPECT_EQ(proto_.flow_graph(0).basic_block_index_size(), + flow_graph_->GetVertexCount()); + int proto_instruction_count = 0; + for (int basic_block_index : proto_.flow_graph(0).basic_block_index()) { + const auto& basic_block_proto(proto_.basic_block(basic_block_index)); + for (const auto& instruction_interval : + basic_block_proto.instruction_index()) { + const int instruction_end_index(instruction_interval.has_end_index() + ? instruction_interval.end_index() + : instruction_interval.begin_index() + + 1); + proto_instruction_count += + instruction_end_index - instruction_interval.begin_index(); + } + } + EXPECT_EQ(proto_instruction_count, flow_graph_->GetInstructionCount()); + + FlowGraph::Graph graph = flow_graph_->graph(); + EXPECT_EQ(proto_.flow_graph(0).basic_block_index_size(), + boost::num_vertices(graph)); + EXPECT_EQ(proto_.flow_graph(0).edge_size(), boost::num_edges(graph)); +} + +// Tests the GetInstruction method. If GetInstruction method provides access to +// the instructions from the specified protocol buffer, and the instructions +// match the instructions specified the test is successful. +TEST_F(FlowGraphTest, GetInstructions) { + // Reproduce test data with the following queries: + /* gqui print \ + basic_block[0], instruction[0], instruction[1], instruction[2], \ + instruction[3], instruction[4], mnemonic[0], mnemonic[9], mnemonic[49] \ + from \ + rawproto:security/zynamics/dejadis/testdata/0000500ed9f688a309ee2176462eb978efa9a2fb80fcceb5d8fd08168ea50dfd.BinExport2 + */ + FlowGraph::Vertex vertex = flow_graph_->GetVertex(0x322152); + int counter = 0; + for (Instructions::const_iterator it = + flow_graph_->GetInstructions(vertex).first; + it != flow_graph_->GetInstructions(vertex).second; ++it) { + switch (it->address()) { + case 0x322152: + EXPECT_EQ("pushad", it->mnemonic()); + break; + case 0x322152 + 1: + EXPECT_EQ("mov", it->mnemonic()); + break; + case 0x322152 + 1 + 5: + EXPECT_EQ("mov", it->mnemonic()); + break; + case 0x322152 + 1 + 5 + 5: + EXPECT_EQ("lea", it->mnemonic()); + break; + case 0x322152 + 1 + 5 + 5 + 4: + EXPECT_EQ("mov", it->mnemonic()); + break; + default: + // Should never happen. + EXPECT_TRUE(false); + } + ++counter; + } + EXPECT_EQ(5, counter); +} + +// Tests that the FromBinExport2Proto method correctly populates Instruction +// call targets. If the total number of call targets matches the expected +// number of call targets, the test is successful. +TEST_F(FlowGraphTest, GetCallTargets) { + const auto& flow_graph(FlowGraph::FromBinExport2Proto( + proto_, proto_.flow_graph(1), + binexport::GetAllInstructionAddresses(proto_))); + const auto& vertex = flow_graph->GetVertex(0x003221BE); + LOG(INFO) << vertex; + std::vector
call_targets; + flow_graph->GetCallTargets(vertex, std::back_inserter(call_targets)); + EXPECT_THAT(call_targets.size(), Eq(9)); +} + +// Tests that the FromBinExport2Proto method correctly populates Instruction +// call targets for a non-final vertex in a flow graph with multiple vertices +// with call targets. If the total number of call targets matches the expected +// number of call targets, the test is successful. +TEST_F(FlowGraphTest, GetCallTargetsMultiple) { + const auto& flow_graph(FlowGraph::FromBinExport2Proto( + proto_, proto_.flow_graph(2), + binexport::GetAllInstructionAddresses(proto_))); + const auto& vertex = flow_graph->GetVertex(0x00322310); + LOG(INFO) << vertex; + std::vector
call_targets; + flow_graph->GetCallTargets(vertex, std::back_inserter(call_targets)); + EXPECT_THAT(call_targets.size(), Eq(6)); +} + +// Tests if IsValidVertex returns false for a vertex not present in the graph. +TEST_F(FlowGraphTest, GetVertexInvalidAddress) { + EXPECT_FALSE(IsValidVertex(flow_graph_->GetVertex(0x003221BE))); +} + +// Tests if IsValidVertex returns true for a vertex present in the graph. +TEST_F(FlowGraphTest, GetVertexGoodAddress) { + EXPECT_TRUE(IsValidVertex(flow_graph_->GetVertex(0x322152))); +} + +} // namespace +} // namespace binexport +} // namespace security diff --git a/reader/graph_utility.h b/reader/graph_utility.h new file mode 100644 index 00000000..de597916 --- /dev/null +++ b/reader/graph_utility.h @@ -0,0 +1,93 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Utility class for graph related algorithms. + +#ifndef THIRD_PARTY_ZYNAMICS_BINEXPORT_READER_GRAPH_UTILITY_H_ +#define THIRD_PARTY_ZYNAMICS_BINEXPORT_READER_GRAPH_UTILITY_H_ + +#include // NOLINT + +#include "base/integral_types.h" +#include "third_party/zynamics/binexport/types.h" + +namespace security { +namespace binexport { + +struct EdgeDegrees { + uint32 source_in_degree; + uint32 source_out_degree; + uint32 target_in_degree; + uint32 target_out_degree; +}; + +template +struct VertexTypeTraits {}; + +// This is the specialization for the types FlowGraph::Vertex and +// CallGraph::Vertex. Both of them are just a typedef and therefore no real type +// in the type system. They are currently of type uint32. This is safe as when +// underlying code changes there is no specialization for this type in place. +template <> +struct VertexTypeTraits { + static const uint32 kInvalidVertex = kuint32max; +}; + +template +bool IsValidVertex(const Vertex& vertex) { + return vertex != VertexTypeTraits::kInvalidVertex; +} + +// Gets a Graph::Vertex by its address. Complexity of the search is O(log(n)). +// This code is heavily borrowed from std::lower_bound. But using it would +// require a comparator which keeps state. +template +typename Graph::Vertex GetVertex(const Graph& graph, Address address) { + typename Graph::Vertex first = 0; + typename Graph::Vertex last = boost::num_vertices(graph.graph()); + typename Graph::Vertex count = last; + while (count > 0) { + typename Graph::Vertex count2 = count / 2; + typename Graph::Vertex mid = first + count2; + if (graph.GetAddress(mid) < address) { + first = ++mid; + count -= count2 + 1; + } else { + count = count2; + } + } + + if ((first != last) && (graph.GetAddress(first) == address)) { + return first; + } + return VertexTypeTraits::kInvalidVertex; +} + +// Collects the in and out degree of the edges source and target vertex, and +// passes them as EdgeDegree struct to the caller. +template +EdgeDegrees GetEdgeDegrees(const typename Graph::Graph& graph, + const typename Graph::Edge& edge) { + typename Graph::Vertex source = boost::source(edge, graph); + typename Graph::Vertex target = boost::target(edge, graph); + EdgeDegrees edge_vector{ + boost::in_degree(source, graph), boost::out_degree(source, graph), + boost::in_degree(target, graph), boost::out_degree(target, graph)}; + return edge_vector; +} + +} // namespace binexport +} // namespace security + +#endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_READER_GRAPH_UTILITY_H_ diff --git a/reader/graph_utility_test.cc b/reader/graph_utility_test.cc new file mode 100644 index 00000000..acac9652 --- /dev/null +++ b/reader/graph_utility_test.cc @@ -0,0 +1,104 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "third_party/zynamics/binexport/reader/graph_utility.h" + +#include +#include + +#include // NOLINT + +#include +#include + +namespace security { +namespace binexport { + +class GraphUtilityTest : public testing::Test { + protected: + const std::vector
addresses_{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, + 10, 11, 12, 13, 14, 15, 16, 16, 18, 19}; + + typedef std::pair edge; + const std::vector edges_{ + {0, 1}, {1, 2}, {2, 3}, {3, 4}, {4, 5}, {5, 6}, {5, 7}, + {5, 8}, {5, 9}, {6, 10}, {7, 10}, {8, 10}, {9, 10}, {10, 11}, + {11, 12}, {12, 13}, {13, 14}, {14, 15}, {14, 15}, {15, 16}, {16, 17}, + {17, 18}, {18, 19}, {1, 18}, {17, 2}}; + + // [0]->[1]->[2]->[3]->[4]->[5]->[6]->[10]->[11]->[12]->[13]->[14]->[15] + // ^ ^ +-->[7]----^ +----^| + // | | +-->[8]----^ | + // | | +-->[9]----^ | + // | +---------------------------------------------+ | + // +-------------------------------------------+ | | + // [19]<-[18]<-[17]<-[16]<-+ + // [20] <- alone to test if the graph hashing works if a vertex is not + // connected by any edge. + + struct VertexInfo { + Address address; + }; + + public: + struct EdgeProperty { + uint32 flags; + }; + + typedef boost::compressed_sparse_row_graph Graph; + + Graph graph_; + + typedef boost::graph_traits::vertex_descriptor Vertex; + typedef boost::graph_traits::edge_descriptor Edge; + typedef boost::graph_traits::edge_iterator EdgeIterator; + typedef boost::graph_traits::out_edge_iterator OutEdgeIterator; + typedef boost::graph_traits::in_edge_iterator InEdgeIterator; + typedef boost::graph_traits::adjacency_iterator AdjacencyIterator; + + typedef boost::property_map::type + VertexIndexMap; + + typedef boost::adjacency_list UndirectedGraph; + + protected: + void SetUp() override { + graph_ = Graph(boost::edges_are_unsorted_multi_pass, edges_.begin(), + edges_.end(), addresses_.size()); + typedef boost::graph_traits::vertex_iterator VertexIterator; + VertexIterator vertices_it, vertices_end; + int j = 0; + for (boost::tie(vertices_it, vertices_end) = boost::vertices(graph_); + vertices_it != vertices_end; ++vertices_it, ++j) { + graph_[j].address = addresses_.at(j); + } + } +}; + +TEST_F(GraphUtilityTest, GetEdgeVector) { + const std::pair edge_pair( + boost::edge(Vertex(5), Vertex(6), graph_)); + const EdgeDegrees edge_vector = + GetEdgeDegrees(graph_, edge_pair.first); + EXPECT_EQ(edge_vector.source_in_degree, 1); + EXPECT_EQ(edge_vector.source_out_degree, 4); + EXPECT_EQ(edge_vector.target_in_degree, 1); + EXPECT_EQ(edge_vector.target_out_degree, 1); +} + +} // namespace binexport +} // namespace security diff --git a/reader/instruction.cc b/reader/instruction.cc new file mode 100644 index 00000000..0f79e96e --- /dev/null +++ b/reader/instruction.cc @@ -0,0 +1,46 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "third_party/zynamics/binexport/reader/instruction.h" + +namespace security { +namespace binexport { + +Instruction::Instruction(Address address, const string& mnemonic) + : address_(address), mnemonic_(mnemonic) {} + +void Instruction::set_operands(const std::vector& operand_indices) { + operand_indices_ = operand_indices; +} + +const Instruction* GetInstruction(const Instructions& instructions, + const Address instruction_address) { + for (const auto& instruction : instructions) { + if (instruction.address() == instruction_address) { + return &instruction; + } + } + return nullptr; +} + +bool IsJumpInstruction(const Instruction& instruction, + absl::optional architecture) { + // TODO(b/114701180): Implement this function, at least for ARM and AArch64. + // TODO(xmsm): false is a good default, but should we return it for + // unsupported architectures, or signal an error instead? + return false; +} + +} // namespace binexport +} // namespace security diff --git a/reader/instruction.h b/reader/instruction.h new file mode 100644 index 00000000..306378b2 --- /dev/null +++ b/reader/instruction.h @@ -0,0 +1,69 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// This class provides storage for instruction information. It is targeted +// towards the instructions stored in a BinExport::Flowgraph::Vertex, where +// operands are stored as a string. + +#ifndef THIRD_PARTY_ZYNAMICS_BINEXPORT_READER_INSTRUCTION_H_ +#define THIRD_PARTY_ZYNAMICS_BINEXPORT_READER_INSTRUCTION_H_ + +#include +#include + +#include "third_party/absl/types/optional.h" +#include "third_party/zynamics/binexport/types.h" +#include "third_party/zynamics/binexport/architectures.h" + +namespace security { +namespace binexport { + +class Instruction { + public: + Instruction(Address address, const string& mnemonic); + const string& mnemonic() const { return mnemonic_; } + Address address() const { return address_; } + const std::vector& operands() const { return operand_indices_; } + void set_operands(const std::vector& operand_indices); + + using CallTargets = std::vector
; + + const CallTargets& call_targets() const { return call_targets_; } + void set_call_targets(const CallTargets& targets) { call_targets_ = targets; } + + private: + Address address_; + string mnemonic_; + + // Operand indices from the BinExport2 protocol buffer they where loaded from. + std::vector operand_indices_; + + // If this is a call instruction, contains potential call targets. + CallTargets call_targets_; +}; + +typedef std::vector Instructions; + +const Instruction* GetInstruction(const Instructions& instructions, + const Address instruction_address); + +// Is this a jump instruction in a given architecture. Returns false for +// unsupported architectures. +bool IsJumpInstruction(const Instruction& instruction, + absl::optional); + +} // namespace binexport +} // namespace security + +#endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_READER_INSTRUCTION_H_ diff --git a/reader/instruction_test.cc b/reader/instruction_test.cc new file mode 100644 index 00000000..0ec91870 --- /dev/null +++ b/reader/instruction_test.cc @@ -0,0 +1,71 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Tests the functionality of the Instruction class. + +#include "third_party/zynamics/binexport/reader/instruction.h" + +#include +#include +#include "third_party/zynamics/binexport/binexport.h" + +namespace security { +namespace binexport { +namespace { + +TEST(InstructionTest, FindInstructionValid) { + const std::vector instructions{{10000000, "mnemonic0"}, + {10001000, "mnemonic1"}, + {10002000, "mnemonic2"}, + {10003000, "mnemonic3"}, + {10004000, "mnemonic4"}}; + EXPECT_EQ(&instructions[2], GetInstruction(instructions, 10002000)); +} + +TEST(InstructionTest, FindInstructionInvalid) { + const std::vector instructions{{10000000, "mnemonic0"}, + {10001000, "mnemonic1"}, + {10002000, "mnemonic2"}, + {10003000, "mnemonic3"}, + {10004000, "mnemonic4"}}; + EXPECT_EQ(nullptr, GetInstruction(instructions, 12345678)); +} + +TEST(InstructionTest, GetInstructionAddresses) { + const int kNumInstructions = 51; + std::vector instructions(kNumInstructions); + for (int i = 0; i * i < kNumInstructions; ++i) { + instructions[i * i].set_address(100 * i); + } + for (int i = 0; i < kNumInstructions; ++i) { + instructions[i].set_raw_bytes("\5\4"); + } + + BinExport2 binexport_proto; + std::copy( + instructions.begin(), instructions.end(), + RepeatedPtrFieldBackInserter(binexport_proto.mutable_instruction())); + + std::vector
addresses = + binexport::GetAllInstructionAddresses(binexport_proto); + for (int i = 0; i * i < 51; ++i) { + for (int j = i * i; j < (i + 1) * (i + 1) && j < kNumInstructions; ++j) { + EXPECT_EQ(100 * i + (j - i * i) * 2, addresses[j]); + } + } +} + +} // namespace +} // namespace binexport +} // namespace security diff --git a/reader/reader_test_util.cc b/reader/reader_test_util.cc new file mode 100644 index 00000000..954dedf7 --- /dev/null +++ b/reader/reader_test_util.cc @@ -0,0 +1,44 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "third_party/zynamics/binexport/reader/reader_test_util.h" + +#include + +#include // NOLINT +#include // NOLINT + +#include "third_party/zynamics/binexport/util/filesystem.h" +#include "third_party/zynamics/binexport/types.h" +#include "third_party/absl/strings/str_cat.h" +#include "util/task/status.h" + +namespace security { +namespace binexport { + +static string* g_test_srcdir{}; + +util::Status GetBinExportProtoForTesting(absl::string_view filename, + BinExport2* proto) { + string testfile = JoinPath(*g_test_srcdir, "testdata", filename); + std::ifstream stream(testfile.c_str(), std::ios::in | std::ios::binary); + if (!proto->ParseFromIstream(&stream)) { + return util::Status(util::error::FAILED_PRECONDITION, + absl::StrCat("Could not parse test file: ", testfile)); + } + return util::OkStatus(); +} + +} // namespace binexport +} // namespace security diff --git a/reader/reader_test_util.h b/reader/reader_test_util.h new file mode 100644 index 00000000..186f461e --- /dev/null +++ b/reader/reader_test_util.h @@ -0,0 +1,33 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef THIRD_PARTY_ZYNAMICS_BINEXPORT_READER_READER_TEST_UTIL_H_ +#define THIRD_PARTY_ZYNAMICS_BINEXPORT_READER_READER_TEST_UTIL_H_ + +#include "third_party/absl/strings/string_view.h" +#include "third_party/zynamics/binexport/binexport2.pb.h" +#include "util/task/status.h" + +namespace security { +namespace binexport { + +// Reads a BinExport2 proto from the testdata directory. The filename is +// relative to that directory. +util::Status GetBinExportProtoForTesting(absl::string_view filename, + BinExport2* proto); + +} // namespace binexport +} // namespace security + +#endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_READER_READER_TEST_UTIL_H_ diff --git a/reader/testdata/0000500ed9f688a309ee2176462eb978efa9a2fb80fcceb5d8fd08168ea50dfd.BinExport b/reader/testdata/0000500ed9f688a309ee2176462eb978efa9a2fb80fcceb5d8fd08168ea50dfd.BinExport new file mode 100644 index 00000000..a8b75307 Binary files /dev/null and b/reader/testdata/0000500ed9f688a309ee2176462eb978efa9a2fb80fcceb5d8fd08168ea50dfd.BinExport differ diff --git a/statistics_writer.cc b/statistics_writer.cc index c24b1b1f..8c705ee7 100644 --- a/statistics_writer.cc +++ b/statistics_writer.cc @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/statistics_writer.h b/statistics_writer.h index dabdda6a..2dbfab5e 100644 --- a/statistics_writer.h +++ b/statistics_writer.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stubs/base/integral_types.h b/stubs/base/integral_types.h index d7c0f062..efed50e2 100644 --- a/stubs/base/integral_types.h +++ b/stubs/base/integral_types.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,11 @@ #include +// Import macros +#define GG_LONGLONG GOOGLE_LONGLONG +#define GG_ULONGLONG GOOGLE_ULONGLONG +#define GG_LL_FORMAT GOOGLE_LL_FORMAT + // Map names from the Protocol Buffers stubs into the global namespace. using ::google::protobuf::int16; using ::google::protobuf::int32; diff --git a/stubs/base/logging.h b/stubs/base/logging.h index c8c883bf..c28c6a11 100644 --- a/stubs/base/logging.h +++ b/stubs/base/logging.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/stubs/base/macros.h b/stubs/base/macros.h new file mode 100644 index 00000000..00a7e6de --- /dev/null +++ b/stubs/base/macros.h @@ -0,0 +1,20 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef THIRD_PARTY_ZYNAMICS_BINEXPORT_BASE_MACROS_H_ +#define THIRD_PARTY_ZYNAMICS_BINEXPORT_BASE_MACROS_H_ + +#include "third_party/absl/base/macros.h" + +#endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_BASE_MACROS_H_ diff --git a/stubs/util/task/status.h b/stubs/util/task/status.h index dab5146c..5d3b177f 100644 --- a/stubs/util/task/status.h +++ b/stubs/util/task/status.h @@ -1,4 +1,4 @@ -// Copyright 2011-2017 Google Inc. All Rights Reserved. +// Copyright 2011-2018 Google LLC. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,17 +17,49 @@ #include -namespace google { -namespace protobuf { +namespace absl { + +// A struct that provides identical syntax to Abseil's enum class. +struct StatusCode { + StatusCode() = delete; + static constexpr auto kOk = ::google::protobuf::util::error::OK; + static constexpr auto kCancelled = ::google::protobuf::util::error::CANCELLED; + static constexpr auto kUnknown = ::google::protobuf::util::error::UNKNOWN; + static constexpr auto kInvalidArgument = + ::google::protobuf::util::error::INVALID_ARGUMENT; + static constexpr auto kDeadlineExceeded = + ::google::protobuf::util::error::DEADLINE_EXCEEDED; + static constexpr auto kNotFound = ::google::protobuf::util::error::NOT_FOUND; + static constexpr auto kAlreadyExists = + ::google::protobuf::util::error::ALREADY_EXISTS; + static constexpr auto kPermissionDenied = + ::google::protobuf::util::error::PERMISSION_DENIED; + static constexpr auto kResourceExhausted = + ::google::protobuf::util::error::RESOURCE_EXHAUSTED; + static constexpr auto kFailedPrecondition = + ::google::protobuf::util::error::FAILED_PRECONDITION; + static constexpr auto kAborted = ::google::protobuf::util::error::ABORTED; + static constexpr auto kOutOfRange = + ::google::protobuf::util::error::OUT_OF_RANGE; + static constexpr auto kUnimplemented = + ::google::protobuf::util::error::UNIMPLEMENTED; + static constexpr auto kInternal = ::google::protobuf::util::error::INTERNAL; + static constexpr auto kUnavailable = + ::google::protobuf::util::error::UNAVAILABLE; + static constexpr auto kDataLoss = ::google::protobuf::util::error::DATA_LOSS; + static constexpr auto kUnauthenticated = + ::google::protobuf::util::error::UNAUTHENTICATED; +}; + +} // namespace absl + namespace util { -inline Status OkStatus() { return Status(); } +// Map the namespace from the Protocol Buffers. +using namespace ::google::protobuf::util; // NOLINT(build/namespaces) -} // namespace util -} // namespace protobuf -} // namespace google +inline Status OkStatus() { return Status{}; } -// Map the namespace from the Protocol Buffers stubs to the global namespace. -namespace util = ::google::protobuf::util; // NOLINT(build/namespaces) +} // namespace util #endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_UTIL_TASK_STATUS_H_ diff --git a/stubs/util/task/status_macros.h b/stubs/util/task/status_macros.h new file mode 100644 index 00000000..e5d5e0a6 --- /dev/null +++ b/stubs/util/task/status_macros.h @@ -0,0 +1,49 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef THIRD_PARTY_ZYNAMICS_BINEXPORT_UTIL_TASK_STATUS_MACROS_H_ +#define THIRD_PARTY_ZYNAMICS_BINEXPORT_UTIL_TASK_STATUS_MACROS_H_ + +#include + +namespace util { + +// Map the namespace from the Protocol Buffers. +using namespace ::google::protobuf::util; // NOLINT(build/namespaces) + +} // namespace util + +// To be able to use the macros, Status needs to be visible (bug in +// Protobuf's status_macros.h). +namespace security { +namespace bindiff { +using ::util::Status; +} // namespace bindiff +namespace binexport { +using ::util::Status; +} // namespace binexport +} // namespace security + +// To be able to use the macros, Status needs to be visible (bug in +// status_macros.h). +namespace security { +namespace bindiff { +using ::google::protobuf::util::Status; +} // namespace bindiff +namespace binexport { +using ::google::protobuf::util::Status; +} // namespace binexport +} // namespace security + +#endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_UTIL_TASK_STATUS_MACROS_H_ diff --git a/stubs/util/task/statusor.h b/stubs/util/task/statusor.h new file mode 100644 index 00000000..84e37ec9 --- /dev/null +++ b/stubs/util/task/statusor.h @@ -0,0 +1,27 @@ +// Copyright 2011-2018 Google LLC. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef THIRD_PARTY_ZYNAMICS_BINEXPORT_UTIL_TASK_STATUSOR_H_ +#define THIRD_PARTY_ZYNAMICS_BINEXPORT_UTIL_TASK_STATUSOR_H_ + +#include + +namespace util { + +// Map the namespace from the Protocol Buffers. +using namespace ::google::protobuf::util; // NOLINT(build/namespaces) + +} // namespace util + +#endif // THIRD_PARTY_ZYNAMICS_BINEXPORT_UTIL_TASK_STATUSOR_H_ diff --git a/third_party/boost_parts/boost/algorithm/string.hpp b/third_party/boost_parts/boost/algorithm/string.hpp deleted file mode 100644 index 07715173..00000000 --- a/third_party/boost_parts/boost/algorithm/string.hpp +++ /dev/null @@ -1,31 +0,0 @@ -// Boost string_algo library string_algo.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2004. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_ALGO_HPP -#define BOOST_STRING_ALGO_HPP - -/*! \file - Cumulative include for string_algo library -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -#endif // BOOST_STRING_ALGO_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/case_conv.hpp b/third_party/boost_parts/boost/algorithm/string/case_conv.hpp deleted file mode 100644 index 683340b8..00000000 --- a/third_party/boost_parts/boost/algorithm/string/case_conv.hpp +++ /dev/null @@ -1,176 +0,0 @@ -// Boost string_algo library case_conv.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_CASE_CONV_HPP -#define BOOST_STRING_CASE_CONV_HPP - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include - -/*! \file - Defines sequence case-conversion algorithms. - Algorithms convert each element in the input sequence to the - desired case using provided locales. -*/ - -namespace boost { - namespace algorithm { - -// to_lower -----------------------------------------------// - - //! Convert to lower case - /*! - Each element of the input sequence is converted to lower - case. The result is a copy of the input converted to lower case. - It is returned as a sequence or copied to the output iterator. - - \param Output An output iterator to which the result will be copied - \param Input An input range - \param Loc A locale used for conversion - \return - An output iterator pointing just after the last inserted character or - a copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - - */ - template - inline OutputIteratorT - to_lower_copy( - OutputIteratorT Output, - const RangeT& Input, - const std::locale& Loc=std::locale()) - { - return ::boost::algorithm::detail::transform_range_copy( - Output, - ::boost::as_literal(Input), - ::boost::algorithm::detail::to_lowerF< - typename range_value::type >(Loc)); - } - - //! Convert to lower case - /*! - \overload - */ - template - inline SequenceT to_lower_copy( - const SequenceT& Input, - const std::locale& Loc=std::locale()) - { - return ::boost::algorithm::detail::transform_range_copy( - Input, - ::boost::algorithm::detail::to_lowerF< - typename range_value::type >(Loc)); - } - - //! Convert to lower case - /*! - Each element of the input sequence is converted to lower - case. The input sequence is modified in-place. - - \param Input A range - \param Loc a locale used for conversion - */ - template - inline void to_lower( - WritableRangeT& Input, - const std::locale& Loc=std::locale()) - { - ::boost::algorithm::detail::transform_range( - ::boost::as_literal(Input), - ::boost::algorithm::detail::to_lowerF< - typename range_value::type >(Loc)); - } - -// to_upper -----------------------------------------------// - - //! Convert to upper case - /*! - Each element of the input sequence is converted to upper - case. The result is a copy of the input converted to upper case. - It is returned as a sequence or copied to the output iterator - - \param Output An output iterator to which the result will be copied - \param Input An input range - \param Loc A locale used for conversion - \return - An output iterator pointing just after the last inserted character or - a copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template - inline OutputIteratorT - to_upper_copy( - OutputIteratorT Output, - const RangeT& Input, - const std::locale& Loc=std::locale()) - { - return ::boost::algorithm::detail::transform_range_copy( - Output, - ::boost::as_literal(Input), - ::boost::algorithm::detail::to_upperF< - typename range_value::type >(Loc)); - } - - //! Convert to upper case - /*! - \overload - */ - template - inline SequenceT to_upper_copy( - const SequenceT& Input, - const std::locale& Loc=std::locale()) - { - return ::boost::algorithm::detail::transform_range_copy( - Input, - ::boost::algorithm::detail::to_upperF< - typename range_value::type >(Loc)); - } - - //! Convert to upper case - /*! - Each element of the input sequence is converted to upper - case. The input sequence is modified in-place. - - \param Input An input range - \param Loc a locale used for conversion - */ - template - inline void to_upper( - WritableRangeT& Input, - const std::locale& Loc=std::locale()) - { - ::boost::algorithm::detail::transform_range( - ::boost::as_literal(Input), - ::boost::algorithm::detail::to_upperF< - typename range_value::type >(Loc)); - } - - } // namespace algorithm - - // pull names to the boost namespace - using algorithm::to_lower; - using algorithm::to_lower_copy; - using algorithm::to_upper; - using algorithm::to_upper_copy; - -} // namespace boost - -#endif // BOOST_STRING_CASE_CONV_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/classification.hpp b/third_party/boost_parts/boost/algorithm/string/classification.hpp deleted file mode 100644 index ca43602d..00000000 --- a/third_party/boost_parts/boost/algorithm/string/classification.hpp +++ /dev/null @@ -1,312 +0,0 @@ -// Boost string_algo library classification.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_CLASSIFICATION_HPP -#define BOOST_STRING_CLASSIFICATION_HPP - -#include -#include -#include -#include -#include -#include - - -/*! \file - Classification predicates are included in the library to give - some more convenience when using algorithms like \c trim() and \c all(). - They wrap functionality of STL classification functions ( e.g. \c std::isspace() ) - into generic functors. -*/ - -namespace boost { - namespace algorithm { - -// classification functor generator -------------------------------------// - - //! is_classified predicate - /*! - Construct the \c is_classified predicate. This predicate holds if the input is - of specified \c std::ctype category. - - \param Type A \c std::ctype category - \param Loc A locale used for classification - \return An instance of the \c is_classified predicate - */ - inline detail::is_classifiedF - is_classified(std::ctype_base::mask Type, const std::locale& Loc=std::locale()) - { - return detail::is_classifiedF(Type, Loc); - } - - //! is_space predicate - /*! - Construct the \c is_classified predicate for the \c ctype_base::space category. - - \param Loc A locale used for classification - \return An instance of the \c is_classified predicate - */ - inline detail::is_classifiedF - is_space(const std::locale& Loc=std::locale()) - { - return detail::is_classifiedF(std::ctype_base::space, Loc); - } - - //! is_alnum predicate - /*! - Construct the \c is_classified predicate for the \c ctype_base::alnum category. - - \param Loc A locale used for classification - \return An instance of the \c is_classified predicate - */ - inline detail::is_classifiedF - is_alnum(const std::locale& Loc=std::locale()) - { - return detail::is_classifiedF(std::ctype_base::alnum, Loc); - } - - //! is_alpha predicate - /*! - Construct the \c is_classified predicate for the \c ctype_base::alpha category. - - \param Loc A locale used for classification - \return An instance of the \c is_classified predicate - */ - inline detail::is_classifiedF - is_alpha(const std::locale& Loc=std::locale()) - { - return detail::is_classifiedF(std::ctype_base::alpha, Loc); - } - - //! is_cntrl predicate - /*! - Construct the \c is_classified predicate for the \c ctype_base::cntrl category. - - \param Loc A locale used for classification - \return An instance of the \c is_classified predicate - */ - inline detail::is_classifiedF - is_cntrl(const std::locale& Loc=std::locale()) - { - return detail::is_classifiedF(std::ctype_base::cntrl, Loc); - } - - //! is_digit predicate - /*! - Construct the \c is_classified predicate for the \c ctype_base::digit category. - - \param Loc A locale used for classification - \return An instance of the \c is_classified predicate - */ - inline detail::is_classifiedF - is_digit(const std::locale& Loc=std::locale()) - { - return detail::is_classifiedF(std::ctype_base::digit, Loc); - } - - //! is_graph predicate - /*! - Construct the \c is_classified predicate for the \c ctype_base::graph category. - - \param Loc A locale used for classification - \return An instance of the \c is_classified predicate - */ - inline detail::is_classifiedF - is_graph(const std::locale& Loc=std::locale()) - { - return detail::is_classifiedF(std::ctype_base::graph, Loc); - } - - //! is_lower predicate - /*! - Construct the \c is_classified predicate for the \c ctype_base::lower category. - - \param Loc A locale used for classification - \return An instance of \c is_classified predicate - */ - inline detail::is_classifiedF - is_lower(const std::locale& Loc=std::locale()) - { - return detail::is_classifiedF(std::ctype_base::lower, Loc); - } - - //! is_print predicate - /*! - Construct the \c is_classified predicate for the \c ctype_base::print category. - - \param Loc A locale used for classification - \return An instance of the \c is_classified predicate - */ - inline detail::is_classifiedF - is_print(const std::locale& Loc=std::locale()) - { - return detail::is_classifiedF(std::ctype_base::print, Loc); - } - - //! is_punct predicate - /*! - Construct the \c is_classified predicate for the \c ctype_base::punct category. - - \param Loc A locale used for classification - \return An instance of the \c is_classified predicate - */ - inline detail::is_classifiedF - is_punct(const std::locale& Loc=std::locale()) - { - return detail::is_classifiedF(std::ctype_base::punct, Loc); - } - - //! is_upper predicate - /*! - Construct the \c is_classified predicate for the \c ctype_base::upper category. - - \param Loc A locale used for classification - \return An instance of the \c is_classified predicate - */ - inline detail::is_classifiedF - is_upper(const std::locale& Loc=std::locale()) - { - return detail::is_classifiedF(std::ctype_base::upper, Loc); - } - - //! is_xdigit predicate - /*! - Construct the \c is_classified predicate for the \c ctype_base::xdigit category. - - \param Loc A locale used for classification - \return An instance of the \c is_classified predicate - */ - inline detail::is_classifiedF - is_xdigit(const std::locale& Loc=std::locale()) - { - return detail::is_classifiedF(std::ctype_base::xdigit, Loc); - } - - //! is_any_of predicate - /*! - Construct the \c is_any_of predicate. The predicate holds if the input - is included in the specified set of characters. - - \param Set A set of characters to be recognized - \return An instance of the \c is_any_of predicate - */ - template - inline detail::is_any_ofF< - BOOST_STRING_TYPENAME range_value::type> - is_any_of( const RangeT& Set ) - { - iterator_range::type> lit_set(boost::as_literal(Set)); - return detail::is_any_ofF::type>(lit_set); - } - - //! is_from_range predicate - /*! - Construct the \c is_from_range predicate. The predicate holds if the input - is included in the specified range. (i.e. From <= Ch <= To ) - - \param From The start of the range - \param To The end of the range - \return An instance of the \c is_from_range predicate - */ - template - inline detail::is_from_rangeF is_from_range(CharT From, CharT To) - { - return detail::is_from_rangeF(From,To); - } - - // predicate combinators ---------------------------------------------------// - - //! predicate 'and' composition predicate - /*! - Construct the \c class_and predicate. This predicate can be used - to logically combine two classification predicates. \c class_and holds, - if both predicates return true. - - \param Pred1 The first predicate - \param Pred2 The second predicate - \return An instance of the \c class_and predicate - */ - template - inline detail::pred_andF - operator&&( - const predicate_facade& Pred1, - const predicate_facade& Pred2 ) - { - // Doing the static_cast with the pointer instead of the reference - // is a workaround for some compilers which have problems with - // static_cast's of template references, i.e. CW8. /grafik/ - return detail::pred_andF( - *static_cast(&Pred1), - *static_cast(&Pred2) ); - } - - //! predicate 'or' composition predicate - /*! - Construct the \c class_or predicate. This predicate can be used - to logically combine two classification predicates. \c class_or holds, - if one of the predicates return true. - - \param Pred1 The first predicate - \param Pred2 The second predicate - \return An instance of the \c class_or predicate - */ - template - inline detail::pred_orF - operator||( - const predicate_facade& Pred1, - const predicate_facade& Pred2 ) - { - // Doing the static_cast with the pointer instead of the reference - // is a workaround for some compilers which have problems with - // static_cast's of template references, i.e. CW8. /grafik/ - return detail::pred_orF( - *static_cast(&Pred1), - *static_cast(&Pred2)); - } - - //! predicate negation operator - /*! - Construct the \c class_not predicate. This predicate represents a negation. - \c class_or holds if of the predicates return false. - - \param Pred The predicate to be negated - \return An instance of the \c class_not predicate - */ - template - inline detail::pred_notF - operator!( const predicate_facade& Pred ) - { - // Doing the static_cast with the pointer instead of the reference - // is a workaround for some compilers which have problems with - // static_cast's of template references, i.e. CW8. /grafik/ - return detail::pred_notF(*static_cast(&Pred)); - } - - } // namespace algorithm - - // pull names to the boost namespace - using algorithm::is_classified; - using algorithm::is_space; - using algorithm::is_alnum; - using algorithm::is_alpha; - using algorithm::is_cntrl; - using algorithm::is_digit; - using algorithm::is_graph; - using algorithm::is_lower; - using algorithm::is_upper; - using algorithm::is_print; - using algorithm::is_punct; - using algorithm::is_xdigit; - using algorithm::is_any_of; - using algorithm::is_from_range; - -} // namespace boost - -#endif // BOOST_STRING_PREDICATE_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/compare.hpp b/third_party/boost_parts/boost/algorithm/string/compare.hpp deleted file mode 100644 index 734303a9..00000000 --- a/third_party/boost_parts/boost/algorithm/string/compare.hpp +++ /dev/null @@ -1,199 +0,0 @@ -// Boost string_algo library compare.hpp header file -------------------------// - -// Copyright Pavol Droba 2002-2006. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_COMPARE_HPP -#define BOOST_STRING_COMPARE_HPP - -#include -#include - -/*! \file - Defines element comparison predicates. Many algorithms in this library can - take an additional argument with a predicate used to compare elements. - This makes it possible, for instance, to have case insensitive versions - of the algorithms. -*/ - -namespace boost { - namespace algorithm { - - // is_equal functor -----------------------------------------------// - - //! is_equal functor - /*! - Standard STL equal_to only handle comparison between arguments - of the same type. This is a less restrictive version which wraps operator ==. - */ - struct is_equal - { - //! Function operator - /*! - Compare two operands for equality - */ - template< typename T1, typename T2 > - bool operator()( const T1& Arg1, const T2& Arg2 ) const - { - return Arg1==Arg2; - } - }; - - //! case insensitive version of is_equal - /*! - Case insensitive comparison predicate. Comparison is done using - specified locales. - */ - struct is_iequal - { - //! Constructor - /*! - \param Loc locales used for comparison - */ - is_iequal( const std::locale& Loc=std::locale() ) : - m_Loc( Loc ) {} - - //! Function operator - /*! - Compare two operands. Case is ignored. - */ - template< typename T1, typename T2 > - bool operator()( const T1& Arg1, const T2& Arg2 ) const - { - #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) - return std::toupper(Arg1)==std::toupper(Arg2); - #else - return std::toupper(Arg1,m_Loc)==std::toupper(Arg2,m_Loc); - #endif - } - - private: - std::locale m_Loc; - }; - - // is_less functor -----------------------------------------------// - - //! is_less functor - /*! - Convenient version of standard std::less. Operation is templated, therefore it is - not required to specify the exact types upon the construction - */ - struct is_less - { - //! Functor operation - /*! - Compare two operands using > operator - */ - template< typename T1, typename T2 > - bool operator()( const T1& Arg1, const T2& Arg2 ) const - { - return Arg1 - bool operator()( const T1& Arg1, const T2& Arg2 ) const - { - #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) - return std::toupper(Arg1)(Arg1,m_Loc)(Arg2,m_Loc); - #endif - } - - private: - std::locale m_Loc; - }; - - // is_not_greater functor -----------------------------------------------// - - //! is_not_greater functor - /*! - Convenient version of standard std::not_greater_to. Operation is templated, therefore it is - not required to specify the exact types upon the construction - */ - struct is_not_greater - { - //! Functor operation - /*! - Compare two operands using > operator - */ - template< typename T1, typename T2 > - bool operator()( const T1& Arg1, const T2& Arg2 ) const - { - return Arg1<=Arg2; - } - }; - - - //! case insensitive version of is_not_greater - /*! - Case insensitive comparison predicate. Comparison is done using - specified locales. - */ - struct is_not_igreater - { - //! Constructor - /*! - \param Loc locales used for comparison - */ - is_not_igreater( const std::locale& Loc=std::locale() ) : - m_Loc( Loc ) {} - - //! Function operator - /*! - Compare two operands. Case is ignored. - */ - template< typename T1, typename T2 > - bool operator()( const T1& Arg1, const T2& Arg2 ) const - { - #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) - return std::toupper(Arg1)<=std::toupper(Arg2); - #else - return std::toupper(Arg1,m_Loc)<=std::toupper(Arg2,m_Loc); - #endif - } - - private: - std::locale m_Loc; - }; - - - } // namespace algorithm - - // pull names to the boost namespace - using algorithm::is_equal; - using algorithm::is_iequal; - using algorithm::is_less; - using algorithm::is_iless; - using algorithm::is_not_greater; - using algorithm::is_not_igreater; - -} // namespace boost - - -#endif // BOOST_STRING_COMPARE_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/concept.hpp b/third_party/boost_parts/boost/algorithm/string/concept.hpp deleted file mode 100644 index 17e83495..00000000 --- a/third_party/boost_parts/boost/algorithm/string/concept.hpp +++ /dev/null @@ -1,83 +0,0 @@ -// Boost string_algo library concept.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_CONCEPT_HPP -#define BOOST_STRING_CONCEPT_HPP - -#include -#include -#include -#include - -/*! \file - Defines concepts used in string_algo library -*/ - -namespace boost { - namespace algorithm { - - //! Finder concept - /*! - Defines the Finder concept. Finder is a functor which selects - an arbitrary part of a string. Search is performed on - the range specified by starting and ending iterators. - - Result of the find operation must be convertible to iterator_range. - */ - template - struct FinderConcept - { - private: - typedef iterator_range range; - public: - void constraints() - { - // Operation - r=(*pF)(i,i); - } - private: - range r; - IteratorT i; - FinderT* pF; - }; // Finder_concept - - - //! Formatter concept - /*! - Defines the Formatter concept. Formatter is a functor, which - takes a result from a finder operation and transforms it - in a specific way. - - Result must be a container supported by container_traits, - or a reference to it. - */ - template - struct FormatterConcept - { - public: - void constraints() - { - // Operation - ::boost::begin((*pFo)( (*pF)(i,i) )); - ::boost::end((*pFo)( (*pF)(i,i) )); - } - private: - IteratorT i; - FinderT* pF; - FormatterT *pFo; - }; // FormatterConcept; - - } // namespace algorithm -} // namespace boost - - - - -#endif // BOOST_STRING_CONCEPT_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/config.hpp b/third_party/boost_parts/boost/algorithm/string/config.hpp deleted file mode 100644 index 559750ac..00000000 --- a/third_party/boost_parts/boost/algorithm/string/config.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// Boost string_algo library config.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_CONFIG_HPP -#define BOOST_STRING_CONFIG_HPP - -#include -#include - -#ifdef BOOST_STRING_DEDUCED_TYPENAME -# error "macro already defined!" -#endif - -#define BOOST_STRING_TYPENAME BOOST_DEDUCED_TYPENAME - -// Metrowerks workaround -#if BOOST_WORKAROUND(__MWERKS__, <= 0x3003) // 8.x -#pragma parse_func_templ off -#endif - -#endif // BOOST_STRING_CONFIG_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/constants.hpp b/third_party/boost_parts/boost/algorithm/string/constants.hpp deleted file mode 100644 index 6ed70eff..00000000 --- a/third_party/boost_parts/boost/algorithm/string/constants.hpp +++ /dev/null @@ -1,36 +0,0 @@ -// Boost string_algo library constants.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_CONSTANTS_HPP -#define BOOST_STRING_CONSTANTS_HPP - -namespace boost { - namespace algorithm { - - //! Token compression mode - /*! - Specifies token compression mode for the token_finder. - */ - enum token_compress_mode_type - { - token_compress_on, //!< Compress adjacent tokens - token_compress_off //!< Do not compress adjacent tokens - }; - - } // namespace algorithm - - // pull the names to the boost namespace - using algorithm::token_compress_on; - using algorithm::token_compress_off; - -} // namespace boost - -#endif // BOOST_STRING_CONSTANTS_HPP - diff --git a/third_party/boost_parts/boost/algorithm/string/detail/case_conv.hpp b/third_party/boost_parts/boost/algorithm/string/detail/case_conv.hpp deleted file mode 100644 index 42621c74..00000000 --- a/third_party/boost_parts/boost/algorithm/string/detail/case_conv.hpp +++ /dev/null @@ -1,123 +0,0 @@ -// Boost string_algo library string_funct.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_CASE_CONV_DETAIL_HPP -#define BOOST_STRING_CASE_CONV_DETAIL_HPP - -#include -#include -#include - -#include - -namespace boost { - namespace algorithm { - namespace detail { - -// case conversion functors -----------------------------------------------// - -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) -#pragma warning(push) -#pragma warning(disable:4512) //assignment operator could not be generated -#endif - - // a tolower functor - template - struct to_lowerF : public std::unary_function - { - // Constructor - to_lowerF( const std::locale& Loc ) : m_Loc( &Loc ) {} - - // Operation - CharT operator ()( CharT Ch ) const - { - #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) - return std::tolower( static_cast::type> ( Ch )); - #else - return std::tolower( Ch, *m_Loc ); - #endif - } - private: - const std::locale* m_Loc; - }; - - // a toupper functor - template - struct to_upperF : public std::unary_function - { - // Constructor - to_upperF( const std::locale& Loc ) : m_Loc( &Loc ) {} - - // Operation - CharT operator ()( CharT Ch ) const - { - #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x564) && !defined(_USE_OLD_RW_STL) - return std::toupper( static_cast::type> ( Ch )); - #else - return std::toupper( Ch, *m_Loc ); - #endif - } - private: - const std::locale* m_Loc; - }; - -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) -#pragma warning(pop) -#endif - -// algorithm implementation ------------------------------------------------------------------------- - - // Transform a range - template - OutputIteratorT transform_range_copy( - OutputIteratorT Output, - const RangeT& Input, - FunctorT Functor) - { - return std::transform( - ::boost::begin(Input), - ::boost::end(Input), - Output, - Functor); - } - - // Transform a range (in-place) - template - void transform_range( - const RangeT& Input, - FunctorT Functor) - { - std::transform( - ::boost::begin(Input), - ::boost::end(Input), - ::boost::begin(Input), - Functor); - } - - template - inline SequenceT transform_range_copy( - const RangeT& Input, - FunctorT Functor) - { - return SequenceT( - ::boost::make_transform_iterator( - ::boost::begin(Input), - Functor), - ::boost::make_transform_iterator( - ::boost::end(Input), - Functor)); - } - - } // namespace detail - } // namespace algorithm -} // namespace boost - - -#endif // BOOST_STRING_CASE_CONV_DETAIL_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/detail/classification.hpp b/third_party/boost_parts/boost/algorithm/string/detail/classification.hpp deleted file mode 100644 index 704d9d20..00000000 --- a/third_party/boost_parts/boost/algorithm/string/detail/classification.hpp +++ /dev/null @@ -1,353 +0,0 @@ -// Boost string_algo library classification.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_CLASSIFICATION_DETAIL_HPP -#define BOOST_STRING_CLASSIFICATION_DETAIL_HPP - -#include -#include -#include -#include - -#include -#include - -#include -#include - -namespace boost { - namespace algorithm { - namespace detail { - -// classification functors -----------------------------------------------// - - // is_classified functor - struct is_classifiedF : - public predicate_facade - { - // Boost.ResultOf support - typedef bool result_type; - - // Constructor from a locale - is_classifiedF(std::ctype_base::mask Type, std::locale const & Loc = std::locale()) : - m_Type(Type), m_Locale(Loc) {} - // Operation - template - bool operator()( CharT Ch ) const - { - return std::use_facet< std::ctype >(m_Locale).is( m_Type, Ch ); - } - - #if defined(__BORLANDC__) && (__BORLANDC__ >= 0x560) && (__BORLANDC__ <= 0x582) && !defined(_USE_OLD_RW_STL) - template<> - bool operator()( char const Ch ) const - { - return std::use_facet< std::ctype >(m_Locale).is( m_Type, Ch ); - } - #endif - - private: - std::ctype_base::mask m_Type; - std::locale m_Locale; - }; - - - // is_any_of functor - /* - returns true if the value is from the specified set - */ - template - struct is_any_ofF : - public predicate_facade > - { - private: - // set cannot operate on const value-type - typedef typename ::boost::remove_const::type set_value_type; - - public: - // Boost.ResultOf support - typedef bool result_type; - - // Constructor - template - is_any_ofF( const RangeT& Range ) : m_Size(0) - { - // Prepare storage - m_Storage.m_dynSet=0; - - std::size_t Size=::boost::distance(Range); - m_Size=Size; - set_value_type* Storage=0; - - if(use_fixed_storage(m_Size)) - { - // Use fixed storage - Storage=&m_Storage.m_fixSet[0]; - } - else - { - // Use dynamic storage - m_Storage.m_dynSet=new set_value_type[m_Size]; - Storage=m_Storage.m_dynSet; - } - - // Use fixed storage - ::std::copy(::boost::begin(Range), ::boost::end(Range), Storage); - ::std::sort(Storage, Storage+m_Size); - } - - // Copy constructor - is_any_ofF(const is_any_ofF& Other) : m_Size(Other.m_Size) - { - // Prepare storage - m_Storage.m_dynSet=0; - const set_value_type* SrcStorage=0; - set_value_type* DestStorage=0; - - if(use_fixed_storage(m_Size)) - { - // Use fixed storage - DestStorage=&m_Storage.m_fixSet[0]; - SrcStorage=&Other.m_Storage.m_fixSet[0]; - } - else - { - // Use dynamic storage - m_Storage.m_dynSet=new set_value_type[m_Size]; - DestStorage=m_Storage.m_dynSet; - SrcStorage=Other.m_Storage.m_dynSet; - } - - // Use fixed storage - ::std::memcpy(DestStorage, SrcStorage, sizeof(set_value_type)*m_Size); - } - - // Destructor - ~is_any_ofF() - { - if(!use_fixed_storage(m_Size) && m_Storage.m_dynSet!=0) - { - delete [] m_Storage.m_dynSet; - } - } - - // Assignment - is_any_ofF& operator=(const is_any_ofF& Other) - { - // Handle self assignment - if(this==&Other) return *this; - - // Prepare storage - const set_value_type* SrcStorage; - set_value_type* DestStorage; - - if(use_fixed_storage(Other.m_Size)) - { - // Use fixed storage - DestStorage=&m_Storage.m_fixSet[0]; - SrcStorage=&Other.m_Storage.m_fixSet[0]; - - // Delete old storage if was present - if(!use_fixed_storage(m_Size) && m_Storage.m_dynSet!=0) - { - delete [] m_Storage.m_dynSet; - } - - // Set new size - m_Size=Other.m_Size; - } - else - { - // Other uses dynamic storage - SrcStorage=Other.m_Storage.m_dynSet; - - // Check what kind of storage are we using right now - if(use_fixed_storage(m_Size)) - { - // Using fixed storage, allocate new - set_value_type* pTemp=new set_value_type[Other.m_Size]; - DestStorage=pTemp; - m_Storage.m_dynSet=pTemp; - m_Size=Other.m_Size; - } - else - { - // Using dynamic storage, check if can reuse - if(m_Storage.m_dynSet!=0 && m_Size>=Other.m_Size && m_Size - bool operator()( Char2T Ch ) const - { - const set_value_type* Storage= - (use_fixed_storage(m_Size)) - ? &m_Storage.m_fixSet[0] - : m_Storage.m_dynSet; - - return ::std::binary_search(Storage, Storage+m_Size, Ch); - } - private: - // check if the size is eligible for fixed storage - static bool use_fixed_storage(std::size_t size) - { - return size<=sizeof(set_value_type*)*2; - } - - - private: - // storage - // The actual used storage is selected on the type - union - { - set_value_type* m_dynSet; - set_value_type m_fixSet[sizeof(set_value_type*)*2]; - } - m_Storage; - - // storage size - ::std::size_t m_Size; - }; - - // is_from_range functor - /* - returns true if the value is from the specified range. - (i.e. x>=From && x>=To) - */ - template - struct is_from_rangeF : - public predicate_facade< is_from_rangeF > - { - // Boost.ResultOf support - typedef bool result_type; - - // Constructor - is_from_rangeF( CharT From, CharT To ) : m_From(From), m_To(To) {} - - // Operation - template - bool operator()( Char2T Ch ) const - { - return ( m_From <= Ch ) && ( Ch <= m_To ); - } - - private: - CharT m_From; - CharT m_To; - }; - - // class_and composition predicate - template - struct pred_andF : - public predicate_facade< pred_andF > - { - public: - - // Boost.ResultOf support - typedef bool result_type; - - // Constructor - pred_andF( Pred1T Pred1, Pred2T Pred2 ) : - m_Pred1(Pred1), m_Pred2(Pred2) {} - - // Operation - template - bool operator()( CharT Ch ) const - { - return m_Pred1(Ch) && m_Pred2(Ch); - } - - private: - Pred1T m_Pred1; - Pred2T m_Pred2; - }; - - // class_or composition predicate - template - struct pred_orF : - public predicate_facade< pred_orF > - { - public: - // Boost.ResultOf support - typedef bool result_type; - - // Constructor - pred_orF( Pred1T Pred1, Pred2T Pred2 ) : - m_Pred1(Pred1), m_Pred2(Pred2) {} - - // Operation - template - bool operator()( CharT Ch ) const - { - return m_Pred1(Ch) || m_Pred2(Ch); - } - - private: - Pred1T m_Pred1; - Pred2T m_Pred2; - }; - - // class_not composition predicate - template< typename PredT > - struct pred_notF : - public predicate_facade< pred_notF > - { - public: - // Boost.ResultOf support - typedef bool result_type; - - // Constructor - pred_notF( PredT Pred ) : m_Pred(Pred) {} - - // Operation - template - bool operator()( CharT Ch ) const - { - return !m_Pred(Ch); - } - - private: - PredT m_Pred; - }; - - } // namespace detail - } // namespace algorithm -} // namespace boost - - -#endif // BOOST_STRING_CLASSIFICATION_DETAIL_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/detail/find_format.hpp b/third_party/boost_parts/boost/algorithm/string/detail/find_format.hpp deleted file mode 100644 index b3987502..00000000 --- a/third_party/boost_parts/boost/algorithm/string/detail/find_format.hpp +++ /dev/null @@ -1,204 +0,0 @@ -// Boost string_algo library find_format.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_FIND_FORMAT_DETAIL_HPP -#define BOOST_STRING_FIND_FORMAT_DETAIL_HPP - -#include -#include -#include -#include -#include -#include - -namespace boost { - namespace algorithm { - namespace detail { - -// find_format_copy (iterator variant) implementation -------------------------------// - - template< - typename OutputIteratorT, - typename InputT, - typename FormatterT, - typename FindResultT, - typename FormatResultT > - inline OutputIteratorT find_format_copy_impl2( - OutputIteratorT Output, - const InputT& Input, - FormatterT Formatter, - const FindResultT& FindResult, - const FormatResultT& FormatResult ) - { - typedef find_format_store< - BOOST_STRING_TYPENAME - range_const_iterator::type, - FormatterT, - FormatResultT > store_type; - - // Create store for the find result - store_type M( FindResult, FormatResult, Formatter ); - - if ( !M ) - { - // Match not found - return original sequence - Output = std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); - return Output; - } - - // Copy the beginning of the sequence - Output = std::copy( ::boost::begin(Input), ::boost::begin(M), Output ); - // Format find result - // Copy formatted result - Output = std::copy( ::boost::begin(M.format_result()), ::boost::end(M.format_result()), Output ); - // Copy the rest of the sequence - Output = std::copy( M.end(), ::boost::end(Input), Output ); - - return Output; - } - - template< - typename OutputIteratorT, - typename InputT, - typename FormatterT, - typename FindResultT > - inline OutputIteratorT find_format_copy_impl( - OutputIteratorT Output, - const InputT& Input, - FormatterT Formatter, - const FindResultT& FindResult ) - { - if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { - return ::boost::algorithm::detail::find_format_copy_impl2( - Output, - Input, - Formatter, - FindResult, - Formatter(FindResult) ); - } else { - return std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); - } - } - - -// find_format_copy implementation --------------------------------------------------// - - template< - typename InputT, - typename FormatterT, - typename FindResultT, - typename FormatResultT > - inline InputT find_format_copy_impl2( - const InputT& Input, - FormatterT Formatter, - const FindResultT& FindResult, - const FormatResultT& FormatResult) - { - typedef find_format_store< - BOOST_STRING_TYPENAME - range_const_iterator::type, - FormatterT, - FormatResultT > store_type; - - // Create store for the find result - store_type M( FindResult, FormatResult, Formatter ); - - if ( !M ) - { - // Match not found - return original sequence - return InputT( Input ); - } - - InputT Output; - // Copy the beginning of the sequence - boost::algorithm::detail::insert( Output, ::boost::end(Output), ::boost::begin(Input), M.begin() ); - // Copy formatted result - boost::algorithm::detail::insert( Output, ::boost::end(Output), M.format_result() ); - // Copy the rest of the sequence - boost::algorithm::detail::insert( Output, ::boost::end(Output), M.end(), ::boost::end(Input) ); - - return Output; - } - - template< - typename InputT, - typename FormatterT, - typename FindResultT > - inline InputT find_format_copy_impl( - const InputT& Input, - FormatterT Formatter, - const FindResultT& FindResult) - { - if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { - return ::boost::algorithm::detail::find_format_copy_impl2( - Input, - Formatter, - FindResult, - Formatter(FindResult) ); - } else { - return Input; - } - } - - // replace implementation ----------------------------------------------------// - - template< - typename InputT, - typename FormatterT, - typename FindResultT, - typename FormatResultT > - inline void find_format_impl2( - InputT& Input, - FormatterT Formatter, - const FindResultT& FindResult, - const FormatResultT& FormatResult) - { - typedef find_format_store< - BOOST_STRING_TYPENAME - range_iterator::type, - FormatterT, - FormatResultT > store_type; - - // Create store for the find result - store_type M( FindResult, FormatResult, Formatter ); - - if ( !M ) - { - // Search not found - return original sequence - return; - } - - // Replace match - ::boost::algorithm::detail::replace( Input, M.begin(), M.end(), M.format_result() ); - } - - template< - typename InputT, - typename FormatterT, - typename FindResultT > - inline void find_format_impl( - InputT& Input, - FormatterT Formatter, - const FindResultT& FindResult) - { - if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { - ::boost::algorithm::detail::find_format_impl2( - Input, - Formatter, - FindResult, - Formatter(FindResult) ); - } - } - - } // namespace detail - } // namespace algorithm -} // namespace boost - -#endif // BOOST_STRING_FIND_FORMAT_DETAIL_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/detail/find_format_all.hpp b/third_party/boost_parts/boost/algorithm/string/detail/find_format_all.hpp deleted file mode 100644 index 52930c83..00000000 --- a/third_party/boost_parts/boost/algorithm/string/detail/find_format_all.hpp +++ /dev/null @@ -1,273 +0,0 @@ -// Boost string_algo library find_format_all.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_FIND_FORMAT_ALL_DETAIL_HPP -#define BOOST_STRING_FIND_FORMAT_ALL_DETAIL_HPP - -#include -#include -#include -#include -#include -#include - -namespace boost { - namespace algorithm { - namespace detail { - -// find_format_all_copy (iterator variant) implementation ---------------------------// - - template< - typename OutputIteratorT, - typename InputT, - typename FinderT, - typename FormatterT, - typename FindResultT, - typename FormatResultT > - inline OutputIteratorT find_format_all_copy_impl2( - OutputIteratorT Output, - const InputT& Input, - FinderT Finder, - FormatterT Formatter, - const FindResultT& FindResult, - const FormatResultT& FormatResult ) - { - typedef BOOST_STRING_TYPENAME - range_const_iterator::type input_iterator_type; - - typedef find_format_store< - input_iterator_type, - FormatterT, - FormatResultT > store_type; - - // Create store for the find result - store_type M( FindResult, FormatResult, Formatter ); - - // Initialize last match - input_iterator_type LastMatch=::boost::begin(Input); - - // Iterate through all matches - while( M ) - { - // Copy the beginning of the sequence - Output = std::copy( LastMatch, M.begin(), Output ); - // Copy formatted result - Output = std::copy( ::boost::begin(M.format_result()), ::boost::end(M.format_result()), Output ); - - // Proceed to the next match - LastMatch=M.end(); - M=Finder( LastMatch, ::boost::end(Input) ); - } - - // Copy the rest of the sequence - Output = std::copy( LastMatch, ::boost::end(Input), Output ); - - return Output; - } - - template< - typename OutputIteratorT, - typename InputT, - typename FinderT, - typename FormatterT, - typename FindResultT > - inline OutputIteratorT find_format_all_copy_impl( - OutputIteratorT Output, - const InputT& Input, - FinderT Finder, - FormatterT Formatter, - const FindResultT& FindResult ) - { - if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { - return ::boost::algorithm::detail::find_format_all_copy_impl2( - Output, - Input, - Finder, - Formatter, - FindResult, - Formatter(FindResult) ); - } else { - return std::copy( ::boost::begin(Input), ::boost::end(Input), Output ); - } - } - - // find_format_all_copy implementation ----------------------------------------------// - - template< - typename InputT, - typename FinderT, - typename FormatterT, - typename FindResultT, - typename FormatResultT > - inline InputT find_format_all_copy_impl2( - const InputT& Input, - FinderT Finder, - FormatterT Formatter, - const FindResultT& FindResult, - const FormatResultT& FormatResult) - { - typedef BOOST_STRING_TYPENAME - range_const_iterator::type input_iterator_type; - - typedef find_format_store< - input_iterator_type, - FormatterT, - FormatResultT > store_type; - - // Create store for the find result - store_type M( FindResult, FormatResult, Formatter ); - - // Initialize last match - input_iterator_type LastMatch=::boost::begin(Input); - - // Output temporary - InputT Output; - - // Iterate through all matches - while( M ) - { - // Copy the beginning of the sequence - boost::algorithm::detail::insert( Output, ::boost::end(Output), LastMatch, M.begin() ); - // Copy formatted result - boost::algorithm::detail::insert( Output, ::boost::end(Output), M.format_result() ); - - // Proceed to the next match - LastMatch=M.end(); - M=Finder( LastMatch, ::boost::end(Input) ); - } - - // Copy the rest of the sequence - ::boost::algorithm::detail::insert( Output, ::boost::end(Output), LastMatch, ::boost::end(Input) ); - - return Output; - } - - template< - typename InputT, - typename FinderT, - typename FormatterT, - typename FindResultT > - inline InputT find_format_all_copy_impl( - const InputT& Input, - FinderT Finder, - FormatterT Formatter, - const FindResultT& FindResult) - { - if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { - return ::boost::algorithm::detail::find_format_all_copy_impl2( - Input, - Finder, - Formatter, - FindResult, - Formatter(FindResult) ); - } else { - return Input; - } - } - - // find_format_all implementation ------------------------------------------------// - - template< - typename InputT, - typename FinderT, - typename FormatterT, - typename FindResultT, - typename FormatResultT > - inline void find_format_all_impl2( - InputT& Input, - FinderT Finder, - FormatterT Formatter, - FindResultT FindResult, - FormatResultT FormatResult) - { - typedef BOOST_STRING_TYPENAME - range_iterator::type input_iterator_type; - typedef find_format_store< - input_iterator_type, - FormatterT, - FormatResultT > store_type; - - // Create store for the find result - store_type M( FindResult, FormatResult, Formatter ); - - // Instantiate replacement storage - std::deque< - BOOST_STRING_TYPENAME range_value::type> Storage; - - // Initialize replacement iterators - input_iterator_type InsertIt=::boost::begin(Input); - input_iterator_type SearchIt=::boost::begin(Input); - - while( M ) - { - // process the segment - InsertIt=process_segment( - Storage, - Input, - InsertIt, - SearchIt, - M.begin() ); - - // Adjust search iterator - SearchIt=M.end(); - - // Copy formatted replace to the storage - ::boost::algorithm::detail::copy_to_storage( Storage, M.format_result() ); - - // Find range for a next match - M=Finder( SearchIt, ::boost::end(Input) ); - } - - // process the last segment - InsertIt=::boost::algorithm::detail::process_segment( - Storage, - Input, - InsertIt, - SearchIt, - ::boost::end(Input) ); - - if ( Storage.empty() ) - { - // Truncate input - ::boost::algorithm::detail::erase( Input, InsertIt, ::boost::end(Input) ); - } - else - { - // Copy remaining data to the end of input - ::boost::algorithm::detail::insert( Input, ::boost::end(Input), Storage.begin(), Storage.end() ); - } - } - - template< - typename InputT, - typename FinderT, - typename FormatterT, - typename FindResultT > - inline void find_format_all_impl( - InputT& Input, - FinderT Finder, - FormatterT Formatter, - FindResultT FindResult) - { - if( ::boost::algorithm::detail::check_find_result(Input, FindResult) ) { - ::boost::algorithm::detail::find_format_all_impl2( - Input, - Finder, - Formatter, - FindResult, - Formatter(FindResult) ); - } - } - - } // namespace detail - } // namespace algorithm -} // namespace boost - -#endif // BOOST_STRING_FIND_FORMAT_ALL_DETAIL_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/detail/find_format_store.hpp b/third_party/boost_parts/boost/algorithm/string/detail/find_format_store.hpp deleted file mode 100644 index b9f4a88d..00000000 --- a/third_party/boost_parts/boost/algorithm/string/detail/find_format_store.hpp +++ /dev/null @@ -1,89 +0,0 @@ -// Boost string_algo library find_format_store.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_FIND_FORMAT_STORE_DETAIL_HPP -#define BOOST_STRING_FIND_FORMAT_STORE_DETAIL_HPP - -#include -#include - -namespace boost { - namespace algorithm { - namespace detail { - -// temporary format and find result storage --------------------------------// - -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) -#pragma warning(push) -#pragma warning(disable:4512) //assignment operator could not be generated -#endif - template< - typename ForwardIteratorT, - typename FormatterT, - typename FormatResultT > - class find_format_store : - public iterator_range - { - public: - // typedefs - typedef iterator_range base_type; - typedef FormatterT formatter_type; - typedef FormatResultT format_result_type; - - public: - // Construction - find_format_store( - const base_type& FindResult, - const format_result_type& FormatResult, - const formatter_type& Formatter ) : - base_type(FindResult), - m_FormatResult(FormatResult), - m_Formatter(Formatter) {} - - // Assignment - template< typename FindResultT > - find_format_store& operator=( FindResultT FindResult ) - { - iterator_range::operator=(FindResult); - if( !this->empty() ) { - m_FormatResult=m_Formatter(FindResult); - } - - return *this; - } - - // Retrieve format result - const format_result_type& format_result() - { - return m_FormatResult; - } - - private: - format_result_type m_FormatResult; - const formatter_type& m_Formatter; - }; - - template - bool check_find_result(InputT&, FindResultT& FindResult) - { - typedef BOOST_STRING_TYPENAME - range_const_iterator::type input_iterator_type; - iterator_range ResultRange(FindResult); - return !ResultRange.empty(); - } - -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) -#pragma warning(pop) -#endif - } // namespace detail - } // namespace algorithm -} // namespace boost - -#endif // BOOST_STRING_FIND_FORMAT_STORE_DETAIL_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/detail/find_iterator.hpp b/third_party/boost_parts/boost/algorithm/string/detail/find_iterator.hpp deleted file mode 100644 index 9b78a0f7..00000000 --- a/third_party/boost_parts/boost/algorithm/string/detail/find_iterator.hpp +++ /dev/null @@ -1,87 +0,0 @@ -// Boost string_algo library find_iterator.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_FIND_ITERATOR_DETAIL_HPP -#define BOOST_STRING_FIND_ITERATOR_DETAIL_HPP - -#include -#include -#include -#include -#include - -namespace boost { - namespace algorithm { - namespace detail { - -// find_iterator base -----------------------------------------------// - - // Find iterator base - template - class find_iterator_base - { - protected: - // typedefs - typedef IteratorT input_iterator_type; - typedef iterator_range match_type; - typedef function2< - match_type, - input_iterator_type, - input_iterator_type> finder_type; - - protected: - // Protected construction/destruction - - // Default constructor - find_iterator_base() {}; - // Copy construction - find_iterator_base( const find_iterator_base& Other ) : - m_Finder(Other.m_Finder) {} - - // Constructor - template - find_iterator_base( FinderT Finder, int ) : - m_Finder(Finder) {} - - // Destructor - ~find_iterator_base() {} - - // Find operation - match_type do_find( - input_iterator_type Begin, - input_iterator_type End ) const - { - if (!m_Finder.empty()) - { - return m_Finder(Begin,End); - } - else - { - return match_type(End,End); - } - } - - // Check - bool is_null() const - { - return m_Finder.empty(); - } - - private: - // Finder - finder_type m_Finder; - }; - - } // namespace detail - } // namespace algorithm -} // namespace boost - - -#endif // BOOST_STRING_FIND_ITERATOR_DETAIL_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/detail/finder.hpp b/third_party/boost_parts/boost/algorithm/string/detail/finder.hpp deleted file mode 100644 index a2a95821..00000000 --- a/third_party/boost_parts/boost/algorithm/string/detail/finder.hpp +++ /dev/null @@ -1,639 +0,0 @@ -// Boost string_algo library finder.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2006. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_FINDER_DETAIL_HPP -#define BOOST_STRING_FINDER_DETAIL_HPP - -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace boost { - namespace algorithm { - namespace detail { - - -// find first functor -----------------------------------------------// - - // find a subsequence in the sequence ( functor ) - /* - Returns a pair marking the subsequence in the sequence. - If the find fails, functor returns - */ - template - struct first_finderF - { - typedef SearchIteratorT search_iterator_type; - - // Construction - template< typename SearchT > - first_finderF( const SearchT& Search, PredicateT Comp ) : - m_Search(::boost::begin(Search), ::boost::end(Search)), m_Comp(Comp) {} - first_finderF( - search_iterator_type SearchBegin, - search_iterator_type SearchEnd, - PredicateT Comp ) : - m_Search(SearchBegin, SearchEnd), m_Comp(Comp) {} - - // Operation - template< typename ForwardIteratorT > - iterator_range - operator()( - ForwardIteratorT Begin, - ForwardIteratorT End ) const - { - typedef iterator_range result_type; - typedef ForwardIteratorT input_iterator_type; - - // Outer loop - for(input_iterator_type OuterIt=Begin; - OuterIt!=End; - ++OuterIt) - { - // Sanity check - if( boost::empty(m_Search) ) - return result_type( End, End ); - - input_iterator_type InnerIt=OuterIt; - search_iterator_type SubstrIt=m_Search.begin(); - for(; - InnerIt!=End && SubstrIt!=m_Search.end(); - ++InnerIt,++SubstrIt) - { - if( !( m_Comp(*InnerIt,*SubstrIt) ) ) - break; - } - - // Substring matching succeeded - if ( SubstrIt==m_Search.end() ) - return result_type( OuterIt, InnerIt ); - } - - return result_type( End, End ); - } - - private: - iterator_range m_Search; - PredicateT m_Comp; - }; - -// find last functor -----------------------------------------------// - - // find the last match a subsequence in the sequence ( functor ) - /* - Returns a pair marking the subsequence in the sequence. - If the find fails, returns - */ - template - struct last_finderF - { - typedef SearchIteratorT search_iterator_type; - typedef first_finderF< - search_iterator_type, - PredicateT> first_finder_type; - - // Construction - template< typename SearchT > - last_finderF( const SearchT& Search, PredicateT Comp ) : - m_Search(::boost::begin(Search), ::boost::end(Search)), m_Comp(Comp) {} - last_finderF( - search_iterator_type SearchBegin, - search_iterator_type SearchEnd, - PredicateT Comp ) : - m_Search(SearchBegin, SearchEnd), m_Comp(Comp) {} - - // Operation - template< typename ForwardIteratorT > - iterator_range - operator()( - ForwardIteratorT Begin, - ForwardIteratorT End ) const - { - typedef iterator_range result_type; - - if( boost::empty(m_Search) ) - return result_type( End, End ); - - typedef BOOST_STRING_TYPENAME boost::detail:: - iterator_traits::iterator_category category; - - return findit( Begin, End, category() ); - } - - private: - // forward iterator - template< typename ForwardIteratorT > - iterator_range - findit( - ForwardIteratorT Begin, - ForwardIteratorT End, - std::forward_iterator_tag ) const - { - typedef iterator_range result_type; - - first_finder_type first_finder( - m_Search.begin(), m_Search.end(), m_Comp ); - - result_type M=first_finder( Begin, End ); - result_type Last=M; - - while( M ) - { - Last=M; - M=first_finder( ::boost::end(M), End ); - } - - return Last; - } - - // bidirectional iterator - template< typename ForwardIteratorT > - iterator_range - findit( - ForwardIteratorT Begin, - ForwardIteratorT End, - std::bidirectional_iterator_tag ) const - { - typedef iterator_range result_type; - typedef ForwardIteratorT input_iterator_type; - - // Outer loop - for(input_iterator_type OuterIt=End; - OuterIt!=Begin; ) - { - input_iterator_type OuterIt2=--OuterIt; - - input_iterator_type InnerIt=OuterIt2; - search_iterator_type SubstrIt=m_Search.begin(); - for(; - InnerIt!=End && SubstrIt!=m_Search.end(); - ++InnerIt,++SubstrIt) - { - if( !( m_Comp(*InnerIt,*SubstrIt) ) ) - break; - } - - // Substring matching succeeded - if( SubstrIt==m_Search.end() ) - return result_type( OuterIt2, InnerIt ); - } - - return result_type( End, End ); - } - - private: - iterator_range m_Search; - PredicateT m_Comp; - }; - -// find n-th functor -----------------------------------------------// - - // find the n-th match of a subsequence in the sequence ( functor ) - /* - Returns a pair marking the subsequence in the sequence. - If the find fails, returns - */ - template - struct nth_finderF - { - typedef SearchIteratorT search_iterator_type; - typedef first_finderF< - search_iterator_type, - PredicateT> first_finder_type; - typedef last_finderF< - search_iterator_type, - PredicateT> last_finder_type; - - // Construction - template< typename SearchT > - nth_finderF( - const SearchT& Search, - int Nth, - PredicateT Comp) : - m_Search(::boost::begin(Search), ::boost::end(Search)), - m_Nth(Nth), - m_Comp(Comp) {} - nth_finderF( - search_iterator_type SearchBegin, - search_iterator_type SearchEnd, - int Nth, - PredicateT Comp) : - m_Search(SearchBegin, SearchEnd), - m_Nth(Nth), - m_Comp(Comp) {} - - // Operation - template< typename ForwardIteratorT > - iterator_range - operator()( - ForwardIteratorT Begin, - ForwardIteratorT End ) const - { - if(m_Nth>=0) - { - return find_forward(Begin, End, m_Nth); - } - else - { - return find_backward(Begin, End, -m_Nth); - } - - } - - private: - // Implementation helpers - template< typename ForwardIteratorT > - iterator_range - find_forward( - ForwardIteratorT Begin, - ForwardIteratorT End, - unsigned int N) const - { - typedef iterator_range result_type; - - // Sanity check - if( boost::empty(m_Search) ) - return result_type( End, End ); - - // Instantiate find functor - first_finder_type first_finder( - m_Search.begin(), m_Search.end(), m_Comp ); - - result_type M( Begin, Begin ); - - for( unsigned int n=0; n<=N; ++n ) - { - // find next match - M=first_finder( ::boost::end(M), End ); - - if ( !M ) - { - // Subsequence not found, return - return M; - } - } - - return M; - } - - template< typename ForwardIteratorT > - iterator_range - find_backward( - ForwardIteratorT Begin, - ForwardIteratorT End, - unsigned int N) const - { - typedef iterator_range result_type; - - // Sanity check - if( boost::empty(m_Search) ) - return result_type( End, End ); - - // Instantiate find functor - last_finder_type last_finder( - m_Search.begin(), m_Search.end(), m_Comp ); - - result_type M( End, End ); - - for( unsigned int n=1; n<=N; ++n ) - { - // find next match - M=last_finder( Begin, ::boost::begin(M) ); - - if ( !M ) - { - // Subsequence not found, return - return M; - } - } - - return M; - } - - - private: - iterator_range m_Search; - int m_Nth; - PredicateT m_Comp; - }; - -// find head/tail implementation helpers ---------------------------// - - template - iterator_range - find_head_impl( - ForwardIteratorT Begin, - ForwardIteratorT End, - unsigned int N, - std::forward_iterator_tag ) - { - typedef ForwardIteratorT input_iterator_type; - typedef iterator_range result_type; - - input_iterator_type It=Begin; - for( - unsigned int Index=0; - Index - iterator_range - find_head_impl( - ForwardIteratorT Begin, - ForwardIteratorT End, - unsigned int N, - std::random_access_iterator_tag ) - { - typedef iterator_range result_type; - - if ( (End<=Begin) || ( static_cast(End-Begin) < N ) ) - return result_type( Begin, End ); - - return result_type(Begin,Begin+N); - } - - // Find head implementation - template - iterator_range - find_head_impl( - ForwardIteratorT Begin, - ForwardIteratorT End, - unsigned int N ) - { - typedef BOOST_STRING_TYPENAME boost::detail:: - iterator_traits::iterator_category category; - - return ::boost::algorithm::detail::find_head_impl( Begin, End, N, category() ); - } - - template< typename ForwardIteratorT > - iterator_range - find_tail_impl( - ForwardIteratorT Begin, - ForwardIteratorT End, - unsigned int N, - std::forward_iterator_tag ) - { - typedef ForwardIteratorT input_iterator_type; - typedef iterator_range result_type; - - unsigned int Index=0; - input_iterator_type It=Begin; - input_iterator_type It2=Begin; - - // Advance It2 by N increments - for( Index=0; Index - iterator_range - find_tail_impl( - ForwardIteratorT Begin, - ForwardIteratorT End, - unsigned int N, - std::bidirectional_iterator_tag ) - { - typedef ForwardIteratorT input_iterator_type; - typedef iterator_range result_type; - - input_iterator_type It=End; - for( - unsigned int Index=0; - Index - iterator_range - find_tail_impl( - ForwardIteratorT Begin, - ForwardIteratorT End, - unsigned int N, - std::random_access_iterator_tag ) - { - typedef iterator_range result_type; - - if ( (End<=Begin) || ( static_cast(End-Begin) < N ) ) - return result_type( Begin, End ); - - return result_type( End-N, End ); - } - - // Operation - template< typename ForwardIteratorT > - iterator_range - find_tail_impl( - ForwardIteratorT Begin, - ForwardIteratorT End, - unsigned int N ) - { - typedef BOOST_STRING_TYPENAME boost::detail:: - iterator_traits::iterator_category category; - - return ::boost::algorithm::detail::find_tail_impl( Begin, End, N, category() ); - } - - - -// find head functor -----------------------------------------------// - - - // find a head in the sequence ( functor ) - /* - This functor find a head of the specified range. For - a specified N, the head is a subsequence of N starting - elements of the range. - */ - struct head_finderF - { - // Construction - head_finderF( int N ) : m_N(N) {} - - // Operation - template< typename ForwardIteratorT > - iterator_range - operator()( - ForwardIteratorT Begin, - ForwardIteratorT End ) const - { - if(m_N>=0) - { - return ::boost::algorithm::detail::find_head_impl( Begin, End, m_N ); - } - else - { - iterator_range Res= - ::boost::algorithm::detail::find_tail_impl( Begin, End, -m_N ); - - return ::boost::make_iterator_range(Begin, Res.begin()); - } - } - - private: - int m_N; - }; - -// find tail functor -----------------------------------------------// - - - // find a tail in the sequence ( functor ) - /* - This functor find a tail of the specified range. For - a specified N, the head is a subsequence of N starting - elements of the range. - */ - struct tail_finderF - { - // Construction - tail_finderF( int N ) : m_N(N) {} - - // Operation - template< typename ForwardIteratorT > - iterator_range - operator()( - ForwardIteratorT Begin, - ForwardIteratorT End ) const - { - if(m_N>=0) - { - return ::boost::algorithm::detail::find_tail_impl( Begin, End, m_N ); - } - else - { - iterator_range Res= - ::boost::algorithm::detail::find_head_impl( Begin, End, -m_N ); - - return ::boost::make_iterator_range(Res.end(), End); - } - } - - private: - int m_N; - }; - -// find token functor -----------------------------------------------// - - // find a token in a sequence ( functor ) - /* - This find functor finds a token specified be a predicate - in a sequence. It is equivalent of std::find algorithm, - with an exception that it return range instead of a single - iterator. - - If bCompress is set to true, adjacent matching tokens are - concatenated into one match. - */ - template< typename PredicateT > - struct token_finderF - { - // Construction - token_finderF( - PredicateT Pred, - token_compress_mode_type eCompress=token_compress_off ) : - m_Pred(Pred), m_eCompress(eCompress) {} - - // Operation - template< typename ForwardIteratorT > - iterator_range - operator()( - ForwardIteratorT Begin, - ForwardIteratorT End ) const - { - typedef iterator_range result_type; - - ForwardIteratorT It=std::find_if( Begin, End, m_Pred ); - - if( It==End ) - { - return result_type( End, End ); - } - else - { - ForwardIteratorT It2=It; - - if( m_eCompress==token_compress_on ) - { - // Find first non-matching character - while( It2!=End && m_Pred(*It2) ) ++It2; - } - else - { - // Advance by one position - ++It2; - } - - return result_type( It, It2 ); - } - } - - private: - PredicateT m_Pred; - token_compress_mode_type m_eCompress; - }; - -// find range functor -----------------------------------------------// - - // find a range in the sequence ( functor ) - /* - This functor actually does not perform any find operation. - It always returns given iterator range as a result. - */ - template - struct range_finderF - { - typedef ForwardIterator1T input_iterator_type; - typedef iterator_range result_type; - - // Construction - range_finderF( - input_iterator_type Begin, - input_iterator_type End ) : m_Range(Begin, End) {} - - range_finderF(const iterator_range& Range) : - m_Range(Range) {} - - // Operation - template< typename ForwardIterator2T > - iterator_range - operator()( - ForwardIterator2T, - ForwardIterator2T ) const - { -#if BOOST_WORKAROUND( __MWERKS__, <= 0x3003 ) - return iterator_range(this->m_Range); -#else - return m_Range; -#endif - } - - private: - iterator_range m_Range; - }; - - - } // namespace detail - } // namespace algorithm -} // namespace boost - -#endif // BOOST_STRING_FINDER_DETAIL_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/detail/formatter.hpp b/third_party/boost_parts/boost/algorithm/string/detail/formatter.hpp deleted file mode 100644 index c071822f..00000000 --- a/third_party/boost_parts/boost/algorithm/string/detail/formatter.hpp +++ /dev/null @@ -1,119 +0,0 @@ -// Boost string_algo library formatter.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#ifndef BOOST_STRING_FORMATTER_DETAIL_HPP -#define BOOST_STRING_FORMATTER_DETAIL_HPP - - -#include -#include -#include -#include - -#include - -// generic replace functors -----------------------------------------------// - -namespace boost { - namespace algorithm { - namespace detail { - -// const format functor ----------------------------------------------------// - - // constant format functor - template - struct const_formatF - { - private: - typedef BOOST_STRING_TYPENAME - range_const_iterator::type format_iterator; - typedef iterator_range result_type; - - public: - // Construction - const_formatF(const RangeT& Format) : - m_Format(::boost::begin(Format), ::boost::end(Format)) {} - - // Operation -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) - template - result_type& operator()(const Range2T&) - { - return m_Format; - } -#endif - - template - const result_type& operator()(const Range2T&) const - { - return m_Format; - } - - private: - result_type m_Format; - }; - -// identity format functor ----------------------------------------------------// - - // identity format functor - template - struct identity_formatF - { - // Operation - template< typename Range2T > - const RangeT& operator()(const Range2T& Replace) const - { - return RangeT(::boost::begin(Replace), ::boost::end(Replace)); - } - }; - -// empty format functor ( used by erase ) ------------------------------------// - - // empty format functor - template< typename CharT > - struct empty_formatF - { - template< typename ReplaceT > - empty_container operator()(const ReplaceT&) const - { - return empty_container(); - } - }; - -// dissect format functor ----------------------------------------------------// - - // dissect format functor - template - struct dissect_formatF - { - public: - // Construction - dissect_formatF(FinderT Finder) : - m_Finder(Finder) {} - - // Operation - template - inline iterator_range< - BOOST_STRING_TYPENAME range_const_iterator::type> - operator()(const RangeT& Replace) const - { - return m_Finder(::boost::begin(Replace), ::boost::end(Replace)); - } - - private: - FinderT m_Finder; - }; - - - } // namespace detail - } // namespace algorithm -} // namespace boost - -#endif // BOOST_STRING_FORMATTER_DETAIL_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/detail/predicate.hpp b/third_party/boost_parts/boost/algorithm/string/detail/predicate.hpp deleted file mode 100644 index 5acf3cc6..00000000 --- a/third_party/boost_parts/boost/algorithm/string/detail/predicate.hpp +++ /dev/null @@ -1,77 +0,0 @@ -// Boost string_algo library predicate.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_PREDICATE_DETAIL_HPP -#define BOOST_STRING_PREDICATE_DETAIL_HPP - -#include -#include - -namespace boost { - namespace algorithm { - namespace detail { - -// ends_with predicate implementation ----------------------------------// - - template< - typename ForwardIterator1T, - typename ForwardIterator2T, - typename PredicateT> - inline bool ends_with_iter_select( - ForwardIterator1T Begin, - ForwardIterator1T End, - ForwardIterator2T SubBegin, - ForwardIterator2T SubEnd, - PredicateT Comp, - std::bidirectional_iterator_tag) - { - ForwardIterator1T it=End; - ForwardIterator2T pit=SubEnd; - for(;it!=Begin && pit!=SubBegin;) - { - if( !(Comp(*(--it),*(--pit))) ) - return false; - } - - return pit==SubBegin; - } - - template< - typename ForwardIterator1T, - typename ForwardIterator2T, - typename PredicateT> - inline bool ends_with_iter_select( - ForwardIterator1T Begin, - ForwardIterator1T End, - ForwardIterator2T SubBegin, - ForwardIterator2T SubEnd, - PredicateT Comp, - std::forward_iterator_tag) - { - if ( SubBegin==SubEnd ) - { - // empty subsequence check - return true; - } - - iterator_range Result - =last_finder( - ::boost::make_iterator_range(SubBegin, SubEnd), - Comp)(Begin, End); - - return !Result.empty() && Result.end()==End; - } - - } // namespace detail - } // namespace algorithm -} // namespace boost - - -#endif // BOOST_STRING_PREDICATE_DETAIL_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/detail/replace_storage.hpp b/third_party/boost_parts/boost/algorithm/string/detail/replace_storage.hpp deleted file mode 100644 index db35e4c5..00000000 --- a/third_party/boost_parts/boost/algorithm/string/detail/replace_storage.hpp +++ /dev/null @@ -1,159 +0,0 @@ -// Boost string_algo library replace_storage.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_REPLACE_STORAGE_DETAIL_HPP -#define BOOST_STRING_REPLACE_STORAGE_DETAIL_HPP - -#include -#include -#include -#include -#include - -namespace boost { - namespace algorithm { - namespace detail { - -// storage handling routines -----------------------------------------------// - - template< typename StorageT, typename OutputIteratorT > - inline OutputIteratorT move_from_storage( - StorageT& Storage, - OutputIteratorT DestBegin, - OutputIteratorT DestEnd ) - { - OutputIteratorT OutputIt=DestBegin; - - while( !Storage.empty() && OutputIt!=DestEnd ) - { - *OutputIt=Storage.front(); - Storage.pop_front(); - ++OutputIt; - } - - return OutputIt; - } - - template< typename StorageT, typename WhatT > - inline void copy_to_storage( - StorageT& Storage, - const WhatT& What ) - { - Storage.insert( Storage.end(), ::boost::begin(What), ::boost::end(What) ); - } - - -// process segment routine -----------------------------------------------// - - template< bool HasStableIterators > - struct process_segment_helper - { - // Optimized version of process_segment for generic sequence - template< - typename StorageT, - typename InputT, - typename ForwardIteratorT > - ForwardIteratorT operator()( - StorageT& Storage, - InputT& /*Input*/, - ForwardIteratorT InsertIt, - ForwardIteratorT SegmentBegin, - ForwardIteratorT SegmentEnd ) - { - // Copy data from the storage until the beginning of the segment - ForwardIteratorT It=::boost::algorithm::detail::move_from_storage( Storage, InsertIt, SegmentBegin ); - - // 3 cases are possible : - // a) Storage is empty, It==SegmentBegin - // b) Storage is empty, It!=SegmentBegin - // c) Storage is not empty - - if( Storage.empty() ) - { - if( It==SegmentBegin ) - { - // Case a) everything is grand, just return end of segment - return SegmentEnd; - } - else - { - // Case b) move the segment backwards - return std::copy( SegmentBegin, SegmentEnd, It ); - } - } - else - { - // Case c) -> shift the segment to the left and keep the overlap in the storage - while( It!=SegmentEnd ) - { - // Store value into storage - Storage.push_back( *It ); - // Get the top from the storage and put it here - *It=Storage.front(); - Storage.pop_front(); - - // Advance - ++It; - } - - return It; - } - } - }; - - template<> - struct process_segment_helper< true > - { - // Optimized version of process_segment for list-like sequence - template< - typename StorageT, - typename InputT, - typename ForwardIteratorT > - ForwardIteratorT operator()( - StorageT& Storage, - InputT& Input, - ForwardIteratorT InsertIt, - ForwardIteratorT SegmentBegin, - ForwardIteratorT SegmentEnd ) - - { - // Call replace to do the job - ::boost::algorithm::detail::replace( Input, InsertIt, SegmentBegin, Storage ); - // Empty the storage - Storage.clear(); - // Iterators were not changed, simply return the end of segment - return SegmentEnd; - } - }; - - // Process one segment in the replace_all algorithm - template< - typename StorageT, - typename InputT, - typename ForwardIteratorT > - inline ForwardIteratorT process_segment( - StorageT& Storage, - InputT& Input, - ForwardIteratorT InsertIt, - ForwardIteratorT SegmentBegin, - ForwardIteratorT SegmentEnd ) - { - return - process_segment_helper< - has_stable_iterators::value>()( - Storage, Input, InsertIt, SegmentBegin, SegmentEnd ); - } - - - } // namespace detail - } // namespace algorithm -} // namespace boost - -#endif // BOOST_STRING_REPLACE_STORAGE_DETAIL_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/detail/sequence.hpp b/third_party/boost_parts/boost/algorithm/string/detail/sequence.hpp deleted file mode 100644 index dc474091..00000000 --- a/third_party/boost_parts/boost/algorithm/string/detail/sequence.hpp +++ /dev/null @@ -1,200 +0,0 @@ -// Boost string_algo library sequence.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_DETAIL_SEQUENCE_HPP -#define BOOST_STRING_DETAIL_SEQUENCE_HPP - -#include -#include -#include -#include -#include - -#include - -namespace boost { - namespace algorithm { - namespace detail { - -// insert helpers -------------------------------------------------// - - template< typename InputT, typename ForwardIteratorT > - inline void insert( - InputT& Input, - BOOST_STRING_TYPENAME InputT::iterator At, - ForwardIteratorT Begin, - ForwardIteratorT End ) - { - Input.insert( At, Begin, End ); - } - - template< typename InputT, typename InsertT > - inline void insert( - InputT& Input, - BOOST_STRING_TYPENAME InputT::iterator At, - const InsertT& Insert ) - { - ::boost::algorithm::detail::insert( Input, At, ::boost::begin(Insert), ::boost::end(Insert) ); - } - -// erase helper ---------------------------------------------------// - - // Erase a range in the sequence - /* - Returns the iterator pointing just after the erase subrange - */ - template< typename InputT > - inline typename InputT::iterator erase( - InputT& Input, - BOOST_STRING_TYPENAME InputT::iterator From, - BOOST_STRING_TYPENAME InputT::iterator To ) - { - return Input.erase( From, To ); - } - -// replace helper implementation ----------------------------------// - - // Optimized version of replace for generic sequence containers - // Assumption: insert and erase are expensive - template< bool HasConstTimeOperations > - struct replace_const_time_helper - { - template< typename InputT, typename ForwardIteratorT > - void operator()( - InputT& Input, - BOOST_STRING_TYPENAME InputT::iterator From, - BOOST_STRING_TYPENAME InputT::iterator To, - ForwardIteratorT Begin, - ForwardIteratorT End ) - { - // Copy data to the container ( as much as possible ) - ForwardIteratorT InsertIt=Begin; - BOOST_STRING_TYPENAME InputT::iterator InputIt=From; - for(; InsertIt!=End && InputIt!=To; InsertIt++, InputIt++ ) - { - *InputIt=*InsertIt; - } - - if ( InsertIt!=End ) - { - // Replace sequence is longer, insert it - Input.insert( InputIt, InsertIt, End ); - } - else - { - if ( InputIt!=To ) - { - // Replace sequence is shorter, erase the rest - Input.erase( InputIt, To ); - } - } - } - }; - - template<> - struct replace_const_time_helper< true > - { - // Const-time erase and insert methods -> use them - template< typename InputT, typename ForwardIteratorT > - void operator()( - InputT& Input, - BOOST_STRING_TYPENAME InputT::iterator From, - BOOST_STRING_TYPENAME InputT::iterator To, - ForwardIteratorT Begin, - ForwardIteratorT End ) - { - BOOST_STRING_TYPENAME InputT::iterator At=Input.erase( From, To ); - if ( Begin!=End ) - { - if(!Input.empty()) - { - Input.insert( At, Begin, End ); - } - else - { - Input.insert( Input.begin(), Begin, End ); - } - } - } - }; - - // No native replace method - template< bool HasNative > - struct replace_native_helper - { - template< typename InputT, typename ForwardIteratorT > - void operator()( - InputT& Input, - BOOST_STRING_TYPENAME InputT::iterator From, - BOOST_STRING_TYPENAME InputT::iterator To, - ForwardIteratorT Begin, - ForwardIteratorT End ) - { - replace_const_time_helper< - boost::mpl::and_< - has_const_time_insert, - has_const_time_erase >::value >()( - Input, From, To, Begin, End ); - } - }; - - // Container has native replace method - template<> - struct replace_native_helper< true > - { - template< typename InputT, typename ForwardIteratorT > - void operator()( - InputT& Input, - BOOST_STRING_TYPENAME InputT::iterator From, - BOOST_STRING_TYPENAME InputT::iterator To, - ForwardIteratorT Begin, - ForwardIteratorT End ) - { - Input.replace( From, To, Begin, End ); - } - }; - -// replace helper -------------------------------------------------// - - template< typename InputT, typename ForwardIteratorT > - inline void replace( - InputT& Input, - BOOST_STRING_TYPENAME InputT::iterator From, - BOOST_STRING_TYPENAME InputT::iterator To, - ForwardIteratorT Begin, - ForwardIteratorT End ) - { - replace_native_helper< has_native_replace::value >()( - Input, From, To, Begin, End ); - } - - template< typename InputT, typename InsertT > - inline void replace( - InputT& Input, - BOOST_STRING_TYPENAME InputT::iterator From, - BOOST_STRING_TYPENAME InputT::iterator To, - const InsertT& Insert ) - { - if(From!=To) - { - ::boost::algorithm::detail::replace( Input, From, To, ::boost::begin(Insert), ::boost::end(Insert) ); - } - else - { - ::boost::algorithm::detail::insert( Input, From, ::boost::begin(Insert), ::boost::end(Insert) ); - } - } - - } // namespace detail - } // namespace algorithm -} // namespace boost - - -#endif // BOOST_STRING_DETAIL_SEQUENCE_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/detail/trim.hpp b/third_party/boost_parts/boost/algorithm/string/detail/trim.hpp deleted file mode 100644 index 1233e49d..00000000 --- a/third_party/boost_parts/boost/algorithm/string/detail/trim.hpp +++ /dev/null @@ -1,95 +0,0 @@ -// Boost string_algo library trim.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_TRIM_DETAIL_HPP -#define BOOST_STRING_TRIM_DETAIL_HPP - -#include -#include - -namespace boost { - namespace algorithm { - namespace detail { - -// trim iterator helper -----------------------------------------------// - - template< typename ForwardIteratorT, typename PredicateT > - inline ForwardIteratorT trim_end_iter_select( - ForwardIteratorT InBegin, - ForwardIteratorT InEnd, - PredicateT IsSpace, - std::forward_iterator_tag ) - { - ForwardIteratorT TrimIt=InBegin; - - for( ForwardIteratorT It=InBegin; It!=InEnd; ++It ) - { - if ( !IsSpace(*It) ) - { - TrimIt=It; - ++TrimIt; - } - } - - return TrimIt; - } - - template< typename ForwardIteratorT, typename PredicateT > - inline ForwardIteratorT trim_end_iter_select( - ForwardIteratorT InBegin, - ForwardIteratorT InEnd, - PredicateT IsSpace, - std::bidirectional_iterator_tag ) - { - for( ForwardIteratorT It=InEnd; It!=InBegin; ) - { - if ( !IsSpace(*(--It)) ) - return ++It; - } - - return InBegin; - } - // Search for first non matching character from the beginning of the sequence - template< typename ForwardIteratorT, typename PredicateT > - inline ForwardIteratorT trim_begin( - ForwardIteratorT InBegin, - ForwardIteratorT InEnd, - PredicateT IsSpace ) - { - ForwardIteratorT It=InBegin; - for(; It!=InEnd; ++It ) - { - if (!IsSpace(*It)) - return It; - } - - return It; - } - - // Search for first non matching character from the end of the sequence - template< typename ForwardIteratorT, typename PredicateT > - inline ForwardIteratorT trim_end( - ForwardIteratorT InBegin, - ForwardIteratorT InEnd, - PredicateT IsSpace ) - { - typedef BOOST_STRING_TYPENAME boost::detail:: - iterator_traits::iterator_category category; - - return ::boost::algorithm::detail::trim_end_iter_select( InBegin, InEnd, IsSpace, category() ); - } - - - } // namespace detail - } // namespace algorithm -} // namespace boost - - -#endif // BOOST_STRING_TRIM_DETAIL_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/detail/util.hpp b/third_party/boost_parts/boost/algorithm/string/detail/util.hpp deleted file mode 100644 index cf4a8b1c..00000000 --- a/third_party/boost_parts/boost/algorithm/string/detail/util.hpp +++ /dev/null @@ -1,106 +0,0 @@ -// Boost string_algo library util.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_UTIL_DETAIL_HPP -#define BOOST_STRING_UTIL_DETAIL_HPP - -#include -#include -#include - -namespace boost { - namespace algorithm { - namespace detail { - -// empty container -----------------------------------------------// - - // empty_container - /* - This class represents always empty container, - containing elements of type CharT. - - It is supposed to be used in a const version only - */ - template< typename CharT > - struct empty_container - { - typedef empty_container type; - typedef CharT value_type; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef const value_type& reference; - typedef const value_type& const_reference; - typedef const value_type* iterator; - typedef const value_type* const_iterator; - - - // Operations - const_iterator begin() const - { - return reinterpret_cast(0); - } - - const_iterator end() const - { - return reinterpret_cast(0); - } - - bool empty() const - { - return false; - } - - size_type size() const - { - return 0; - } - }; - -// bounded copy algorithm -----------------------------------------------// - - // Bounded version of the std::copy algorithm - template - inline OutputIteratorT bounded_copy( - InputIteratorT First, - InputIteratorT Last, - OutputIteratorT DestFirst, - OutputIteratorT DestLast ) - { - InputIteratorT InputIt=First; - OutputIteratorT OutputIt=DestFirst; - for(; InputIt!=Last && OutputIt!=DestLast; InputIt++, OutputIt++ ) - { - *OutputIt=*InputIt; - } - - return OutputIt; - } - -// iterator range utilities -----------------------------------------// - - // copy range functor - template< - typename SeqT, - typename IteratorT=BOOST_STRING_TYPENAME SeqT::const_iterator > - struct copy_iterator_rangeF : - public std::unary_function< iterator_range, SeqT > - { - SeqT operator()( const iterator_range& Range ) const - { - return copy_range(Range); - } - }; - - } // namespace detail - } // namespace algorithm -} // namespace boost - - -#endif // BOOST_STRING_UTIL_DETAIL_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/erase.hpp b/third_party/boost_parts/boost/algorithm/string/erase.hpp deleted file mode 100644 index 68837909..00000000 --- a/third_party/boost_parts/boost/algorithm/string/erase.hpp +++ /dev/null @@ -1,844 +0,0 @@ -// Boost string_algo library erase.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2006. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_ERASE_HPP -#define BOOST_STRING_ERASE_HPP - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -/*! \file - Defines various erase algorithms. Each algorithm removes - part(s) of the input according to a searching criteria. -*/ - -namespace boost { - namespace algorithm { - -// erase_range -------------------------------------------------------// - - //! Erase range algorithm - /*! - Remove the given range from the input. The result is a modified copy of - the input. It is returned as a sequence or copied to the output iterator. - - \param Output An output iterator to which the result will be copied - \param Input An input sequence - \param SearchRange A range in the input to be removed - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template - inline OutputIteratorT erase_range_copy( - OutputIteratorT Output, - const RangeT& Input, - const iterator_range< - BOOST_STRING_TYPENAME - range_const_iterator::type>& SearchRange ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::range_finder(SearchRange), - ::boost::algorithm::empty_formatter(Input) ); - } - - //! Erase range algorithm - /*! - \overload - */ - template - inline SequenceT erase_range_copy( - const SequenceT& Input, - const iterator_range< - BOOST_STRING_TYPENAME - range_const_iterator::type>& SearchRange ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::range_finder(SearchRange), - ::boost::algorithm::empty_formatter(Input) ); - } - - //! Erase range algorithm - /*! - Remove the given range from the input. - The input sequence is modified in-place. - - \param Input An input sequence - \param SearchRange A range in the input to be removed - */ - template - inline void erase_range( - SequenceT& Input, - const iterator_range< - BOOST_STRING_TYPENAME - range_iterator::type>& SearchRange ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::range_finder(SearchRange), - ::boost::algorithm::empty_formatter(Input) ); - } - -// erase_first --------------------------------------------------------// - - //! Erase first algorithm - /*! - Remove the first occurrence of the substring from the input. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param Search A substring to be searched for - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T> - inline OutputIteratorT erase_first_copy( - OutputIteratorT Output, - const Range1T& Input, - const Range2T& Search ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::first_finder(Search), - ::boost::algorithm::empty_formatter(Input) ); - } - - //! Erase first algorithm - /*! - \overload - */ - template - inline SequenceT erase_first_copy( - const SequenceT& Input, - const RangeT& Search ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::first_finder(Search), - ::boost::algorithm::empty_formatter(Input) ); - } - - //! Erase first algorithm - /*! - Remove the first occurrence of the substring from the input. - The input sequence is modified in-place. - - \param Input An input string - \param Search A substring to be searched for. - */ - template - inline void erase_first( - SequenceT& Input, - const RangeT& Search ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::first_finder(Search), - ::boost::algorithm::empty_formatter(Input) ); - } - -// erase_first ( case insensitive ) ------------------------------------// - - //! Erase first algorithm ( case insensitive ) - /*! - Remove the first occurrence of the substring from the input. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - Searching is case insensitive. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param Search A substring to be searched for - \param Loc A locale used for case insensitive comparison - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T> - inline OutputIteratorT ierase_first_copy( - OutputIteratorT Output, - const Range1T& Input, - const Range2T& Search, - const std::locale& Loc=std::locale() ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::first_finder(Search, is_iequal(Loc)), - ::boost::algorithm::empty_formatter(Input) ); - } - - //! Erase first algorithm ( case insensitive ) - /*! - \overload - */ - template - inline SequenceT ierase_first_copy( - const SequenceT& Input, - const RangeT& Search, - const std::locale& Loc=std::locale() ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::first_finder(Search, is_iequal(Loc)), - ::boost::algorithm::empty_formatter(Input) ); - } - - //! Erase first algorithm ( case insensitive ) - /*! - Remove the first occurrence of the substring from the input. - The input sequence is modified in-place. Searching is case insensitive. - - \param Input An input string - \param Search A substring to be searched for - \param Loc A locale used for case insensitive comparison - */ - template - inline void ierase_first( - SequenceT& Input, - const RangeT& Search, - const std::locale& Loc=std::locale() ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::first_finder(Search, is_iequal(Loc)), - ::boost::algorithm::empty_formatter(Input) ); - } - -// erase_last --------------------------------------------------------// - - //! Erase last algorithm - /*! - Remove the last occurrence of the substring from the input. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param Search A substring to be searched for. - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T> - inline OutputIteratorT erase_last_copy( - OutputIteratorT Output, - const Range1T& Input, - const Range2T& Search ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::last_finder(Search), - ::boost::algorithm::empty_formatter(Input) ); - } - - //! Erase last algorithm - /*! - \overload - */ - template - inline SequenceT erase_last_copy( - const SequenceT& Input, - const RangeT& Search ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::last_finder(Search), - ::boost::algorithm::empty_formatter(Input) ); - } - - //! Erase last algorithm - /*! - Remove the last occurrence of the substring from the input. - The input sequence is modified in-place. - - \param Input An input string - \param Search A substring to be searched for - */ - template - inline void erase_last( - SequenceT& Input, - const RangeT& Search ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::last_finder(Search), - ::boost::algorithm::empty_formatter(Input) ); - } - -// erase_last ( case insensitive ) ------------------------------------// - - //! Erase last algorithm ( case insensitive ) - /*! - Remove the last occurrence of the substring from the input. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - Searching is case insensitive. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param Search A substring to be searched for - \param Loc A locale used for case insensitive comparison - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T> - inline OutputIteratorT ierase_last_copy( - OutputIteratorT Output, - const Range1T& Input, - const Range2T& Search, - const std::locale& Loc=std::locale() ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::last_finder(Search, is_iequal(Loc)), - ::boost::algorithm::empty_formatter(Input) ); - } - - //! Erase last algorithm ( case insensitive ) - /*! - \overload - */ - template - inline SequenceT ierase_last_copy( - const SequenceT& Input, - const RangeT& Search, - const std::locale& Loc=std::locale() ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::last_finder(Search, is_iequal(Loc)), - ::boost::algorithm::empty_formatter(Input) ); - } - - //! Erase last algorithm ( case insensitive ) - /*! - Remove the last occurrence of the substring from the input. - The input sequence is modified in-place. Searching is case insensitive. - - \param Input An input string - \param Search A substring to be searched for - \param Loc A locale used for case insensitive comparison - */ - template - inline void ierase_last( - SequenceT& Input, - const RangeT& Search, - const std::locale& Loc=std::locale() ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::last_finder(Search, is_iequal(Loc)), - ::boost::algorithm::empty_formatter(Input) ); - } - -// erase_nth --------------------------------------------------------------------// - - //! Erase nth algorithm - /*! - Remove the Nth occurrence of the substring in the input. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param Search A substring to be searched for - \param Nth An index of the match to be replaced. The index is 0-based. - For negative N, matches are counted from the end of string. - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T> - inline OutputIteratorT erase_nth_copy( - OutputIteratorT Output, - const Range1T& Input, - const Range2T& Search, - int Nth ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::nth_finder(Search, Nth), - ::boost::algorithm::empty_formatter(Input) ); - } - - //! Erase nth algorithm - /*! - \overload - */ - template - inline SequenceT erase_nth_copy( - const SequenceT& Input, - const RangeT& Search, - int Nth ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::nth_finder(Search, Nth), - ::boost::algorithm::empty_formatter(Input) ); - } - - //! Erase nth algorithm - /*! - Remove the Nth occurrence of the substring in the input. - The input sequence is modified in-place. - - \param Input An input string - \param Search A substring to be searched for. - \param Nth An index of the match to be replaced. The index is 0-based. - For negative N, matches are counted from the end of string. - */ - template - inline void erase_nth( - SequenceT& Input, - const RangeT& Search, - int Nth ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::nth_finder(Search, Nth), - ::boost::algorithm::empty_formatter(Input) ); - } - -// erase_nth ( case insensitive ) ---------------------------------------------// - - //! Erase nth algorithm ( case insensitive ) - /*! - Remove the Nth occurrence of the substring in the input. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - Searching is case insensitive. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param Search A substring to be searched for. - \param Nth An index of the match to be replaced. The index is 0-based. - For negative N, matches are counted from the end of string. - \param Loc A locale used for case insensitive comparison - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T> - inline OutputIteratorT ierase_nth_copy( - OutputIteratorT Output, - const Range1T& Input, - const Range2T& Search, - int Nth, - const std::locale& Loc=std::locale() ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), - ::boost::algorithm::empty_formatter(Input) ); - } - - //! Erase nth algorithm - /*! - \overload - */ - template - inline SequenceT ierase_nth_copy( - const SequenceT& Input, - const RangeT& Search, - int Nth, - const std::locale& Loc=std::locale() ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), - empty_formatter(Input) ); - } - - //! Erase nth algorithm - /*! - Remove the Nth occurrence of the substring in the input. - The input sequence is modified in-place. Searching is case insensitive. - - \param Input An input string - \param Search A substring to be searched for. - \param Nth An index of the match to be replaced. The index is 0-based. - For negative N, matches are counted from the end of string. - \param Loc A locale used for case insensitive comparison - */ - template - inline void ierase_nth( - SequenceT& Input, - const RangeT& Search, - int Nth, - const std::locale& Loc=std::locale() ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), - ::boost::algorithm::empty_formatter(Input) ); - } - - -// erase_all --------------------------------------------------------// - - //! Erase all algorithm - /*! - Remove all the occurrences of the string from the input. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - - - \param Output An output iterator to which the result will be copied - \param Input An input sequence - \param Search A substring to be searched for. - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T> - inline OutputIteratorT erase_all_copy( - OutputIteratorT Output, - const Range1T& Input, - const Range2T& Search ) - { - return ::boost::algorithm::find_format_all_copy( - Output, - Input, - ::boost::algorithm::first_finder(Search), - ::boost::algorithm::empty_formatter(Input) ); - } - - //! Erase all algorithm - /*! - \overload - */ - template - inline SequenceT erase_all_copy( - const SequenceT& Input, - const RangeT& Search ) - { - return ::boost::algorithm::find_format_all_copy( - Input, - ::boost::algorithm::first_finder(Search), - ::boost::algorithm::empty_formatter(Input) ); - } - - //! Erase all algorithm - /*! - Remove all the occurrences of the string from the input. - The input sequence is modified in-place. - - \param Input An input string - \param Search A substring to be searched for. - */ - template - inline void erase_all( - SequenceT& Input, - const RangeT& Search ) - { - ::boost::algorithm::find_format_all( - Input, - ::boost::algorithm::first_finder(Search), - ::boost::algorithm::empty_formatter(Input) ); - } - -// erase_all ( case insensitive ) ------------------------------------// - - //! Erase all algorithm ( case insensitive ) - /*! - Remove all the occurrences of the string from the input. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - Searching is case insensitive. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param Search A substring to be searched for - \param Loc A locale used for case insensitive comparison - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T> - inline OutputIteratorT ierase_all_copy( - OutputIteratorT Output, - const Range1T& Input, - const Range2T& Search, - const std::locale& Loc=std::locale() ) - { - return ::boost::algorithm::find_format_all_copy( - Output, - Input, - ::boost::algorithm::first_finder(Search, is_iequal(Loc)), - ::boost::algorithm::empty_formatter(Input) ); - } - - //! Erase all algorithm ( case insensitive ) - /*! - \overload - */ - template - inline SequenceT ierase_all_copy( - const SequenceT& Input, - const RangeT& Search, - const std::locale& Loc=std::locale() ) - { - return ::boost::algorithm::find_format_all_copy( - Input, - ::boost::algorithm::first_finder(Search, is_iequal(Loc)), - ::boost::algorithm::empty_formatter(Input) ); - } - - //! Erase all algorithm ( case insensitive ) - /*! - Remove all the occurrences of the string from the input. - The input sequence is modified in-place. Searching is case insensitive. - - \param Input An input string - \param Search A substring to be searched for. - \param Loc A locale used for case insensitive comparison - */ - template - inline void ierase_all( - SequenceT& Input, - const RangeT& Search, - const std::locale& Loc=std::locale() ) - { - ::boost::algorithm::find_format_all( - Input, - ::boost::algorithm::first_finder(Search, is_iequal(Loc)), - ::boost::algorithm::empty_formatter(Input) ); - } - -// erase_head --------------------------------------------------------------------// - - //! Erase head algorithm - /*! - Remove the head from the input. The head is a prefix of a sequence of given size. - If the sequence is shorter then required, the whole string is - considered to be the head. The result is a modified copy of the input. - It is returned as a sequence or copied to the output iterator. - - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param N Length of the head. - For N>=0, at most N characters are extracted. - For N<0, size(Input)-|N| characters are extracted. - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename RangeT> - inline OutputIteratorT erase_head_copy( - OutputIteratorT Output, - const RangeT& Input, - int N ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::head_finder(N), - ::boost::algorithm::empty_formatter( Input ) ); - } - - //! Erase head algorithm - /*! - \overload - */ - template - inline SequenceT erase_head_copy( - const SequenceT& Input, - int N ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::head_finder(N), - ::boost::algorithm::empty_formatter( Input ) ); - } - - //! Erase head algorithm - /*! - Remove the head from the input. The head is a prefix of a sequence of given size. - If the sequence is shorter then required, the whole string is - considered to be the head. The input sequence is modified in-place. - - \param Input An input string - \param N Length of the head - For N>=0, at most N characters are extracted. - For N<0, size(Input)-|N| characters are extracted. - */ - template - inline void erase_head( - SequenceT& Input, - int N ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::head_finder(N), - ::boost::algorithm::empty_formatter( Input ) ); - } - -// erase_tail --------------------------------------------------------------------// - - //! Erase tail algorithm - /*! - Remove the tail from the input. The tail is a suffix of a sequence of given size. - If the sequence is shorter then required, the whole string is - considered to be the tail. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param N Length of the tail. - For N>=0, at most N characters are extracted. - For N<0, size(Input)-|N| characters are extracted. - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename RangeT> - inline OutputIteratorT erase_tail_copy( - OutputIteratorT Output, - const RangeT& Input, - int N ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::tail_finder(N), - ::boost::algorithm::empty_formatter( Input ) ); - } - - //! Erase tail algorithm - /*! - \overload - */ - template - inline SequenceT erase_tail_copy( - const SequenceT& Input, - int N ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::tail_finder(N), - ::boost::algorithm::empty_formatter( Input ) ); - } - - //! Erase tail algorithm - /*! - Remove the tail from the input. The tail is a suffix of a sequence of given size. - If the sequence is shorter then required, the whole string is - considered to be the tail. The input sequence is modified in-place. - - \param Input An input string - \param N Length of the tail - For N>=0, at most N characters are extracted. - For N<0, size(Input)-|N| characters are extracted. - */ - template - inline void erase_tail( - SequenceT& Input, - int N ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::tail_finder(N), - ::boost::algorithm::empty_formatter( Input ) ); - } - - } // namespace algorithm - - // pull names into the boost namespace - using algorithm::erase_range_copy; - using algorithm::erase_range; - using algorithm::erase_first_copy; - using algorithm::erase_first; - using algorithm::ierase_first_copy; - using algorithm::ierase_first; - using algorithm::erase_last_copy; - using algorithm::erase_last; - using algorithm::ierase_last_copy; - using algorithm::ierase_last; - using algorithm::erase_nth_copy; - using algorithm::erase_nth; - using algorithm::ierase_nth_copy; - using algorithm::ierase_nth; - using algorithm::erase_all_copy; - using algorithm::erase_all; - using algorithm::ierase_all_copy; - using algorithm::ierase_all; - using algorithm::erase_head_copy; - using algorithm::erase_head; - using algorithm::erase_tail_copy; - using algorithm::erase_tail; - -} // namespace boost - - -#endif // BOOST_ERASE_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/find.hpp b/third_party/boost_parts/boost/algorithm/string/find.hpp deleted file mode 100644 index f2c2926b..00000000 --- a/third_party/boost_parts/boost/algorithm/string/find.hpp +++ /dev/null @@ -1,334 +0,0 @@ -// Boost string_algo library find.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_FIND_HPP -#define BOOST_STRING_FIND_HPP - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -/*! \file - Defines a set of find algorithms. The algorithms are searching - for a substring of the input. The result is given as an \c iterator_range - delimiting the substring. -*/ - -namespace boost { - namespace algorithm { - -// Generic find -----------------------------------------------// - - //! Generic find algorithm - /*! - Search the input using the given finder. - - \param Input A string which will be searched. - \param Finder Finder object used for searching. - \return - An \c iterator_range delimiting the match. - Returned iterator is either \c RangeT::iterator or - \c RangeT::const_iterator, depending on the constness of - the input parameter. - */ - template - inline iterator_range< - BOOST_STRING_TYPENAME range_iterator::type> - find( - RangeT& Input, - const FinderT& Finder) - { - iterator_range::type> lit_input(::boost::as_literal(Input)); - - return Finder(::boost::begin(lit_input),::boost::end(lit_input)); - } - -// find_first -----------------------------------------------// - - //! Find first algorithm - /*! - Search for the first occurrence of the substring in the input. - - \param Input A string which will be searched. - \param Search A substring to be searched for. - \return - An \c iterator_range delimiting the match. - Returned iterator is either \c RangeT::iterator or - \c RangeT::const_iterator, depending on the constness of - the input parameter. - - \note This function provides the strong exception-safety guarantee - */ - template - inline iterator_range< - BOOST_STRING_TYPENAME range_iterator::type> - find_first( - Range1T& Input, - const Range2T& Search) - { - return ::boost::algorithm::find(Input, ::boost::algorithm::first_finder(Search)); - } - - //! Find first algorithm ( case insensitive ) - /*! - Search for the first occurrence of the substring in the input. - Searching is case insensitive. - - \param Input A string which will be searched. - \param Search A substring to be searched for. - \param Loc A locale used for case insensitive comparison - \return - An \c iterator_range delimiting the match. - Returned iterator is either \c Range1T::iterator or - \c Range1T::const_iterator, depending on the constness of - the input parameter. - - \note This function provides the strong exception-safety guarantee - */ - template - inline iterator_range< - BOOST_STRING_TYPENAME range_iterator::type> - ifind_first( - Range1T& Input, - const Range2T& Search, - const std::locale& Loc=std::locale()) - { - return ::boost::algorithm::find(Input, ::boost::algorithm::first_finder(Search,is_iequal(Loc))); - } - -// find_last -----------------------------------------------// - - //! Find last algorithm - /*! - Search for the last occurrence of the substring in the input. - - \param Input A string which will be searched. - \param Search A substring to be searched for. - \return - An \c iterator_range delimiting the match. - Returned iterator is either \c Range1T::iterator or - \c Range1T::const_iterator, depending on the constness of - the input parameter. - - \note This function provides the strong exception-safety guarantee - */ - template - inline iterator_range< - BOOST_STRING_TYPENAME range_iterator::type> - find_last( - Range1T& Input, - const Range2T& Search) - { - return ::boost::algorithm::find(Input, ::boost::algorithm::last_finder(Search)); - } - - //! Find last algorithm ( case insensitive ) - /*! - Search for the last match a string in the input. - Searching is case insensitive. - - \param Input A string which will be searched. - \param Search A substring to be searched for. - \param Loc A locale used for case insensitive comparison - \return - An \c iterator_range delimiting the match. - Returned iterator is either \c Range1T::iterator or - \c Range1T::const_iterator, depending on the constness of - the input parameter. - - \note This function provides the strong exception-safety guarantee - */ - template - inline iterator_range< - BOOST_STRING_TYPENAME range_iterator::type> - ifind_last( - Range1T& Input, - const Range2T& Search, - const std::locale& Loc=std::locale()) - { - return ::boost::algorithm::find(Input, ::boost::algorithm::last_finder(Search, is_iequal(Loc))); - } - -// find_nth ----------------------------------------------------------------------// - - //! Find n-th algorithm - /*! - Search for the n-th (zero-indexed) occurrence of the substring in the - input. - - \param Input A string which will be searched. - \param Search A substring to be searched for. - \param Nth An index (zero-indexed) of the match to be found. - For negative N, the matches are counted from the end of string. - \return - An \c iterator_range delimiting the match. - Returned iterator is either \c Range1T::iterator or - \c Range1T::const_iterator, depending on the constness of - the input parameter. - */ - template - inline iterator_range< - BOOST_STRING_TYPENAME range_iterator::type> - find_nth( - Range1T& Input, - const Range2T& Search, - int Nth) - { - return ::boost::algorithm::find(Input, ::boost::algorithm::nth_finder(Search,Nth)); - } - - //! Find n-th algorithm ( case insensitive ). - /*! - Search for the n-th (zero-indexed) occurrence of the substring in the - input. Searching is case insensitive. - - \param Input A string which will be searched. - \param Search A substring to be searched for. - \param Nth An index (zero-indexed) of the match to be found. - For negative N, the matches are counted from the end of string. - \param Loc A locale used for case insensitive comparison - \return - An \c iterator_range delimiting the match. - Returned iterator is either \c Range1T::iterator or - \c Range1T::const_iterator, depending on the constness of - the input parameter. - - - \note This function provides the strong exception-safety guarantee - */ - template - inline iterator_range< - BOOST_STRING_TYPENAME range_iterator::type> - ifind_nth( - Range1T& Input, - const Range2T& Search, - int Nth, - const std::locale& Loc=std::locale()) - { - return ::boost::algorithm::find(Input, ::boost::algorithm::nth_finder(Search,Nth,is_iequal(Loc))); - } - -// find_head ----------------------------------------------------------------------// - - //! Find head algorithm - /*! - Get the head of the input. Head is a prefix of the string of the - given size. If the input is shorter then required, whole input is considered - to be the head. - - \param Input An input string - \param N Length of the head - For N>=0, at most N characters are extracted. - For N<0, at most size(Input)-|N| characters are extracted. - \return - An \c iterator_range delimiting the match. - Returned iterator is either \c Range1T::iterator or - \c Range1T::const_iterator, depending on the constness of - the input parameter. - - \note This function provides the strong exception-safety guarantee - */ - template - inline iterator_range< - BOOST_STRING_TYPENAME range_iterator::type> - find_head( - RangeT& Input, - int N) - { - return ::boost::algorithm::find(Input, ::boost::algorithm::head_finder(N)); - } - -// find_tail ----------------------------------------------------------------------// - - //! Find tail algorithm - /*! - Get the tail of the input. Tail is a suffix of the string of the - given size. If the input is shorter then required, whole input is considered - to be the tail. - - \param Input An input string - \param N Length of the tail. - For N>=0, at most N characters are extracted. - For N<0, at most size(Input)-|N| characters are extracted. - \return - An \c iterator_range delimiting the match. - Returned iterator is either \c RangeT::iterator or - \c RangeT::const_iterator, depending on the constness of - the input parameter. - - - \note This function provides the strong exception-safety guarantee - */ - template - inline iterator_range< - BOOST_STRING_TYPENAME range_iterator::type> - find_tail( - RangeT& Input, - int N) - { - return ::boost::algorithm::find(Input, ::boost::algorithm::tail_finder(N)); - } - -// find_token --------------------------------------------------------------------// - - //! Find token algorithm - /*! - Look for a given token in the string. Token is a character that matches the - given predicate. - If the "token compress mode" is enabled, adjacent tokens are considered to be one match. - - \param Input A input string. - \param Pred A unary predicate to identify a token - \param eCompress Enable/Disable compressing of adjacent tokens - \return - An \c iterator_range delimiting the match. - Returned iterator is either \c RangeT::iterator or - \c RangeT::const_iterator, depending on the constness of - the input parameter. - - \note This function provides the strong exception-safety guarantee - */ - template - inline iterator_range< - BOOST_STRING_TYPENAME range_iterator::type> - find_token( - RangeT& Input, - PredicateT Pred, - token_compress_mode_type eCompress=token_compress_off) - { - return ::boost::algorithm::find(Input, ::boost::algorithm::token_finder(Pred, eCompress)); - } - - } // namespace algorithm - - // pull names to the boost namespace - using algorithm::find; - using algorithm::find_first; - using algorithm::ifind_first; - using algorithm::find_last; - using algorithm::ifind_last; - using algorithm::find_nth; - using algorithm::ifind_nth; - using algorithm::find_head; - using algorithm::find_tail; - using algorithm::find_token; - -} // namespace boost - - -#endif // BOOST_STRING_FIND_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/find_format.hpp b/third_party/boost_parts/boost/algorithm/string/find_format.hpp deleted file mode 100644 index 0e84a4ee..00000000 --- a/third_party/boost_parts/boost/algorithm/string/find_format.hpp +++ /dev/null @@ -1,287 +0,0 @@ -// Boost string_algo library find_format.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_FIND_FORMAT_HPP -#define BOOST_STRING_FIND_FORMAT_HPP - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -/*! \file - Defines generic replace algorithms. Each algorithm replaces - part(s) of the input. The part to be replaced is looked up using a Finder object. - Result of finding is then used by a Formatter object to generate the replacement. -*/ - -namespace boost { - namespace algorithm { - -// generic replace -----------------------------------------------------------------// - - //! Generic replace algorithm - /*! - Use the Finder to search for a substring. Use the Formatter to format - this substring and replace it in the input. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - - \param Output An output iterator to which the result will be copied - \param Input An input sequence - \param Finder A Finder object used to search for a match to be replaced - \param Formatter A Formatter object used to format a match - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename RangeT, - typename FinderT, - typename FormatterT> - inline OutputIteratorT find_format_copy( - OutputIteratorT Output, - const RangeT& Input, - FinderT Finder, - FormatterT Formatter ) - { - // Concept check - BOOST_CONCEPT_ASSERT(( - FinderConcept< - FinderT, - BOOST_STRING_TYPENAME range_const_iterator::type> - )); - BOOST_CONCEPT_ASSERT(( - FormatterConcept< - FormatterT, - FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> - )); - - iterator_range::type> lit_input(::boost::as_literal(Input)); - - return detail::find_format_copy_impl( - Output, - lit_input, - Formatter, - Finder( ::boost::begin(lit_input), ::boost::end(lit_input) ) ); - } - - //! Generic replace algorithm - /*! - \overload - */ - template< - typename SequenceT, - typename FinderT, - typename FormatterT> - inline SequenceT find_format_copy( - const SequenceT& Input, - FinderT Finder, - FormatterT Formatter ) - { - // Concept check - BOOST_CONCEPT_ASSERT(( - FinderConcept< - FinderT, - BOOST_STRING_TYPENAME range_const_iterator::type> - )); - BOOST_CONCEPT_ASSERT(( - FormatterConcept< - FormatterT, - FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> - )); - - return detail::find_format_copy_impl( - Input, - Formatter, - Finder(::boost::begin(Input), ::boost::end(Input))); - } - - //! Generic replace algorithm - /*! - Use the Finder to search for a substring. Use the Formatter to format - this substring and replace it in the input. The input is modified in-place. - - \param Input An input sequence - \param Finder A Finder object used to search for a match to be replaced - \param Formatter A Formatter object used to format a match - */ - template< - typename SequenceT, - typename FinderT, - typename FormatterT> - inline void find_format( - SequenceT& Input, - FinderT Finder, - FormatterT Formatter) - { - // Concept check - BOOST_CONCEPT_ASSERT(( - FinderConcept< - FinderT, - BOOST_STRING_TYPENAME range_const_iterator::type> - )); - BOOST_CONCEPT_ASSERT(( - FormatterConcept< - FormatterT, - FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> - )); - - detail::find_format_impl( - Input, - Formatter, - Finder(::boost::begin(Input), ::boost::end(Input))); - } - - -// find_format_all generic ----------------------------------------------------------------// - - //! Generic replace all algorithm - /*! - Use the Finder to search for a substring. Use the Formatter to format - this substring and replace it in the input. Repeat this for all matching - substrings. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - - \param Output An output iterator to which the result will be copied - \param Input An input sequence - \param Finder A Finder object used to search for a match to be replaced - \param Formatter A Formatter object used to format a match - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename RangeT, - typename FinderT, - typename FormatterT> - inline OutputIteratorT find_format_all_copy( - OutputIteratorT Output, - const RangeT& Input, - FinderT Finder, - FormatterT Formatter) - { - // Concept check - BOOST_CONCEPT_ASSERT(( - FinderConcept< - FinderT, - BOOST_STRING_TYPENAME range_const_iterator::type> - )); - BOOST_CONCEPT_ASSERT(( - FormatterConcept< - FormatterT, - FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> - )); - - iterator_range::type> lit_input(::boost::as_literal(Input)); - - return detail::find_format_all_copy_impl( - Output, - lit_input, - Finder, - Formatter, - Finder(::boost::begin(lit_input), ::boost::end(lit_input))); - } - - //! Generic replace all algorithm - /*! - \overload - */ - template< - typename SequenceT, - typename FinderT, - typename FormatterT > - inline SequenceT find_format_all_copy( - const SequenceT& Input, - FinderT Finder, - FormatterT Formatter ) - { - // Concept check - BOOST_CONCEPT_ASSERT(( - FinderConcept< - FinderT, - BOOST_STRING_TYPENAME range_const_iterator::type> - )); - BOOST_CONCEPT_ASSERT(( - FormatterConcept< - FormatterT, - FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> - )); - - return detail::find_format_all_copy_impl( - Input, - Finder, - Formatter, - Finder( ::boost::begin(Input), ::boost::end(Input) ) ); - } - - //! Generic replace all algorithm - /*! - Use the Finder to search for a substring. Use the Formatter to format - this substring and replace it in the input. Repeat this for all matching - substrings.The input is modified in-place. - - \param Input An input sequence - \param Finder A Finder object used to search for a match to be replaced - \param Formatter A Formatter object used to format a match - */ - template< - typename SequenceT, - typename FinderT, - typename FormatterT > - inline void find_format_all( - SequenceT& Input, - FinderT Finder, - FormatterT Formatter ) - { - // Concept check - BOOST_CONCEPT_ASSERT(( - FinderConcept< - FinderT, - BOOST_STRING_TYPENAME range_const_iterator::type> - )); - BOOST_CONCEPT_ASSERT(( - FormatterConcept< - FormatterT, - FinderT,BOOST_STRING_TYPENAME range_const_iterator::type> - )); - - detail::find_format_all_impl( - Input, - Finder, - Formatter, - Finder(::boost::begin(Input), ::boost::end(Input))); - - } - - } // namespace algorithm - - // pull the names to the boost namespace - using algorithm::find_format_copy; - using algorithm::find_format; - using algorithm::find_format_all_copy; - using algorithm::find_format_all; - -} // namespace boost - - -#endif // BOOST_STRING_FIND_FORMAT_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/find_iterator.hpp b/third_party/boost_parts/boost/algorithm/string/find_iterator.hpp deleted file mode 100644 index 5a52d92e..00000000 --- a/third_party/boost_parts/boost/algorithm/string/find_iterator.hpp +++ /dev/null @@ -1,388 +0,0 @@ -// Boost string_algo library find_iterator.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2004. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_FIND_ITERATOR_HPP -#define BOOST_STRING_FIND_ITERATOR_HPP - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -/*! \file - Defines find iterator classes. Find iterator repeatedly applies a Finder - to the specified input string to search for matches. Dereferencing - the iterator yields the current match or a range between the last and the current - match depending on the iterator used. -*/ - -namespace boost { - namespace algorithm { - -// find_iterator -----------------------------------------------// - - //! find_iterator - /*! - Find iterator encapsulates a Finder and allows - for incremental searching in a string. - Each increment moves the iterator to the next match. - - Find iterator is a readable forward traversal iterator. - - Dereferencing the iterator yields an iterator_range delimiting - the current match. - */ - template - class find_iterator : - public iterator_facade< - find_iterator, - const iterator_range, - forward_traversal_tag >, - private detail::find_iterator_base - { - private: - // facade support - friend class ::boost::iterator_core_access; - - private: - // typedefs - - typedef detail::find_iterator_base base_type; - typedef BOOST_STRING_TYPENAME - base_type::input_iterator_type input_iterator_type; - typedef BOOST_STRING_TYPENAME - base_type::match_type match_type; - - public: - //! Default constructor - /*! - Construct null iterator. All null iterators are equal. - - \post eof()==true - */ - find_iterator() {} - - //! Copy constructor - /*! - Construct a copy of the find_iterator - */ - find_iterator( const find_iterator& Other ) : - base_type(Other), - m_Match(Other.m_Match), - m_End(Other.m_End) {} - - //! Constructor - /*! - Construct new find_iterator for a given finder - and a range. - */ - template - find_iterator( - IteratorT Begin, - IteratorT End, - FinderT Finder ) : - detail::find_iterator_base(Finder,0), - m_Match(Begin,Begin), - m_End(End) - { - increment(); - } - - //! Constructor - /*! - Construct new find_iterator for a given finder - and a range. - */ - template - find_iterator( - RangeT& Col, - FinderT Finder ) : - detail::find_iterator_base(Finder,0) - { - iterator_range::type> lit_col(::boost::as_literal(Col)); - m_Match=::boost::make_iterator_range(::boost::begin(lit_col), ::boost::begin(lit_col)); - m_End=::boost::end(lit_col); - - increment(); - } - - private: - // iterator operations - - // dereference - const match_type& dereference() const - { - return m_Match; - } - - // increment - void increment() - { - m_Match=this->do_find(m_Match.end(),m_End); - } - - // comparison - bool equal( const find_iterator& Other ) const - { - bool bEof=eof(); - bool bOtherEof=Other.eof(); - - return bEof || bOtherEof ? bEof==bOtherEof : - ( - m_Match==Other.m_Match && - m_End==Other.m_End - ); - } - - public: - // operations - - //! Eof check - /*! - Check the eof condition. Eof condition means that - there is nothing more to be searched i.e. find_iterator - is after the last match. - */ - bool eof() const - { - return - this->is_null() || - ( - m_Match.begin() == m_End && - m_Match.end() == m_End - ); - } - - private: - // Attributes - match_type m_Match; - input_iterator_type m_End; - }; - - //! find iterator construction helper - /*! - * Construct a find iterator to iterate through the specified string - */ - template - inline find_iterator< - BOOST_STRING_TYPENAME range_iterator::type> - make_find_iterator( - RangeT& Collection, - FinderT Finder) - { - return find_iterator::type>( - Collection, Finder); - } - -// split iterator -----------------------------------------------// - - //! split_iterator - /*! - Split iterator encapsulates a Finder and allows - for incremental searching in a string. - Unlike the find iterator, split iterator iterates - through gaps between matches. - - Find iterator is a readable forward traversal iterator. - - Dereferencing the iterator yields an iterator_range delimiting - the current match. - */ - template - class split_iterator : - public iterator_facade< - split_iterator, - const iterator_range, - forward_traversal_tag >, - private detail::find_iterator_base - { - private: - // facade support - friend class ::boost::iterator_core_access; - - private: - // typedefs - - typedef detail::find_iterator_base base_type; - typedef BOOST_STRING_TYPENAME - base_type::input_iterator_type input_iterator_type; - typedef BOOST_STRING_TYPENAME - base_type::match_type match_type; - - public: - //! Default constructor - /*! - Construct null iterator. All null iterators are equal. - - \post eof()==true - */ - split_iterator() : - m_Next(), - m_End(), - m_bEof(true) - {} - - //! Copy constructor - /*! - Construct a copy of the split_iterator - */ - split_iterator( const split_iterator& Other ) : - base_type(Other), - m_Match(Other.m_Match), - m_Next(Other.m_Next), - m_End(Other.m_End), - m_bEof(Other.m_bEof) - {} - - //! Constructor - /*! - Construct new split_iterator for a given finder - and a range. - */ - template - split_iterator( - IteratorT Begin, - IteratorT End, - FinderT Finder ) : - detail::find_iterator_base(Finder,0), - m_Match(Begin,Begin), - m_Next(Begin), - m_End(End), - m_bEof(false) - { - // force the correct behavior for empty sequences and yield at least one token - if(Begin!=End) - { - increment(); - } - } - //! Constructor - /*! - Construct new split_iterator for a given finder - and a collection. - */ - template - split_iterator( - RangeT& Col, - FinderT Finder ) : - detail::find_iterator_base(Finder,0), - m_bEof(false) - { - iterator_range::type> lit_col(::boost::as_literal(Col)); - m_Match=make_iterator_range(::boost::begin(lit_col), ::boost::begin(lit_col)); - m_Next=::boost::begin(lit_col); - m_End=::boost::end(lit_col); - - // force the correct behavior for empty sequences and yield at least one token - if(m_Next!=m_End) - { - increment(); - } - } - - - private: - // iterator operations - - // dereference - const match_type& dereference() const - { - return m_Match; - } - - // increment - void increment() - { - match_type FindMatch=this->do_find( m_Next, m_End ); - - if(FindMatch.begin()==m_End && FindMatch.end()==m_End) - { - if(m_Match.end()==m_End) - { - // Mark iterator as eof - m_bEof=true; - } - } - - m_Match=match_type( m_Next, FindMatch.begin() ); - m_Next=FindMatch.end(); - } - - // comparison - bool equal( const split_iterator& Other ) const - { - bool bEof=eof(); - bool bOtherEof=Other.eof(); - - return bEof || bOtherEof ? bEof==bOtherEof : - ( - m_Match==Other.m_Match && - m_Next==Other.m_Next && - m_End==Other.m_End - ); - } - - public: - // operations - - //! Eof check - /*! - Check the eof condition. Eof condition means that - there is nothing more to be searched i.e. find_iterator - is after the last match. - */ - bool eof() const - { - return this->is_null() || m_bEof; - } - - private: - // Attributes - match_type m_Match; - input_iterator_type m_Next; - input_iterator_type m_End; - bool m_bEof; - }; - - //! split iterator construction helper - /*! - * Construct a split iterator to iterate through the specified collection - */ - template - inline split_iterator< - BOOST_STRING_TYPENAME range_iterator::type> - make_split_iterator( - RangeT& Collection, - FinderT Finder) - { - return split_iterator::type>( - Collection, Finder); - } - - - } // namespace algorithm - - // pull names to the boost namespace - using algorithm::find_iterator; - using algorithm::make_find_iterator; - using algorithm::split_iterator; - using algorithm::make_split_iterator; - -} // namespace boost - - -#endif // BOOST_STRING_FIND_ITERATOR_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/finder.hpp b/third_party/boost_parts/boost/algorithm/string/finder.hpp deleted file mode 100644 index 93f7ec30..00000000 --- a/third_party/boost_parts/boost/algorithm/string/finder.hpp +++ /dev/null @@ -1,270 +0,0 @@ -// Boost string_algo library finder.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2006. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_FINDER_HPP -#define BOOST_STRING_FINDER_HPP - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -/*! \file - Defines Finder generators. Finder object is a functor which is able to - find a substring matching a specific criteria in the input. - Finders are used as a pluggable components for replace, find - and split facilities. This header contains generator functions - for finders provided in this library. -*/ - -namespace boost { - namespace algorithm { - -// Finder generators ------------------------------------------// - - //! "First" finder - /*! - Construct the \c first_finder. The finder searches for the first - occurrence of the string in a given input. - The result is given as an \c iterator_range delimiting the match. - - \param Search A substring to be searched for. - \param Comp An element comparison predicate - \return An instance of the \c first_finder object - */ - template - inline detail::first_finderF< - BOOST_STRING_TYPENAME range_const_iterator::type, - is_equal> - first_finder( const RangeT& Search ) - { - return - detail::first_finderF< - BOOST_STRING_TYPENAME - range_const_iterator::type, - is_equal>( ::boost::as_literal(Search), is_equal() ) ; - } - - //! "First" finder - /*! - \overload - */ - template - inline detail::first_finderF< - BOOST_STRING_TYPENAME range_const_iterator::type, - PredicateT> - first_finder( - const RangeT& Search, PredicateT Comp ) - { - return - detail::first_finderF< - BOOST_STRING_TYPENAME - range_const_iterator::type, - PredicateT>( ::boost::as_literal(Search), Comp ); - } - - //! "Last" finder - /*! - Construct the \c last_finder. The finder searches for the last - occurrence of the string in a given input. - The result is given as an \c iterator_range delimiting the match. - - \param Search A substring to be searched for. - \param Comp An element comparison predicate - \return An instance of the \c last_finder object - */ - template - inline detail::last_finderF< - BOOST_STRING_TYPENAME range_const_iterator::type, - is_equal> - last_finder( const RangeT& Search ) - { - return - detail::last_finderF< - BOOST_STRING_TYPENAME - range_const_iterator::type, - is_equal>( ::boost::as_literal(Search), is_equal() ); - } - //! "Last" finder - /*! - \overload - */ - template - inline detail::last_finderF< - BOOST_STRING_TYPENAME range_const_iterator::type, - PredicateT> - last_finder( const RangeT& Search, PredicateT Comp ) - { - return - detail::last_finderF< - BOOST_STRING_TYPENAME - range_const_iterator::type, - PredicateT>( ::boost::as_literal(Search), Comp ) ; - } - - //! "Nth" finder - /*! - Construct the \c nth_finder. The finder searches for the n-th (zero-indexed) - occurrence of the string in a given input. - The result is given as an \c iterator_range delimiting the match. - - \param Search A substring to be searched for. - \param Nth An index of the match to be find - \param Comp An element comparison predicate - \return An instance of the \c nth_finder object - */ - template - inline detail::nth_finderF< - BOOST_STRING_TYPENAME range_const_iterator::type, - is_equal> - nth_finder( - const RangeT& Search, - int Nth) - { - return - detail::nth_finderF< - BOOST_STRING_TYPENAME - range_const_iterator::type, - is_equal>( ::boost::as_literal(Search), Nth, is_equal() ) ; - } - //! "Nth" finder - /*! - \overload - */ - template - inline detail::nth_finderF< - BOOST_STRING_TYPENAME range_const_iterator::type, - PredicateT> - nth_finder( - const RangeT& Search, - int Nth, - PredicateT Comp ) - { - return - detail::nth_finderF< - BOOST_STRING_TYPENAME - range_const_iterator::type, - PredicateT>( ::boost::as_literal(Search), Nth, Comp ); - } - - //! "Head" finder - /*! - Construct the \c head_finder. The finder returns a head of a given - input. The head is a prefix of a string up to n elements in - size. If an input has less then n elements, whole input is - considered a head. - The result is given as an \c iterator_range delimiting the match. - - \param N The size of the head - \return An instance of the \c head_finder object - */ - inline detail::head_finderF - head_finder( int N ) - { - return detail::head_finderF(N); - } - - //! "Tail" finder - /*! - Construct the \c tail_finder. The finder returns a tail of a given - input. The tail is a suffix of a string up to n elements in - size. If an input has less then n elements, whole input is - considered a head. - The result is given as an \c iterator_range delimiting the match. - - \param N The size of the head - \return An instance of the \c tail_finder object - */ - inline detail::tail_finderF - tail_finder( int N ) - { - return detail::tail_finderF(N); - } - - //! "Token" finder - /*! - Construct the \c token_finder. The finder searches for a token - specified by a predicate. It is similar to std::find_if - algorithm, with an exception that it return a range of - instead of a single iterator. - - If "compress token mode" is enabled, adjacent matching tokens are - concatenated into one match. Thus the finder can be used to - search for continuous segments of characters satisfying the - given predicate. - - The result is given as an \c iterator_range delimiting the match. - - \param Pred An element selection predicate - \param eCompress Compress flag - \return An instance of the \c token_finder object - */ - template< typename PredicateT > - inline detail::token_finderF - token_finder( - PredicateT Pred, - token_compress_mode_type eCompress=token_compress_off ) - { - return detail::token_finderF( Pred, eCompress ); - } - - //! "Range" finder - /*! - Construct the \c range_finder. The finder does not perform - any operation. It simply returns the given range for - any input. - - \param Begin Beginning of the range - \param End End of the range - \param Range The range. - \return An instance of the \c range_finger object - */ - template< typename ForwardIteratorT > - inline detail::range_finderF - range_finder( - ForwardIteratorT Begin, - ForwardIteratorT End ) - { - return detail::range_finderF( Begin, End ); - } - - //! "Range" finder - /*! - \overload - */ - template< typename ForwardIteratorT > - inline detail::range_finderF - range_finder( iterator_range Range ) - { - return detail::range_finderF( Range ); - } - - } // namespace algorithm - - // pull the names to the boost namespace - using algorithm::first_finder; - using algorithm::last_finder; - using algorithm::nth_finder; - using algorithm::head_finder; - using algorithm::tail_finder; - using algorithm::token_finder; - using algorithm::range_finder; - -} // namespace boost - - -#endif // BOOST_STRING_FINDER_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/formatter.hpp b/third_party/boost_parts/boost/algorithm/string/formatter.hpp deleted file mode 100644 index de8681bc..00000000 --- a/third_party/boost_parts/boost/algorithm/string/formatter.hpp +++ /dev/null @@ -1,120 +0,0 @@ -// Boost string_algo library formatter.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_FORMATTER_HPP -#define BOOST_STRING_FORMATTER_HPP - -#include -#include -#include -#include - -#include - -/*! \file - Defines Formatter generators. Formatter is a functor which formats - a string according to given parameters. A Formatter works - in conjunction with a Finder. A Finder can provide additional information - for a specific Formatter. An example of such a cooperation is regex_finder - and regex_formatter. - - Formatters are used as pluggable components for replace facilities. - This header contains generator functions for the Formatters provided in this library. -*/ - -namespace boost { - namespace algorithm { - -// generic formatters ---------------------------------------------------------------// - - //! Constant formatter - /*! - Constructs a \c const_formatter. Const formatter always returns - the same value, regardless of the parameter. - - \param Format A predefined value used as a result for formatting - \return An instance of the \c const_formatter object. - */ - template - inline detail::const_formatF< - iterator_range< - BOOST_STRING_TYPENAME range_const_iterator::type> > - const_formatter(const RangeT& Format) - { - return detail::const_formatF< - iterator_range< - BOOST_STRING_TYPENAME range_const_iterator::type> >(::boost::as_literal(Format)); - } - - //! Identity formatter - /*! - Constructs an \c identity_formatter. Identity formatter always returns - the parameter. - - \return An instance of the \c identity_formatter object. - */ - template - inline detail::identity_formatF< - iterator_range< - BOOST_STRING_TYPENAME range_const_iterator::type> > - identity_formatter() - { - return detail::identity_formatF< - iterator_range< - BOOST_STRING_TYPENAME range_const_iterator::type> >(); - } - - //! Empty formatter - /*! - Constructs an \c empty_formatter. Empty formatter always returns an empty - sequence. - - \param Input container used to select a correct value_type for the - resulting empty_container<>. - \return An instance of the \c empty_formatter object. - */ - template - inline detail::empty_formatF< - BOOST_STRING_TYPENAME range_value::type> - empty_formatter(const RangeT&) - { - return detail::empty_formatF< - BOOST_STRING_TYPENAME range_value::type>(); - } - - //! Empty formatter - /*! - Constructs a \c dissect_formatter. Dissect formatter uses a specified finder - to extract a portion of the formatted sequence. The first finder's match is returned - as a result - - \param Finder a finder used to select a portion of the formatted sequence - \return An instance of the \c dissect_formatter object. - */ - template - inline detail::dissect_formatF< FinderT > - dissect_formatter(const FinderT& Finder) - { - return detail::dissect_formatF(Finder); - } - - - } // namespace algorithm - - // pull the names to the boost namespace - using algorithm::const_formatter; - using algorithm::identity_formatter; - using algorithm::empty_formatter; - using algorithm::dissect_formatter; - -} // namespace boost - - -#endif // BOOST_FORMATTER_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/iter_find.hpp b/third_party/boost_parts/boost/algorithm/string/iter_find.hpp deleted file mode 100644 index 10424abc..00000000 --- a/third_party/boost_parts/boost/algorithm/string/iter_find.hpp +++ /dev/null @@ -1,193 +0,0 @@ -// Boost string_algo library iter_find.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_ITER_FIND_HPP -#define BOOST_STRING_ITER_FIND_HPP - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -/*! \file - Defines generic split algorithms. Split algorithms can be - used to divide a sequence into several part according - to a given criteria. Result is given as a 'container - of containers' where elements are copies or references - to extracted parts. - - There are two algorithms provided. One iterates over matching - substrings, the other one over the gaps between these matches. -*/ - -namespace boost { - namespace algorithm { - -// iterate find ---------------------------------------------------// - - //! Iter find algorithm - /*! - This algorithm executes a given finder in iteration on the input, - until the end of input is reached, or no match is found. - Iteration is done using built-in find_iterator, so the real - searching is performed only when needed. - In each iteration new match is found and added to the result. - - \param Result A 'container container' to contain the result of search. - Both outer and inner container must have constructor taking a pair - of iterators as an argument. - Typical type of the result is - \c std::vector> - (each element of such a vector will container a range delimiting - a match). - \param Input A container which will be searched. - \param Finder A Finder object used for searching - \return A reference to the result - - \note Prior content of the result will be overwritten. - */ - template< - typename SequenceSequenceT, - typename RangeT, - typename FinderT > - inline SequenceSequenceT& - iter_find( - SequenceSequenceT& Result, - RangeT& Input, - FinderT Finder ) - { - BOOST_CONCEPT_ASSERT(( - FinderConcept< - FinderT, - BOOST_STRING_TYPENAME range_iterator::type> - )); - - iterator_range::type> lit_input(::boost::as_literal(Input)); - - typedef BOOST_STRING_TYPENAME - range_iterator::type input_iterator_type; - typedef find_iterator find_iterator_type; - typedef detail::copy_iterator_rangeF< - BOOST_STRING_TYPENAME - range_value::type, - input_iterator_type> copy_range_type; - - input_iterator_type InputEnd=::boost::end(lit_input); - - typedef transform_iterator - transform_iter_type; - - transform_iter_type itBegin= - ::boost::make_transform_iterator( - find_iterator_type( ::boost::begin(lit_input), InputEnd, Finder ), - copy_range_type()); - - transform_iter_type itEnd= - ::boost::make_transform_iterator( - find_iterator_type(), - copy_range_type()); - - SequenceSequenceT Tmp(itBegin, itEnd); - - Result.swap(Tmp); - return Result; - } - -// iterate split ---------------------------------------------------// - - //! Split find algorithm - /*! - This algorithm executes a given finder in iteration on the input, - until the end of input is reached, or no match is found. - Iteration is done using built-in find_iterator, so the real - searching is performed only when needed. - Each match is used as a separator of segments. These segments are then - returned in the result. - - \param Result A 'container container' to contain the result of search. - Both outer and inner container must have constructor taking a pair - of iterators as an argument. - Typical type of the result is - \c std::vector> - (each element of such a vector will container a range delimiting - a match). - \param Input A container which will be searched. - \param Finder A finder object used for searching - \return A reference to the result - - \note Prior content of the result will be overwritten. - */ - template< - typename SequenceSequenceT, - typename RangeT, - typename FinderT > - inline SequenceSequenceT& - iter_split( - SequenceSequenceT& Result, - RangeT& Input, - FinderT Finder ) - { - BOOST_CONCEPT_ASSERT(( - FinderConcept::type> - )); - - iterator_range::type> lit_input(::boost::as_literal(Input)); - - typedef BOOST_STRING_TYPENAME - range_iterator::type input_iterator_type; - typedef split_iterator find_iterator_type; - typedef detail::copy_iterator_rangeF< - BOOST_STRING_TYPENAME - range_value::type, - input_iterator_type> copy_range_type; - - input_iterator_type InputEnd=::boost::end(lit_input); - - typedef transform_iterator - transform_iter_type; - - transform_iter_type itBegin= - ::boost::make_transform_iterator( - find_iterator_type( ::boost::begin(lit_input), InputEnd, Finder ), - copy_range_type() ); - - transform_iter_type itEnd= - ::boost::make_transform_iterator( - find_iterator_type(), - copy_range_type() ); - - SequenceSequenceT Tmp(itBegin, itEnd); - - Result.swap(Tmp); - return Result; - } - - } // namespace algorithm - - // pull names to the boost namespace - using algorithm::iter_find; - using algorithm::iter_split; - -} // namespace boost - - -#endif // BOOST_STRING_ITER_FIND_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/join.hpp b/third_party/boost_parts/boost/algorithm/string/join.hpp deleted file mode 100644 index b871eb44..00000000 --- a/third_party/boost_parts/boost/algorithm/string/join.hpp +++ /dev/null @@ -1,145 +0,0 @@ -// Boost string_algo library join.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2006. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_JOIN_HPP -#define BOOST_STRING_JOIN_HPP - -#include -#include -#include -#include - -/*! \file - Defines join algorithm. - - Join algorithm is a counterpart to split algorithms. - It joins strings from a 'list' by adding user defined separator. - Additionally there is a version that allows simple filtering - by providing a predicate. -*/ - -namespace boost { - namespace algorithm { - -// join --------------------------------------------------------------// - - //! Join algorithm - /*! - This algorithm joins all strings in a 'list' into one long string. - Segments are concatenated by given separator. - - \param Input A container that holds the input strings. It must be a container-of-containers. - \param Separator A string that will separate the joined segments. - \return Concatenated string. - - \note This function provides the strong exception-safety guarantee - */ - template< typename SequenceSequenceT, typename Range1T> - inline typename range_value::type - join( - const SequenceSequenceT& Input, - const Range1T& Separator) - { - // Define working types - typedef typename range_value::type ResultT; - typedef typename range_const_iterator::type InputIteratorT; - - // Parse input - InputIteratorT itBegin=::boost::begin(Input); - InputIteratorT itEnd=::boost::end(Input); - - // Construct container to hold the result - ResultT Result; - - // Append first element - if(itBegin!=itEnd) - { - detail::insert(Result, ::boost::end(Result), *itBegin); - ++itBegin; - } - - for(;itBegin!=itEnd; ++itBegin) - { - // Add separator - detail::insert(Result, ::boost::end(Result), ::boost::as_literal(Separator)); - // Add element - detail::insert(Result, ::boost::end(Result), *itBegin); - } - - return Result; - } - -// join_if ----------------------------------------------------------// - - //! Conditional join algorithm - /*! - This algorithm joins all strings in a 'list' into one long string. - Segments are concatenated by given separator. Only segments that - satisfy the predicate will be added to the result. - - \param Input A container that holds the input strings. It must be a container-of-containers. - \param Separator A string that will separate the joined segments. - \param Pred A segment selection predicate - \return Concatenated string. - - \note This function provides the strong exception-safety guarantee - */ - template< typename SequenceSequenceT, typename Range1T, typename PredicateT> - inline typename range_value::type - join_if( - const SequenceSequenceT& Input, - const Range1T& Separator, - PredicateT Pred) - { - // Define working types - typedef typename range_value::type ResultT; - typedef typename range_const_iterator::type InputIteratorT; - - // Parse input - InputIteratorT itBegin=::boost::begin(Input); - InputIteratorT itEnd=::boost::end(Input); - - // Construct container to hold the result - ResultT Result; - - // Roll to the first element that will be added - while(itBegin!=itEnd && !Pred(*itBegin)) ++itBegin; - // Add this element - if(itBegin!=itEnd) - { - detail::insert(Result, ::boost::end(Result), *itBegin); - ++itBegin; - } - - for(;itBegin!=itEnd; ++itBegin) - { - if(Pred(*itBegin)) - { - // Add separator - detail::insert(Result, ::boost::end(Result), ::boost::as_literal(Separator)); - // Add element - detail::insert(Result, ::boost::end(Result), *itBegin); - } - } - - return Result; - } - - } // namespace algorithm - - // pull names to the boost namespace - using algorithm::join; - using algorithm::join_if; - -} // namespace boost - - -#endif // BOOST_STRING_JOIN_HPP - diff --git a/third_party/boost_parts/boost/algorithm/string/predicate.hpp b/third_party/boost_parts/boost/algorithm/string/predicate.hpp deleted file mode 100644 index 0879829b..00000000 --- a/third_party/boost_parts/boost/algorithm/string/predicate.hpp +++ /dev/null @@ -1,475 +0,0 @@ -// Boost string_algo library predicate.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_PREDICATE_HPP -#define BOOST_STRING_PREDICATE_HPP - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -/*! \file boost/algorithm/string/predicate.hpp - Defines string-related predicates. - The predicates determine whether a substring is contained in the input string - under various conditions: a string starts with the substring, ends with the - substring, simply contains the substring or if both strings are equal. - Additionaly the algorithm \c all() checks all elements of a container to satisfy a - condition. - - All predicates provide the strong exception guarantee. -*/ - -namespace boost { - namespace algorithm { - -// starts_with predicate -----------------------------------------------// - - //! 'Starts with' predicate - /*! - This predicate holds when the test string is a prefix of the Input. - In other words, if the input starts with the test. - When the optional predicate is specified, it is used for character-wise - comparison. - - \param Input An input sequence - \param Test A test sequence - \param Comp An element comparison predicate - \return The result of the test - - \note This function provides the strong exception-safety guarantee - */ - template - inline bool starts_with( - const Range1T& Input, - const Range2T& Test, - PredicateT Comp) - { - iterator_range::type> lit_input(::boost::as_literal(Input)); - iterator_range::type> lit_test(::boost::as_literal(Test)); - - typedef BOOST_STRING_TYPENAME - range_const_iterator::type Iterator1T; - typedef BOOST_STRING_TYPENAME - range_const_iterator::type Iterator2T; - - Iterator1T InputEnd=::boost::end(lit_input); - Iterator2T TestEnd=::boost::end(lit_test); - - Iterator1T it=::boost::begin(lit_input); - Iterator2T pit=::boost::begin(lit_test); - for(; - it!=InputEnd && pit!=TestEnd; - ++it,++pit) - { - if( !(Comp(*it,*pit)) ) - return false; - } - - return pit==TestEnd; - } - - //! 'Starts with' predicate - /*! - \overload - */ - template - inline bool starts_with( - const Range1T& Input, - const Range2T& Test) - { - return ::boost::algorithm::starts_with(Input, Test, is_equal()); - } - - //! 'Starts with' predicate ( case insensitive ) - /*! - This predicate holds when the test string is a prefix of the Input. - In other words, if the input starts with the test. - Elements are compared case insensitively. - - \param Input An input sequence - \param Test A test sequence - \param Loc A locale used for case insensitive comparison - \return The result of the test - - \note This function provides the strong exception-safety guarantee - */ - template - inline bool istarts_with( - const Range1T& Input, - const Range2T& Test, - const std::locale& Loc=std::locale()) - { - return ::boost::algorithm::starts_with(Input, Test, is_iequal(Loc)); - } - - -// ends_with predicate -----------------------------------------------// - - //! 'Ends with' predicate - /*! - This predicate holds when the test string is a suffix of the Input. - In other words, if the input ends with the test. - When the optional predicate is specified, it is used for character-wise - comparison. - - - \param Input An input sequence - \param Test A test sequence - \param Comp An element comparison predicate - \return The result of the test - - \note This function provides the strong exception-safety guarantee - */ - template - inline bool ends_with( - const Range1T& Input, - const Range2T& Test, - PredicateT Comp) - { - iterator_range::type> lit_input(::boost::as_literal(Input)); - iterator_range::type> lit_test(::boost::as_literal(Test)); - - typedef BOOST_STRING_TYPENAME - range_const_iterator::type Iterator1T; - typedef BOOST_STRING_TYPENAME boost::detail:: - iterator_traits::iterator_category category; - - return detail:: - ends_with_iter_select( - ::boost::begin(lit_input), - ::boost::end(lit_input), - ::boost::begin(lit_test), - ::boost::end(lit_test), - Comp, - category()); - } - - - //! 'Ends with' predicate - /*! - \overload - */ - template - inline bool ends_with( - const Range1T& Input, - const Range2T& Test) - { - return ::boost::algorithm::ends_with(Input, Test, is_equal()); - } - - //! 'Ends with' predicate ( case insensitive ) - /*! - This predicate holds when the test container is a suffix of the Input. - In other words, if the input ends with the test. - Elements are compared case insensitively. - - \param Input An input sequence - \param Test A test sequence - \param Loc A locale used for case insensitive comparison - \return The result of the test - - \note This function provides the strong exception-safety guarantee - */ - template - inline bool iends_with( - const Range1T& Input, - const Range2T& Test, - const std::locale& Loc=std::locale()) - { - return ::boost::algorithm::ends_with(Input, Test, is_iequal(Loc)); - } - -// contains predicate -----------------------------------------------// - - //! 'Contains' predicate - /*! - This predicate holds when the test container is contained in the Input. - When the optional predicate is specified, it is used for character-wise - comparison. - - \param Input An input sequence - \param Test A test sequence - \param Comp An element comparison predicate - \return The result of the test - - \note This function provides the strong exception-safety guarantee - */ - template - inline bool contains( - const Range1T& Input, - const Range2T& Test, - PredicateT Comp) - { - iterator_range::type> lit_input(::boost::as_literal(Input)); - iterator_range::type> lit_test(::boost::as_literal(Test)); - - if (::boost::empty(lit_test)) - { - // Empty range is contained always - return true; - } - - // Use the temporary variable to make VACPP happy - bool bResult=(::boost::algorithm::first_finder(lit_test,Comp)(::boost::begin(lit_input), ::boost::end(lit_input))); - return bResult; - } - - //! 'Contains' predicate - /*! - \overload - */ - template - inline bool contains( - const Range1T& Input, - const Range2T& Test) - { - return ::boost::algorithm::contains(Input, Test, is_equal()); - } - - //! 'Contains' predicate ( case insensitive ) - /*! - This predicate holds when the test container is contained in the Input. - Elements are compared case insensitively. - - \param Input An input sequence - \param Test A test sequence - \param Loc A locale used for case insensitive comparison - \return The result of the test - - \note This function provides the strong exception-safety guarantee - */ - template - inline bool icontains( - const Range1T& Input, - const Range2T& Test, - const std::locale& Loc=std::locale()) - { - return ::boost::algorithm::contains(Input, Test, is_iequal(Loc)); - } - -// equals predicate -----------------------------------------------// - - //! 'Equals' predicate - /*! - This predicate holds when the test container is equal to the - input container i.e. all elements in both containers are same. - When the optional predicate is specified, it is used for character-wise - comparison. - - \param Input An input sequence - \param Test A test sequence - \param Comp An element comparison predicate - \return The result of the test - - \note This is a two-way version of \c std::equal algorithm - - \note This function provides the strong exception-safety guarantee - */ - template - inline bool equals( - const Range1T& Input, - const Range2T& Test, - PredicateT Comp) - { - iterator_range::type> lit_input(::boost::as_literal(Input)); - iterator_range::type> lit_test(::boost::as_literal(Test)); - - typedef BOOST_STRING_TYPENAME - range_const_iterator::type Iterator1T; - typedef BOOST_STRING_TYPENAME - range_const_iterator::type Iterator2T; - - Iterator1T InputEnd=::boost::end(lit_input); - Iterator2T TestEnd=::boost::end(lit_test); - - Iterator1T it=::boost::begin(lit_input); - Iterator2T pit=::boost::begin(lit_test); - for(; - it!=InputEnd && pit!=TestEnd; - ++it,++pit) - { - if( !(Comp(*it,*pit)) ) - return false; - } - - return (pit==TestEnd) && (it==InputEnd); - } - - //! 'Equals' predicate - /*! - \overload - */ - template - inline bool equals( - const Range1T& Input, - const Range2T& Test) - { - return ::boost::algorithm::equals(Input, Test, is_equal()); - } - - //! 'Equals' predicate ( case insensitive ) - /*! - This predicate holds when the test container is equal to the - input container i.e. all elements in both containers are same. - Elements are compared case insensitively. - - \param Input An input sequence - \param Test A test sequence - \param Loc A locale used for case insensitive comparison - \return The result of the test - - \note This is a two-way version of \c std::equal algorithm - - \note This function provides the strong exception-safety guarantee - */ - template - inline bool iequals( - const Range1T& Input, - const Range2T& Test, - const std::locale& Loc=std::locale()) - { - return ::boost::algorithm::equals(Input, Test, is_iequal(Loc)); - } - -// lexicographical_compare predicate -----------------------------// - - //! Lexicographical compare predicate - /*! - This predicate is an overload of std::lexicographical_compare - for range arguments - - It check whether the first argument is lexicographically less - then the second one. - - If the optional predicate is specified, it is used for character-wise - comparison - - \param Arg1 First argument - \param Arg2 Second argument - \param Pred Comparison predicate - \return The result of the test - - \note This function provides the strong exception-safety guarantee - */ - template - inline bool lexicographical_compare( - const Range1T& Arg1, - const Range2T& Arg2, - PredicateT Pred) - { - iterator_range::type> lit_arg1(::boost::as_literal(Arg1)); - iterator_range::type> lit_arg2(::boost::as_literal(Arg2)); - - return std::lexicographical_compare( - ::boost::begin(lit_arg1), - ::boost::end(lit_arg1), - ::boost::begin(lit_arg2), - ::boost::end(lit_arg2), - Pred); - } - - //! Lexicographical compare predicate - /*! - \overload - */ - template - inline bool lexicographical_compare( - const Range1T& Arg1, - const Range2T& Arg2) - { - return ::boost::algorithm::lexicographical_compare(Arg1, Arg2, is_less()); - } - - //! Lexicographical compare predicate (case-insensitive) - /*! - This predicate is an overload of std::lexicographical_compare - for range arguments. - It check whether the first argument is lexicographically less - then the second one. - Elements are compared case insensitively - - - \param Arg1 First argument - \param Arg2 Second argument - \param Loc A locale used for case insensitive comparison - \return The result of the test - - \note This function provides the strong exception-safety guarantee - */ - template - inline bool ilexicographical_compare( - const Range1T& Arg1, - const Range2T& Arg2, - const std::locale& Loc=std::locale()) - { - return ::boost::algorithm::lexicographical_compare(Arg1, Arg2, is_iless(Loc)); - } - - -// all predicate -----------------------------------------------// - - //! 'All' predicate - /*! - This predicate holds it all its elements satisfy a given - condition, represented by the predicate. - - \param Input An input sequence - \param Pred A predicate - \return The result of the test - - \note This function provides the strong exception-safety guarantee - */ - template - inline bool all( - const RangeT& Input, - PredicateT Pred) - { - iterator_range::type> lit_input(::boost::as_literal(Input)); - - typedef BOOST_STRING_TYPENAME - range_const_iterator::type Iterator1T; - - Iterator1T InputEnd=::boost::end(lit_input); - for( Iterator1T It=::boost::begin(lit_input); It!=InputEnd; ++It) - { - if (!Pred(*It)) - return false; - } - - return true; - } - - } // namespace algorithm - - // pull names to the boost namespace - using algorithm::starts_with; - using algorithm::istarts_with; - using algorithm::ends_with; - using algorithm::iends_with; - using algorithm::contains; - using algorithm::icontains; - using algorithm::equals; - using algorithm::iequals; - using algorithm::all; - using algorithm::lexicographical_compare; - using algorithm::ilexicographical_compare; - -} // namespace boost - - -#endif // BOOST_STRING_PREDICATE_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/predicate_facade.hpp b/third_party/boost_parts/boost/algorithm/string/predicate_facade.hpp deleted file mode 100644 index a9753fc2..00000000 --- a/third_party/boost_parts/boost/algorithm/string/predicate_facade.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Boost string_algo library predicate_facade.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_PREDICATE_FACADE_HPP -#define BOOST_STRING_PREDICATE_FACADE_HPP - -#include - -/* - \file boost/algorith/string/predicate_facade.hpp - This file contains predicate_facade definition. This template class is used - to identify classification predicates, so they can be combined using - composition operators. -*/ - -namespace boost { - namespace algorithm { - -// predicate facade ------------------------------------------------------// - - //! Predicate facade - /*! - This class allows to recognize classification - predicates, so that they can be combined using - composition operators. - Every classification predicate must be derived from this class. - */ - template - struct predicate_facade {}; - - } // namespace algorithm -} // namespace boost - - -#endif // BOOST_STRING_CLASSIFICATION_DETAIL_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/replace.hpp b/third_party/boost_parts/boost/algorithm/string/replace.hpp deleted file mode 100644 index 0c04e47e..00000000 --- a/third_party/boost_parts/boost/algorithm/string/replace.hpp +++ /dev/null @@ -1,928 +0,0 @@ -// Boost string_algo library replace.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2006. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_REPLACE_HPP -#define BOOST_STRING_REPLACE_HPP - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -/*! \file - Defines various replace algorithms. Each algorithm replaces - part(s) of the input according to set of searching and replace criteria. -*/ - -namespace boost { - namespace algorithm { - -// replace_range --------------------------------------------------------------------// - - //! Replace range algorithm - /*! - Replace the given range in the input string. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param SearchRange A range in the input to be substituted - \param Format A substitute string - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T> - inline OutputIteratorT replace_range_copy( - OutputIteratorT Output, - const Range1T& Input, - const iterator_range< - BOOST_STRING_TYPENAME - range_const_iterator::type>& SearchRange, - const Range2T& Format) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::range_finder(SearchRange), - ::boost::algorithm::const_formatter(Format)); - } - - //! Replace range algorithm - /*! - \overload - */ - template - inline SequenceT replace_range_copy( - const SequenceT& Input, - const iterator_range< - BOOST_STRING_TYPENAME - range_const_iterator::type>& SearchRange, - const RangeT& Format) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::range_finder(SearchRange), - ::boost::algorithm::const_formatter(Format)); - } - - //! Replace range algorithm - /*! - Replace the given range in the input string. - The input sequence is modified in-place. - - \param Input An input string - \param SearchRange A range in the input to be substituted - \param Format A substitute string - */ - template - inline void replace_range( - SequenceT& Input, - const iterator_range< - BOOST_STRING_TYPENAME - range_iterator::type>& SearchRange, - const RangeT& Format) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::range_finder(SearchRange), - ::boost::algorithm::const_formatter(Format)); - } - -// replace_first --------------------------------------------------------------------// - - //! Replace first algorithm - /*! - Replace the first match of the search substring in the input - with the format string. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param Search A substring to be searched for - \param Format A substitute string - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T, - typename Range3T> - inline OutputIteratorT replace_first_copy( - OutputIteratorT Output, - const Range1T& Input, - const Range2T& Search, - const Range3T& Format) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::first_finder(Search), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace first algorithm - /*! - \overload - */ - template - inline SequenceT replace_first_copy( - const SequenceT& Input, - const Range1T& Search, - const Range2T& Format ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::first_finder(Search), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace first algorithm - /*! - replace the first match of the search substring in the input - with the format string. The input sequence is modified in-place. - - \param Input An input string - \param Search A substring to be searched for - \param Format A substitute string - */ - template - inline void replace_first( - SequenceT& Input, - const Range1T& Search, - const Range2T& Format ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::first_finder(Search), - ::boost::algorithm::const_formatter(Format) ); - } - -// replace_first ( case insensitive ) ---------------------------------------------// - - //! Replace first algorithm ( case insensitive ) - /*! - Replace the first match of the search substring in the input - with the format string. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - Searching is case insensitive. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param Search A substring to be searched for - \param Format A substitute string - \param Loc A locale used for case insensitive comparison - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T, - typename Range3T> - inline OutputIteratorT ireplace_first_copy( - OutputIteratorT Output, - const Range1T& Input, - const Range2T& Search, - const Range3T& Format, - const std::locale& Loc=std::locale() ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::first_finder(Search, is_iequal(Loc)), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace first algorithm ( case insensitive ) - /*! - \overload - */ - template - inline SequenceT ireplace_first_copy( - const SequenceT& Input, - const Range2T& Search, - const Range1T& Format, - const std::locale& Loc=std::locale() ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::first_finder(Search, is_iequal(Loc)), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace first algorithm ( case insensitive ) - /*! - Replace the first match of the search substring in the input - with the format string. Input sequence is modified in-place. - Searching is case insensitive. - - \param Input An input string - \param Search A substring to be searched for - \param Format A substitute string - \param Loc A locale used for case insensitive comparison - */ - template - inline void ireplace_first( - SequenceT& Input, - const Range1T& Search, - const Range2T& Format, - const std::locale& Loc=std::locale() ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::first_finder(Search, is_iequal(Loc)), - ::boost::algorithm::const_formatter(Format) ); - } - -// replace_last --------------------------------------------------------------------// - - //! Replace last algorithm - /*! - Replace the last match of the search string in the input - with the format string. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param Search A substring to be searched for - \param Format A substitute string - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T, - typename Range3T> - inline OutputIteratorT replace_last_copy( - OutputIteratorT Output, - const Range1T& Input, - const Range2T& Search, - const Range3T& Format ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::last_finder(Search), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace last algorithm - /*! - \overload - */ - template - inline SequenceT replace_last_copy( - const SequenceT& Input, - const Range1T& Search, - const Range2T& Format ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::last_finder(Search), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace last algorithm - /*! - Replace the last match of the search string in the input - with the format string. Input sequence is modified in-place. - - \param Input An input string - \param Search A substring to be searched for - \param Format A substitute string - */ - template - inline void replace_last( - SequenceT& Input, - const Range1T& Search, - const Range2T& Format ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::last_finder(Search), - ::boost::algorithm::const_formatter(Format) ); - } - -// replace_last ( case insensitive ) -----------------------------------------------// - - //! Replace last algorithm ( case insensitive ) - /*! - Replace the last match of the search string in the input - with the format string. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - Searching is case insensitive. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param Search A substring to be searched for - \param Format A substitute string - \param Loc A locale used for case insensitive comparison - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T, - typename Range3T> - inline OutputIteratorT ireplace_last_copy( - OutputIteratorT Output, - const Range1T& Input, - const Range2T& Search, - const Range3T& Format, - const std::locale& Loc=std::locale() ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::last_finder(Search, is_iequal(Loc)), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace last algorithm ( case insensitive ) - /*! - \overload - */ - template - inline SequenceT ireplace_last_copy( - const SequenceT& Input, - const Range1T& Search, - const Range2T& Format, - const std::locale& Loc=std::locale() ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::last_finder(Search, is_iequal(Loc)), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace last algorithm ( case insensitive ) - /*! - Replace the last match of the search string in the input - with the format string.The input sequence is modified in-place. - Searching is case insensitive. - - \param Input An input string - \param Search A substring to be searched for - \param Format A substitute string - \param Loc A locale used for case insensitive comparison - \return A reference to the modified input - */ - template - inline void ireplace_last( - SequenceT& Input, - const Range1T& Search, - const Range2T& Format, - const std::locale& Loc=std::locale() ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::last_finder(Search, is_iequal(Loc)), - ::boost::algorithm::const_formatter(Format) ); - } - -// replace_nth --------------------------------------------------------------------// - - //! Replace nth algorithm - /*! - Replace an Nth (zero-indexed) match of the search string in the input - with the format string. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param Search A substring to be searched for - \param Nth An index of the match to be replaced. The index is 0-based. - For negative N, matches are counted from the end of string. - \param Format A substitute string - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T, - typename Range3T> - inline OutputIteratorT replace_nth_copy( - OutputIteratorT Output, - const Range1T& Input, - const Range2T& Search, - int Nth, - const Range3T& Format ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::nth_finder(Search, Nth), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace nth algorithm - /*! - \overload - */ - template - inline SequenceT replace_nth_copy( - const SequenceT& Input, - const Range1T& Search, - int Nth, - const Range2T& Format ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::nth_finder(Search, Nth), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace nth algorithm - /*! - Replace an Nth (zero-indexed) match of the search string in the input - with the format string. Input sequence is modified in-place. - - \param Input An input string - \param Search A substring to be searched for - \param Nth An index of the match to be replaced. The index is 0-based. - For negative N, matches are counted from the end of string. - \param Format A substitute string - */ - template - inline void replace_nth( - SequenceT& Input, - const Range1T& Search, - int Nth, - const Range2T& Format ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::nth_finder(Search, Nth), - ::boost::algorithm::const_formatter(Format) ); - } - -// replace_nth ( case insensitive ) -----------------------------------------------// - - //! Replace nth algorithm ( case insensitive ) - /*! - Replace an Nth (zero-indexed) match of the search string in the input - with the format string. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - Searching is case insensitive. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param Search A substring to be searched for - \param Nth An index of the match to be replaced. The index is 0-based. - For negative N, matches are counted from the end of string. - \param Format A substitute string - \param Loc A locale used for case insensitive comparison - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T, - typename Range3T> - inline OutputIteratorT ireplace_nth_copy( - OutputIteratorT Output, - const Range1T& Input, - const Range2T& Search, - int Nth, - const Range3T& Format, - const std::locale& Loc=std::locale() ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc) ), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace nth algorithm ( case insensitive ) - /*! - \overload - */ - template - inline SequenceT ireplace_nth_copy( - const SequenceT& Input, - const Range1T& Search, - int Nth, - const Range2T& Format, - const std::locale& Loc=std::locale() ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace nth algorithm ( case insensitive ) - /*! - Replace an Nth (zero-indexed) match of the search string in the input - with the format string. Input sequence is modified in-place. - Searching is case insensitive. - - \param Input An input string - \param Search A substring to be searched for - \param Nth An index of the match to be replaced. The index is 0-based. - For negative N, matches are counted from the end of string. - \param Format A substitute string - \param Loc A locale used for case insensitive comparison - */ - template - inline void ireplace_nth( - SequenceT& Input, - const Range1T& Search, - int Nth, - const Range2T& Format, - const std::locale& Loc=std::locale() ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::nth_finder(Search, Nth, is_iequal(Loc)), - ::boost::algorithm::const_formatter(Format) ); - } - -// replace_all --------------------------------------------------------------------// - - //! Replace all algorithm - /*! - Replace all occurrences of the search string in the input - with the format string. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param Search A substring to be searched for - \param Format A substitute string - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T, - typename Range3T> - inline OutputIteratorT replace_all_copy( - OutputIteratorT Output, - const Range1T& Input, - const Range2T& Search, - const Range3T& Format ) - { - return ::boost::algorithm::find_format_all_copy( - Output, - Input, - ::boost::algorithm::first_finder(Search), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace all algorithm - /*! - \overload - */ - template - inline SequenceT replace_all_copy( - const SequenceT& Input, - const Range1T& Search, - const Range2T& Format ) - { - return ::boost::algorithm::find_format_all_copy( - Input, - ::boost::algorithm::first_finder(Search), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace all algorithm - /*! - Replace all occurrences of the search string in the input - with the format string. The input sequence is modified in-place. - - \param Input An input string - \param Search A substring to be searched for - \param Format A substitute string - \return A reference to the modified input - */ - template - inline void replace_all( - SequenceT& Input, - const Range1T& Search, - const Range2T& Format ) - { - ::boost::algorithm::find_format_all( - Input, - ::boost::algorithm::first_finder(Search), - ::boost::algorithm::const_formatter(Format) ); - } - -// replace_all ( case insensitive ) -----------------------------------------------// - - //! Replace all algorithm ( case insensitive ) - /*! - Replace all occurrences of the search string in the input - with the format string. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - Searching is case insensitive. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param Search A substring to be searched for - \param Format A substitute string - \param Loc A locale used for case insensitive comparison - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T, - typename Range3T> - inline OutputIteratorT ireplace_all_copy( - OutputIteratorT Output, - const Range1T& Input, - const Range2T& Search, - const Range3T& Format, - const std::locale& Loc=std::locale() ) - { - return ::boost::algorithm::find_format_all_copy( - Output, - Input, - ::boost::algorithm::first_finder(Search, is_iequal(Loc)), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace all algorithm ( case insensitive ) - /*! - \overload - */ - template - inline SequenceT ireplace_all_copy( - const SequenceT& Input, - const Range1T& Search, - const Range2T& Format, - const std::locale& Loc=std::locale() ) - { - return ::boost::algorithm::find_format_all_copy( - Input, - ::boost::algorithm::first_finder(Search, is_iequal(Loc)), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace all algorithm ( case insensitive ) - /*! - Replace all occurrences of the search string in the input - with the format string.The input sequence is modified in-place. - Searching is case insensitive. - - \param Input An input string - \param Search A substring to be searched for - \param Format A substitute string - \param Loc A locale used for case insensitive comparison - */ - template - inline void ireplace_all( - SequenceT& Input, - const Range1T& Search, - const Range2T& Format, - const std::locale& Loc=std::locale() ) - { - ::boost::algorithm::find_format_all( - Input, - ::boost::algorithm::first_finder(Search, is_iequal(Loc)), - ::boost::algorithm::const_formatter(Format) ); - } - -// replace_head --------------------------------------------------------------------// - - //! Replace head algorithm - /*! - Replace the head of the input with the given format string. - The head is a prefix of a string of given size. - If the sequence is shorter then required, whole string if - considered to be the head. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param N Length of the head. - For N>=0, at most N characters are extracted. - For N<0, size(Input)-|N| characters are extracted. - \param Format A substitute string - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T> - inline OutputIteratorT replace_head_copy( - OutputIteratorT Output, - const Range1T& Input, - int N, - const Range2T& Format ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::head_finder(N), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace head algorithm - /*! - \overload - */ - template - inline SequenceT replace_head_copy( - const SequenceT& Input, - int N, - const RangeT& Format ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::head_finder(N), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace head algorithm - /*! - Replace the head of the input with the given format string. - The head is a prefix of a string of given size. - If the sequence is shorter then required, the whole string is - considered to be the head. The input sequence is modified in-place. - - \param Input An input string - \param N Length of the head. - For N>=0, at most N characters are extracted. - For N<0, size(Input)-|N| characters are extracted. - \param Format A substitute string - */ - template - inline void replace_head( - SequenceT& Input, - int N, - const RangeT& Format ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::head_finder(N), - ::boost::algorithm::const_formatter(Format) ); - } - -// replace_tail --------------------------------------------------------------------// - - //! Replace tail algorithm - /*! - Replace the tail of the input with the given format string. - The tail is a suffix of a string of given size. - If the sequence is shorter then required, whole string is - considered to be the tail. - The result is a modified copy of the input. It is returned as a sequence - or copied to the output iterator. - - \param Output An output iterator to which the result will be copied - \param Input An input string - \param N Length of the tail. - For N>=0, at most N characters are extracted. - For N<0, size(Input)-|N| characters are extracted. - \param Format A substitute string - \return An output iterator pointing just after the last inserted character or - a modified copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template< - typename OutputIteratorT, - typename Range1T, - typename Range2T> - inline OutputIteratorT replace_tail_copy( - OutputIteratorT Output, - const Range1T& Input, - int N, - const Range2T& Format ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::tail_finder(N), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace tail algorithm - /*! - \overload - */ - template - inline SequenceT replace_tail_copy( - const SequenceT& Input, - int N, - const RangeT& Format ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::tail_finder(N), - ::boost::algorithm::const_formatter(Format) ); - } - - //! Replace tail algorithm - /*! - Replace the tail of the input with the given format sequence. - The tail is a suffix of a string of given size. - If the sequence is shorter then required, the whole string is - considered to be the tail. The input sequence is modified in-place. - - \param Input An input string - \param N Length of the tail. - For N>=0, at most N characters are extracted. - For N<0, size(Input)-|N| characters are extracted. - \param Format A substitute string - */ - template - inline void replace_tail( - SequenceT& Input, - int N, - const RangeT& Format ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::tail_finder(N), - ::boost::algorithm::const_formatter(Format) ); - } - - } // namespace algorithm - - // pull names to the boost namespace - using algorithm::replace_range_copy; - using algorithm::replace_range; - using algorithm::replace_first_copy; - using algorithm::replace_first; - using algorithm::ireplace_first_copy; - using algorithm::ireplace_first; - using algorithm::replace_last_copy; - using algorithm::replace_last; - using algorithm::ireplace_last_copy; - using algorithm::ireplace_last; - using algorithm::replace_nth_copy; - using algorithm::replace_nth; - using algorithm::ireplace_nth_copy; - using algorithm::ireplace_nth; - using algorithm::replace_all_copy; - using algorithm::replace_all; - using algorithm::ireplace_all_copy; - using algorithm::ireplace_all; - using algorithm::replace_head_copy; - using algorithm::replace_head; - using algorithm::replace_tail_copy; - using algorithm::replace_tail; - -} // namespace boost - -#endif // BOOST_REPLACE_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/sequence_traits.hpp b/third_party/boost_parts/boost/algorithm/string/sequence_traits.hpp deleted file mode 100644 index be151f8d..00000000 --- a/third_party/boost_parts/boost/algorithm/string/sequence_traits.hpp +++ /dev/null @@ -1,120 +0,0 @@ -// Boost string_algo library sequence_traits.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_SEQUENCE_TRAITS_HPP -#define BOOST_STRING_SEQUENCE_TRAITS_HPP - -#include -#include -#include - -/*! \file - Traits defined in this header are used by various algorithms to achieve - better performance for specific containers. - Traits provide fail-safe defaults. If a container supports some of these - features, it is possible to specialize the specific trait for this container. - For lacking compilers, it is possible of define an override for a specific tester - function. - - Due to a language restriction, it is not currently possible to define specializations for - stl containers without including the corresponding header. To decrease the overhead - needed by this inclusion, user can selectively include a specialization - header for a specific container. They are located in boost/algorithm/string/stl - directory. Alternatively she can include boost/algorithm/string/std_collection_traits.hpp - header which contains specializations for all stl containers. -*/ - -namespace boost { - namespace algorithm { - -// sequence traits -----------------------------------------------// - - - //! Native replace trait - /*! - This trait specifies that the sequence has \c std::string like replace method - */ - template< typename T > - class has_native_replace - { - - public: -# if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - enum { value = false }; -# else - BOOST_STATIC_CONSTANT(bool, value=false); -# endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - - - typedef mpl::bool_::value> type; - }; - - - //! Stable iterators trait - /*! - This trait specifies that the sequence has stable iterators. It means - that operations like insert/erase/replace do not invalidate iterators. - */ - template< typename T > - class has_stable_iterators - { - public: -# if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - enum { value = false }; -# else - BOOST_STATIC_CONSTANT(bool, value=false); -# endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - - typedef mpl::bool_::value> type; - }; - - - //! Const time insert trait - /*! - This trait specifies that the sequence's insert method has - constant time complexity. - */ - template< typename T > - class has_const_time_insert - { - public: -# if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - enum { value = false }; -# else - BOOST_STATIC_CONSTANT(bool, value=false); -# endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - - typedef mpl::bool_::value> type; - }; - - - //! Const time erase trait - /*! - This trait specifies that the sequence's erase method has - constant time complexity. - */ - template< typename T > - class has_const_time_erase - { - public: -# if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - enum { value = false }; -# else - BOOST_STATIC_CONSTANT(bool, value=false); -# endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - - typedef mpl::bool_::value> type; - }; - - } // namespace algorithm -} // namespace boost - - -#endif // BOOST_STRING_SEQUENCE_TRAITS_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/split.hpp b/third_party/boost_parts/boost/algorithm/string/split.hpp deleted file mode 100644 index cae712c0..00000000 --- a/third_party/boost_parts/boost/algorithm/string/split.hpp +++ /dev/null @@ -1,163 +0,0 @@ -// Boost string_algo library split.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2006. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_SPLIT_HPP -#define BOOST_STRING_SPLIT_HPP - -#include - -#include -#include -#include - -/*! \file - Defines basic split algorithms. - Split algorithms can be used to divide a string - into several parts according to given criteria. - - Each part is copied and added as a new element to the - output container. - Thus the result container must be able to hold copies - of the matches (in a compatible structure like std::string) or - a reference to it (e.g. using the iterator range class). - Examples of such a container are \c std::vector - or \c std::list> -*/ - -namespace boost { - namespace algorithm { - -// find_all ------------------------------------------------------------// - - //! Find all algorithm - /*! - This algorithm finds all occurrences of the search string - in the input. - - Each part is copied and added as a new element to the - output container. - Thus the result container must be able to hold copies - of the matches (in a compatible structure like std::string) or - a reference to it (e.g. using the iterator range class). - Examples of such a container are \c std::vector - or \c std::list> - - \param Result A container that can hold copies of references to the substrings - \param Input A container which will be searched. - \param Search A substring to be searched for. - \return A reference the result - - \note Prior content of the result will be overwritten. - - \note This function provides the strong exception-safety guarantee - */ - template< typename SequenceSequenceT, typename Range1T, typename Range2T > - inline SequenceSequenceT& find_all( - SequenceSequenceT& Result, - Range1T& Input, - const Range2T& Search) - { - return ::boost::algorithm::iter_find( - Result, - Input, - ::boost::algorithm::first_finder(Search) ); - } - - //! Find all algorithm ( case insensitive ) - /*! - This algorithm finds all occurrences of the search string - in the input. - Each part is copied and added as a new element to the - output container. Thus the result container must be able to hold copies - of the matches (in a compatible structure like std::string) or - a reference to it (e.g. using the iterator range class). - Examples of such a container are \c std::vector - or \c std::list> - - Searching is case insensitive. - - \param Result A container that can hold copies of references to the substrings - \param Input A container which will be searched. - \param Search A substring to be searched for. - \param Loc A locale used for case insensitive comparison - \return A reference the result - - \note Prior content of the result will be overwritten. - - \note This function provides the strong exception-safety guarantee - */ - template< typename SequenceSequenceT, typename Range1T, typename Range2T > - inline SequenceSequenceT& ifind_all( - SequenceSequenceT& Result, - Range1T& Input, - const Range2T& Search, - const std::locale& Loc=std::locale() ) - { - return ::boost::algorithm::iter_find( - Result, - Input, - ::boost::algorithm::first_finder(Search, is_iequal(Loc) ) ); - } - - -// tokenize -------------------------------------------------------------// - - //! Split algorithm - /*! - Tokenize expression. This function is equivalent to C strtok. Input - sequence is split into tokens, separated by separators. Separators - are given by means of the predicate. - - Each part is copied and added as a new element to the - output container. - Thus the result container must be able to hold copies - of the matches (in a compatible structure like std::string) or - a reference to it (e.g. using the iterator range class). - Examples of such a container are \c std::vector - or \c std::list> - - \param Result A container that can hold copies of references to the substrings - \param Input A container which will be searched. - \param Pred A predicate to identify separators. This predicate is - supposed to return true if a given element is a separator. - \param eCompress If eCompress argument is set to token_compress_on, adjacent - separators are merged together. Otherwise, every two separators - delimit a token. - \return A reference the result - - \note Prior content of the result will be overwritten. - - \note This function provides the strong exception-safety guarantee - */ - template< typename SequenceSequenceT, typename RangeT, typename PredicateT > - inline SequenceSequenceT& split( - SequenceSequenceT& Result, - RangeT& Input, - PredicateT Pred, - token_compress_mode_type eCompress=token_compress_off ) - { - return ::boost::algorithm::iter_split( - Result, - Input, - ::boost::algorithm::token_finder( Pred, eCompress ) ); - } - - } // namespace algorithm - - // pull names to the boost namespace - using algorithm::find_all; - using algorithm::ifind_all; - using algorithm::split; - -} // namespace boost - - -#endif // BOOST_STRING_SPLIT_HPP - diff --git a/third_party/boost_parts/boost/algorithm/string/std/list_traits.hpp b/third_party/boost_parts/boost/algorithm/string/std/list_traits.hpp deleted file mode 100644 index a3cf7bb1..00000000 --- a/third_party/boost_parts/boost/algorithm/string/std/list_traits.hpp +++ /dev/null @@ -1,68 +0,0 @@ -// Boost string_algo library list_traits.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_STD_LIST_TRAITS_HPP -#define BOOST_STRING_STD_LIST_TRAITS_HPP - -#include -#include -#include - -namespace boost { - namespace algorithm { - -// std::list<> traits -----------------------------------------------// - - - // stable iterators trait - template - class has_stable_iterators< ::std::list > - { - public: -#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - enum { value = true }; -#else - BOOST_STATIC_CONSTANT(bool, value=true); -#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - typedef mpl::bool_::value> type; - }; - - // const time insert trait - template - class has_const_time_insert< ::std::list > - { - public: -#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - enum { value = true }; -#else - BOOST_STATIC_CONSTANT(bool, value=true); -#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - typedef mpl::bool_::value> type; - }; - - // const time erase trait - template - class has_const_time_erase< ::std::list > - { - public: -#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - enum { value = true }; -#else - BOOST_STATIC_CONSTANT(bool, value=true); -#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - typedef mpl::bool_::value> type; - }; - - - } // namespace algorithm -} // namespace boost - - -#endif // BOOST_STRING_STD_LIST_TRAITS_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/std/slist_traits.hpp b/third_party/boost_parts/boost/algorithm/string/std/slist_traits.hpp deleted file mode 100644 index c30b93c7..00000000 --- a/third_party/boost_parts/boost/algorithm/string/std/slist_traits.hpp +++ /dev/null @@ -1,69 +0,0 @@ -// Boost string_algo library slist_traits.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_STD_SLIST_TRAITS_HPP -#define BOOST_STRING_STD_SLIST_TRAITS_HPP - -#include -#include -#include BOOST_SLIST_HEADER -#include - -namespace boost { - namespace algorithm { - -// SGI's std::slist<> traits -----------------------------------------------// - - - // stable iterators trait - template - class has_stable_iterators< BOOST_STD_EXTENSION_NAMESPACE::slist > - { - public: -#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - enum { value = true }; -#else - BOOST_STATIC_CONSTANT(bool, value=true); -#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - typedef mpl::bool_::value> type; - }; - - // const time insert trait - template - class has_const_time_insert< BOOST_STD_EXTENSION_NAMESPACE::slist > - { - public: -#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - enum { value = true }; -#else - BOOST_STATIC_CONSTANT(bool, value=true); -#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - typedef mpl::bool_::value> type; - }; - - // const time erase trait - template - class has_const_time_erase< BOOST_STD_EXTENSION_NAMESPACE::slist > - { - public: -#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - enum { value = true }; -#else - BOOST_STATIC_CONSTANT(bool, value=true); -#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - typedef mpl::bool_::value> type; - }; - - - } // namespace algorithm -} // namespace boost - - -#endif // BOOST_STRING_STD_LIST_TRAITS_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/std/string_traits.hpp b/third_party/boost_parts/boost/algorithm/string/std/string_traits.hpp deleted file mode 100644 index c9408307..00000000 --- a/third_party/boost_parts/boost/algorithm/string/std/string_traits.hpp +++ /dev/null @@ -1,44 +0,0 @@ -// Boost string_algo library string_traits.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_STD_STRING_TRAITS_HPP -#define BOOST_STRING_STD_STRING_TRAITS_HPP - -#include -#include -#include - -namespace boost { - namespace algorithm { - -// std::basic_string<> traits -----------------------------------------------// - - - // native replace trait - template - class has_native_replace< std::basic_string > - { - public: -#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - enum { value = true } ; -#else - BOOST_STATIC_CONSTANT(bool, value=true); -#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - - typedef mpl::bool_::value> type; - }; - - - - } // namespace algorithm -} // namespace boost - - -#endif // BOOST_STRING_LIST_TRAITS_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/std_containers_traits.hpp b/third_party/boost_parts/boost/algorithm/string/std_containers_traits.hpp deleted file mode 100644 index 3f02246f..00000000 --- a/third_party/boost_parts/boost/algorithm/string/std_containers_traits.hpp +++ /dev/null @@ -1,26 +0,0 @@ -// Boost string_algo library std_containers_traits.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_STD_CONTAINERS_TRAITS_HPP -#define BOOST_STRING_STD_CONTAINERS_TRAITS_HPP - -/*!\file - This file includes sequence traits for stl containers. -*/ - -#include -#include -#include - -#ifdef BOOST_HAS_SLIST -# include -#endif - -#endif // BOOST_STRING_STD_CONTAINERS_TRAITS_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/trim.hpp b/third_party/boost_parts/boost/algorithm/string/trim.hpp deleted file mode 100644 index e740d57d..00000000 --- a/third_party/boost_parts/boost/algorithm/string/trim.hpp +++ /dev/null @@ -1,398 +0,0 @@ -// Boost string_algo library trim.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_TRIM_HPP -#define BOOST_STRING_TRIM_HPP - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -/*! \file - Defines trim algorithms. - Trim algorithms are used to remove trailing and leading spaces from a - sequence (string). Space is recognized using given locales. - - Parametric (\c _if) variants use a predicate (functor) to select which characters - are to be trimmed.. - Functions take a selection predicate as a parameter, which is used to determine - whether a character is a space. Common predicates are provided in classification.hpp header. - -*/ - -namespace boost { - namespace algorithm { - - // left trim -----------------------------------------------// - - - //! Left trim - parametric - /*! - Remove all leading spaces from the input. - The supplied predicate is used to determine which characters are considered spaces. - The result is a trimmed copy of the input. It is returned as a sequence - or copied to the output iterator - - \param Output An output iterator to which the result will be copied - \param Input An input range - \param IsSpace A unary predicate identifying spaces - \return - An output iterator pointing just after the last inserted character or - a copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template - inline OutputIteratorT trim_left_copy_if( - OutputIteratorT Output, - const RangeT& Input, - PredicateT IsSpace) - { - iterator_range::type> lit_range(::boost::as_literal(Input)); - - std::copy( - ::boost::algorithm::detail::trim_begin( - ::boost::begin(lit_range), - ::boost::end(lit_range), - IsSpace ), - ::boost::end(lit_range), - Output); - - return Output; - } - - //! Left trim - parametric - /*! - \overload - */ - template - inline SequenceT trim_left_copy_if(const SequenceT& Input, PredicateT IsSpace) - { - return SequenceT( - ::boost::algorithm::detail::trim_begin( - ::boost::begin(Input), - ::boost::end(Input), - IsSpace ), - ::boost::end(Input)); - } - - //! Left trim - parametric - /*! - Remove all leading spaces from the input. - The result is a trimmed copy of the input. - - \param Input An input sequence - \param Loc a locale used for 'space' classification - \return A trimmed copy of the input - - \note This function provides the strong exception-safety guarantee - */ - template - inline SequenceT trim_left_copy(const SequenceT& Input, const std::locale& Loc=std::locale()) - { - return - ::boost::algorithm::trim_left_copy_if( - Input, - is_space(Loc)); - } - - //! Left trim - /*! - Remove all leading spaces from the input. The supplied predicate is - used to determine which characters are considered spaces. - The input sequence is modified in-place. - - \param Input An input sequence - \param IsSpace A unary predicate identifying spaces - */ - template - inline void trim_left_if(SequenceT& Input, PredicateT IsSpace) - { - Input.erase( - ::boost::begin(Input), - ::boost::algorithm::detail::trim_begin( - ::boost::begin(Input), - ::boost::end(Input), - IsSpace)); - } - - //! Left trim - /*! - Remove all leading spaces from the input. - The Input sequence is modified in-place. - - \param Input An input sequence - \param Loc A locale used for 'space' classification - */ - template - inline void trim_left(SequenceT& Input, const std::locale& Loc=std::locale()) - { - ::boost::algorithm::trim_left_if( - Input, - is_space(Loc)); - } - - // right trim -----------------------------------------------// - - //! Right trim - parametric - /*! - Remove all trailing spaces from the input. - The supplied predicate is used to determine which characters are considered spaces. - The result is a trimmed copy of the input. It is returned as a sequence - or copied to the output iterator - - \param Output An output iterator to which the result will be copied - \param Input An input range - \param IsSpace A unary predicate identifying spaces - \return - An output iterator pointing just after the last inserted character or - a copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template - inline OutputIteratorT trim_right_copy_if( - OutputIteratorT Output, - const RangeT& Input, - PredicateT IsSpace ) - { - iterator_range::type> lit_range(::boost::as_literal(Input)); - - std::copy( - ::boost::begin(lit_range), - ::boost::algorithm::detail::trim_end( - ::boost::begin(lit_range), - ::boost::end(lit_range), - IsSpace ), - Output ); - - return Output; - } - - //! Right trim - parametric - /*! - \overload - */ - template - inline SequenceT trim_right_copy_if(const SequenceT& Input, PredicateT IsSpace) - { - return SequenceT( - ::boost::begin(Input), - ::boost::algorithm::detail::trim_end( - ::boost::begin(Input), - ::boost::end(Input), - IsSpace) - ); - } - - //! Right trim - /*! - Remove all trailing spaces from the input. - The result is a trimmed copy of the input - - \param Input An input sequence - \param Loc A locale used for 'space' classification - \return A trimmed copy of the input - - \note This function provides the strong exception-safety guarantee - */ - template - inline SequenceT trim_right_copy(const SequenceT& Input, const std::locale& Loc=std::locale()) - { - return - ::boost::algorithm::trim_right_copy_if( - Input, - is_space(Loc)); - } - - - //! Right trim - parametric - /*! - Remove all trailing spaces from the input. - The supplied predicate is used to determine which characters are considered spaces. - The input sequence is modified in-place. - - \param Input An input sequence - \param IsSpace A unary predicate identifying spaces - */ - template - inline void trim_right_if(SequenceT& Input, PredicateT IsSpace) - { - Input.erase( - ::boost::algorithm::detail::trim_end( - ::boost::begin(Input), - ::boost::end(Input), - IsSpace ), - ::boost::end(Input) - ); - } - - - //! Right trim - /*! - Remove all trailing spaces from the input. - The input sequence is modified in-place. - - \param Input An input sequence - \param Loc A locale used for 'space' classification - */ - template - inline void trim_right(SequenceT& Input, const std::locale& Loc=std::locale()) - { - ::boost::algorithm::trim_right_if( - Input, - is_space(Loc) ); - } - - // both side trim -----------------------------------------------// - - //! Trim - parametric - /*! - Remove all trailing and leading spaces from the input. - The supplied predicate is used to determine which characters are considered spaces. - The result is a trimmed copy of the input. It is returned as a sequence - or copied to the output iterator - - \param Output An output iterator to which the result will be copied - \param Input An input range - \param IsSpace A unary predicate identifying spaces - \return - An output iterator pointing just after the last inserted character or - a copy of the input - - \note The second variant of this function provides the strong exception-safety guarantee - */ - template - inline OutputIteratorT trim_copy_if( - OutputIteratorT Output, - const RangeT& Input, - PredicateT IsSpace) - { - iterator_range::type> lit_range(::boost::as_literal(Input)); - - BOOST_STRING_TYPENAME - range_const_iterator::type TrimEnd= - ::boost::algorithm::detail::trim_end( - ::boost::begin(lit_range), - ::boost::end(lit_range), - IsSpace); - - std::copy( - detail::trim_begin( - ::boost::begin(lit_range), TrimEnd, IsSpace), - TrimEnd, - Output - ); - - return Output; - } - - //! Trim - parametric - /*! - \overload - */ - template - inline SequenceT trim_copy_if(const SequenceT& Input, PredicateT IsSpace) - { - BOOST_STRING_TYPENAME - range_const_iterator::type TrimEnd= - ::boost::algorithm::detail::trim_end( - ::boost::begin(Input), - ::boost::end(Input), - IsSpace); - - return SequenceT( - detail::trim_begin( - ::boost::begin(Input), - TrimEnd, - IsSpace), - TrimEnd - ); - } - - //! Trim - /*! - Remove all leading and trailing spaces from the input. - The result is a trimmed copy of the input - - \param Input An input sequence - \param Loc A locale used for 'space' classification - \return A trimmed copy of the input - - \note This function provides the strong exception-safety guarantee - */ - template - inline SequenceT trim_copy( const SequenceT& Input, const std::locale& Loc=std::locale() ) - { - return - ::boost::algorithm::trim_copy_if( - Input, - is_space(Loc) ); - } - - //! Trim - /*! - Remove all leading and trailing spaces from the input. - The supplied predicate is used to determine which characters are considered spaces. - The input sequence is modified in-place. - - \param Input An input sequence - \param IsSpace A unary predicate identifying spaces - */ - template - inline void trim_if(SequenceT& Input, PredicateT IsSpace) - { - ::boost::algorithm::trim_right_if( Input, IsSpace ); - ::boost::algorithm::trim_left_if( Input, IsSpace ); - } - - //! Trim - /*! - Remove all leading and trailing spaces from the input. - The input sequence is modified in-place. - - \param Input An input sequence - \param Loc A locale used for 'space' classification - */ - template - inline void trim(SequenceT& Input, const std::locale& Loc=std::locale()) - { - ::boost::algorithm::trim_if( - Input, - is_space( Loc ) ); - } - - } // namespace algorithm - - // pull names to the boost namespace - using algorithm::trim_left; - using algorithm::trim_left_if; - using algorithm::trim_left_copy; - using algorithm::trim_left_copy_if; - using algorithm::trim_right; - using algorithm::trim_right_if; - using algorithm::trim_right_copy; - using algorithm::trim_right_copy_if; - using algorithm::trim; - using algorithm::trim_if; - using algorithm::trim_copy; - using algorithm::trim_copy_if; - -} // namespace boost - -#endif // BOOST_STRING_TRIM_HPP diff --git a/third_party/boost_parts/boost/algorithm/string/yes_no_type.hpp b/third_party/boost_parts/boost/algorithm/string/yes_no_type.hpp deleted file mode 100644 index b76cc6c1..00000000 --- a/third_party/boost_parts/boost/algorithm/string/yes_no_type.hpp +++ /dev/null @@ -1,33 +0,0 @@ -// Boost string_algo library yes_no_type.hpp header file ---------------------------// - -// Copyright Pavol Droba 2002-2003. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/ for updates, documentation, and revision history. - -#ifndef BOOST_STRING_YES_NO_TYPE_DETAIL_HPP -#define BOOST_STRING_YES_NO_TYPE_DETAIL_HPP - -namespace boost { - namespace algorithm { - - // taken from boost mailing-list - // when yes_no_type will become officially - // a part of boost distribution, this header - // will be deprecated - template struct size_descriptor - { - typedef char (& type)[I]; - }; - - typedef size_descriptor<1>::type yes_type; - typedef size_descriptor<2>::type no_type; - - } // namespace algorithm -} // namespace boost - - -#endif // BOOST_STRING_YES_NO_TYPE_DETAIL_HPP diff --git a/third_party/boost_parts/boost/align/align.hpp b/third_party/boost_parts/boost/align/align.hpp deleted file mode 100644 index 3582dcc0..00000000 --- a/third_party/boost_parts/boost/align/align.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/* -(c) 2014-2015 Glen Joseph Fernandes - - -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt -*/ -#ifndef BOOST_ALIGN_ALIGN_HPP -#define BOOST_ALIGN_ALIGN_HPP - -#include - -#if !defined(BOOST_NO_CXX11_STD_ALIGN) -#include -#else -#include -#endif - -#endif diff --git a/third_party/boost_parts/boost/align/detail/align.hpp b/third_party/boost_parts/boost/align/detail/align.hpp deleted file mode 100644 index 0828c583..00000000 --- a/third_party/boost_parts/boost/align/detail/align.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/* -(c) 2014 Glen Joseph Fernandes - - -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt -*/ -#ifndef BOOST_ALIGN_DETAIL_ALIGN_HPP -#define BOOST_ALIGN_DETAIL_ALIGN_HPP - -#include -#include - -namespace boost { -namespace alignment { - -inline void* align(std::size_t alignment, std::size_t size, - void*& ptr, std::size_t& space) -{ - BOOST_ASSERT(detail::is_alignment(alignment)); - if (size <= space) { - char* p = reinterpret_cast((reinterpret_cast(ptr) + alignment - 1) & ~(alignment - 1)); - std::ptrdiff_t n = p - static_cast(ptr); - if (size <= space - n) { - ptr = p; - space -= n; - return p; - } - } - return 0; -} - -} /* .alignment */ -} /* .boost */ - -#endif diff --git a/third_party/boost_parts/boost/align/detail/align_cxx11.hpp b/third_party/boost_parts/boost/align/detail/align_cxx11.hpp deleted file mode 100644 index a95b84c7..00000000 --- a/third_party/boost_parts/boost/align/detail/align_cxx11.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -(c) 2014 Glen Joseph Fernandes - - -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt -*/ -#ifndef BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP -#define BOOST_ALIGN_DETAIL_ALIGN_CXX11_HPP - -#include - -namespace boost { -namespace alignment { - -using std::align; - -} /* .alignment */ -} /* .boost */ - -#endif diff --git a/third_party/boost_parts/boost/align/detail/is_alignment.hpp b/third_party/boost_parts/boost/align/detail/is_alignment.hpp deleted file mode 100644 index 12d8df97..00000000 --- a/third_party/boost_parts/boost/align/detail/is_alignment.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/* -(c) 2014 Glen Joseph Fernandes - - -Distributed under the Boost Software -License, Version 1.0. -http://boost.org/LICENSE_1_0.txt -*/ -#ifndef BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP -#define BOOST_ALIGN_DETAIL_IS_ALIGNMENT_HPP - -#include -#include - -namespace boost { -namespace alignment { -namespace detail { - -BOOST_CONSTEXPR inline bool is_alignment(std::size_t value) - BOOST_NOEXCEPT -{ - return (value > 0) && ((value & (value - 1)) == 0); -} - -} /* .detail */ -} /* .alignment */ -} /* .boost */ - -#endif diff --git a/third_party/boost_parts/boost/archive/add_facet.hpp b/third_party/boost_parts/boost/archive/add_facet.hpp deleted file mode 100644 index 6bafe9bd..00000000 --- a/third_party/boost_parts/boost/archive/add_facet.hpp +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef BOOST_ARCHIVE_ADD_FACET_HPP -#define BOOST_ARCHIVE_ADD_FACET_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// add_facet.hpp - -// (C) Copyright 2003 Robert Ramey - http://www.rrsd.com . -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include -#include -#include - -// does STLport uses native STL for locales? -#if (defined(__SGI_STL_PORT)&& defined(_STLP_NO_OWN_IOSTREAMS)) -// and this native STL lib is old Dinkumware (has not defined _CPPLIB_VER) -# if (defined(_YVALS) && !defined(__IBMCPP__)) || !defined(_CPPLIB_VER) -# define BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT -# endif -#endif - -namespace boost { -namespace archive { - -template -inline std::locale * -add_facet(const std::locale &l, Facet * f){ - return - #if defined BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT - // std namespace used for native locale - new std::locale(std::_Addfac(l, f)); - #elif BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) // old Dinkumwar - // std namespace used for native locale - new std::locale(std::_Addfac(l, f)); - #else - // standard compatible - new std::locale(l, f); - #endif -} - -} // namespace archive -} // namespace boost - -#undef BOOST_ARCHIVE_OLD_DINKUMWARE_BENEATH_STLPORT - -#endif // BOOST_ARCHIVE_ADD_FACET_HPP diff --git a/third_party/boost_parts/boost/archive/basic_archive.hpp b/third_party/boost_parts/boost/archive/basic_archive.hpp index ce7ac99a..9283974f 100644 --- a/third_party/boost_parts/boost/archive/basic_archive.hpp +++ b/third_party/boost_parts/boost/archive/basic_archive.hpp @@ -127,11 +127,11 @@ class class_id_type { } // used for text output - operator int () const { + operator base_type () const { return t; } // used for text input - operator int_least16_t &() { + operator base_type &() { return t; } bool operator==(const class_id_type & rhs) const { @@ -151,7 +151,10 @@ class object_id_type { public: object_id_type(): t(0) {}; // note: presumes that size_t >= unsigned int. - explicit object_id_type(const std::size_t & t_) : t(t_){ + // use explicit cast to silence useless warning + explicit object_id_type(const std::size_t & t_) : t(static_cast(t_)){ + // make quadriple sure that we haven't lost any real integer + // precision BOOST_ASSERT(t_ <= boost::integer_traits::const_max); } object_id_type(const object_id_type & t_) : @@ -162,11 +165,11 @@ class object_id_type { return *this; } // used for text output - operator uint_least32_t () const { + operator base_type () const { return t; } // used for text input - operator uint_least32_t & () { + operator base_type & () { return t; } bool operator==(const object_id_type & rhs) const { diff --git a/third_party/boost_parts/boost/archive/basic_binary_iprimitive.hpp b/third_party/boost_parts/boost/archive/basic_binary_iprimitive.hpp index 40f45d9c..665d3e81 100644 --- a/third_party/boost_parts/boost/archive/basic_binary_iprimitive.hpp +++ b/third_party/boost_parts/boost/archive/basic_binary_iprimitive.hpp @@ -50,7 +50,7 @@ namespace std{ //#include #include -#include +#include #include #include diff --git a/third_party/boost_parts/boost/archive/basic_binary_oprimitive.hpp b/third_party/boost_parts/boost/archive/basic_binary_oprimitive.hpp index 4b7f454b..6dc770c6 100644 --- a/third_party/boost_parts/boost/archive/basic_binary_oprimitive.hpp +++ b/third_party/boost_parts/boost/archive/basic_binary_oprimitive.hpp @@ -45,7 +45,7 @@ namespace std{ //#include #include -#include +#include #include #include diff --git a/third_party/boost_parts/boost/archive/basic_text_iarchive.hpp b/third_party/boost_parts/boost/archive/basic_text_iarchive.hpp index 583041d8..48a646cc 100644 --- a/third_party/boost_parts/boost/archive/basic_text_iarchive.hpp +++ b/third_party/boost_parts/boost/archive/basic_text_iarchive.hpp @@ -21,7 +21,7 @@ // // note the fact that on libraries without wide characters, ostream is // is not a specialization of basic_ostream which in fact is not defined -// in such cases. So we can't use basic_ostream but rather +// in such cases. So we can't use basic_istream but rather // use two template parameters #include diff --git a/third_party/boost_parts/boost/archive/basic_text_oprimitive.hpp b/third_party/boost_parts/boost/archive/basic_text_oprimitive.hpp index c9f8c591..45f09358 100644 --- a/third_party/boost_parts/boost/archive/basic_text_oprimitive.hpp +++ b/third_party/boost_parts/boost/archive/basic_text_oprimitive.hpp @@ -175,8 +175,6 @@ class BOOST_SYMBOL_VISIBLE basic_text_oprimitive template void save(const T & t){ - boost::io::ios_flags_saver fs(os); - boost::io::ios_precision_saver ps(os); typename is_float::type tf; save_impl(t, tf); } diff --git a/third_party/boost_parts/boost/archive/basic_xml_iarchive.hpp b/third_party/boost_parts/boost/archive/basic_xml_iarchive.hpp index a882df56..e9f7482f 100644 --- a/third_party/boost_parts/boost/archive/basic_xml_iarchive.hpp +++ b/third_party/boost_parts/boost/archive/basic_xml_iarchive.hpp @@ -89,8 +89,7 @@ class BOOST_SYMBOL_VISIBLE basic_xml_iarchive : // leaving the archive in an undetermined state BOOST_ARCHIVE_OR_WARCHIVE_DECL void load_override(class_id_type & t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - load_override(class_id_optional_type & /* t */){} + void load_override(class_id_optional_type & /* t */){} BOOST_ARCHIVE_OR_WARCHIVE_DECL void load_override(object_id_type & t); BOOST_ARCHIVE_OR_WARCHIVE_DECL void diff --git a/third_party/boost_parts/boost/archive/codecvt_null.hpp b/third_party/boost_parts/boost/archive/codecvt_null.hpp index 9cc9e572..3b39c8ed 100644 --- a/third_party/boost_parts/boost/archive/codecvt_null.hpp +++ b/third_party/boost_parts/boost/archive/codecvt_null.hpp @@ -18,8 +18,11 @@ #include #include // NULL, size_t +#ifndef BOOST_NO_CWCHAR #include // for mbstate_t +#endif #include +#include #include #include // must be the last header @@ -60,9 +63,10 @@ class codecvt_null : public std::codecvt }; template<> -class BOOST_SYMBOL_VISIBLE codecvt_null : public std::codecvt +class BOOST_WARCHIVE_DECL codecvt_null : + public std::codecvt { - virtual BOOST_WARCHIVE_DECL std::codecvt_base::result + virtual std::codecvt_base::result do_out( std::mbstate_t & state, const wchar_t * first1, @@ -72,7 +76,7 @@ class BOOST_SYMBOL_VISIBLE codecvt_null : public std::codecvt : public std::codecvt(no_locale_manage) {} - virtual ~codecvt_null(){}; + //virtual ~codecvt_null(){}; }; } // namespace archive diff --git a/third_party/boost_parts/boost/archive/detail/common_iarchive.hpp b/third_party/boost_parts/boost/archive/detail/common_iarchive.hpp index 82304f1e..4176a8a5 100644 --- a/third_party/boost_parts/boost/archive/detail/common_iarchive.hpp +++ b/third_party/boost_parts/boost/archive/detail/common_iarchive.hpp @@ -35,11 +35,12 @@ class extended_type_info; // note: referred to as Curiously Recurring Template Patter (CRTP) template -class BOOST_SYMBOL_VISIBLE common_iarchive : +class BOOST_SYMBOL_VISIBLE common_iarchive : public basic_iarchive, public interface_iarchive { friend class interface_iarchive; + friend class basic_iarchive; private: virtual void vload(version_type & t){ * this->This() >> t; diff --git a/third_party/boost_parts/boost/archive/detail/common_oarchive.hpp b/third_party/boost_parts/boost/archive/detail/common_oarchive.hpp index ee42bbe5..f7428637 100644 --- a/third_party/boost_parts/boost/archive/detail/common_oarchive.hpp +++ b/third_party/boost_parts/boost/archive/detail/common_oarchive.hpp @@ -38,6 +38,7 @@ class BOOST_SYMBOL_VISIBLE common_oarchive : public interface_oarchive { friend class interface_oarchive; + friend class basic_oarchive; private: virtual void vsave(const version_type t){ * this->This() << t; diff --git a/third_party/boost_parts/boost/archive/detail/iserializer.hpp b/third_party/boost_parts/boost/archive/detail/iserializer.hpp index 6bec499b..6c2fd67d 100644 --- a/third_party/boost_parts/boost/archive/detail/iserializer.hpp +++ b/third_party/boost_parts/boost/archive/detail/iserializer.hpp @@ -57,11 +57,10 @@ namespace std{ #include -#ifndef BOOST_MSVC - #define DONT_USE_HAS_NEW_OPERATOR ( \ - BOOST_WORKAROUND(__IBMCPP__, < 1210) \ - || defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590) \ - ) +#if !defined(BOOST_MSVC) && \ + (BOOST_WORKAROUND(__IBMCPP__, < 1210) || \ + defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590)) + #define DONT_USE_HAS_NEW_OPERATOR 1 #else #define DONT_USE_HAS_NEW_OPERATOR 0 #endif @@ -77,10 +76,10 @@ namespace std{ #include #include #include -#include #include #include #include +#include // the following is need only for dynamic cast of polymorphic pointers #include @@ -90,6 +89,8 @@ namespace std{ #include #include +#include + namespace boost { namespace serialization { @@ -234,7 +235,7 @@ struct heap_allocation { // that the class might have class specific new with NO // class specific delete at all. Patches (compatible with // C++03) welcome! - delete t; + (operator delete)(t); } }; struct doesnt_have_new_operator { @@ -243,7 +244,7 @@ struct heap_allocation { } static void invoke_delete(T * t) { // Note: I'm reliance upon automatic conversion from T * to void * here - delete t; + (operator delete)(t); } }; static T * invoke_new() { @@ -406,7 +407,7 @@ struct load_non_pointer_type { struct load_standard { template static void invoke(Archive &ar, const T & t){ - void * x = & const_cast(t); + void * x = boost::addressof(const_cast(t)); ar.load_object( x, boost::serialization::singleton< @@ -484,7 +485,7 @@ struct load_pointer_type { }; template - static const basic_pointer_iserializer * register_type(Archive &ar, const T & /*t*/){ + static const basic_pointer_iserializer * register_type(Archive &ar, const T* const /*t*/){ // there should never be any need to load an abstract polymorphic // class pointer. Inhibiting code generation for this // permits abstract base classes to be used - note: exception @@ -523,7 +524,7 @@ struct load_pointer_type { } template - static void check_load(T & /* t */){ + static void check_load(T * const /* t */){ check_pointer_level< T >(); check_pointer_tracking< T >(); } @@ -537,8 +538,8 @@ struct load_pointer_type { template static void invoke(Archive & ar, Tptr & t){ - check_load(*t); - const basic_pointer_iserializer * bpis_ptr = register_type(ar, *t); + check_load(t); + const basic_pointer_iserializer * bpis_ptr = register_type(ar, t); const basic_pointer_iserializer * newbpis_ptr = ar.load_pointer( // note major hack here !!! // I tried every way to convert Tptr &t (where Tptr might @@ -588,7 +589,14 @@ struct load_array_type { boost::archive::archive_exception::array_size_too_short ) ); - ar >> serialization::make_array(static_cast(&t[0]),count); + // explict template arguments to pass intel C++ compiler + ar >> serialization::make_array< + value_type, + boost::serialization::collection_size_type + >( + static_cast(&t[0]), + count + ); } }; @@ -598,7 +606,7 @@ template inline void load(Archive & ar, T &t){ // if this assertion trips. It means we're trying to load a // const object with a compiler that doesn't have correct - // funtion template ordering. On other compilers, this is + // function template ordering. On other compilers, this is // handled below. detail::check_const_loading< T >(); typedef diff --git a/third_party/boost_parts/boost/archive/detail/oserializer.hpp b/third_party/boost_parts/boost/archive/detail/oserializer.hpp index 0f2e733c..612e1f2c 100644 --- a/third_party/boost_parts/boost/archive/detail/oserializer.hpp +++ b/third_party/boost_parts/boost/archive/detail/oserializer.hpp @@ -26,6 +26,7 @@ #include // NULL #include + #include #include @@ -56,8 +57,9 @@ #include #include #include -#include #include +#include + #include #include @@ -67,6 +69,8 @@ #include #include +#include + namespace boost { namespace serialization { @@ -252,7 +256,7 @@ struct save_non_pointer_type { template static void invoke(Archive &ar, const T & t){ ar.save_object( - & t, + boost::addressof(t), boost::serialization::singleton< oserializer >::get_const_instance() @@ -260,6 +264,8 @@ struct save_non_pointer_type { } }; + + // adds class information to the archive. This includes // serialization level and class version struct save_conditional { @@ -337,7 +343,7 @@ struct save_pointer_type { }; template - static const basic_pointer_oserializer * register_type(Archive &ar, T & /*t*/){ + static const basic_pointer_oserializer * register_type(Archive &ar, T* const /*t*/){ // there should never be any need to save an abstract polymorphic // class pointer. Inhibiting code generation for this // permits abstract base classes to be used - note: exception @@ -404,7 +410,7 @@ struct save_pointer_type { // if its not a pointer to a more derived type const void *vp = static_cast(&t); if(*this_type == *true_type){ - const basic_pointer_oserializer * bpos = register_type(ar, t); + const basic_pointer_oserializer * bpos = register_type(ar, &t); ar.save_pointer(vp, bpos); return; } @@ -463,7 +469,7 @@ struct save_pointer_type { template static void invoke(Archive &ar, const TPtr t){ - register_type(ar, * t); + register_type(ar, t); if(NULL == t){ basic_oarchive & boa = boost::serialization::smart_cast_reference(ar); @@ -501,7 +507,14 @@ struct save_array_type ); boost::serialization::collection_size_type count(c); ar << BOOST_SERIALIZATION_NVP(count); - ar << serialization::make_array(static_cast(&t[0]),count); + // explict template arguments to pass intel C++ compiler + ar << serialization::make_array< + const value_type, + boost::serialization::collection_size_type + >( + static_cast(&t[0]), + count + ); } }; diff --git a/third_party/boost_parts/boost/archive/detail/utf8_codecvt_facet.hpp b/third_party/boost_parts/boost/archive/detail/utf8_codecvt_facet.hpp index dfbec6bd..00b2b419 100644 --- a/third_party/boost_parts/boost/archive/detail/utf8_codecvt_facet.hpp +++ b/third_party/boost_parts/boost/archive/detail/utf8_codecvt_facet.hpp @@ -9,26 +9,21 @@ #include -// std::codecvt_utf8 doesn't seem to work for msvc -// versions prior to MSVC 14.0 +#ifdef BOOST_NO_STD_WSTREAMBUF +#error "wide char i/o not supported on this platform" +#endif -#if defined(_MSC_VER) && _MSC_VER < 1900 \ -|| defined( BOOST_NO_CXX11_HDR_CODECVT ) - #include - #define BOOST_UTF8_BEGIN_NAMESPACE \ - namespace boost { namespace archive { namespace detail { - #define BOOST_UTF8_DECL BOOST_ARCHIVE_DECL - #define BOOST_UTF8_END_NAMESPACE }}} +// use boost's utf8 codecvt facet +#include +#define BOOST_UTF8_BEGIN_NAMESPACE \ + namespace boost { namespace archive { namespace detail { +#define BOOST_UTF8_DECL BOOST_ARCHIVE_DECL +#define BOOST_UTF8_END_NAMESPACE }}} - #include +#include + +#undef BOOST_UTF8_END_NAMESPACE +#undef BOOST_UTF8_DECL +#undef BOOST_UTF8_BEGIN_NAMESPACE - #undef BOOST_UTF8_END_NAMESPACE - #undef BOOST_UTF8_DECL - #undef BOOST_UTF8_BEGIN_NAMESPACE -#else - #include - namespace boost { namespace archive { namespace detail { - typedef std::codecvt_utf8 utf8_codecvt_facet; - } } } -#endif // BOOST_NO_CXX11_HDR_CODECVT #endif // BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP diff --git a/third_party/boost_parts/boost/archive/impl/archive_serializer_map.ipp b/third_party/boost_parts/boost/archive/impl/archive_serializer_map.ipp index 8dabf0d0..7f163ec4 100644 --- a/third_party/boost_parts/boost/archive/impl/archive_serializer_map.ipp +++ b/third_party/boost_parts/boost/archive/impl/archive_serializer_map.ipp @@ -47,6 +47,10 @@ archive_serializer_map::insert(const basic_serializer * bs){ template BOOST_ARCHIVE_OR_WARCHIVE_DECL void archive_serializer_map::erase(const basic_serializer * bs){ + BOOST_ASSERT(! boost::serialization::singleton< + extra_detail::map + >::is_destroyed() + ); if(boost::serialization::singleton< extra_detail::map >::is_destroyed()) diff --git a/third_party/boost_parts/boost/archive/impl/basic_binary_iprimitive.ipp b/third_party/boost_parts/boost/archive/impl/basic_binary_iprimitive.ipp index 7082b003..e2d05108 100644 --- a/third_party/boost_parts/boost/archive/impl/basic_binary_iprimitive.ipp +++ b/third_party/boost_parts/boost/archive/impl/basic_binary_iprimitive.ipp @@ -84,6 +84,8 @@ basic_binary_iprimitive::init() ); } +#ifndef BOOST_NO_CWCHAR +#ifndef BOOST_NO_INTRINSIC_WCHAR_T template BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_iprimitive::load(wchar_t * ws) @@ -93,6 +95,8 @@ basic_binary_iprimitive::load(wchar_t * ws) load_binary(ws, l * sizeof(wchar_t) / sizeof(char)); ws[l] = L'\0'; } +#endif +#endif template BOOST_ARCHIVE_OR_WARCHIVE_DECL void @@ -110,7 +114,6 @@ basic_binary_iprimitive::load(std::string & s) load_binary(&(*s.begin()), l); } -#ifndef BOOST_NO_CWCHAR template BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_iprimitive::load(char * s) @@ -120,7 +123,6 @@ basic_binary_iprimitive::load(char * s) load_binary(s, l); s[l] = '\0'; } -#endif #ifndef BOOST_NO_STD_WSTRING template diff --git a/third_party/boost_parts/boost/archive/impl/basic_binary_oprimitive.ipp b/third_party/boost_parts/boost/archive/impl/basic_binary_oprimitive.ipp index 130831e4..7b042173 100644 --- a/third_party/boost_parts/boost/archive/impl/basic_binary_oprimitive.ipp +++ b/third_party/boost_parts/boost/archive/impl/basic_binary_oprimitive.ipp @@ -71,6 +71,7 @@ basic_binary_oprimitive::save(const std::string &s) } #ifndef BOOST_NO_CWCHAR +#ifndef BOOST_NO_INTRINSIC_WCHAR_T template BOOST_ARCHIVE_OR_WARCHIVE_DECL void basic_binary_oprimitive::save(const wchar_t * ws) @@ -91,6 +92,7 @@ basic_binary_oprimitive::save(const std::wstring &ws) save_binary(ws.data(), l * sizeof(wchar_t) / sizeof(char)); } #endif +#endif // BOOST_NO_CWCHAR template BOOST_ARCHIVE_OR_WARCHIVE_DECL diff --git a/third_party/boost_parts/boost/archive/impl/text_wiarchive_impl.ipp b/third_party/boost_parts/boost/archive/impl/text_wiarchive_impl.ipp index 12af2b9f..e85625ac 100644 --- a/third_party/boost_parts/boost/archive/impl/text_wiarchive_impl.ipp +++ b/third_party/boost_parts/boost/archive/impl/text_wiarchive_impl.ipp @@ -56,7 +56,7 @@ text_wiarchive_impl::load(std::string &s) s.resize(0); s.reserve(size); while(size-- > 0){ - int x = is.narrow(is.get(), '\0'); + char x = is.narrow(is.get(), '\0'); s += x; } } diff --git a/third_party/boost_parts/boost/archive/impl/xml_wiarchive_impl.ipp b/third_party/boost_parts/boost/archive/impl/xml_wiarchive_impl.ipp index ee66c126..f572b762 100644 --- a/third_party/boost_parts/boost/archive/impl/xml_wiarchive_impl.ipp +++ b/third_party/boost_parts/boost/archive/impl/xml_wiarchive_impl.ipp @@ -161,13 +161,13 @@ xml_wiarchive_impl::xml_wiarchive_impl( gimpl(new xml_wgrammar()) { if(0 == (flags & no_codecvt)){ - std::locale l = std::locale( + archive_locale = std::locale( is_.getloc(), new boost::archive::detail::utf8_codecvt_facet ); // libstdc++ crashes without this is_.sync(); - is_.imbue(l); + is_.imbue(archive_locale); } if(0 == (flags & no_header)) init(); diff --git a/third_party/boost_parts/boost/archive/impl/xml_woarchive_impl.ipp b/third_party/boost_parts/boost/archive/impl/xml_woarchive_impl.ipp index 58f92c9d..630898b8 100644 --- a/third_party/boost_parts/boost/archive/impl/xml_woarchive_impl.ipp +++ b/third_party/boost_parts/boost/archive/impl/xml_woarchive_impl.ipp @@ -17,7 +17,9 @@ #include // strlen #include // mbtowc +#ifndef BOOST_NO_CWCHAR #include // wcslen +#endif #include #if defined(BOOST_NO_STDC_NAMESPACE) @@ -101,7 +103,6 @@ xml_woarchive_impl::save(const char * s){ template BOOST_WARCHIVE_DECL void xml_woarchive_impl::save(const wchar_t * ws){ - os << ws; typedef iterators::xml_escape xmbtows; std::copy( xmbtows(ws), @@ -124,12 +125,12 @@ xml_woarchive_impl::xml_woarchive_impl( basic_xml_oarchive(flags) { if(0 == (flags & no_codecvt)){ - std::locale l = std::locale( + archive_locale = std::locale( os_.getloc(), new boost::archive::detail::utf8_codecvt_facet ); os_.flush(); - os_.imbue(l); + os_.imbue(archive_locale); } if(0 == (flags & no_header)) this->init(); @@ -141,7 +142,7 @@ xml_woarchive_impl::~xml_woarchive_impl(){ if(std::uncaught_exception()) return; if(0 == (this->get_flags() & no_header)){ - save(L"\n"); + os << L""; } } diff --git a/third_party/boost_parts/boost/archive/iterators/base64_from_binary.hpp b/third_party/boost_parts/boost/archive/iterators/base64_from_binary.hpp index 00c4e10c..ee849944 100644 --- a/third_party/boost_parts/boost/archive/iterators/base64_from_binary.hpp +++ b/third_party/boost_parts/boost/archive/iterators/base64_from_binary.hpp @@ -41,7 +41,7 @@ template struct from_6_bit { typedef CharType result_type; CharType operator()(CharType t) const{ - const char * lookup_table = + static const char * lookup_table = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "0123456789" diff --git a/third_party/boost_parts/boost/archive/iterators/binary_from_base64.hpp b/third_party/boost_parts/boost/archive/iterators/binary_from_base64.hpp index 2eb78282..89b8f889 100644 --- a/third_party/boost_parts/boost/archive/iterators/binary_from_base64.hpp +++ b/third_party/boost_parts/boost/archive/iterators/binary_from_base64.hpp @@ -37,7 +37,7 @@ template struct to_6_bit { typedef CharType result_type; CharType operator()(CharType t) const{ - const signed char lookup_table[] = { + static const signed char lookup_table[] = { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,62,-1,-1,-1,63, diff --git a/third_party/boost_parts/boost/archive/iterators/escape.hpp b/third_party/boost_parts/boost/archive/iterators/escape.hpp index a1fee914..103b31e0 100644 --- a/third_party/boost_parts/boost/archive/iterators/escape.hpp +++ b/third_party/boost_parts/boost/archive/iterators/escape.hpp @@ -102,7 +102,8 @@ class escape : super_t(base), m_bnext(NULL), m_bend(NULL), - m_full(false) + m_full(false), + m_current_value(0) { } }; diff --git a/third_party/boost_parts/boost/archive/iterators/istream_iterator.hpp b/third_party/boost_parts/boost/archive/iterators/istream_iterator.hpp index 9a1d555c..a187f605 100644 --- a/third_party/boost_parts/boost/archive/iterators/istream_iterator.hpp +++ b/third_party/boost_parts/boost/archive/iterators/istream_iterator.hpp @@ -56,7 +56,7 @@ class istream_iterator : //Access the value referred to Elem dereference() const { - return m_istream->peek(); + return static_cast(m_istream->peek()); } void increment(){ @@ -75,14 +75,14 @@ class istream_iterator : } istream_iterator() : - m_istream(NULL) + m_istream(NULL), + m_current_value(NULL) {} istream_iterator(const istream_iterator & rhs) : m_istream(rhs.m_istream), m_current_value(rhs.m_current_value) {} - }; } // namespace iterators diff --git a/third_party/boost_parts/boost/archive/iterators/mb_from_wchar.hpp b/third_party/boost_parts/boost/archive/iterators/mb_from_wchar.hpp index d5110de2..eb30480c 100644 --- a/third_party/boost_parts/boost/archive/iterators/mb_from_wchar.hpp +++ b/third_party/boost_parts/boost/archive/iterators/mb_from_wchar.hpp @@ -18,14 +18,16 @@ #include #include // size_t +#ifndef BOOST_NO_CWCHAR #include // mbstate_t - +#endif #include #if defined(BOOST_NO_STDC_NAMESPACE) namespace std{ using ::mbstate_t; } // namespace std #endif + #include #include @@ -84,12 +86,15 @@ class mb_from_wchar wchar_t value = * this->base_reference(); const wchar_t *wend; char *bend; - std::codecvt_base::result r = m_codecvt_facet.out( - m_mbs, - & value, & value + 1, wend, - m_buffer, m_buffer + sizeof(m_buffer), bend + BOOST_VERIFY( + m_codecvt_facet.out( + m_mbs, + & value, & value + 1, wend, + m_buffer, m_buffer + sizeof(m_buffer), bend + ) + == + std::codecvt_base::ok ); - BOOST_ASSERT(std::codecvt_base::ok == r); m_bnext = 0; m_bend = bend - m_buffer; } diff --git a/third_party/boost_parts/boost/archive/iterators/transform_width.hpp b/third_party/boost_parts/boost/archive/iterators/transform_width.hpp index d042560e..09c050a9 100644 --- a/third_party/boost_parts/boost/archive/iterators/transform_width.hpp +++ b/third_party/boost_parts/boost/archive/iterators/transform_width.hpp @@ -111,6 +111,7 @@ class transform_width : transform_width(T start) : super_t(Base(static_cast< T >(start))), m_buffer_out_full(false), + m_buffer_out(0), // To disable GCC warning, but not truly necessary //(m_buffer_in will be initialized later before being //used because m_remaining_bits == 0) diff --git a/third_party/boost_parts/boost/archive/iterators/wchar_from_mb.hpp b/third_party/boost_parts/boost/archive/iterators/wchar_from_mb.hpp index 52a44bdc..2af8f640 100644 --- a/third_party/boost_parts/boost/archive/iterators/wchar_from_mb.hpp +++ b/third_party/boost_parts/boost/archive/iterators/wchar_from_mb.hpp @@ -19,7 +19,9 @@ #include #include #include // size_t +#ifndef BOOST_NO_CWCHAR #include // mbstate_t +#endif #include // copy #include diff --git a/third_party/boost_parts/boost/archive/shared_ptr_helper.hpp b/third_party/boost_parts/boost/archive/shared_ptr_helper.hpp deleted file mode 100644 index 39e6eb82..00000000 --- a/third_party/boost_parts/boost/archive/shared_ptr_helper.hpp +++ /dev/null @@ -1,219 +0,0 @@ -#ifndef BOOST_ARCHIVE_SHARED_PTR_HELPER_HPP -#define BOOST_ARCHIVE_SHARED_PTR_HELPER_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// shared_ptr_helper.hpp: serialization for boost shared pointern - -// (C) Copyright 2004-2009 Robert Ramey, Martin Ecker and Takatoshi Kondo -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include -#include -#include -#include // NULL - -#include -#include - -#include -#include -#include -#include - -#include -#include - -#include // must be the last headern - -namespace boost_132 { - template class shared_ptr; -} -namespace boost { - template class shared_ptr; - namespace serialization { - class extended_type_info; - template - inline void load( - Archive & ar, - boost::shared_ptr< T > &t, - const unsigned int file_version - ); - } -namespace archive{ -namespace detail { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// a common class for holding various types of shared pointers - -class shared_ptr_helper { - struct collection_type_compare { - bool operator()( - const shared_ptr &lhs, - const shared_ptr &rhs - )const{ - return lhs.get() < rhs.get(); - } - }; - typedef std::set< - boost::shared_ptr, - collection_type_compare - > collection_type; - typedef collection_type::const_iterator iterator_type; - // list of shared_pointers create accessable by raw pointer. This - // is used to "match up" shared pointers loaded at different - // points in the archive. Note, we delay construction until - // it is actually used since this is by default included as - // a "mix-in" even if shared_ptr isn't used. - collection_type * m_pointers; - - struct null_deleter { - void operator()(void const *) const {} - }; - - struct void_deleter { - const boost::serialization::extended_type_info * m_eti; - void_deleter(const boost::serialization::extended_type_info *eti) : - m_eti(eti) - {} - void operator()(void *vp) const { - m_eti->destroy(vp); - } - }; - -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else - template - friend inline void boost::serialization::load( - Archive & ar, - boost::shared_ptr< T > &t, - const unsigned int file_version - ); -#endif - -// #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP - // list of loaded pointers. This is used to be sure that the pointers - // stay around long enough to be "matched" with other pointers loaded - // by the same archive. These are created with a "null_deleter" so that - // when this list is destroyed - the underlaying raw pointers are not - // destroyed. This has to be done because the pointers are also held by - // new system which is disjoint from this set. This is implemented - // by a change in load_construct_data below. It makes this file suitable - // only for loading pointers into a 1.33 or later boost system. - std::list > * m_pointers_132; -// #endif - - // returns pointer to object and an indicator whether this is a - // new entry (true) or a previous one (false) - BOOST_ARCHIVE_DECL(shared_ptr) - get_od( - const void * od, - const boost::serialization::extended_type_info * true_type, - const boost::serialization::extended_type_info * this_type - ); - - BOOST_ARCHIVE_DECL(void) - append(const boost::shared_ptr &); - - template - struct non_polymorphic { - static const boost::serialization::extended_type_info * - get_object_identifier(T &){ - return & boost::serialization::singleton< - BOOST_DEDUCED_TYPENAME - boost::serialization::type_info_implementation< T >::type - >::get_const_instance(); - } - }; - template - struct polymorphic { - static const boost::serialization::extended_type_info * - get_object_identifier(T & t){ - return boost::serialization::singleton< - BOOST_DEDUCED_TYPENAME - boost::serialization::type_info_implementation< T >::type - >::get_const_instance().get_derived_extended_type_info(t); - } - }; -public: - template - void reset(shared_ptr< T > & s, T * t){ - if(NULL == t){ - s.reset(); - return; - } - const boost::serialization::extended_type_info * this_type - = & boost::serialization::type_info_implementation< T >::type - ::get_const_instance(); - - // get pointer to the most derived object. This is effectively - // the object identifern - typedef BOOST_DEDUCED_TYPENAME mpl::eval_if< - is_polymorphic< T >, - mpl::identity >, - mpl::identity > - >::type type; - - const boost::serialization::extended_type_info * true_type - = type::get_object_identifier(*t); - - // note:if this exception is thrown, be sure that derived pointern - // is either registered or exported. - if(NULL == true_type) - boost::serialization::throw_exception( - archive_exception( - archive_exception::unregistered_class, - this_type->get_debug_info() - ) - ); - shared_ptr r = - get_od( - static_cast(t), - true_type, - this_type - ); - if(!r){ - s.reset(t); - const void * od = void_downcast( - *true_type, - *this_type, - static_cast(t) - ); - shared_ptr sp(s, od); - append(sp); - } - else{ - s = shared_ptr< T >( - r, - static_cast(r.get()) - ); - } - } - -// #ifdef BOOST_SERIALIZATION_SHARED_PTR_132_HPP - BOOST_ARCHIVE_DECL(void) - append(const boost_132::shared_ptr & t); -// #endif -public: - BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) - shared_ptr_helper(); - BOOST_ARCHIVE_DECL(BOOST_PP_EMPTY()) - ~shared_ptr_helper(); -}; - -} // namespace detail -} // namespace archive -} // namespace boost - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_SHARED_PTR_HELPER_HPP diff --git a/third_party/boost_parts/boost/archive/wcslen.hpp b/third_party/boost_parts/boost/archive/wcslen.hpp index 2a3d6351..0b60004f 100644 --- a/third_party/boost_parts/boost/archive/wcslen.hpp +++ b/third_party/boost_parts/boost/archive/wcslen.hpp @@ -44,7 +44,9 @@ inline std::size_t wcslen(const wchar_t * ws) #else +#ifndef BOOST_NO_CWCHAR #include +#endif #ifdef BOOST_NO_STDC_NAMESPACE namespace std{ using ::wcslen; } #endif diff --git a/third_party/boost_parts/boost/archive/xml_wiarchive.hpp b/third_party/boost_parts/boost/archive/xml_wiarchive.hpp index ac24289a..2ca3e559 100644 --- a/third_party/boost_parts/boost/archive/xml_wiarchive.hpp +++ b/third_party/boost_parts/boost/archive/xml_wiarchive.hpp @@ -62,6 +62,7 @@ class BOOST_SYMBOL_VISIBLE xml_wiarchive_impl : friend class basic_xml_iarchive; friend class load_access; #endif + std::locale archive_locale; boost::scoped_ptr gimpl; std::wistream & get_is(){ return is; diff --git a/third_party/boost_parts/boost/array.hpp b/third_party/boost_parts/boost/array.hpp index fa06fa9a..210c0721 100644 --- a/third_party/boost_parts/boost/array.hpp +++ b/third_party/boost_parts/boost/array.hpp @@ -13,6 +13,7 @@ * accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) * + * 9 Jan 2013 - (mtc) Added constexpr * 14 Apr 2012 - (mtc) Added support for boost::hash * 28 Dec 2010 - (mtc) Added cbegin and cend (and crbegin and crend) for C++Ox compatibility. * 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group. @@ -42,12 +43,12 @@ #include #include #include +#include #include // Handles broken standard libraries better than #include #include -#include #include // FIXES for broken compilers @@ -81,15 +82,9 @@ namespace boost { const_iterator cend() const { return elems+N; } // reverse iterator support -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) +#if !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; -#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310) - // workaround for broken reverse_iterator in VC7 - typedef std::reverse_iterator > reverse_iterator; - typedef std::reverse_iterator > const_reverse_iterator; #elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) typedef std::reverse_iterator reverse_iterator; @@ -120,19 +115,17 @@ namespace boost { // operator[] reference operator[](size_type i) { - BOOST_ASSERT_MSG( i < N, "out of range" ); - return elems[i]; + return BOOST_ASSERT_MSG( i < N, "out of range" ), elems[i]; } - const_reference operator[](size_type i) const + /*BOOST_CONSTEXPR*/ const_reference operator[](size_type i) const { - BOOST_ASSERT_MSG( i < N, "out of range" ); - return elems[i]; + return BOOST_ASSERT_MSG( i < N, "out of range" ), elems[i]; } // at() with range check - reference at(size_type i) { rangecheck(i); return elems[i]; } - const_reference at(size_type i) const { rangecheck(i); return elems[i]; } + reference at(size_type i) { return rangecheck(i), elems[i]; } + /*BOOST_CONSTEXPR*/ const_reference at(size_type i) const { return rangecheck(i), elems[i]; } // front() and back() reference front() @@ -140,7 +133,7 @@ namespace boost { return elems[0]; } - const_reference front() const + BOOST_CONSTEXPR const_reference front() const { return elems[0]; } @@ -150,15 +143,15 @@ namespace boost { return elems[N-1]; } - const_reference back() const + BOOST_CONSTEXPR const_reference back() const { return elems[N-1]; } // size is constant - static size_type size() { return N; } - static bool empty() { return false; } - static size_type max_size() { return N; } + static BOOST_CONSTEXPR size_type size() { return N; } + static BOOST_CONSTEXPR bool empty() { return false; } + static BOOST_CONSTEXPR size_type max_size() { return N; } enum { static_size = N }; // swap (note: linear complexity) @@ -189,16 +182,12 @@ namespace boost { } // check range (may be private because it is static) - static void rangecheck (size_type i) { - if (i >= size()) { - std::out_of_range e("array<>: index out of range"); - boost::throw_exception(e); - } + static BOOST_CONSTEXPR bool rangecheck (size_type i) { + return i > size() ? boost::throw_exception(std::out_of_range ("array<>: index out of range")), true : true; } }; -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< class T > class array< T, 0 > { @@ -222,15 +211,9 @@ namespace boost { const_iterator cend() const { return cbegin(); } // reverse iterator support -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) +#if !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS) typedef std::reverse_iterator reverse_iterator; typedef std::reverse_iterator const_reverse_iterator; -#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310) - // workaround for broken reverse_iterator in VC7 - typedef std::reverse_iterator > reverse_iterator; - typedef std::reverse_iterator > const_reverse_iterator; #elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) typedef std::reverse_iterator reverse_iterator; @@ -264,14 +247,14 @@ namespace boost { return failed_rangecheck(); } - const_reference operator[](size_type /*i*/) const + /*BOOST_CONSTEXPR*/ const_reference operator[](size_type /*i*/) const { return failed_rangecheck(); } // at() with range check reference at(size_type /*i*/) { return failed_rangecheck(); } - const_reference at(size_type /*i*/) const { return failed_rangecheck(); } + /*BOOST_CONSTEXPR*/ const_reference at(size_type /*i*/) const { return failed_rangecheck(); } // front() and back() reference front() @@ -279,7 +262,7 @@ namespace boost { return failed_rangecheck(); } - const_reference front() const + BOOST_CONSTEXPR const_reference front() const { return failed_rangecheck(); } @@ -289,15 +272,15 @@ namespace boost { return failed_rangecheck(); } - const_reference back() const + BOOST_CONSTEXPR const_reference back() const { return failed_rangecheck(); } // size is constant - static size_type size() { return 0; } - static bool empty() { return true; } - static size_type max_size() { return 0; } + static BOOST_CONSTEXPR size_type size() { return 0; } + static BOOST_CONSTEXPR bool empty() { return true; } + static BOOST_CONSTEXPR size_type max_size() { return 0; } enum { static_size = 0 }; void swap (array& /*y*/) { @@ -335,7 +318,6 @@ namespace boost { #endif } }; -#endif // comparisons template @@ -391,7 +373,7 @@ namespace boost { // Specific for boost::array: simply returns its elems data member. template - typename const detail::c_array::type& get_c_array(const boost::array& arg) + typename detail::c_array::type const& get_c_array(const boost::array& arg) { return arg.elems; } @@ -429,6 +411,7 @@ namespace boost { } #endif + template std::size_t hash_range(It, It); template std::size_t hash_value(const array& arr) @@ -436,8 +419,36 @@ namespace boost { return boost::hash_range(arr.begin(), arr.end()); } + template + T &get(boost::array &arr) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG ( Idx < N, "boost::get<>(boost::array &) index out of range" ); + return arr[Idx]; + } + + template + const T &get(const boost::array &arr) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG ( Idx < N, "boost::get<>(const boost::array &) index out of range" ); + return arr[Idx]; + } + } /* namespace boost */ +#ifndef BOOST_NO_CXX11_HDR_ARRAY +// If we don't have std::array, I'm assuming that we don't have std::get +namespace std { + template + T &get(boost::array &arr) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG ( Idx < N, "std::get<>(boost::array &) index out of range" ); + return arr[Idx]; + } + + template + const T &get(const boost::array &arr) BOOST_NOEXCEPT { + BOOST_STATIC_ASSERT_MSG ( Idx < N, "std::get<>(const boost::array &) index out of range" ); + return arr[Idx]; + } +} +#endif #if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) # pragma warning(pop) diff --git a/third_party/boost_parts/boost/bind/arg.hpp b/third_party/boost_parts/boost/bind/arg.hpp index a74b8298..cb52e668 100644 --- a/third_party/boost_parts/boost/bind/arg.hpp +++ b/third_party/boost_parts/boost/bind/arg.hpp @@ -21,20 +21,27 @@ #include #include -#include namespace boost { +template struct _arg_eq +{ +}; + +template<> struct _arg_eq +{ + typedef void type; +}; + template< int I > struct arg { BOOST_CONSTEXPR arg() { } - template< class T > BOOST_CONSTEXPR arg( T const & /* t */ ) + template< class T > BOOST_CONSTEXPR arg( T const & /* t */, typename _arg_eq< I == is_placeholder::value >::type * = 0 ) { - BOOST_STATIC_ASSERT( I == is_placeholder::value ); } }; diff --git a/third_party/boost_parts/boost/bind/bind.hpp b/third_party/boost_parts/boost/bind/bind.hpp index f793551d..4cedc5e9 100644 --- a/third_party/boost_parts/boost/bind/bind.hpp +++ b/third_party/boost_parts/boost/bind/bind.hpp @@ -887,9 +887,17 @@ template< class A1 > class rrlist1 template T & operator[] (reference_wrapper const & v) const { return v.get(); } - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t & b) const + { + rrlist1 a( a1_ ); + return b.eval( a ); + } - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const + { + rrlist1 a( a1_ ); + return b.eval( a ); + } }; template< class A1, class A2 > class rrlist2 @@ -915,9 +923,17 @@ template< class A1, class A2 > class rrlist2 template T & operator[] (reference_wrapper const & v) const { return v.get(); } - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t & b) const + { + rrlist2 a( a1_, a2_ ); + return b.eval( a ); + } - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const + { + rrlist2 a( a1_, a2_ ); + return b.eval( a ); + } }; template< class A1, class A2, class A3 > class rrlist3 @@ -946,9 +962,17 @@ template< class A1, class A2, class A3 > class rrlist3 template T & operator[] (reference_wrapper const & v) const { return v.get(); } - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t & b) const + { + rrlist3 a( a1_, a2_, a3_ ); + return b.eval( a ); + } - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const + { + rrlist3 a( a1_, a2_, a3_ ); + return b.eval( a ); + } }; template< class A1, class A2, class A3, class A4 > class rrlist4 @@ -980,9 +1004,17 @@ template< class A1, class A2, class A3, class A4 > class rrlist4 template T & operator[] (reference_wrapper const & v) const { return v.get(); } - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t & b) const + { + rrlist4 a( a1_, a2_, a3_, a4_ ); + return b.eval( a ); + } - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const + { + rrlist4 a( a1_, a2_, a3_, a4_ ); + return b.eval( a ); + } }; template< class A1, class A2, class A3, class A4, class A5 > class rrlist5 @@ -1017,9 +1049,17 @@ template< class A1, class A2, class A3, class A4, class A5 > class rrlist5 template T & operator[] (reference_wrapper const & v) const { return v.get(); } - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t & b) const + { + rrlist5 a( a1_, a2_, a3_, a4_, a5_ ); + return b.eval( a ); + } - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const + { + rrlist5 a( a1_, a2_, a3_, a4_, a5_ ); + return b.eval( a ); + } }; template< class A1, class A2, class A3, class A4, class A5, class A6 > class rrlist6 @@ -1057,9 +1097,17 @@ template< class A1, class A2, class A3, class A4, class A5, class A6 > class rrl template T & operator[] (reference_wrapper const & v) const { return v.get(); } - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t & b) const + { + rrlist6 a( a1_, a2_, a3_, a4_, a5_, a6_ ); + return b.eval( a ); + } - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const + { + rrlist6 a( a1_, a2_, a3_, a4_, a5_, a6_ ); + return b.eval( a ); + } }; template< class A1, class A2, class A3, class A4, class A5, class A6, class A7 > class rrlist7 @@ -1100,9 +1148,17 @@ template< class A1, class A2, class A3, class A4, class A5, class A6, class A7 > template T & operator[] (reference_wrapper const & v) const { return v.get(); } - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t & b) const + { + rrlist7 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_ ); + return b.eval( a ); + } - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const + { + rrlist7 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_ ); + return b.eval( a ); + } }; template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > class rrlist8 @@ -1146,9 +1202,17 @@ template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, template T & operator[] (reference_wrapper const & v) const { return v.get(); } - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t & b) const + { + rrlist8 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_ ); + return b.eval( a ); + } - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const + { + rrlist8 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_ ); + return b.eval( a ); + } }; template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8, class A9 > class rrlist9 @@ -1195,9 +1259,17 @@ template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, template T & operator[] (reference_wrapper const & v) const { return v.get(); } - template typename result_traits::type operator[] (bind_t & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t & b) const + { + rrlist9 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_, a9_ ); + return b.eval( a ); + } - template typename result_traits::type operator[] (bind_t const & b) const { return b.eval(*this); } + template typename result_traits::type operator[] (bind_t const & b) const + { + rrlist9 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_, a9_ ); + return b.eval( a ); + } }; template class bind_t @@ -2050,21 +2122,31 @@ template +# if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED ) +# undef BOOST_BIND_NOEXCEPT +# define BOOST_BIND_NOEXCEPT noexcept +# include +# endif + #undef BOOST_BIND_CC #undef BOOST_BIND_ST +#undef BOOST_BIND_NOEXCEPT #ifdef BOOST_BIND_ENABLE_STDCALL #define BOOST_BIND_CC __stdcall #define BOOST_BIND_ST +#define BOOST_BIND_NOEXCEPT #include #undef BOOST_BIND_CC #undef BOOST_BIND_ST +#undef BOOST_BIND_NOEXCEPT #endif @@ -2072,11 +2154,13 @@ template #undef BOOST_BIND_CC #undef BOOST_BIND_ST +#undef BOOST_BIND_NOEXCEPT #endif @@ -2084,11 +2168,13 @@ template #undef BOOST_BIND_ST #undef BOOST_BIND_CC +#undef BOOST_BIND_NOEXCEPT #endif @@ -2096,23 +2182,33 @@ template #include +# if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED ) +# undef BOOST_BIND_MF_NOEXCEPT +# define BOOST_BIND_MF_NOEXCEPT noexcept +# include +# endif + #undef BOOST_BIND_MF_NAME #undef BOOST_BIND_MF_CC +#undef BOOST_BIND_MF_NOEXCEPT #ifdef BOOST_MEM_FN_ENABLE_CDECL #define BOOST_BIND_MF_NAME(X) X##_cdecl #define BOOST_BIND_MF_CC __cdecl +#define BOOST_BIND_MF_NOEXCEPT #include #include #undef BOOST_BIND_MF_NAME #undef BOOST_BIND_MF_CC +#undef BOOST_BIND_MF_NOEXCEPT #endif @@ -2120,12 +2216,14 @@ template #include #undef BOOST_BIND_MF_NAME #undef BOOST_BIND_MF_CC +#undef BOOST_BIND_MF_NOEXCEPT #endif @@ -2133,12 +2231,14 @@ template #include #undef BOOST_BIND_MF_NAME #undef BOOST_BIND_MF_CC +#undef BOOST_BIND_MF_NOEXCEPT #endif @@ -2192,6 +2292,15 @@ template< class R, class T > struct add_cref< R (T::*) () const, 1 > typedef void type; }; +#if defined( __cpp_noexcept_function_type ) || defined( _NOEXCEPT_TYPES_SUPPORTED ) + +template< class R, class T > struct add_cref< R (T::*) () const noexcept, 1 > +{ + typedef void type; +}; + +#endif // __cpp_noexcept_function_type + #endif // __IBMCPP__ template struct isref diff --git a/third_party/boost_parts/boost/bind/bind_cc.hpp b/third_party/boost_parts/boost/bind/bind_cc.hpp index 35f8eceb..278aa9a2 100644 --- a/third_party/boost_parts/boost/bind/bind_cc.hpp +++ b/third_party/boost_parts/boost/bind/bind_cc.hpp @@ -13,28 +13,28 @@ // template - _bi::bind_t - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) ()) + _bi::bind_t + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) () BOOST_BIND_NOEXCEPT) { - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (); + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) () BOOST_BIND_NOEXCEPT; typedef _bi::list0 list_type; return _bi::bind_t (f, list_type()); } template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1), A1 a1) + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1) BOOST_BIND_NOEXCEPT, A1 a1) { - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1); + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1) BOOST_BIND_NOEXCEPT; typedef typename _bi::list_av_1::type list_type; return _bi::bind_t (f, list_type(a1)); } template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2), A1 a1, A2 a2) + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2) { - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2); + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2) BOOST_BIND_NOEXCEPT; typedef typename _bi::list_av_2::type list_type; return _bi::bind_t (f, list_type(a1, a2)); } @@ -42,10 +42,10 @@ template template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3), A1 a1, A2 a2, A3 a3) + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3) { - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3); + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3) BOOST_BIND_NOEXCEPT; typedef typename _bi::list_av_3::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3)); } @@ -53,10 +53,10 @@ template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4) + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) { - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4); + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4) BOOST_BIND_NOEXCEPT; typedef typename _bi::list_av_4::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4)); } @@ -64,10 +64,10 @@ template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5); + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5) BOOST_BIND_NOEXCEPT; typedef typename _bi::list_av_5::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); } @@ -75,10 +75,10 @@ template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6); + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6) BOOST_BIND_NOEXCEPT; typedef typename _bi::list_av_6::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); } @@ -86,10 +86,10 @@ template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7); + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_NOEXCEPT; typedef typename _bi::list_av_7::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); } @@ -97,10 +97,10 @@ template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8); + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_NOEXCEPT; typedef typename _bi::list_av_8::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); } @@ -108,10 +108,10 @@ template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) + _bi::bind_t::type> + BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3, B4, B5, B6, B7, B8, B9) BOOST_BIND_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9); + typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9) BOOST_BIND_NOEXCEPT; typedef typename _bi::list_av_9::type list_type; return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); } diff --git a/third_party/boost_parts/boost/bind/bind_mf_cc.hpp b/third_party/boost_parts/boost/bind/bind_mf_cc.hpp index e149384f..bbfd3719 100644 --- a/third_party/boost_parts/boost/bind/bind_mf_cc.hpp +++ b/third_party/boost_parts/boost/bind/bind_mf_cc.hpp @@ -17,7 +17,7 @@ template _bi::bind_t, typename _bi::list_av_1::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () BOOST_BIND_MF_NOEXCEPT, A1 a1) { typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; typedef typename _bi::list_av_1::type list_type; @@ -27,7 +27,7 @@ template _bi::bind_t, typename _bi::list_av_1::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const BOOST_BIND_MF_NOEXCEPT, A1 a1) { typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; typedef typename _bi::list_av_1::type list_type; @@ -38,7 +38,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_1::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () BOOST_BIND_MF_NOEXCEPT, A1 a1) { typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; typedef typename _bi::list_av_1::type list_type; @@ -49,7 +49,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_1::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const BOOST_BIND_MF_NOEXCEPT, A1 a1) { typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; typedef typename _bi::list_av_1::type list_type; @@ -62,7 +62,7 @@ template _bi::bind_t, typename _bi::list_av_2::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2) { typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; typedef typename _bi::list_av_2::type list_type; @@ -73,7 +73,7 @@ template _bi::bind_t, typename _bi::list_av_2::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2) { typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; typedef typename _bi::list_av_2::type list_type; @@ -85,7 +85,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_2::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2) { typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; typedef typename _bi::list_av_2::type list_type; @@ -97,7 +97,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_2::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2) { typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; typedef typename _bi::list_av_2::type list_type; @@ -110,7 +110,7 @@ template _bi::bind_t, typename _bi::list_av_3::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3) { typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; typedef typename _bi::list_av_3::type list_type; @@ -121,7 +121,7 @@ template _bi::bind_t, typename _bi::list_av_3::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3) { typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; typedef typename _bi::list_av_3::type list_type; @@ -133,7 +133,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_3::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3) { typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; typedef typename _bi::list_av_3::type list_type; @@ -145,7 +145,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_3::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3) { typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; typedef typename _bi::list_av_3::type list_type; @@ -158,7 +158,7 @@ template _bi::bind_t, typename _bi::list_av_4::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) { typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; typedef typename _bi::list_av_4::type list_type; @@ -169,7 +169,7 @@ template _bi::bind_t, typename _bi::list_av_4::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) { typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; typedef typename _bi::list_av_4::type list_type; @@ -181,7 +181,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_4::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), A1 a1, A2 a2, A3 a3, A4 a4) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) { typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; typedef typename _bi::list_av_4::type list_type; @@ -193,7 +193,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_4::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, A1 a1, A2 a2, A3 a3, A4 a4) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4) { typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; typedef typename _bi::list_av_4::type list_type; @@ -206,7 +206,7 @@ template _bi::bind_t, typename _bi::list_av_5::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; typedef typename _bi::list_av_5::type list_type; @@ -217,7 +217,7 @@ template _bi::bind_t, typename _bi::list_av_5::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; typedef typename _bi::list_av_5::type list_type; @@ -229,7 +229,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_5::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; typedef typename _bi::list_av_5::type list_type; @@ -241,7 +241,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_5::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; typedef typename _bi::list_av_5::type list_type; @@ -254,7 +254,7 @@ template _bi::bind_t, typename _bi::list_av_6::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; typedef typename _bi::list_av_6::type list_type; @@ -265,7 +265,7 @@ template _bi::bind_t, typename _bi::list_av_6::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; typedef typename _bi::list_av_6::type list_type; @@ -277,7 +277,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_6::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; typedef typename _bi::list_av_6::type list_type; @@ -289,7 +289,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_6::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; typedef typename _bi::list_av_6::type list_type; @@ -302,7 +302,7 @@ template _bi::bind_t, typename _bi::list_av_7::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; typedef typename _bi::list_av_7::type list_type; @@ -313,7 +313,7 @@ template _bi::bind_t, typename _bi::list_av_7::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; typedef typename _bi::list_av_7::type list_type; @@ -325,7 +325,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_7::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; typedef typename _bi::list_av_7::type list_type; @@ -337,7 +337,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_7::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; typedef typename _bi::list_av_7::type list_type; @@ -350,7 +350,7 @@ template _bi::bind_t, typename _bi::list_av_8::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; typedef typename _bi::list_av_8::type list_type; @@ -361,7 +361,7 @@ template _bi::bind_t, typename _bi::list_av_8::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; typedef typename _bi::list_av_8::type list_type; @@ -373,7 +373,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_8::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; typedef typename _bi::list_av_8::type list_type; @@ -385,7 +385,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_8::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; typedef typename _bi::list_av_8::type list_type; @@ -398,7 +398,7 @@ template _bi::bind_t, typename _bi::list_av_9::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; typedef typename _bi::list_av_9::type list_type; @@ -409,7 +409,7 @@ template _bi::bind_t, typename _bi::list_av_9::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) + BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; typedef typename _bi::list_av_9::type list_type; @@ -421,7 +421,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_9::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; typedef typename _bi::list_av_9::type list_type; @@ -433,7 +433,7 @@ template typename boost::enable_if_c::value, _bi::bind_t, typename _bi::list_av_9::type> - >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) + >::type BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5, B6, B7, B8) const BOOST_BIND_MF_NOEXCEPT, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; typedef typename _bi::list_av_9::type list_type; diff --git a/third_party/boost_parts/boost/concept_archetype.hpp b/third_party/boost_parts/boost/concept_archetype.hpp index f21c8173..f2455fd8 100644 --- a/third_party/boost_parts/boost/concept_archetype.hpp +++ b/third_party/boost_parts/boost/concept_archetype.hpp @@ -15,9 +15,10 @@ #define BOOST_CONCEPT_ARCHETYPES_HPP #include -#include #include #include +#include // iterator tags +#include // std::ptrdiff_t namespace boost { diff --git a/third_party/boost_parts/boost/config.hpp b/third_party/boost_parts/boost/config.hpp index d49bb27c..f00a9805 100644 --- a/third_party/boost_parts/boost/config.hpp +++ b/third_party/boost_parts/boost/config.hpp @@ -32,7 +32,7 @@ // if we don't have a compiler config set, try and find one: #if !defined(BOOST_COMPILER_CONFIG) && !defined(BOOST_NO_COMPILER_CONFIG) && !defined(BOOST_NO_CONFIG) -# include +# include #endif // if we have a compiler config, include it now: #ifdef BOOST_COMPILER_CONFIG @@ -41,7 +41,7 @@ // if we don't have a std library config set, try and find one: #if !defined(BOOST_STDLIB_CONFIG) && !defined(BOOST_NO_STDLIB_CONFIG) && !defined(BOOST_NO_CONFIG) && defined(__cplusplus) -# include +# include #endif // if we have a std library config, include it now: #ifdef BOOST_STDLIB_CONFIG @@ -50,7 +50,7 @@ // if we don't have a platform config set, try and find one: #if !defined(BOOST_PLATFORM_CONFIG) && !defined(BOOST_NO_PLATFORM_CONFIG) && !defined(BOOST_NO_CONFIG) -# include +# include #endif // if we have a platform config, include it now: #ifdef BOOST_PLATFORM_CONFIG @@ -58,7 +58,7 @@ #endif // get config suffix code: -#include +#include #ifdef BOOST_HAS_PRAGMA_ONCE #pragma once diff --git a/third_party/boost_parts/boost/config/auto_link.hpp b/third_party/boost_parts/boost/config/auto_link.hpp index 56a16b0b..271f8379 100644 --- a/third_party/boost_parts/boost/config/auto_link.hpp +++ b/third_party/boost_parts/boost/config/auto_link.hpp @@ -45,6 +45,7 @@ BOOST_LIB_PREFIX + BOOST_LIB_TOOLSET + BOOST_LIB_THREAD_OPT + BOOST_LIB_RT_OPT + + BOOST_LIB_ARCH_AND_MODEL_OPT "-" + BOOST_LIB_VERSION @@ -69,6 +70,9 @@ BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used, p STLport build. n STLport build without its IOStreams. +BOOST_LIB_ARCH_AND_MODEL_OPT: The architecture and address model + (-x32 or -x64 for x86/32 and x86/64 respectively) + BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. @@ -161,10 +165,15 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. // vc12: # define BOOST_LIB_TOOLSET "vc120" -# elif defined(BOOST_MSVC) +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1910) + + // vc14: +# define BOOST_LIB_TOOLSET "vc140" + +# elif defined(BOOST_MSVC) - // vc14: -# define BOOST_LIB_TOOLSET "vc140" + // vc14.1: +# define BOOST_LIB_TOOLSET "vc141" # elif defined(__BORLANDC__) @@ -356,6 +365,20 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. #endif +// +// BOOST_LIB_ARCH_AND_MODEL_OPT +// + +#if defined( _M_IX86 ) +# define BOOST_LIB_ARCH_AND_MODEL_OPT "-x32" +#elif defined( _M_X64 ) +# define BOOST_LIB_ARCH_AND_MODEL_OPT "-x64" +#elif defined( _M_ARM ) +# define BOOST_LIB_ARCH_AND_MODEL_OPT "-a32" +#elif defined( _M_ARM64 ) +# define BOOST_LIB_ARCH_AND_MODEL_OPT "-a64" +#endif + // // select linkage opt: // @@ -375,6 +398,7 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. && defined(BOOST_LIB_TOOLSET) \ && defined(BOOST_LIB_THREAD_OPT) \ && defined(BOOST_LIB_RT_OPT) \ + && defined(BOOST_LIB_ARCH_AND_MODEL_OPT) \ && defined(BOOST_LIB_VERSION) #ifdef BOOST_AUTO_LINK_TAGGED @@ -388,14 +412,14 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. # pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") # endif #elif defined(BOOST_LIB_BUILDID) -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib") # endif #else -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") +# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION ".lib") # ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT "-" BOOST_LIB_VERSION ".lib") +# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION ".lib") # endif #endif @@ -426,6 +450,9 @@ BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. #if defined(BOOST_LIB_RT_OPT) # undef BOOST_LIB_RT_OPT #endif +#if defined(BOOST_LIB_ARCH_AND_MODEL_OPT) +# undef BOOST_LIB_ARCH_AND_MODEL_OPT +#endif #if defined(BOOST_LIB_LINK_OPT) # undef BOOST_LIB_LINK_OPT #endif diff --git a/third_party/boost_parts/boost/config/compiler/borland.hpp b/third_party/boost_parts/boost/config/compiler/borland.hpp index 80dd2300..6190e390 100644 --- a/third_party/boost_parts/boost/config/compiler/borland.hpp +++ b/third_party/boost_parts/boost/config/compiler/borland.hpp @@ -174,6 +174,7 @@ #define BOOST_NO_CXX11_CONSTEXPR #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +#define BOOST_NO_CXX11_DEFAULTED_MOVES #define BOOST_NO_CXX11_DELETED_FUNCTIONS #define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS #define BOOST_NO_CXX11_HDR_INITIALIZER_LIST @@ -185,6 +186,7 @@ #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS // UTF-8 still not supported #define BOOST_NO_CXX11_VARIADIC_TEMPLATES @@ -196,6 +198,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) @@ -226,6 +229,17 @@ # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif +// C++17 +#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) +# define BOOST_NO_CXX17_STRUCTURED_BINDINGS +#endif +#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) +# define BOOST_NO_CXX17_INLINE_VARIABLES +#endif +#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) +# define BOOST_NO_CXX17_FOLD_EXPRESSIONS +#endif + #if __BORLANDC__ >= 0x590 # define BOOST_HAS_TR1_HASH diff --git a/third_party/boost_parts/boost/config/compiler/clang.hpp b/third_party/boost_parts/boost/config/compiler/clang.hpp index 01355bb7..da736bc4 100644 --- a/third_party/boost_parts/boost/config/compiler/clang.hpp +++ b/third_party/boost_parts/boost/config/compiler/clang.hpp @@ -27,6 +27,10 @@ #define __has_attribute(x) 0 #endif +#ifndef __has_cpp_attribute +#define __has_cpp_attribute(x) 0 +#endif + #if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif @@ -39,14 +43,25 @@ # define BOOST_NO_TYPEID #endif -#if defined(__int64) && !defined(__GNUC__) +#if !__has_feature(cxx_thread_local) +# define BOOST_NO_CXX11_THREAD_LOCAL +#endif + +#ifdef __is_identifier +#if !__is_identifier(__int64) && !defined(__GNUC__) # define BOOST_HAS_MS_INT64 #endif +#endif + +#if __has_include() +# define BOOST_HAS_STDINT_H +#endif + #define BOOST_HAS_NRVO // Branch prediction hints -#if defined(__has_builtin) +#if !defined (__c2__) && defined(__has_builtin) #if __has_builtin(__builtin_expect) #define BOOST_LIKELY(x) __builtin_expect(x, 1) #define BOOST_UNLIKELY(x) __builtin_expect(x, 0) @@ -83,11 +98,15 @@ // // Dynamic shared object (DSO) and dynamic-link library (DLL) support // -#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32) +#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__) +# define BOOST_HAS_DECLSPEC +# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__)) +# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__)) +#else # define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) # define BOOST_SYMBOL_IMPORT -# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) #endif +#define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) // // The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through @@ -107,11 +126,16 @@ // // Currently clang on Windows using VC++ RTL does not support C++11's char16_t or char32_t // -#if defined(_MSC_VER) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) +#if (defined(_MSC_VER) && (_MSC_VER < 1900)) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L) # define BOOST_NO_CXX11_CHAR16_T # define BOOST_NO_CXX11_CHAR32_T #endif +#if defined(_MSC_VER) && (_MSC_VER >= 1800) && !defined(__GNUC__) +#define BOOST_HAS_EXPM1 +#define BOOST_HAS_LOG1P +#endif + #if !__has_feature(cxx_constexpr) # define BOOST_NO_CXX11_CONSTEXPR #endif @@ -266,6 +290,20 @@ # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif +#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) +# define BOOST_NO_CXX17_STRUCTURED_BINDINGS +#endif + +// Clang 3.9+ in c++1z +#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L +# define BOOST_NO_CXX17_INLINE_VARIABLES +# define BOOST_NO_CXX17_FOLD_EXPRESSIONS +#endif + +#if __cplusplus < 201103L +#define BOOST_NO_CXX11_SFINAE_EXPR +#endif + #if __cplusplus < 201400 // All versions with __cplusplus above this value seem to support this: # define BOOST_NO_CXX14_DIGIT_SEPARATORS @@ -276,9 +314,19 @@ #define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable(); #endif +#if (__clang_major__ == 3) && (__clang_minor__ == 0) +// Apparently a clang bug: +# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS +#endif + // Clang has supported the 'unused' attribute since the first release. #define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) +// Type aliasing hint. +#if __has_attribute(__may_alias__) +# define BOOST_MAY_ALIAS __attribute__((__may_alias__)) +#endif + #ifndef BOOST_COMPILER # define BOOST_COMPILER "Clang version " __clang_version__ #endif diff --git a/third_party/boost_parts/boost/config/compiler/codegear.hpp b/third_party/boost_parts/boost/config/compiler/codegear.hpp index 02bd792a..44ca8428 100644 --- a/third_party/boost_parts/boost/config/compiler/codegear.hpp +++ b/third_party/boost_parts/boost/config/compiler/codegear.hpp @@ -112,6 +112,7 @@ #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS #define BOOST_NO_CXX11_VARIADIC_TEMPLATES @@ -122,6 +123,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) @@ -152,6 +154,19 @@ # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif +// C++17 +#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) +# define BOOST_NO_CXX17_STRUCTURED_BINDINGS +#endif + +#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) +# define BOOST_NO_CXX17_INLINE_VARIABLES +#endif + +#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) +# define BOOST_NO_CXX17_FOLD_EXPRESSIONS +#endif + // // TR1 macros: // diff --git a/third_party/boost_parts/boost/config/compiler/comeau.hpp b/third_party/boost_parts/boost/config/compiler/comeau.hpp index 278222dc..09841604 100644 --- a/third_party/boost_parts/boost/config/compiler/comeau.hpp +++ b/third_party/boost_parts/boost/config/compiler/comeau.hpp @@ -12,7 +12,7 @@ // Comeau C++ compiler setup: -#include "boost/config/compiler/common_edg.hpp" +#include #if (__COMO_VERSION__ <= 4245) diff --git a/third_party/boost_parts/boost/config/compiler/common_edg.hpp b/third_party/boost_parts/boost/config/compiler/common_edg.hpp index b92e574d..d49ceb68 100644 --- a/third_party/boost_parts/boost/config/compiler/common_edg.hpp +++ b/third_party/boost_parts/boost/config/compiler/common_edg.hpp @@ -95,6 +95,7 @@ #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS @@ -106,6 +107,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) @@ -136,6 +138,17 @@ # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif +// C++17 +#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) +# define BOOST_NO_CXX17_STRUCTURED_BINDINGS +#endif +#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) +# define BOOST_NO_CXX17_INLINE_VARIABLES +#endif +#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) +# define BOOST_NO_CXX17_FOLD_EXPRESSIONS +#endif + #ifdef c_plusplus // EDG has "long long" in non-strict mode // However, some libraries have insufficient "long long" support diff --git a/third_party/boost_parts/boost/config/compiler/compaq_cxx.hpp b/third_party/boost_parts/boost/config/compiler/compaq_cxx.hpp index b44486c6..4d6b8ab3 100644 --- a/third_party/boost_parts/boost/config/compiler/compaq_cxx.hpp +++ b/third_party/boost_parts/boost/config/compiler/compaq_cxx.hpp @@ -9,7 +9,7 @@ #define BOOST_COMPILER "HP Tru64 C++ " BOOST_STRINGIZE(__DECCXX_VER) -#include "boost/config/compiler/common_edg.hpp" +#include // // versions check: diff --git a/third_party/boost_parts/boost/config/compiler/cray.hpp b/third_party/boost_parts/boost/config/compiler/cray.hpp index 3f660433..5f810781 100644 --- a/third_party/boost_parts/boost/config/compiler/cray.hpp +++ b/third_party/boost_parts/boost/config/compiler/cray.hpp @@ -10,7 +10,7 @@ #define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE) -#if _RELEASE < 8 +#if _RELEASE_MAJOR < 8 # error "Boost is not configured for Cray compilers prior to version 8, please try the configure script." #endif @@ -21,8 +21,8 @@ # error "Unsupported Cray compiler, please try running the configure script." #endif -#include "boost/config/compiler/common_edg.hpp" - +#if _RELEASE_MINOR < 5 || __cplusplus < 201100 +#include // // @@ -39,6 +39,7 @@ #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_RANGE_BASED_FOR @@ -60,6 +61,7 @@ #define BOOST_NO_CXX11_CHAR16_T #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_THREAD_LOCAL //#define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG @@ -88,5 +90,35 @@ #define __ATOMIC_SEQ_CST 5 #endif +#else /* _RELEASE_MINOR */ + +#define BOOST_HAS_VARIADIC_TMPL +#define BOOST_HAS_UNISTD_H +#define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG +#define BOOST_HAS_TR1_COMPLEX_OVERLOADS +#define BOOST_HAS_STDINT_H +#define BOOST_HAS_STATIC_ASSERT +#define BOOST_HAS_SIGACTION +#define BOOST_HAS_SCHED_YIELD +#define BOOST_HAS_RVALUE_REFS +#define BOOST_HAS_PTHREADS +#define BOOST_HAS_PTHREAD_YIELD +#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +#define BOOST_HAS_PARTIAL_STD_ALLOCATOR +#define BOOST_HAS_NRVO +#define BOOST_HAS_NL_TYPES_H +#define BOOST_HAS_NANOSLEEP +#define BOOST_NO_CXX11_SMART_PTR +#define BOOST_NO_CXX11_HDR_FUNCTIONAL +#define BOOST_NO_CXX14_CONSTEXPR +#define BOOST_HAS_LONG_LONG +#define BOOST_HAS_FLOAT128 + +#if __cplusplus < 201400 +#define BOOST_NO_CXX11_DECLTYPE_N3276 +#endif /* __cpluspus */ + +#endif /* _RELEASE_MINOR */ + diff --git a/third_party/boost_parts/boost/config/compiler/diab.hpp b/third_party/boost_parts/boost/config/compiler/diab.hpp new file mode 100644 index 00000000..943db83f --- /dev/null +++ b/third_party/boost_parts/boost/config/compiler/diab.hpp @@ -0,0 +1,26 @@ +// (C) Copyright Brian Kuhl 2016. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// Check this is a recent EDG based compiler, otherwise we don't support it here: + + +#ifndef __EDG_VERSION__ +# error "Unknown Diab compiler version - please run the configure tests and report the results" +#endif + +#include "boost/config/compiler/common_edg.hpp" + +#define BOOST_NO_TWO_PHASE_NAME_LOOKUP +#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS + +#define BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE +#define BOOST_LOG_NO_MEMBER_TEMPLATE_FRIENDS +#define BOOST_REGEX_NO_EXTERNAL_TEMPLATES + +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST +#define BOOST_NO_CXX11_HDR_CODECVT +#define BOOST_NO_CXX11_NUMERIC_LIMITS + +#define BOOST_COMPILER "Wind River Diab " BOOST_STRINGIZE(__VERSION_NUMBER__) diff --git a/third_party/boost_parts/boost/config/compiler/digitalmars.hpp b/third_party/boost_parts/boost/config/compiler/digitalmars.hpp index a3d293c7..e4c5afdd 100644 --- a/third_party/boost_parts/boost/config/compiler/digitalmars.hpp +++ b/third_party/boost_parts/boost/config/compiler/digitalmars.hpp @@ -71,6 +71,7 @@ #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS @@ -82,6 +83,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) @@ -112,6 +114,17 @@ # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif +// C++17 +#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) +# define BOOST_NO_CXX17_STRUCTURED_BINDINGS +#endif +#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) +# define BOOST_NO_CXX17_INLINE_VARIABLES +#endif +#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) +# define BOOST_NO_CXX17_FOLD_EXPRESSIONS +#endif + #if (__DMC__ <= 0x840) #error "Compiler not supported or configured - please reconfigure" #endif diff --git a/third_party/boost_parts/boost/config/compiler/gcc.hpp b/third_party/boost_parts/boost/config/compiler/gcc.hpp index fbd3dd9c..4fe968a0 100644 --- a/third_party/boost_parts/boost/config/compiler/gcc.hpp +++ b/third_party/boost_parts/boost/config/compiler/gcc.hpp @@ -99,10 +99,10 @@ // Dynamic shared object (DSO) and dynamic-link library (DLL) support // #if __GNUC__ >= 4 -# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(__CYGWIN__) +# if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__) // All Win32 development environments, including 64-bit Windows and MinGW, define // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment, - // so does not define _WIN32 or its variants. + // so does not define _WIN32 or its variants, but still supports dllexport/dllimport. # define BOOST_HAS_DECLSPEC # define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__)) # define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__)) @@ -233,6 +233,7 @@ // #if (BOOST_GCC_VERSION < 40600) || !defined(BOOST_GCC_CXX11) #define BOOST_NO_CXX11_CONSTEXPR +#define BOOST_NO_CXX11_DEFAULTED_MOVES #define BOOST_NO_CXX11_NOEXCEPT #define BOOST_NO_CXX11_NULLPTR #define BOOST_NO_CXX11_RANGE_BASED_FOR @@ -252,6 +253,8 @@ // #if (BOOST_GCC_VERSION < 40800) || !defined(BOOST_GCC_CXX11) # define BOOST_NO_CXX11_ALIGNAS +# define BOOST_NO_CXX11_THREAD_LOCAL +# define BOOST_NO_CXX11_SFINAE_EXPR #endif // C++0x features in 4.8.1 and later @@ -282,15 +285,41 @@ #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) +#if (BOOST_GCC_VERSION < 50200) || !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif +// C++17 +#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) +# define BOOST_NO_CXX17_STRUCTURED_BINDINGS +#endif +#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) +# define BOOST_NO_CXX17_INLINE_VARIABLES +#endif +#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) +# define BOOST_NO_CXX17_FOLD_EXPRESSIONS +#endif + +#if __GNUC__ >= 7 +# define BOOST_FALLTHROUGH __attribute__((fallthrough)) +#endif + +#ifdef __MINGW32__ +// Currently (June 2017) thread_local is broken on mingw for all current compiler releases, see +// https://sourceforge.net/p/mingw-w64/bugs/527/ +// Not setting this causes program termination on thread exit. +#define BOOST_NO_CXX11_THREAD_LOCAL +#endif + // // Unused attribute: #if __GNUC__ >= 4 # define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__)) #endif + +// Type aliasing hint. Supported since gcc 3.3. +#define BOOST_MAY_ALIAS __attribute__((__may_alias__)) + // // __builtin_unreachable: #if BOOST_GCC_VERSION >= 40800 @@ -314,10 +343,10 @@ # error "Compiler not configured - please reconfigure" #endif // -// last known and checked version is 4.9: -#if (BOOST_GCC_VERSION > 40900) +// last known and checked version is 7.1: +#if (BOOST_GCC_VERSION > 70100) # if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" +# error "Boost.Config is older than your compiler - please check for an updated Boost release." # else // we don't emit warnings here anymore since there are no defect macros defined for // gcc post 3.4, so any failures are gcc regressions... diff --git a/third_party/boost_parts/boost/config/compiler/gcc_xml.hpp b/third_party/boost_parts/boost/config/compiler/gcc_xml.hpp index c11f29dd..2b47585a 100644 --- a/third_party/boost_parts/boost/config/compiler/gcc_xml.hpp +++ b/third_party/boost_parts/boost/config/compiler/gcc_xml.hpp @@ -46,6 +46,7 @@ # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_SCOPED_ENUMS # define BOOST_NO_SFINAE_EXPR +# define BOOST_NO_CXX11_SFINAE_EXPR # define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS # define BOOST_NO_CXX11_LAMBDAS # define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS @@ -59,7 +60,8 @@ # define BOOST_NO_CXX11_TRAILING_RESULT_TYPES # define BOOST_NO_CXX11_INLINE_NAMESPACES # define BOOST_NO_CXX11_REF_QUALIFIERS -#define BOOST_NO_CXX11_FINAL +# define BOOST_NO_CXX11_FINAL +# define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) @@ -90,6 +92,17 @@ # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif +// C++17 +#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) +# define BOOST_NO_CXX17_STRUCTURED_BINDINGS +#endif +#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) +# define BOOST_NO_CXX17_INLINE_VARIABLES +#endif +#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) +# define BOOST_NO_CXX17_FOLD_EXPRESSIONS +#endif + #define BOOST_COMPILER "GCC-XML C++ version " __GCCXML__ diff --git a/third_party/boost_parts/boost/config/compiler/greenhills.hpp b/third_party/boost_parts/boost/config/compiler/greenhills.hpp index 038b6b2b..a76a07cf 100644 --- a/third_party/boost_parts/boost/config/compiler/greenhills.hpp +++ b/third_party/boost_parts/boost/config/compiler/greenhills.hpp @@ -9,7 +9,7 @@ #define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs) -#include "boost/config/compiler/common_edg.hpp" +#include // // versions check: diff --git a/third_party/boost_parts/boost/config/compiler/hp_acc.hpp b/third_party/boost_parts/boost/config/compiler/hp_acc.hpp index fb63839a..9df18eaf 100644 --- a/third_party/boost_parts/boost/config/compiler/hp_acc.hpp +++ b/third_party/boost_parts/boost/config/compiler/hp_acc.hpp @@ -13,7 +13,7 @@ // HP aCC C++ compiler setup: #if defined(__EDG__) -#include "boost/config/compiler/common_edg.hpp" +#include #endif #if (__HP_aCC <= 33100) @@ -114,6 +114,7 @@ #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS @@ -123,6 +124,7 @@ #define BOOST_NO_CXX11_TRAILING_RESULT_TYPES #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_THREAD_LOCAL /* See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and diff --git a/third_party/boost_parts/boost/config/compiler/intel.hpp b/third_party/boost_parts/boost/config/compiler/intel.hpp index 88ac023a..0eea05b9 100644 --- a/third_party/boost_parts/boost/config/compiler/intel.hpp +++ b/third_party/boost_parts/boost/config/compiler/intel.hpp @@ -35,15 +35,25 @@ #endif -#else +#if (__INTEL_COMPILER <= 1600) && !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#endif + +#else // defined(_MSC_VER) #include #undef BOOST_GCC_VERSION #undef BOOST_GCC_CXX11 +#undef BOOST_GCC +// Broken in all versions up to 17 (newer versions not tested) +#if (__INTEL_COMPILER <= 1700) && !defined(BOOST_NO_CXX14_CONSTEXPR) +# define BOOST_NO_CXX14_CONSTEXPR #endif +#endif // defined(_MSC_VER) + #undef BOOST_COMPILER #if defined(__INTEL_COMPILER) @@ -88,9 +98,9 @@ # define BOOST_INTEL_LINUX BOOST_INTEL #endif -#else +#else // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__)) -#include "boost/config/compiler/common_edg.hpp" +#include #if defined(__INTEL_COMPILER) #if __INTEL_COMPILER == 9999 @@ -302,6 +312,12 @@ template<> struct assert_intrinsic_wchar_t {}; # define BOOST_SYMBOL_IMPORT # define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) #endif + +// Type aliasing hint +#if defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1300) +# define BOOST_MAY_ALIAS __attribute__((__may_alias__)) +#endif + // // C++0x features // For each feature we need to check both the Intel compiler version, @@ -406,6 +422,11 @@ template<> struct assert_intrinsic_wchar_t {}; # undef BOOST_NO_SFINAE_EXPR #endif +// BOOST_NO_CXX11_SFINAE_EXPR +#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && !defined(_MSC_VER) +# undef BOOST_NO_CXX11_SFINAE_EXPR +#endif + // BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) // This is available in earlier Intel releases, but breaks Multiprecision: @@ -479,7 +500,7 @@ template<> struct assert_intrinsic_wchar_t {}; # undef BOOST_NO_CXX11_FINAL #endif -#endif +#endif // defined(BOOST_INTEL_STDCXX0X) // // Broken in all versions up to 15: @@ -526,12 +547,12 @@ template<> struct assert_intrinsic_wchar_t {}; # define BOOST_HAS_INT128 #endif -#endif +#endif // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__)) // // last known and checked version: -#if (BOOST_INTEL_CXX_VERSION > 1500) +#if (BOOST_INTEL_CXX_VERSION > 1700) # if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" +# error "Boost.Config is older than your compiler - please check for an updated Boost release." # elif defined(_MSC_VER) // // We don't emit this warning any more, since we have so few diff --git a/third_party/boost_parts/boost/config/compiler/kai.hpp b/third_party/boost_parts/boost/config/compiler/kai.hpp index 2337e6a8..960d501c 100644 --- a/third_party/boost_parts/boost/config/compiler/kai.hpp +++ b/third_party/boost_parts/boost/config/compiler/kai.hpp @@ -9,7 +9,7 @@ // Kai C++ compiler setup: -#include "boost/config/compiler/common_edg.hpp" +#include # if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG) // at least on Sun, the contents of is not in namespace std diff --git a/third_party/boost_parts/boost/config/compiler/metrowerks.hpp b/third_party/boost_parts/boost/config/compiler/metrowerks.hpp index c9301434..99ff0f5e 100644 --- a/third_party/boost_parts/boost/config/compiler/metrowerks.hpp +++ b/third_party/boost_parts/boost/config/compiler/metrowerks.hpp @@ -113,6 +113,7 @@ #define BOOST_NO_CXX11_RAW_LITERALS #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS @@ -125,6 +126,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) @@ -155,6 +157,17 @@ # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif +// C++17 +#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) +# define BOOST_NO_CXX17_STRUCTURED_BINDINGS +#endif +#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) +# define BOOST_NO_CXX17_INLINE_VARIABLES +#endif +#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) +# define BOOST_NO_CXX17_FOLD_EXPRESSIONS +#endif + #define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) // diff --git a/third_party/boost_parts/boost/config/compiler/mpw.hpp b/third_party/boost_parts/boost/config/compiler/mpw.hpp index 76045bcd..d9544345 100644 --- a/third_party/boost_parts/boost/config/compiler/mpw.hpp +++ b/third_party/boost_parts/boost/config/compiler/mpw.hpp @@ -62,6 +62,7 @@ #define BOOST_NO_CXX11_RVALUE_REFERENCES #define BOOST_NO_CXX11_SCOPED_ENUMS #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_STATIC_ASSERT #define BOOST_NO_CXX11_TEMPLATE_ALIASES #define BOOST_NO_CXX11_UNICODE_LITERALS @@ -74,6 +75,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) @@ -104,6 +106,17 @@ # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif +// C++17 +#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) +# define BOOST_NO_CXX17_STRUCTURED_BINDINGS +#endif +#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) +# define BOOST_NO_CXX17_INLINE_VARIABLES +#endif +#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) +# define BOOST_NO_CXX17_FOLD_EXPRESSIONS +#endif + // // versions check: // we don't support MPW prior to version 8.9: diff --git a/third_party/boost_parts/boost/config/compiler/nvcc.hpp b/third_party/boost_parts/boost/config/compiler/nvcc.hpp index 5a047070..f21b9b54 100644 --- a/third_party/boost_parts/boost/config/compiler/nvcc.hpp +++ b/third_party/boost_parts/boost/config/compiler/nvcc.hpp @@ -11,6 +11,13 @@ # define BOOST_COMPILER "NVIDIA CUDA C++ Compiler" #endif +#if defined(__CUDACC_VER_MAJOR__) && defined(__CUDACC_VER_MINOR__) && defined(__CUDACC_VER_BUILD__) +# define BOOST_CUDA_VERSION __CUDACC_VER_MAJOR__ * 1000000 + __CUDACC_VER_MINOR__ * 10000 + __CUDACC_VER_BUILD__ +#else +// We don't really know what the CUDA version is, but it's definitely before 7.5: +# define BOOST_CUDA_VERSION 7000000 +#endif + // NVIDIA Specific support // BOOST_GPU_ENABLED : Flag a function or a method as being enabled on the host and device #define BOOST_GPU_ENABLED __host__ __device__ @@ -19,6 +26,33 @@ // https://svn.boost.org/trac/boost/ticket/11897 // This is fixed in 7.5. As the following version macro was introduced in 7.5 an existance // check is enough to detect versions < 7.5 -#if !defined(__CUDACC_VER__) || (__CUDACC_VER__ < 70500) +#if BOOST_CUDA_VERSION < 7050000 +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +#endif +// The same bug is back again in 8.0: +#if (BOOST_CUDA_VERSION > 8000000) && (BOOST_CUDA_VERSION < 8010000) # define BOOST_NO_CXX11_VARIADIC_TEMPLATES #endif +// Most recent CUDA (8.0) has no constexpr support in msvc mode: +#if defined(_MSC_VER) +# define BOOST_NO_CXX11_CONSTEXPR +#endif + +#ifdef __CUDACC__ +// +// When compiing .cu files, there's a bunch of stuff that doesn't work with msvc: +// +#if defined(_MSC_VER) +# define BOOST_NO_CXX14_DIGIT_SEPARATORS +# define BOOST_NO_CXX11_UNICODE_LITERALS +#endif +// +// And this one effects the NVCC front end, +// See https://svn.boost.org/trac/boost/ticket/13049 +// +#if (BOOST_CUDA_VERSION >= 8000000) && (BOOST_CUDA_VERSION < 8010000) +# define BOOST_NO_CXX11_NOEXCEPT +#endif + +#endif + diff --git a/third_party/boost_parts/boost/config/compiler/pathscale.hpp b/third_party/boost_parts/boost/config/compiler/pathscale.hpp index 7c211c45..94b3f91d 100644 --- a/third_party/boost_parts/boost/config/compiler/pathscale.hpp +++ b/third_party/boost_parts/boost/config/compiler/pathscale.hpp @@ -12,7 +12,12 @@ # define BOOST_COMPILER "PathScale EKOPath C++ Compiler version " __PATHSCALE__ #endif -#if __PATHCC__ >= 4 +#if __PATHCC__ >= 6 +// PathCC is based on clang, and supports the __has_*() builtins used +// to detect features in clang.hpp. Since the clang toolset is much +// better maintained, it is more convenient to reuse its definitions. +# include "boost/config/compiler/clang.hpp" +#elif __PATHCC__ >= 4 # define BOOST_MSVC6_MEMBER_TEMPLATES # define BOOST_HAS_UNISTD_H # define BOOST_HAS_STDINT_H @@ -37,6 +42,7 @@ # define BOOST_NO_CXX11_TEMPLATE_ALIASES # define BOOST_NO_CXX11_STATIC_ASSERT # define BOOST_NO_SFINAE_EXPR +# define BOOST_NO_CXX11_SFINAE_EXPR # define BOOST_NO_CXX11_SCOPED_ENUMS # define BOOST_NO_CXX11_RVALUE_REFERENCES # define BOOST_NO_CXX11_RANGE_BASED_FOR @@ -82,6 +88,7 @@ # define BOOST_NO_CXX11_INLINE_NAMESPACES # define BOOST_NO_CXX11_REF_QUALIFIERS # define BOOST_NO_CXX11_FINAL +# define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) @@ -111,4 +118,15 @@ #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif + +// C++17 +#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) +# define BOOST_NO_CXX17_STRUCTURED_BINDINGS +#endif +#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) +# define BOOST_NO_CXX17_INLINE_VARIABLES +#endif +#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) +# define BOOST_NO_CXX17_FOLD_EXPRESSIONS +#endif #endif diff --git a/third_party/boost_parts/boost/config/compiler/pgi.hpp b/third_party/boost_parts/boost/config/compiler/pgi.hpp index e5605c9e..4e909d8a 100644 --- a/third_party/boost_parts/boost/config/compiler/pgi.hpp +++ b/third_party/boost_parts/boost/config/compiler/pgi.hpp @@ -1,4 +1,5 @@ // (C) Copyright Noel Belcourt 2007. +// Copyright 2017, NVIDIA CORPORATION. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -10,146 +11,13 @@ #define BOOST_COMPILER_VERSION __PGIC__##__PGIC_MINOR__ #define BOOST_COMPILER "PGI compiler version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) -// -// Threading support: -// Turn this on unconditionally here, it will get turned off again later -// if no threading API is detected. -// +// PGI is mostly GNU compatible. So start with that. +#include -#if __PGIC__ >= 11 +// Now adjust for things that are different. -// options requested by configure --enable-test -#define BOOST_HAS_PTHREADS -#define BOOST_HAS_THREADS -#define BOOST_HAS_PTHREAD_YIELD -#define BOOST_HAS_NRVO -#define BOOST_HAS_LONG_LONG - -// options --enable-test wants undefined -#undef BOOST_NO_STDC_NAMESPACE -#undef BOOST_NO_EXCEPTION_STD_NAMESPACE -#undef BOOST_DEDUCED_TYPENAME - -#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#define BOOST_NO_CXX11_AUTO_DECLARATIONS - -#elif __PGIC__ >= 10 - -// options requested by configure --enable-test -#define BOOST_HAS_THREADS -#define BOOST_HAS_NRVO -#define BOOST_HAS_LONG_LONG -#if defined(linux) || defined(__linux) || defined(__linux__) -# define BOOST_HAS_STDINT_H -#endif - -// options --enable-test wants undefined -#undef BOOST_NO_STDC_NAMESPACE -#undef BOOST_NO_EXCEPTION_STD_NAMESPACE -#undef BOOST_DEDUCED_TYPENAME - -#elif __PGIC__ >= 7 - -#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_NO_SWPRINTF -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#define BOOST_NO_CXX11_AUTO_DECLARATIONS - -#else - -# error "Pgi compiler not configured - please reconfigure" - -#endif -// -// C++0x features -// -// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG -// -#define BOOST_NO_CXX11_CHAR16_T -#define BOOST_NO_CXX11_CHAR32_T -#define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_DECLTYPE -#define BOOST_NO_CXX11_DECLTYPE_N3276 -#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_CXX11_EXTERN_TEMPLATE -#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_CXX11_LAMBDAS -#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_NULLPTR -#define BOOST_NO_CXX11_NUMERIC_LIMITS -#define BOOST_NO_CXX11_RANGE_BASED_FOR -#define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_RVALUE_REFERENCES -#define BOOST_NO_CXX11_SCOPED_ENUMS -#define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_SWPRINTF -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_VARIADIC_MACROS -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX - -#define BOOST_NO_CXX11_HDR_UNORDERED_SET -#define BOOST_NO_CXX11_HDR_UNORDERED_MAP -#define BOOST_NO_CXX11_HDR_TYPEINDEX -#define BOOST_NO_CXX11_HDR_TYPE_TRAITS -#define BOOST_NO_CXX11_HDR_TUPLE -#define BOOST_NO_CXX11_HDR_THREAD -#define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -#define BOOST_NO_CXX11_HDR_REGEX -#define BOOST_NO_CXX11_HDR_RATIO -#define BOOST_NO_CXX11_HDR_RANDOM -#define BOOST_NO_CXX11_HDR_MUTEX -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#define BOOST_NO_CXX11_HDR_FUTURE -#define BOOST_NO_CXX11_HDR_FORWARD_LIST -#define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -#define BOOST_NO_CXX11_HDR_CODECVT -#define BOOST_NO_CXX11_HDR_CHRONO -#define BOOST_NO_CXX11_HDR_ARRAY -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#define BOOST_NO_CXX11_ALIGNAS -#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#define BOOST_NO_CXX11_INLINE_NAMESPACES -#define BOOST_NO_CXX11_REF_QUALIFIERS -#define BOOST_NO_CXX11_FINAL - -// C++ 14: -#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif -#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304) -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) -# define BOOST_NO_CXX14_CONSTEXPR -#endif -#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) -# define BOOST_NO_CXX14_DECLTYPE_AUTO -#endif -#if (__cplusplus < 201304) // There's no SD6 check for this.... -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -#endif -#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304) -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -#endif -#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -#endif -#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -#endif -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES -#endif -// -// version check: -// probably nothing to do here? +// __float128 is a typedef, not a distinct type. +#undef BOOST_HAS_FLOAT128 +// __int128 is not supported. +#undef BOOST_HAS_INT128 diff --git a/third_party/boost_parts/boost/config/compiler/sgi_mipspro.hpp b/third_party/boost_parts/boost/config/compiler/sgi_mipspro.hpp index 90688314..54433c99 100644 --- a/third_party/boost_parts/boost/config/compiler/sgi_mipspro.hpp +++ b/third_party/boost_parts/boost/config/compiler/sgi_mipspro.hpp @@ -9,7 +9,7 @@ #define BOOST_COMPILER "SGI Irix compiler version " BOOST_STRINGIZE(_COMPILER_VERSION) -#include "boost/config/compiler/common_edg.hpp" +#include // // Threading support: diff --git a/third_party/boost_parts/boost/config/compiler/sunpro_cc.hpp b/third_party/boost_parts/boost/config/compiler/sunpro_cc.hpp index 6017660c..54ad77a3 100644 --- a/third_party/boost_parts/boost/config/compiler/sunpro_cc.hpp +++ b/third_party/boost_parts/boost/config/compiler/sunpro_cc.hpp @@ -132,6 +132,7 @@ #define BOOST_NO_CXX11_DECLTYPE_N3276 #define BOOST_NO_CXX11_USER_DEFINED_LITERALS #define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_THREAD_LOCAL #endif #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION @@ -140,6 +141,7 @@ // # define BOOST_HAS_LONG_LONG +#define BOOST_NO_CXX11_SFINAE_EXPR // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) @@ -151,7 +153,7 @@ #if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) # define BOOST_NO_CXX14_CONSTEXPR #endif -#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) +#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304) || (__cplusplus < 201402L) # define BOOST_NO_CXX14_DECLTYPE_AUTO #endif #if (__cplusplus < 201304) // There's no SD6 check for this.... @@ -169,6 +171,24 @@ #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif + +// C++17 +#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) +# define BOOST_NO_CXX17_STRUCTURED_BINDINGS +#endif +#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) +# define BOOST_NO_CXX17_INLINE_VARIABLES +#endif +#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) +# define BOOST_NO_CXX17_FOLD_EXPRESSIONS +#endif + +// Turn on threading support for Solaris 12. +// Ticket #11972 +#if (__SUNPRO_CC >= 0x5140) && defined(__SunOS_5_12) && !defined(BOOST_HAS_THREADS) +# define BOOST_HAS_THREADS +#endif + // // Version // @@ -182,9 +202,9 @@ #error "Compiler not supported or configured - please reconfigure" #endif // -// last known and checked version is 0x590: -#if (__SUNPRO_CC > 0x590) +// last known and checked version: +#if (__SUNPRO_CC > 0x5150) # if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" +# error "Boost.Config is older than your compiler - please check for an updated Boost release." # endif #endif diff --git a/third_party/boost_parts/boost/config/compiler/vacpp.hpp b/third_party/boost_parts/boost/config/compiler/vacpp.hpp index 6c228eab..c8400a34 100644 --- a/third_party/boost_parts/boost/config/compiler/vacpp.hpp +++ b/third_party/boost_parts/boost/config/compiler/vacpp.hpp @@ -65,6 +65,11 @@ #define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS #endif +// Type aliasing hint. Supported since XL C++ 13.1 +#if (__IBMCPP__ >= 1310) +# define BOOST_MAY_ALIAS __attribute__((__may_alias__)) +#endif + // // C++0x features // @@ -114,6 +119,7 @@ # define BOOST_NO_CXX11_SCOPED_ENUMS #endif #define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR #define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX #if ! __IBMCPP_STATIC_ASSERT # define BOOST_NO_CXX11_STATIC_ASSERT @@ -131,6 +137,7 @@ #define BOOST_NO_CXX11_INLINE_NAMESPACES #define BOOST_NO_CXX11_REF_QUALIFIERS #define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_THREAD_LOCAL // C++ 14: #if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) @@ -160,3 +167,14 @@ #if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif + +// C++17 +#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) +# define BOOST_NO_CXX17_STRUCTURED_BINDINGS +#endif +#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606) +# define BOOST_NO_CXX17_INLINE_VARIABLES +#endif +#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603) +# define BOOST_NO_CXX17_FOLD_EXPRESSIONS +#endif diff --git a/third_party/boost_parts/boost/config/compiler/visualc.hpp b/third_party/boost_parts/boost/config/compiler/visualc.hpp index baaab589..c533c50d 100644 --- a/third_party/boost_parts/boost/config/compiler/visualc.hpp +++ b/third_party/boost_parts/boost/config/compiler/visualc.hpp @@ -107,7 +107,7 @@ // // TR1 features: // -#if _MSC_VER >= 1700 +#if (_MSC_VER >= 1700) && defined(_HAS_CXX17) && (_HAS_CXX17 > 0) // # define BOOST_HAS_TR1_HASH // don't know if this is true yet. // # define BOOST_HAS_TR1_TYPE_TRAITS // don't know if this is true yet. # define BOOST_HAS_TR1_UNORDERED_MAP @@ -158,10 +158,16 @@ # define BOOST_NO_CXX11_DECLTYPE_N3276 #endif +#if _MSC_FULL_VER >= 180020827 +#define BOOST_HAS_EXPM1 +#define BOOST_HAS_LOG1P +#endif + // C++11 features supported by VC++ 14 (aka 2015) // #if (_MSC_FULL_VER < 190023026) # define BOOST_NO_CXX11_NOEXCEPT +# define BOOST_NO_CXX11_DEFAULTED_MOVES # define BOOST_NO_CXX11_REF_QUALIFIERS # define BOOST_NO_CXX11_USER_DEFINED_LITERALS # define BOOST_NO_CXX11_ALIGNAS @@ -175,6 +181,26 @@ # define BOOST_NO_CXX14_BINARY_LITERALS # define BOOST_NO_CXX14_GENERIC_LAMBDAS # define BOOST_NO_CXX14_DIGIT_SEPARATORS +# define BOOST_NO_CXX11_THREAD_LOCAL +#endif +// C++11 features supported by VC++ 14 update 3 (aka 2015) +// +#if (_MSC_FULL_VER < 190024210) +# define BOOST_NO_CXX14_VARIABLE_TEMPLATES +# define BOOST_NO_SFINAE_EXPR +# define BOOST_NO_CXX11_CONSTEXPR +#endif + +// C++14 features supported by VC++ 14.1 (Visual Studio 2017) +// +#if (_MSC_VER < 1910) +# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#endif + +// C++17 features supported by VC++ 14.1 (Visual Studio 2017) Update 3 +// +#if (_MSC_VER < 1911) || (_MSVC_LANG < 201703) +# define BOOST_NO_CXX17_STRUCTURED_BINDINGS #endif // MSVC including version 14 has not yet completely @@ -192,25 +218,48 @@ // https://connect.microsoft.com/VisualStudio/feedback/details/1582233/c-subobjects-still-not-value-initialized-correctly // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues // (Niels Dekker, LKEB, May 2010) +// Still present in VC15.5, Dec 2017. #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -// C++11 features not supported by any versions -#define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP // -// This is somewhat supported in VC14, but we may need to wait for -// a service release before enabling: +// C++ 11: +// +// This is supported with /permissive- for 15.5 onwards, unfortunately we appear to have no way to tell +// if this is in effect or not, in any case nothing in Boost is currently using this, so we'll just go +// on defining it for now: // -#define BOOST_NO_CXX11_CONSTEXPR +# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -// C++ 14: -#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI +#if (_MSC_VER < 1912) || (_MSVC_LANG < 201402) +// Supported from msvc-15.5 onwards: +#define BOOST_NO_CXX11_SFINAE_EXPR #endif -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) +// C++ 14: +// Still gives internal compiler error for msvc-15.5: # define BOOST_NO_CXX14_CONSTEXPR +// C++ 17: +#if (_MSC_VER < 1912) || (_MSVC_LANG < 201703) +#define BOOST_NO_CXX17_INLINE_VARIABLES +#define BOOST_NO_CXX17_FOLD_EXPRESSIONS +#endif + +// +// Things that don't work in clr mode: +// +#ifdef _M_CEE +#ifndef BOOST_NO_CXX11_THREAD_LOCAL +# define BOOST_NO_CXX11_THREAD_LOCAL +#endif +#ifndef BOOST_NO_SFINAE_EXPR +# define BOOST_NO_SFINAE_EXPR +#endif +#ifndef BOOST_NO_CXX11_REF_QUALIFIERS +# define BOOST_NO_CXX11_REF_QUALIFIERS +#endif +#endif +#ifdef _M_CEE_PURE +#ifndef BOOST_NO_CXX11_CONSTEXPR +# define BOOST_NO_CXX11_CONSTEXPR #endif -#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304) -# define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif // @@ -258,7 +307,7 @@ # endif # endif # else -# if _MSC_VER < 1310 +# if _MSC_VER < 1200 // Note: Versions up to 7.0 aren't supported. # define BOOST_COMPILER_VERSION 5.0 # elif _MSC_VER < 1300 @@ -277,8 +326,10 @@ # define BOOST_COMPILER_VERSION 11.0 # elif _MSC_VER < 1900 # define BOOST_COMPILER_VERSION 12.0 -# elif _MSC_VER < 2000 +# elif _MSC_VER < 1910 # define BOOST_COMPILER_VERSION 14.0 +# elif _MSC_VER < 1920 +# define BOOST_COMPILER_VERSION 14.1 # else # define BOOST_COMPILER_VERSION _MSC_VER # endif @@ -287,12 +338,17 @@ # define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) #endif +#include + // -// last known and checked version is 19.00.23026 (VC++ 2015 RTM): -#if (_MSC_VER > 1900) +// last known and checked version is 19.12.25830.2 (VC++ 2017.3): +#if (_MSC_VER > 1912) # if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# else -# pragma message("Unknown compiler version - please run the configure tests and report the results") +# error "Boost.Config is older than your current compiler version." +# elif !defined(BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE) + // + // Disabled as of March 2018 - the pace of VS releases is hard to keep up with + // and in any case, we have relatively few defect macros defined now. + // BOOST_PRAGMA_MESSAGE("Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an updated Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.") # endif #endif diff --git a/third_party/boost_parts/boost/config/compiler/xlcpp.hpp b/third_party/boost_parts/boost/config/compiler/xlcpp.hpp index e369ecef..a4c66e40 100644 --- a/third_party/boost_parts/boost/config/compiler/xlcpp.hpp +++ b/third_party/boost_parts/boost/config/compiler/xlcpp.hpp @@ -23,6 +23,10 @@ #define __has_extension __has_feature #endif +#ifndef __has_cpp_attribute +#define __has_cpp_attribute(x) 0 +#endif + #if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS) # define BOOST_NO_EXCEPTIONS #endif @@ -238,6 +242,20 @@ # define BOOST_NO_CXX14_VARIABLE_TEMPLATES #endif +#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606) +# define BOOST_NO_CXX17_STRUCTURED_BINDINGS +#endif + +// Clang 3.9+ in c++1z +#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L +# define BOOST_NO_CXX17_INLINE_VARIABLES +# define BOOST_NO_CXX17_FOLD_EXPRESSIONS +#endif + +#if !__has_feature(cxx_thread_local) +# define BOOST_NO_CXX11_THREAD_LOCAL +#endif + #if __cplusplus < 201400 // All versions with __cplusplus above this value seem to support this: # define BOOST_NO_CXX14_DIGIT_SEPARATORS @@ -249,6 +267,11 @@ # define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) #endif +// Type aliasing hint. +#if __has_attribute(__may_alias__) +# define BOOST_MAY_ALIAS __attribute__((__may_alias__)) +#endif + #ifndef BOOST_COMPILER # define BOOST_COMPILER "Clang version " __clang_version__ #endif diff --git a/third_party/boost_parts/boost/config/compiler/xlcpp_zos.hpp b/third_party/boost_parts/boost/config/compiler/xlcpp_zos.hpp new file mode 100644 index 00000000..bc785b8a --- /dev/null +++ b/third_party/boost_parts/boost/config/compiler/xlcpp_zos.hpp @@ -0,0 +1,169 @@ +// Copyright (c) 2017 Dynatrace +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org for most recent version. + +// Compiler setup for IBM z/OS XL C/C++ compiler. + +// Oldest compiler version currently supported is 2.1 (V2R1) +#if !defined(__IBMCPP__) || !defined(__COMPILER_VER__) || __COMPILER_VER__ < 0x42010000 +# error "Compiler not supported or configured - please reconfigure" +#endif + +#if __COMPILER_VER__ > 0x42010000 +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown compiler version - please run the configure tests and report the results" +# endif +#endif + +#define BOOST_COMPILER "IBM z/OS XL C/C++ version " BOOST_STRINGIZE(__COMPILER_VER__) +#define BOOST_XLCPP_ZOS __COMPILER_VER__ + +// ------------------------------------- + +#include // For __UU, __C99, __TR1, ... + +#if !defined(__IBMCPP_DEFAULTED_AND_DELETED_FUNCTIONS) +# define BOOST_NO_CXX11_DELETED_FUNCTIONS +# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS +# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS +#endif + +// ------------------------------------- + +#if defined(__UU) || defined(__C99) || defined(__TR1) +# define BOOST_HAS_LOG1P +# define BOOST_HAS_EXPM1 +#endif + +#if defined(__C99) || defined(__TR1) +# define BOOST_HAS_STDINT_H +#else +# define BOOST_NO_FENV_H +#endif + +// ------------------------------------- + +#define BOOST_HAS_NRVO + +#if !defined(__RTTI_ALL__) +# define BOOST_NO_RTTI +#endif + +#if !defined(_CPPUNWIND) && !defined(__EXCEPTIONS) +# define BOOST_NO_EXCEPTIONS +#endif + +#if defined(_LONG_LONG) || defined(__IBMCPP_C99_LONG_LONG) || defined(__LL) +# define BOOST_HAS_LONG_LONG +#else +# define BOOST_NO_LONG_LONG +#endif + +#if defined(_LONG_LONG) || defined(__IBMCPP_C99_LONG_LONG) || defined(__LL) || defined(_LP64) +# define BOOST_HAS_MS_INT64 +#endif + +#define BOOST_NO_SFINAE_EXPR +#define BOOST_NO_CXX11_SFINAE_EXPR + +#if defined(__IBMCPP_VARIADIC_TEMPLATES) +# define BOOST_HAS_VARIADIC_TMPL +#else +# define BOOST_NO_CXX11_VARIADIC_TEMPLATES +# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS +#endif + +#if defined(__IBMCPP_STATIC_ASSERT) +# define BOOST_HAS_STATIC_ASSERT +#else +# define BOOST_NO_CXX11_STATIC_ASSERT +#endif + +#if defined(__IBMCPP_RVALUE_REFERENCES) +# define BOOST_HAS_RVALUE_REFS +#else +# define BOOST_NO_CXX11_RVALUE_REFERENCES +#endif + +#if !defined(__IBMCPP_SCOPED_ENUM) +# define BOOST_NO_CXX11_SCOPED_ENUMS +#endif + +#define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS +#define BOOST_NO_CXX11_TEMPLATE_ALIASES +#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS + +#if !defined(__IBMCPP_EXPLICIT_CONVERSION_OPERATORS) +# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +#endif + +#if !defined(__IBMCPP_DECLTYPE) +# define BOOST_NO_CXX11_DECLTYPE +#else +# define BOOST_HAS_DECLTYPE +#endif +#define BOOST_NO_CXX11_DECLTYPE_N3276 + +#if !defined(__IBMCPP_INLINE_NAMESPACE) +# define BOOST_NO_CXX11_INLINE_NAMESPACES +#endif + +#if !defined(__IBMCPP_AUTO_TYPEDEDUCTION) +# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS +# define BOOST_NO_CXX11_AUTO_DECLARATIONS +# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES +#endif + +#if !defined(__IBM_CHAR32_T__) +# define BOOST_NO_CXX11_CHAR32_T +#endif +#if !defined(__IBM_CHAR16_T__) +# define BOOST_NO_CXX11_CHAR16_T +#endif + +#if !defined(__IBMCPP_CONSTEXPR) +# define BOOST_NO_CXX11_CONSTEXPR +#endif + +#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX +#define BOOST_NO_CXX11_UNICODE_LITERALS +#define BOOST_NO_CXX11_RAW_LITERALS +#define BOOST_NO_CXX11_RANGE_BASED_FOR +#define BOOST_NO_CXX11_NULLPTR +#define BOOST_NO_CXX11_NOEXCEPT +#define BOOST_NO_CXX11_LAMBDAS +#define BOOST_NO_CXX11_USER_DEFINED_LITERALS +#define BOOST_NO_CXX11_THREAD_LOCAL +#define BOOST_NO_CXX11_REF_QUALIFIERS +#define BOOST_NO_CXX11_FINAL +#define BOOST_NO_CXX11_ALIGNAS +#define BOOST_NO_CXX14_VARIABLE_TEMPLATES +#define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION +#define BOOST_NO_CXX14_AGGREGATE_NSDMI +#define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES +#define BOOST_NO_CXX14_GENERIC_LAMBDAS +#define BOOST_NO_CXX14_DIGIT_SEPARATORS +#define BOOST_NO_CXX14_DECLTYPE_AUTO +#define BOOST_NO_CXX14_CONSTEXPR +#define BOOST_NO_CXX14_BINARY_LITERALS +#define BOOST_NO_CXX17_STRUCTURED_BINDINGS +#define BOOST_NO_CXX17_INLINE_VARIABLES +#define BOOST_NO_CXX17_FOLD_EXPRESSIONS + +// ------------------------------------- + +#if defined(__IBM_ATTRIBUTES) +# define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__)) +# define BOOST_NOINLINE __attribute__ ((__noinline__)) +# define BOOST_MAY_ALIAS __attribute__((__may_alias__)) +// No BOOST_ALIGNMENT - explicit alignment support is broken (V2R1). +#endif + +extern "builtin" long __builtin_expect(long, long); + +#define BOOST_LIKELY(x) __builtin_expect((x) && true, 1) +#define BOOST_UNLIKELY(x) __builtin_expect((x) && true, 0) diff --git a/third_party/boost_parts/boost/config/posix_features.hpp b/third_party/boost_parts/boost/config/detail/posix_features.hpp similarity index 100% rename from third_party/boost_parts/boost/config/posix_features.hpp rename to third_party/boost_parts/boost/config/detail/posix_features.hpp diff --git a/third_party/boost_parts/boost/config/select_compiler_config.hpp b/third_party/boost_parts/boost/config/detail/select_compiler_config.hpp similarity index 75% rename from third_party/boost_parts/boost/config/select_compiler_config.hpp rename to third_party/boost_parts/boost/config/detail/select_compiler_config.hpp index 4d87093a..ced8443d 100644 --- a/third_party/boost_parts/boost/config/select_compiler_config.hpp +++ b/third_party/boost_parts/boost/config/detail/select_compiler_config.hpp @@ -48,6 +48,14 @@ // Digital Mars C++ # define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp" +#elif defined __DCC__ +// Wind River Diab C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/diab.hpp" + +#elif defined(__PGI) +// Portland Group Inc. +# define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp" + # elif defined(__GNUC__) && !defined(__ibmxl__) // GNU C++: # define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp" @@ -92,18 +100,18 @@ // MPW MrCpp or SCpp # define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp" +#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) && defined(__MVS__) +// IBM z/OS XL C/C++ +# define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp_zos.hpp" + #elif defined(__ibmxl__) -// IBM XL C/C++ for Linux (Little Endian) +// IBM XL C/C++ for Linux (Little Endian) # define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp.hpp" #elif defined(__IBMCPP__) // IBM Visual Age or IBM XL C/C++ for Linux (Big Endian) # define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp" -#elif defined(__PGI) -// Portland Group Inc. -# define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp" - #elif defined _MSC_VER // Microsoft Visual C++ // @@ -122,27 +130,29 @@ // // This section allows dependency scanners to find all the headers we *might* include: // -#include "boost/config/compiler/gcc_xml.hpp" -#include "boost/config/compiler/cray.hpp" -#include "boost/config/compiler/comeau.hpp" -#include "boost/config/compiler/pathscale.hpp" -#include "boost/config/compiler/intel.hpp" -#include "boost/config/compiler/clang.hpp" -#include "boost/config/compiler/digitalmars.hpp" -#include "boost/config/compiler/gcc.hpp" -#include "boost/config/compiler/kai.hpp" -#include "boost/config/compiler/sgi_mipspro.hpp" -#include "boost/config/compiler/compaq_cxx.hpp" -#include "boost/config/compiler/greenhills.hpp" -#include "boost/config/compiler/codegear.hpp" -#include "boost/config/compiler/borland.hpp" -#include "boost/config/compiler/metrowerks.hpp" -#include "boost/config/compiler/sunpro_cc.hpp" -#include "boost/config/compiler/hp_acc.hpp" -#include "boost/config/compiler/mpw.hpp" -#include "boost/config/compiler/vacpp.hpp" -#include "boost/config/compiler/pgi.hpp" -#include "boost/config/compiler/visualc.hpp" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #endif diff --git a/third_party/boost_parts/boost/config/select_platform_config.hpp b/third_party/boost_parts/boost/config/detail/select_platform_config.hpp similarity index 94% rename from third_party/boost_parts/boost/config/select_platform_config.hpp rename to third_party/boost_parts/boost/config/detail/select_platform_config.hpp index 62fd818b..b36eca57 100644 --- a/third_party/boost_parts/boost/config/select_platform_config.hpp +++ b/third_party/boost_parts/boost/config/detail/select_platform_config.hpp @@ -53,8 +53,12 @@ // MacOS # define BOOST_PLATFORM_CONFIG "boost/config/platform/macos.hpp" +#elif defined(__TOS_MVS__) +// IBM z/OS +# define BOOST_PLATFORM_CONFIG "boost/config/platform/zos.hpp" + #elif defined(__IBMCPP__) || defined(_AIX) -// IBM +// IBM AIX # define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp" #elif defined(__amigaos__) @@ -97,7 +101,7 @@ # define BOOST_HAS_UNISTD_H # endif -# include +# include # endif @@ -122,6 +126,7 @@ # include "boost/config/platform/win32.hpp" # include "boost/config/platform/beos.hpp" # include "boost/config/platform/macos.hpp" +# include "boost/config/platform/zos.hpp" # include "boost/config/platform/aix.hpp" # include "boost/config/platform/amigaos.hpp" # include "boost/config/platform/qnxnto.hpp" @@ -129,7 +134,7 @@ # include "boost/config/platform/symbian.hpp" # include "boost/config/platform/cray.hpp" # include "boost/config/platform/vms.hpp" -# include +# include diff --git a/third_party/boost_parts/boost/config/select_stdlib_config.hpp b/third_party/boost_parts/boost/config/detail/select_stdlib_config.hpp similarity index 94% rename from third_party/boost_parts/boost/config/select_stdlib_config.hpp rename to third_party/boost_parts/boost/config/detail/select_stdlib_config.hpp index e270a881..8db778c8 100644 --- a/third_party/boost_parts/boost/config/select_stdlib_config.hpp +++ b/third_party/boost_parts/boost/config/detail/select_stdlib_config.hpp @@ -66,6 +66,10 @@ // MSL standard lib: # define BOOST_STDLIB_CONFIG "boost/config/stdlib/msl.hpp" +#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) && defined(__MVS__) +// IBM z/OS XL C/C++ +# define BOOST_STDLIB_CONFIG "boost/config/stdlib/xlcpp_zos.hpp" + #elif defined(__IBMCPP__) // take the default VACPP std lib # define BOOST_STDLIB_CONFIG "boost/config/stdlib/vacpp.hpp" @@ -98,6 +102,7 @@ # include "boost/config/stdlib/libstdcpp3.hpp" # include "boost/config/stdlib/sgi.hpp" # include "boost/config/stdlib/msl.hpp" +# include "boost/config/stdlib/xlcpp_zos.hpp" # include "boost/config/stdlib/vacpp.hpp" # include "boost/config/stdlib/modena.hpp" # include "boost/config/stdlib/dinkumware.hpp" diff --git a/third_party/boost_parts/boost/config/suffix.hpp b/third_party/boost_parts/boost/config/detail/suffix.hpp similarity index 94% rename from third_party/boost_parts/boost/config/suffix.hpp rename to third_party/boost_parts/boost/config/detail/suffix.hpp index 17bf1020..22d31f68 100644 --- a/third_party/boost_parts/boost/config/suffix.hpp +++ b/third_party/boost_parts/boost/config/detail/suffix.hpp @@ -537,25 +537,10 @@ namespace std{ using ::type_info; } // ---------------------------------------------------------------------------// -// // Helper macro BOOST_STRINGIZE: -// Converts the parameter X to a string after macro replacement -// on X has been performed. -// -#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) -#define BOOST_DO_STRINGIZE(X) #X - -// // Helper macro BOOST_JOIN: -// The following piece of macro magic joins the two -// arguments together, even when one of the arguments is -// itself a macro (see 16.3.1 in C++ standard). The key -// is that macro expansion of macro arguments does not -// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN. -// -#define BOOST_JOIN( X, Y ) BOOST_DO_JOIN( X, Y ) -#define BOOST_DO_JOIN( X, Y ) BOOST_DO_JOIN2(X,Y) -#define BOOST_DO_JOIN2( X, Y ) X##Y + +#include // // Set some default values for compiler/library/platform names. @@ -583,6 +568,33 @@ namespace std{ using ::type_info; } # define BOOST_GPU_ENABLED # endif +// BOOST_RESTRICT ---------------------------------------------// +// Macro to use in place of 'restrict' keyword variants +#if !defined(BOOST_RESTRICT) +# if defined(_MSC_VER) +# define BOOST_RESTRICT __restrict +# if !defined(BOOST_NO_RESTRICT_REFERENCES) && (_MSC_FULL_VER < 190023026) +# define BOOST_NO_RESTRICT_REFERENCES +# endif +# elif defined(__GNUC__) && __GNUC__ > 3 + // Clang also defines __GNUC__ (as 4) +# define BOOST_RESTRICT __restrict__ +# else +# define BOOST_RESTRICT +# if !defined(BOOST_NO_RESTRICT_REFERENCES) +# define BOOST_NO_RESTRICT_REFERENCES +# endif +# endif +#endif + +// BOOST_MAY_ALIAS -----------------------------------------------// +// The macro expands to an attribute to mark a type that is allowed to alias other types. +// The macro is defined in the compiler-specific headers. +#if !defined(BOOST_MAY_ALIAS) +# define BOOST_NO_MAY_ALIAS +# define BOOST_MAY_ALIAS +#endif + // BOOST_FORCEINLINE ---------------------------------------------// // Macro to use in place of 'inline' to force a function to be inline #if !defined(BOOST_FORCEINLINE) @@ -604,7 +616,7 @@ namespace std{ using ::type_info; } # elif defined(__GNUC__) && __GNUC__ > 3 // Clang also defines __GNUC__ (as 4) # if defined(__CUDACC__) - // nvcc doesn't always parse __noinline__, + // nvcc doesn't always parse __noinline__, // see: https://svn.boost.org/trac/boost/ticket/9392 # define BOOST_NOINLINE __attribute__ ((noinline)) # else @@ -624,12 +636,22 @@ namespace std{ using ::type_info; } # define BOOST_NORETURN __declspec(noreturn) # elif defined(__GNUC__) # define BOOST_NORETURN __attribute__ ((__noreturn__)) -# else -# define BOOST_NO_NORETURN -# define BOOST_NORETURN +# elif defined(__has_attribute) && defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x5130) +# if __has_attribute(noreturn) +# define BOOST_NORETURN [[noreturn]] +# endif +# elif defined(__has_cpp_attribute) +# if __has_cpp_attribute(noreturn) +# define BOOST_NORETURN [[noreturn]] +# endif # endif #endif +#if !defined(BOOST_NORETURN) +# define BOOST_NO_NORETURN +# define BOOST_NORETURN +#endif + // Branch prediction hints // These macros are intended to wrap conditional expressions that yield true or false // @@ -647,15 +669,17 @@ namespace std{ using ::type_info; } // Type and data alignment specification // -#if !defined(BOOST_NO_CXX11_ALIGNAS) -# define BOOST_ALIGNMENT(x) alignas(x) -#elif defined(_MSC_VER) -# define BOOST_ALIGNMENT(x) __declspec(align(x)) -#elif defined(__GNUC__) -# define BOOST_ALIGNMENT(x) __attribute__ ((__aligned__(x))) -#else -# define BOOST_NO_ALIGNMENT -# define BOOST_ALIGNMENT(x) +#if !defined(BOOST_ALIGNMENT) +# if !defined(BOOST_NO_CXX11_ALIGNAS) +# define BOOST_ALIGNMENT(x) alignas(x) +# elif defined(_MSC_VER) +# define BOOST_ALIGNMENT(x) __declspec(align(x)) +# elif defined(__GNUC__) +# define BOOST_ALIGNMENT(x) __attribute__ ((__aligned__(x))) +# else +# define BOOST_NO_ALIGNMENT +# define BOOST_ALIGNMENT(x) +# endif #endif // Lack of non-public defaulted functions is implied by the lack of any defaulted functions @@ -663,6 +687,11 @@ namespace std{ using ::type_info; } # define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS #endif +// Lack of defaulted moves is implied by the lack of either rvalue references or any defaulted functions +#if !defined(BOOST_NO_CXX11_DEFAULTED_MOVES) && (defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES)) +# define BOOST_NO_CXX11_DEFAULTED_MOVES +#endif + // Defaulted and deleted function declaration helpers // These macros are intended to be inside a class definition. // BOOST_DEFAULTED_FUNCTION accepts the function declaration and its diff --git a/third_party/boost_parts/boost/config/header_deprecated.hpp b/third_party/boost_parts/boost/config/header_deprecated.hpp new file mode 100644 index 00000000..864554f2 --- /dev/null +++ b/third_party/boost_parts/boost/config/header_deprecated.hpp @@ -0,0 +1,26 @@ +#ifndef BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED +#define BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED + +// Copyright 2017 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// BOOST_HEADER_DEPRECATED("") +// +// Expands to the equivalent of +// BOOST_PRAGMA_MESSAGE("This header is deprecated. Use instead.") +// +// Note that this header is C compatible. + +#include + +#if defined(BOOST_ALLOW_DEPRECATED_HEADERS) +# define BOOST_HEADER_DEPRECATED(a) +#else +# define BOOST_HEADER_DEPRECATED(a) BOOST_PRAGMA_MESSAGE("This header is deprecated. Use " a " instead.") +#endif + +#endif // BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED diff --git a/third_party/boost_parts/boost/config/helper_macros.hpp b/third_party/boost_parts/boost/config/helper_macros.hpp new file mode 100644 index 00000000..3e79526d --- /dev/null +++ b/third_party/boost_parts/boost/config/helper_macros.hpp @@ -0,0 +1,37 @@ +#ifndef BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED +#define BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED + +// Copyright 2001 John Maddock. +// Copyright 2017 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// BOOST_STRINGIZE(X) +// BOOST_JOIN(X, Y) +// +// Note that this header is C compatible. + +// +// Helper macro BOOST_STRINGIZE: +// Converts the parameter X to a string after macro replacement +// on X has been performed. +// +#define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) +#define BOOST_DO_STRINGIZE(X) #X + +// +// Helper macro BOOST_JOIN: +// The following piece of macro magic joins the two +// arguments together, even when one of the arguments is +// itself a macro (see 16.3.1 in C++ standard). The key +// is that macro expansion of macro arguments does not +// occur in BOOST_DO_JOIN2 but does in BOOST_DO_JOIN. +// +#define BOOST_JOIN(X, Y) BOOST_DO_JOIN(X, Y) +#define BOOST_DO_JOIN(X, Y) BOOST_DO_JOIN2(X,Y) +#define BOOST_DO_JOIN2(X, Y) X##Y + +#endif // BOOST_CONFIG_HELPER_MACROS_HPP_INCLUDED diff --git a/third_party/boost_parts/boost/config/platform/aix.hpp b/third_party/boost_parts/boost/config/platform/aix.hpp index 894ef42c..a48e2320 100644 --- a/third_party/boost_parts/boost/config/platform/aix.hpp +++ b/third_party/boost_parts/boost/config/platform/aix.hpp @@ -26,7 +26,7 @@ //#define BOOST_HAS_PTHREAD_YIELD // boilerplate code: -#include +#include diff --git a/third_party/boost_parts/boost/config/platform/beos.hpp b/third_party/boost_parts/boost/config/platform/beos.hpp index 48c3d8dc..6158c1c2 100644 --- a/third_party/boost_parts/boost/config/platform/beos.hpp +++ b/third_party/boost_parts/boost/config/platform/beos.hpp @@ -20,7 +20,7 @@ #endif // boilerplate code: -#include +#include diff --git a/third_party/boost_parts/boost/config/platform/bsd.hpp b/third_party/boost_parts/boost/config/platform/bsd.hpp index a0142978..79e74a08 100644 --- a/third_party/boost_parts/boost/config/platform/bsd.hpp +++ b/third_party/boost_parts/boost/config/platform/bsd.hpp @@ -77,7 +77,7 @@ // boilerplate code: #define BOOST_HAS_UNISTD_H -#include +#include diff --git a/third_party/boost_parts/boost/config/platform/cray.hpp b/third_party/boost_parts/boost/config/platform/cray.hpp index 5c476e41..103e9c06 100644 --- a/third_party/boost_parts/boost/config/platform/cray.hpp +++ b/third_party/boost_parts/boost/config/platform/cray.hpp @@ -12,7 +12,7 @@ // boilerplate code: #define BOOST_HAS_UNISTD_H -#include +#include diff --git a/third_party/boost_parts/boost/config/platform/cygwin.hpp b/third_party/boost_parts/boost/config/platform/cygwin.hpp index b7ef572f..6dd7e57c 100644 --- a/third_party/boost_parts/boost/config/platform/cygwin.hpp +++ b/third_party/boost_parts/boost/config/platform/cygwin.hpp @@ -23,7 +23,7 @@ # define BOOST_HAS_SCHED_YIELD # define BOOST_HAS_GETTIMEOFDAY # define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# define BOOST_HAS_SIGACTION +//# define BOOST_HAS_SIGACTION #else # if !defined(BOOST_HAS_WINTHREADS) # define BOOST_HAS_WINTHREADS @@ -38,12 +38,23 @@ #ifdef _STDINT_H #define BOOST_HAS_STDINT_H #endif +#if __GNUC__ > 5 && !defined(BOOST_HAS_STDINT_H) +# define BOOST_HAS_STDINT_H +#endif /// Cygwin has no fenv.h #define BOOST_NO_FENV_H +// Cygwin has it's own which breaks unless the correct compiler flags are used: +#ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX +#include +#if !(__XSI_VISIBLE >= 500 || __POSIX_VISIBLE >= 200112) +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#endif + // boilerplate code: -#include +#include // // Cygwin lies about XSI conformance, there is no nl_types.h: @@ -51,7 +62,6 @@ #ifdef BOOST_HAS_NL_TYPES_H # undef BOOST_HAS_NL_TYPES_H #endif - diff --git a/third_party/boost_parts/boost/config/platform/haiku.hpp b/third_party/boost_parts/boost/config/platform/haiku.hpp index 750866c4..04244c56 100644 --- a/third_party/boost_parts/boost/config/platform/haiku.hpp +++ b/third_party/boost_parts/boost/config/platform/haiku.hpp @@ -28,4 +28,4 @@ #define BOOST_HAS_GETTIMEOFDAY // boilerplate code: -#include +#include diff --git a/third_party/boost_parts/boost/config/platform/hpux.hpp b/third_party/boost_parts/boost/config/platform/hpux.hpp index 19ce68e5..222622e7 100644 --- a/third_party/boost_parts/boost/config/platform/hpux.hpp +++ b/third_party/boost_parts/boost/config/platform/hpux.hpp @@ -43,7 +43,7 @@ // boilerplate code: #define BOOST_HAS_UNISTD_H -#include +#include // the following are always available: #ifndef BOOST_HAS_GETTIMEOFDAY diff --git a/third_party/boost_parts/boost/config/platform/irix.hpp b/third_party/boost_parts/boost/config/platform/irix.hpp index aeae49c8..0acb6515 100644 --- a/third_party/boost_parts/boost/config/platform/irix.hpp +++ b/third_party/boost_parts/boost/config/platform/irix.hpp @@ -25,7 +25,7 @@ // boilerplate code: #define BOOST_HAS_UNISTD_H -#include +#include diff --git a/third_party/boost_parts/boost/config/platform/linux.hpp b/third_party/boost_parts/boost/config/platform/linux.hpp index 6fa5f45b..c4eef8f8 100644 --- a/third_party/boost_parts/boost/config/platform/linux.hpp +++ b/third_party/boost_parts/boost/config/platform/linux.hpp @@ -24,8 +24,9 @@ #if defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 1))) // defines int64_t unconditionally, but defines // int64_t only if __GNUC__. Thus, assume a fully usable - // only when using GCC. -# if defined __GNUC__ + // only when using GCC. Update 2017: this appears not to be the case for + // recent glibc releases, see bug report: https://svn.boost.org/trac/boost/ticket/13045 +# if defined(__GNUC__) || ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ >= 5))) # define BOOST_HAS_STDINT_H # endif #endif @@ -71,8 +72,8 @@ // boilerplate code: #define BOOST_HAS_UNISTD_H -#include -#ifdef __USE_GNU +#include +#if defined(__USE_GNU) && !defined(__ANDROID__) && !defined(ANDROID) #define BOOST_HAS_PTHREAD_YIELD #endif diff --git a/third_party/boost_parts/boost/config/platform/macos.hpp b/third_party/boost_parts/boost/config/platform/macos.hpp index 5be4e3b3..ed7dc15f 100644 --- a/third_party/boost_parts/boost/config/platform/macos.hpp +++ b/third_party/boost_parts/boost/config/platform/macos.hpp @@ -25,7 +25,7 @@ // to replace the platform-native BSD one. G++ users // should also always be able to do this on MaxOS X. // -# include +# include # ifndef BOOST_HAS_STDINT_H # define BOOST_HAS_STDINT_H # endif diff --git a/third_party/boost_parts/boost/config/platform/qnxnto.hpp b/third_party/boost_parts/boost/config/platform/qnxnto.hpp index b1377c8d..d0298cb4 100644 --- a/third_party/boost_parts/boost/config/platform/qnxnto.hpp +++ b/third_party/boost_parts/boost/config/platform/qnxnto.hpp @@ -10,7 +10,7 @@ #define BOOST_PLATFORM "QNX" #define BOOST_HAS_UNISTD_H -#include +#include // QNX claims XOpen version 5 compatibility, but doesn't have an nl_types.h // or log1p and expm1: diff --git a/third_party/boost_parts/boost/config/platform/solaris.hpp b/third_party/boost_parts/boost/config/platform/solaris.hpp index 6e4efc9e..51ffe67f 100644 --- a/third_party/boost_parts/boost/config/platform/solaris.hpp +++ b/third_party/boost_parts/boost/config/platform/solaris.hpp @@ -14,7 +14,7 @@ // boilerplate code: #define BOOST_HAS_UNISTD_H -#include +#include // // pthreads don't actually work with gcc unless _PTHREADS is defined: diff --git a/third_party/boost_parts/boost/config/platform/symbian.hpp b/third_party/boost_parts/boost/config/platform/symbian.hpp index e02a7782..f814d00b 100644 --- a/third_party/boost_parts/boost/config/platform/symbian.hpp +++ b/third_party/boost_parts/boost/config/platform/symbian.hpp @@ -24,7 +24,7 @@ #include #endif// boilerplate code: # define BOOST_HAS_UNISTD_H -# include +# include // S60 SDK defines _POSIX_VERSION as POSIX.1 # ifndef BOOST_HAS_STDINT_H # define BOOST_HAS_STDINT_H diff --git a/third_party/boost_parts/boost/config/platform/vxworks.hpp b/third_party/boost_parts/boost/config/platform/vxworks.hpp index cdda0158..a91e4ab4 100644 --- a/third_party/boost_parts/boost/config/platform/vxworks.hpp +++ b/third_party/boost_parts/boost/config/platform/vxworks.hpp @@ -1,30 +1,50 @@ // (C) Copyright Dustin Spicuzza 2009. // Adapted to vxWorks 6.9 by Peter Brockamp 2012. +// Updated for VxWorks 7 by Brian Kuhl 2016 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org for most recent version. -// Since WRS does not yet properly support boost under vxWorks -// and this file was badly outdated, but I was keen on using it, -// I patched boost myself to make things work. This has been tested -// and adapted by me for vxWorks 6.9 *only*, as I'm lacking access -// to earlier 6.X versions! The only thing I know for sure is that -// very old versions of vxWorks (namely everything below 6.x) are -// absolutely unable to use boost. This is mainly due to the completely -// outdated libraries and ancient compiler (GCC 2.96 or worse). Do -// not even think of getting this to work, a miserable failure will -// be guaranteed! +// Old versions of vxWorks (namely everything below 6.x) are +// absolutely unable to use boost. Old STLs and compilers +// like (GCC 2.96) . Do not even think of getting this to work, +// a miserable failure will be guaranteed! +// // Equally, this file has been tested for RTPs (Real Time Processes) // only, not for DKMs (Downloadable Kernel Modules). These two types // of executables differ largely in the available functionality of -// the C-library, STL, and so on. A DKM uses a library similar to those -// of vxWorks 5.X - with all its limitations and incompatibilities -// with respect to ANSI C++ and STL. So probably there might be problems -// with the usage of boost from DKMs. WRS or any voluteers are free to -// prove the opposite! - +// the C-library, STL, and so on. A DKM uses a C89 library with no +// wide character support and no guarantee of ANSI C. The same Dinkum +// STL library is used in both contexts. +// +// Similarly the Dinkum abridged STL that supports the loosely specified +// embedded C++ standard has not been tested and is unlikely to work +// on anything but the simplest library. +// ==================================================================== +// +// Additional Configuration +// ------------------------------------------------------------------- +// +// Because of the ordering of include files and other issues the following +// additional definitions worked better outside this file. +// +// When building the log library add the following to the b2 invocation +// define=BOOST_LOG_WITHOUT_IPC +// and +// -DBOOST_LOG_WITHOUT_DEFAULT_FACTORIES +// to your compile options. +// +// When building the test library add +// -DBOOST_TEST_LIMITED_SIGNAL_DETAILS +// to your compile options +// +// When building containers library add +// -DHAVE_MORECORE=0 +// to your c compile options so dlmalloc heap library is compiled +// without brk() calls +// // ==================================================================== // // Some important information regarding the usage of POSIX semaphores: @@ -38,29 +58,14 @@ // Now, VxWorks POSIX-semaphores for DKM's default to the usage of // priority inverting semaphores, which is fine. On the other hand, // for RTP's it defaults to using non priority inverting semaphores, -// which could easily pose a serious problem for a real time process, -// i.e. deadlocks! To overcome this two possibilities do exist: +// which could easily pose a serious problem for a real time process. // -// a) Patch every piece of boost that uses semaphores to instanciate -// the proper type of semaphores. This is non-intrusive with respect -// to the OS and could relatively easy been done by giving all -// semaphores attributes deviating from the default (for in-depth -// information see the POSIX functions pthread_mutexattr_init() -// and pthread_mutexattr_setprotocol()). However this breaks all -// too easily, as with every new version some boost library could -// all in a sudden start using semaphores, resurrecting the very -// same, hard to locate problem over and over again! -// -// b) We could change the default properties for POSIX-semaphores -// that VxWorks uses for RTP's and this is being suggested here, -// as it will more or less seamlessly integrate with boost. I got -// the following information from WRS how to do this, compare -// Wind River TSR# 1209768: -// -// Instructions for changing the default properties of POSIX- -// semaphores for RTP's in VxWorks 6.9: -// - Edit the file /vxworks-6.9/target/usr/src/posix/pthreadLib.c -// in the root of your Workbench-installation. +// To change the default properties for POSIX-semaphores in VxWorks 7 +// enable core > CORE_USER Menu > DEFAULT_PTHREAD_PRIO_INHERIT +// +// In VxWorks 6.x so as to integrate with boost. +// - Edit the file +// installDir/vxworks-6.x/target/usr/src/posix/pthreadLib.c // - Around line 917 there should be the definition of the default // mutex attributes: // @@ -81,30 +86,11 @@ // pAttr->mutexAttrType = PTHREAD_MUTEX_DEFAULT; // // Here again, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT. -// - Finally, rebuild your VSB. This will create a new VxWorks kernel +// - Finally, rebuild your VSB. This will rebuild the libraries // with the changed properties. That's it! Now, using boost should // no longer cause any problems with task deadlocks! // -// And here's another useful piece of information concerning VxWorks' -// POSIX-functionality in general: -// VxWorks is not a genuine POSIX-OS in itself, rather it is using a -// kind of compatibility layer (sort of a wrapper) to emulate the -// POSIX-functionality by using its own resources and functions. -// At the time a task (thread) calls it's first POSIX-function during -// runtime it is being transformed by the OS into a POSIX-thread. -// This transformation does include a call to malloc() to allocate the -// memory required for the housekeeping of POSIX-threads. In a high -// priority RTP this malloc() call may be highly undesirable, as its -// timing is more or less unpredictable (depending on what your actual -// heap looks like). You can circumvent this problem by calling the -// function thread_self() at a well defined point in the code of the -// task, e.g. shortly after the task spawns up. Thereby you are able -// to define the time when the task-transformation will take place and -// you could shift it to an uncritical point where a malloc() call is -// tolerable. So, if this could pose a problem for your code, remember -// to call thread_self() from the affected task at an early stage. -// -// ==================================================================== +// ==================================================================== // Block out all versions before vxWorks 6.x, as these don't work: // Include header with the vxWorks version information and query them @@ -158,11 +144,6 @@ #define BOOST_HAS_CLOCK_GETTIME #define BOOST_HAS_MACRO_USE_FACET -// Generally unavailable functionality, delivered by boost's test function: -//#define BOOST_NO_DEDUCED_TYPENAME // Commented this out, boost's test gives an errorneous result! -#define BOOST_NO_CXX11_EXTERN_TEMPLATE -#define BOOST_NO_CXX11_VARIADIC_MACROS - // Generally available threading API's: #define BOOST_HAS_PTHREADS #define BOOST_HAS_SCHED_YIELD @@ -180,7 +161,7 @@ // Luckily, at the moment there seems to be none! #endif -// These #defines allow posix_features to work, since vxWorks doesn't +// These #defines allow detail/posix_features to work, since vxWorks doesn't // #define them itself for DKMs (for RTPs on the contrary it does): #ifdef _WRS_KERNEL # ifndef _POSIX_TIMERS @@ -191,14 +172,7 @@ # endif #endif -// vxWorks doesn't work with asio serial ports: -#define BOOST_ASIO_DISABLE_SERIAL_PORT -// TODO: The problem here seems to bee that vxWorks uses its own, very specific -// ways to handle serial ports, incompatible with POSIX or anything... -// Maybe a specific implementation would be possible, but until the -// straight need arises... This implementation would presumably consist -// of some vxWorks specific ioctl-calls, etc. Any voluteers? - +#if (_WRS_VXWORKS_MAJOR < 7) // vxWorks-around: #defines CLOCKS_PER_SEC as sysClkRateGet() but // miserably fails to #include the required to make // sysClkRateGet() available! So we manually include it here. @@ -208,11 +182,12 @@ #endif // vxWorks-around: In the macros INT32_C(), UINT32_C(), INT64_C() and -// UINT64_C() are defined errorneously, yielding not a signed/ +// UINT64_C() are defined erroneously, yielding not a signed/ // unsigned long/long long type, but a signed/unsigned int/long // type. Eventually this leads to compile errors in ratio_fwd.hpp, // when trying to define several constants which do not fit into a // long type! We correct them here by redefining. + #include // Some macro-magic to do the job @@ -231,12 +206,16 @@ #define UINT64_C(x) VX_JOIN(x, ULL) // #include Libraries required for the following function adaption +#include +#endif // _WRS_VXWORKS_MAJOR < 7 + #include #include -#include // Use C-linkage for the following helper functions +#ifdef __cplusplus extern "C" { +#endif // vxWorks-around: The required functions getrlimit() and getrlimit() are missing. // But we have the similar functions getprlimit() and setprlimit(), @@ -248,7 +227,7 @@ extern "C" { // TODO: getprlimit() and setprlimit() do exist for RTPs only, for whatever reason. // Thus for DKMs there would have to be another implementation. -#ifdef __RTP__ +#if defined ( __RTP__) && (_WRS_VXWORKS_MAJOR < 7) inline int getrlimit(int resource, struct rlimit *rlp){ return getprlimit(0, 0, resource, rlp); } @@ -273,23 +252,27 @@ inline int truncate(const char *p, off_t l){ return close(fd); } +#ifdef __GNUC__ +#define ___unused __attribute__((unused)) +#else +#define ___unused +#endif + // Fake symlink handling by dummy functions: -inline int symlink(const char*, const char*){ +inline int symlink(const char* path1 ___unused, const char* path2 ___unused){ // vxWorks has no symlinks -> always return an error! errno = EACCES; return -1; } -inline ssize_t readlink(const char*, char*, size_t){ +inline ssize_t readlink(const char* path1 ___unused, char* path2 ___unused, size_t size ___unused){ // vxWorks has no symlinks -> always return an error! errno = EACCES; return -1; } -// vxWorks claims to implement gettimeofday in sys/time.h -// but nevertheless does not provide it! See -// https://support.windriver.com/olsPortal/faces/maintenance/techtipDetail_noHeader.jspx?docId=16442&contentId=WR_TECHTIP_006256 -// We implement a surrogate version here via clock_gettime: +#if (_WRS_VXWORKS_MAJOR < 7) + inline int gettimeofday(struct timeval *tv, void * /*tzv*/) { struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); @@ -297,8 +280,20 @@ inline int gettimeofday(struct timeval *tv, void * /*tzv*/) { tv->tv_usec = ts.tv_nsec / 1000; return 0; } +#endif + +#ifdef __cplusplus +} // extern "C" +#endif + +/* + * moved to os/utils/unix/freind_h/times.h in VxWorks 7 + * to avoid conflict with MPL operator times + */ +#if (_WRS_VXWORKS_MAJOR < 7) +#ifdef __cplusplus -// vxWorks does provide neither struct tms nor function times()! +// vxWorks provides neither struct tms nor function times()! // We implement an empty dummy-function, simply setting the user // and system time to the half of thew actual system ticks-value // and the child user and system time to 0. @@ -315,7 +310,8 @@ struct tms{ clock_t tms_cstime; // System CPU time of terminated child processes }; -inline clock_t times(struct tms *t){ + + inline clock_t times(struct tms *t){ struct timespec ts; clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts); clock_t ticks(static_cast(static_cast(ts.tv_sec) * CLOCKS_PER_SEC + @@ -327,7 +323,16 @@ inline clock_t times(struct tms *t){ return ticks; } -} // extern "C" + +namespace std { + using ::times; +} +#endif // __cplusplus +#endif // _WRS_VXWORKS_MAJOR < 7 + + +#ifdef __cplusplus +extern "C" void bzero (void *, size_t); // FD_ZERO uses bzero() but doesn't include strings.h // Put the selfmade functions into the std-namespace, just in case namespace std { @@ -338,9 +343,11 @@ namespace std { using ::truncate; using ::symlink; using ::readlink; - using ::times; - using ::gettimeofday; +#if (_WRS_VXWORKS_MAJOR < 7) + using ::gettimeofday; +#endif } +#endif // __cplusplus // Some more macro-magic: // vxWorks-around: Some functions are not present or broken in vxWorks @@ -348,22 +355,79 @@ namespace std { // Include signal.h which might contain a typo to be corrected here #include - +#if (_WRS_VXWORKS_MAJOR < 7) #define getpagesize() sysconf(_SC_PAGESIZE) // getpagesize is deprecated anyway! +inline int lstat(p, b) { return stat(p, b); } // lstat() == stat(), as vxWorks has no symlinks! +#endif #ifndef S_ISSOCK # define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket? #endif -#define lstat(p, b) stat(p, b) // lstat() == stat(), as vxWorks has no symlinks! #ifndef FPE_FLTINV # define FPE_FLTINV (FPE_FLTSUB+1) // vxWorks has no FPE_FLTINV, so define one as a dummy #endif #if !defined(BUS_ADRALN) && defined(BUS_ADRALNR) # define BUS_ADRALN BUS_ADRALNR // Correct a supposed typo in vxWorks' #endif -//typedef int locale_t; // locale_t is a POSIX-extension, currently unpresent in vxWorks! +typedef int locale_t; // locale_t is a POSIX-extension, currently not present in vxWorks! // #include boilerplate code: -#include +#include // vxWorks lies about XSI conformance, there is no nl_types.h: #undef BOOST_HAS_NL_TYPES_H + +// vxWorks 7 adds C++11 support +// however it is optional, and does not match exactly the support determined +// by examining the Dinkum STL version and GCC version (or ICC and DCC) +#ifndef _WRS_CONFIG_LANG_LIB_CPLUS_CPLUS_USER_2011 +# define BOOST_NO_CXX11_ADDRESSOF // C11 addressof operator on memory location +# define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_ATOMIC_SMART_PTR +# define BOOST_NO_CXX11_NUMERIC_LIMITS // max_digits10 in test/../print_helper.hpp +# define BOOST_NO_CXX11_SMART_PTR +# define BOOST_NO_CXX11_STD_ALIGN + + +# define BOOST_NO_CXX11_HDR_ARRAY +# define BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_HDR_CHRONO +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_FORWARD_LIST //serialization/test/test_list.cpp +# define BOOST_NO_CXX11_HDR_FUNCTIONAL +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_RANDOM //math/../test_data.hpp +# define BOOST_NO_CXX11_HDR_RATIO +# define BOOST_NO_CXX11_HDR_REGEX +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +# define BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_TYPEINDEX +# define BOOST_NO_CXX11_HDR_TYPE_TRAITS +# define BOOST_NO_CXX11_HDR_TUPLE +# define BOOST_NO_CXX11_HDR_UNORDERED_MAP +# define BOOST_NO_CXX11_HDR_UNORDERED_SET +#else +#ifndef BOOST_SYSTEM_NO_DEPRECATED +# define BOOST_SYSTEM_NO_DEPRECATED // workaround link error in spirit +#endif +#endif + + +// NONE is used in enums in lamda and other libraries +#undef NONE +// restrict is an iostreams class +#undef restrict + +// use fake poll() from Unix layer in ASIO to get full functionality +// most libraries will use select() but this define allows 'iostream' functionality +// which is based on poll() only +#if (_WRS_VXWORKS_MAJOR > 6) +# ifndef BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR +# define BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR +# endif +#else +# define BOOST_ASIO_DISABLE_SERIAL_PORT +#endif + + diff --git a/third_party/boost_parts/boost/config/platform/zos.hpp b/third_party/boost_parts/boost/config/platform/zos.hpp new file mode 100644 index 00000000..fa77999e --- /dev/null +++ b/third_party/boost_parts/boost/config/platform/zos.hpp @@ -0,0 +1,32 @@ +// Copyright (c) 2017 Dynatrace +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org for most recent version. + +// Platform setup for IBM z/OS. + +#define BOOST_PLATFORM "IBM z/OS" + +#include // For __UU, __C99, __TR1, ... + +#if defined(__UU) +# define BOOST_HAS_GETTIMEOFDAY +#endif + +#if defined(_OPEN_THREADS) || defined(__SUSV3_THR) +# define BOOST_HAS_PTHREADS +# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE +# define BOOST_HAS_THREADS +#endif + +#if defined(__SUSV3) || defined(__SUSV3_THR) +# define BOOST_HAS_SCHED_YIELD +#endif + +#define BOOST_HAS_SIGACTION +#define BOOST_HAS_UNISTD_H +#define BOOST_HAS_DIRENT_H +#define BOOST_HAS_NL_TYPES_H diff --git a/third_party/boost_parts/boost/config/pragma_message.hpp b/third_party/boost_parts/boost/config/pragma_message.hpp new file mode 100644 index 00000000..b2c5ff2e --- /dev/null +++ b/third_party/boost_parts/boost/config/pragma_message.hpp @@ -0,0 +1,31 @@ +#ifndef BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED +#define BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED + +// Copyright 2017 Peter Dimov. +// +// Distributed under the Boost Software License, Version 1.0. +// +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt +// +// BOOST_PRAGMA_MESSAGE("message") +// +// Expands to the equivalent of #pragma message("message") +// +// Note that this header is C compatible. + +#include + +#if defined(BOOST_DISABLE_PRAGMA_MESSAGE) +# define BOOST_PRAGMA_MESSAGE(x) +#elif defined(__INTEL_COMPILER) +# define BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" BOOST_STRINGIZE(__LINE__) "): note: " x)) +#elif defined(__GNUC__) +# define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x))) +#elif defined(_MSC_VER) +# define BOOST_PRAGMA_MESSAGE(x) __pragma(message(__FILE__ "(" BOOST_STRINGIZE(__LINE__) "): note: " x)) +#else +# define BOOST_PRAGMA_MESSAGE(x) +#endif + +#endif // BOOST_CONFIG_PRAGMA_MESSAGE_HPP_INCLUDED diff --git a/third_party/boost_parts/boost/config/stdlib/dinkumware.hpp b/third_party/boost_parts/boost/config/stdlib/dinkumware.hpp index af8ddda5..641c2ae2 100644 --- a/third_party/boost_parts/boost/config/stdlib/dinkumware.hpp +++ b/third_party/boost_parts/boost/config/stdlib/dinkumware.hpp @@ -96,7 +96,8 @@ #include #endif #include -#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) +#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) \ + && !defined(__VXWORKS__) # define BOOST_NO_STD_TYPEINFO #endif @@ -147,16 +148,42 @@ # define BOOST_NO_CXX11_STD_ALIGN #endif +// Before 650 std::pointer_traits has a broken rebind template +#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 650 +# define BOOST_NO_CXX11_POINTER_TRAITS +#elif defined(BOOST_MSVC) && BOOST_MSVC < 1910 +# define BOOST_NO_CXX11_POINTER_TRAITS +#endif + #if defined(__has_include) #if !__has_include() # define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus < 201402 +#elif (__cplusplus < 201402) && !defined(_MSC_VER) # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif #elif !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif +// C++14 features +#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) +# define BOOST_NO_CXX14_STD_EXCHANGE +#endif + +// C++17 features +#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(BOOST_MSVC) || (BOOST_MSVC < 1910) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0) +# define BOOST_NO_CXX17_STD_APPLY +# define BOOST_NO_CXX17_ITERATOR_TRAITS +#endif +#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) +# define BOOST_NO_CXX17_STD_INVOKE +#endif + +#if !(!defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) || !defined(BOOST_MSVC) || (BOOST_MSVC < 1912) || !defined(_HAS_CXX17) || (_HAS_CXX17 == 0)) +// Deprecated std::iterator: +# define BOOST_NO_STD_ITERATOR +#endif + #if defined(BOOST_INTEL) && (BOOST_INTEL <= 1400) // Intel's compiler can't handle this header yet: # define BOOST_NO_CXX11_HDR_ATOMIC @@ -177,14 +204,47 @@ #endif #if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 650) -// If _HAS_AUTO_PTR_ETC is defined to 0, std::auto_ptr is not available. +// If _HAS_AUTO_PTR_ETC is defined to 0, std::auto_ptr and std::random_shuffle are not available. // See https://www.visualstudio.com/en-us/news/vs2015-vs.aspx#C++ // and http://blogs.msdn.com/b/vcblog/archive/2015/06/19/c-11-14-17-features-in-vs-2015-rtm.aspx # if defined(_HAS_AUTO_PTR_ETC) && (_HAS_AUTO_PTR_ETC == 0) # define BOOST_NO_AUTO_PTR +# define BOOST_NO_CXX98_RANDOM_SHUFFLE +# define BOOST_NO_CXX98_FUNCTION_BASE +# define BOOST_NO_CXX98_BINDERS # endif #endif + +// +// Things not supported by the CLR: +#ifdef _M_CEE +#ifndef BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_MUTEX +#endif +#ifndef BOOST_NO_CXX11_HDR_ATOMIC +# define BOOST_NO_CXX11_HDR_ATOMIC +#endif +#ifndef BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_FUTURE +#endif +#ifndef BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +#endif +#ifndef BOOST_NO_CXX11_HDR_THREAD +# define BOOST_NO_CXX11_HDR_THREAD +#endif +#ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX +# define BOOST_NO_CXX14_HDR_SHARED_MUTEX +#endif +#ifndef BOOST_NO_CXX14_STD_EXCHANGE +# define BOOST_NO_CXX14_STD_EXCHANGE +#endif +#ifndef BOOST_NO_FENV_H +# define BOOST_NO_FENV_H +#endif +#endif + #ifdef _CPPLIB_VER # define BOOST_DINKUMWARE_STDLIB _CPPLIB_VER #else diff --git a/third_party/boost_parts/boost/config/stdlib/libcomo.hpp b/third_party/boost_parts/boost/config/stdlib/libcomo.hpp index 941498d0..75ac2bb7 100644 --- a/third_party/boost_parts/boost/config/stdlib/libcomo.hpp +++ b/third_party/boost_parts/boost/config/stdlib/libcomo.hpp @@ -55,6 +55,7 @@ # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_POINTER_TRAITS # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL @@ -72,6 +73,14 @@ # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif +// C++14 features +# define BOOST_NO_CXX14_STD_EXCHANGE + +// C++17 features +# define BOOST_NO_CXX17_STD_APPLY +# define BOOST_NO_CXX17_STD_INVOKE +# define BOOST_NO_CXX17_ITERATOR_TRAITS + // // Intrinsic type_traits support. // The SGI STL has it's own __type_traits class, which diff --git a/third_party/boost_parts/boost/config/stdlib/libcpp.hpp b/third_party/boost_parts/boost/config/stdlib/libcpp.hpp index 645bb63b..1e77dca3 100644 --- a/third_party/boost_parts/boost/config/stdlib/libcpp.hpp +++ b/third_party/boost_parts/boost/config/stdlib/libcpp.hpp @@ -29,13 +29,18 @@ // aliases since members rebind_alloc and rebind_traits require it. #if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES) # define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_POINTER_TRAITS #endif #if __cplusplus < 201103 -# define BOOST_NO_CXX11_HDR_ARRAY +// +// These two appear to be somewhat useable in C++03 mode, there may be others... +// +//# define BOOST_NO_CXX11_HDR_ARRAY +//# define BOOST_NO_CXX11_HDR_FORWARD_LIST + # define BOOST_NO_CXX11_HDR_CODECVT # define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_FORWARD_LIST # define BOOST_NO_CXX11_HDR_INITIALIZER_LIST # define BOOST_NO_CXX11_HDR_MUTEX # define BOOST_NO_CXX11_HDR_RANDOM @@ -49,6 +54,7 @@ # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_POINTER_TRAITS # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL # define BOOST_NO_CXX11_STD_ALIGN @@ -75,6 +81,45 @@ #define BOOST_NO_STD_MESSAGES #endif +// C++14 features +#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L) +# define BOOST_NO_CXX14_STD_EXCHANGE +#endif + +// C++17 features +#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L) +# define BOOST_NO_CXX17_STD_INVOKE +#endif +#if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L) +# define BOOST_NO_CXX17_STD_APPLY +#endif +#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR) +# define BOOST_NO_AUTO_PTR +#endif +#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE) +# define BOOST_NO_CXX98_RANDOM_SHUFFLE +#endif +#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS) +# define BOOST_NO_CXX98_BINDERS +#endif + +#define BOOST_NO_CXX17_ITERATOR_TRAITS + +#if (_LIBCPP_VERSION <= 1101) && !defined(BOOST_NO_CXX11_THREAD_LOCAL) +// This is a bit of a sledgehammer, because really it's just libc++abi that has no +// support for thread_local, leading to linker errors such as +// "undefined reference to `__cxa_thread_atexit'". It is fixed in the +// most recent releases of libc++abi though... +# define BOOST_NO_CXX11_THREAD_LOCAL +#endif + +#if defined(__linux__) && !defined(BOOST_NO_CXX11_THREAD_LOCAL) +// After libc++-dev is installed on Trusty, clang++-libc++ almost works, +// except uses of `thread_local` fail with undefined reference to +// `__cxa_thread_atexit`. +# define BOOST_NO_CXX11_THREAD_LOCAL +#endif + #if defined(__has_include) #if !__has_include() # define BOOST_NO_CXX14_HDR_SHARED_MUTEX diff --git a/third_party/boost_parts/boost/config/stdlib/libstdcpp3.hpp b/third_party/boost_parts/boost/config/stdlib/libstdcpp3.hpp index 9718bedc..e99fe316 100644 --- a/third_party/boost_parts/boost/config/stdlib/libstdcpp3.hpp +++ b/third_party/boost_parts/boost/config/stdlib/libstdcpp3.hpp @@ -78,6 +78,7 @@ # include #endif +#ifndef __VXWORKS__ // VxWorks uses Dinkum, not GNU STL with GCC #if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 # define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx # define BOOST_HAS_SLIST @@ -91,6 +92,7 @@ # define BOOST_HASH_MAP_HEADER # endif #endif +#endif // // Decide whether we have C++11 support turned on: @@ -98,10 +100,11 @@ #if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103) # define BOOST_LIBSTDCXX11 #endif + // // Decide which version of libstdc++ we have, normally -// stdlibc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly -// __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the stdlibc++ +// libstdc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly +// __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the libstdc++ // developers. He also commented: // // "I'm not sure how useful __GLIBCXX__ is for your purposes, for instance in @@ -109,7 +112,7 @@ // Although 4.3.0 was released earlier than 4.2.4, it has better C++0x support // than any release in the 4.2 series." // -// Another resource for understanding stdlibc++ features is: +// Another resource for understanding libstdc++ features is: // http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x // // However, using the GCC version number fails when the compiler is clang since this @@ -122,7 +125,9 @@ // #ifdef __clang__ -#if __has_include() +#if __has_include() +# define BOOST_LIBSTDCXX_VERSION 60100 +#elif __has_include() # define BOOST_LIBSTDCXX_VERSION 50100 #elif __has_include() # define BOOST_LIBSTDCXX_VERSION 40900 @@ -139,6 +144,38 @@ #elif __has_include() # define BOOST_LIBSTDCXX_VERSION 40300 #endif + +#if (BOOST_LIBSTDCXX_VERSION < 50100) +// libstdc++ does not define this function as it's deprecated in C++11, but clang still looks for it, +// defining it here is a terrible cludge, but should get things working: +extern "C" char *gets (char *__s); +#endif +// +// clang is unable to parse some GCC headers, add those workarounds here: +// +#if BOOST_LIBSTDCXX_VERSION < 50000 +# define BOOST_NO_CXX11_HDR_REGEX +#endif +// +// GCC 4.7.x has no __cxa_thread_atexit which +// thread_local objects require for cleanup: +// +#if BOOST_LIBSTDCXX_VERSION < 40800 +# define BOOST_NO_CXX11_THREAD_LOCAL +#endif +// +// Early clang versions can handle , not exactly sure which versions +// but certainly up to clang-3.8 and gcc-4.6: +// +#if (__clang_major__ < 5) +# if BOOST_LIBSTDCXX_VERSION < 40800 +# define BOOST_NO_CXX11_HDR_FUTURE +# define BOOST_NO_CXX11_HDR_MUTEX +# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +# define BOOST_NO_CXX11_HDR_CHRONO +# endif +#endif + // // GCC 4.8 and 9 add working versions of and respectively. // However, we have no test for these as the headers were present but broken @@ -151,13 +188,29 @@ // Oracle Solaris compiler uses it's own verison of libstdc++ but doesn't // set __GNUC__ // +#if __SUNPRO_CC >= 0x5140 +#define BOOST_LIBSTDCXX_VERSION 50100 +#else #define BOOST_LIBSTDCXX_VERSION 40800 #endif +#endif #if !defined(BOOST_LIBSTDCXX_VERSION) # define BOOST_LIBSTDCXX_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #endif +// std::auto_ptr isn't provided with _GLIBCXX_DEPRECATED=0 (GCC 4.5 and earlier) +// or _GLIBCXX_USE_DEPRECATED=0 (GCC 4.6 and later). +#if defined(BOOST_LIBSTDCXX11) +# if BOOST_LIBSTDCXX_VERSION < 40600 +# if !_GLIBCXX_DEPRECATED +# define BOOST_NO_AUTO_PTR +# endif +# elif !_GLIBCXX_USE_DEPRECATED +# define BOOST_NO_AUTO_PTR +# endif +#endif + // C++0x headers in GCC 4.3.0 and later // #if (BOOST_LIBSTDCXX_VERSION < 40300) || !defined(BOOST_LIBSTDCXX11) @@ -196,15 +249,17 @@ #if (BOOST_LIBSTDCXX_VERSION < 40600) || !defined(BOOST_LIBSTDCXX11) # define BOOST_NO_CXX11_HDR_TYPEINDEX # define BOOST_NO_CXX11_ADDRESSOF +# define BOOST_NO_CXX17_ITERATOR_TRAITS #endif // C++0x features in GCC 4.7.0 and later // #if (BOOST_LIBSTDCXX_VERSION < 40700) || !defined(BOOST_LIBSTDCXX11) // Note that although existed prior to 4.7, "steady_clock" is spelled "monotonic_clock" -// so 4.7.0 is the first truely conforming one. +// so 4.7.0 is the first truly conforming one. # define BOOST_NO_CXX11_HDR_CHRONO # define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_POINTER_TRAITS #endif // C++0x features in GCC 4.8.0 and later // @@ -220,6 +275,9 @@ // even for the simplest patterns such as "\d" or "[0-9]". This is the case at least in gcc up to 4.8, inclusively. # define BOOST_NO_CXX11_HDR_REGEX #endif +#if (BOOST_LIBSTDCXX_VERSION < 40900) || (__cplusplus <= 201103) +# define BOOST_NO_CXX14_STD_EXCHANGE +#endif #if defined(__clang_major__) && ((__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 7))) // As of clang-3.6, libstdc++ header throws up errors with clang: @@ -235,6 +293,16 @@ # define BOOST_NO_CXX11_STD_ALIGN #endif +// +// C++17 features in GCC 6.1 and later +// +#if (BOOST_LIBSTDCXX_VERSION < 60100) || (__cplusplus <= 201402L) +# define BOOST_NO_CXX17_STD_INVOKE +#endif +#if (BOOST_LIBSTDCXX_VERSION < 70100) || (__cplusplus <= 201402L) +# define BOOST_NO_CXX17_STD_APPLY +#endif + #if defined(__has_include) #if !__has_include() # define BOOST_NO_CXX14_HDR_SHARED_MUTEX @@ -247,7 +315,7 @@ // // Headers not present on Solaris with the Oracle compiler: -#if defined(__SUNPRO_CC) +#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5140) #define BOOST_NO_CXX11_HDR_FUTURE #define BOOST_NO_CXX11_HDR_FORWARD_LIST #define BOOST_NO_CXX11_HDR_ATOMIC diff --git a/third_party/boost_parts/boost/config/stdlib/modena.hpp b/third_party/boost_parts/boost/config/stdlib/modena.hpp index 7a85e0cd..81919e01 100644 --- a/third_party/boost_parts/boost/config/stdlib/modena.hpp +++ b/third_party/boost_parts/boost/config/stdlib/modena.hpp @@ -44,6 +44,7 @@ # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_POINTER_TRAITS # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL @@ -61,6 +62,14 @@ # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif +// C++14 features +# define BOOST_NO_CXX14_STD_EXCHANGE + +// C++17 features +# define BOOST_NO_CXX17_STD_APPLY +# define BOOST_NO_CXX17_STD_INVOKE +# define BOOST_NO_CXX17_ITERATOR_TRAITS + #define BOOST_STDLIB "Modena C++ standard library" diff --git a/third_party/boost_parts/boost/config/stdlib/msl.hpp b/third_party/boost_parts/boost/config/stdlib/msl.hpp index dd2775e1..0e2e2afe 100644 --- a/third_party/boost_parts/boost/config/stdlib/msl.hpp +++ b/third_party/boost_parts/boost/config/stdlib/msl.hpp @@ -34,7 +34,7 @@ # define BOOST_HAS_UNISTD_H # endif // boilerplate code: -# include +# include #endif #if defined(_MWMT) || _MSL_THREADSAFE @@ -68,6 +68,7 @@ # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_POINTER_TRAITS # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL @@ -85,4 +86,12 @@ # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif +// C++14 features +# define BOOST_NO_CXX14_STD_EXCHANGE + +// C++17 features +# define BOOST_NO_CXX17_STD_APPLY +# define BOOST_NO_CXX17_STD_INVOKE +# define BOOST_NO_CXX17_ITERATOR_TRAITS + #define BOOST_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__) diff --git a/third_party/boost_parts/boost/config/stdlib/roguewave.hpp b/third_party/boost_parts/boost/config/stdlib/roguewave.hpp index 97a2b0b9..df602155 100644 --- a/third_party/boost_parts/boost/config/stdlib/roguewave.hpp +++ b/third_party/boost_parts/boost/config/stdlib/roguewave.hpp @@ -180,6 +180,7 @@ # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_POINTER_TRAITS # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL @@ -196,3 +197,11 @@ #else # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif + +// C++14 features +# define BOOST_NO_CXX14_STD_EXCHANGE + +// C++17 features +# define BOOST_NO_CXX17_STD_APPLY +# define BOOST_NO_CXX17_STD_INVOKE +# define BOOST_NO_CXX17_ITERATOR_TRAITS diff --git a/third_party/boost_parts/boost/config/stdlib/sgi.hpp b/third_party/boost_parts/boost/config/stdlib/sgi.hpp index c8052717..0c8ab2e4 100644 --- a/third_party/boost_parts/boost/config/stdlib/sgi.hpp +++ b/third_party/boost_parts/boost/config/stdlib/sgi.hpp @@ -138,6 +138,7 @@ # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_POINTER_TRAITS # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL @@ -155,4 +156,12 @@ # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif -#define BOOST_STDLIB "SGI standard library" \ No newline at end of file +// C++14 features +# define BOOST_NO_CXX14_STD_EXCHANGE + +// C++17 features +# define BOOST_NO_CXX17_STD_APPLY +# define BOOST_NO_CXX17_STD_INVOKE +# define BOOST_NO_CXX17_ITERATOR_TRAITS + +#define BOOST_STDLIB "SGI standard library" diff --git a/third_party/boost_parts/boost/config/stdlib/stlport.hpp b/third_party/boost_parts/boost/config/stdlib/stlport.hpp index bbc4176c..2e304e2b 100644 --- a/third_party/boost_parts/boost/config/stdlib/stlport.hpp +++ b/third_party/boost_parts/boost/config/stdlib/stlport.hpp @@ -228,6 +228,7 @@ namespace boost { using std::min; using std::max; } # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_POINTER_TRAITS # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL @@ -245,4 +246,12 @@ namespace boost { using std::min; using std::max; } # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif +// C++14 features +# define BOOST_NO_CXX14_STD_EXCHANGE + +// C++17 features +# define BOOST_NO_CXX17_STD_APPLY +# define BOOST_NO_CXX17_STD_INVOKE +# define BOOST_NO_CXX17_ITERATOR_TRAITS + #define BOOST_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT) diff --git a/third_party/boost_parts/boost/config/stdlib/vacpp.hpp b/third_party/boost_parts/boost/config/stdlib/vacpp.hpp index 4ccd0d24..c4e1fb18 100644 --- a/third_party/boost_parts/boost/config/stdlib/vacpp.hpp +++ b/third_party/boost_parts/boost/config/stdlib/vacpp.hpp @@ -44,6 +44,7 @@ # define BOOST_NO_CXX11_HDR_UNORDERED_SET # define BOOST_NO_CXX11_NUMERIC_LIMITS # define BOOST_NO_CXX11_ALLOCATOR +# define BOOST_NO_CXX11_POINTER_TRAITS # define BOOST_NO_CXX11_ATOMIC_SMART_PTR # define BOOST_NO_CXX11_SMART_PTR # define BOOST_NO_CXX11_HDR_FUNCTIONAL @@ -61,4 +62,12 @@ # define BOOST_NO_CXX14_HDR_SHARED_MUTEX #endif +// C++14 features +# define BOOST_NO_CXX14_STD_EXCHANGE + +// C++17 features +# define BOOST_NO_CXX17_STD_APPLY +# define BOOST_NO_CXX17_STD_INVOKE +# define BOOST_NO_CXX17_ITERATOR_TRAITS + #define BOOST_STDLIB "Visual Age default standard library" diff --git a/third_party/boost_parts/boost/config/stdlib/xlcpp_zos.hpp b/third_party/boost_parts/boost/config/stdlib/xlcpp_zos.hpp new file mode 100644 index 00000000..4d5beb18 --- /dev/null +++ b/third_party/boost_parts/boost/config/stdlib/xlcpp_zos.hpp @@ -0,0 +1,60 @@ +// Copyright (c) 2017 Dynatrace +// +// Distributed under the Boost Software License, Version 1.0. +// See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt + +// See http://www.boost.org for most recent version. + +// Standard library setup for IBM z/OS XL C/C++ compiler. + +// Oldest library version currently supported is 2.1 (V2R1) +#if __TARGET_LIB__ < 0x42010000 +# error "Library version not supported or configured - please reconfigure" +#endif + +#if __TARGET_LIB__ > 0x42010000 +# if defined(BOOST_ASSERT_CONFIG) +# error "Unknown library version - please run the configure tests and report the results" +# endif +#endif + +#define BOOST_STDLIB "IBM z/OS XL C/C++ standard library" + +#define BOOST_HAS_MACRO_USE_FACET + +#define BOOST_NO_CXX11_HDR_TYPE_TRAITS +#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST + +#define BOOST_NO_CXX11_ADDRESSOF +#define BOOST_NO_CXX11_SMART_PTR +#define BOOST_NO_CXX11_ATOMIC_SMART_PTR +#define BOOST_NO_CXX11_NUMERIC_LIMITS +#define BOOST_NO_CXX11_ALLOCATOR +#define BOOST_NO_CXX11_POINTER_TRAITS +#define BOOST_NO_CXX11_HDR_FUNCTIONAL +#define BOOST_NO_CXX11_HDR_UNORDERED_SET +#define BOOST_NO_CXX11_HDR_UNORDERED_MAP +#define BOOST_NO_CXX11_HDR_TYPEINDEX +#define BOOST_NO_CXX11_HDR_TUPLE +#define BOOST_NO_CXX11_HDR_THREAD +#define BOOST_NO_CXX11_HDR_SYSTEM_ERROR +#define BOOST_NO_CXX11_HDR_REGEX +#define BOOST_NO_CXX11_HDR_RATIO +#define BOOST_NO_CXX11_HDR_RANDOM +#define BOOST_NO_CXX11_HDR_MUTEX +#define BOOST_NO_CXX11_HDR_FUTURE +#define BOOST_NO_CXX11_HDR_FORWARD_LIST +#define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE +#define BOOST_NO_CXX11_HDR_CODECVT +#define BOOST_NO_CXX11_HDR_CHRONO +#define BOOST_NO_CXX11_HDR_ATOMIC +#define BOOST_NO_CXX11_HDR_ARRAY +#define BOOST_NO_CXX11_STD_ALIGN + +#define BOOST_NO_CXX14_STD_EXCHANGE +#define BOOST_NO_CXX14_HDR_SHARED_MUTEX + +#define BOOST_NO_CXX17_STD_INVOKE +#define BOOST_NO_CXX17_STD_APPLY +#define BOOST_NO_CXX17_ITERATOR_TRAITS diff --git a/third_party/boost_parts/boost/config/workaround.hpp b/third_party/boost_parts/boost/config/workaround.hpp new file mode 100644 index 00000000..fca8f3ab --- /dev/null +++ b/third_party/boost_parts/boost/config/workaround.hpp @@ -0,0 +1,279 @@ +// Copyright David Abrahams 2002. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +#ifndef BOOST_CONFIG_WORKAROUND_HPP +#define BOOST_CONFIG_WORKAROUND_HPP + +// Compiler/library version workaround macro +// +// Usage: +// +// #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) +// // workaround for eVC4 and VC6 +// ... // workaround code here +// #endif +// +// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the +// first argument must be undefined or expand to a numeric +// value. The above expands to: +// +// (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300 +// +// When used for workarounds that apply to the latest known version +// and all earlier versions of a compiler, the following convention +// should be observed: +// +// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301)) +// +// The version number in this case corresponds to the last version in +// which the workaround was known to have been required. When +// BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro +// BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates +// the workaround for any version of the compiler. When +// BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or +// error will be issued if the compiler version exceeds the argument +// to BOOST_TESTED_AT(). This can be used to locate workarounds which +// may be obsoleted by newer versions. + +#ifndef BOOST_STRICT_CONFIG + +#include + +#ifndef __BORLANDC__ +#define __BORLANDC___WORKAROUND_GUARD 1 +#else +#define __BORLANDC___WORKAROUND_GUARD 0 +#endif +#ifndef __CODEGEARC__ +#define __CODEGEARC___WORKAROUND_GUARD 1 +#else +#define __CODEGEARC___WORKAROUND_GUARD 0 +#endif +#ifndef _MSC_VER +#define _MSC_VER_WORKAROUND_GUARD 1 +#else +#define _MSC_VER_WORKAROUND_GUARD 0 +#endif +#ifndef _MSC_FULL_VER +#define _MSC_FULL_VER_WORKAROUND_GUARD 1 +#else +#define _MSC_FULL_VER_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_MSVC +#define BOOST_MSVC_WORKAROUND_GUARD 1 +#else +#define BOOST_MSVC_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_MSVC_FULL_VER +#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1 +#else +#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0 +#endif +#ifndef __GNUC__ +#define __GNUC___WORKAROUND_GUARD 1 +#else +#define __GNUC___WORKAROUND_GUARD 0 +#endif +#ifndef __GNUC_MINOR__ +#define __GNUC_MINOR___WORKAROUND_GUARD 1 +#else +#define __GNUC_MINOR___WORKAROUND_GUARD 0 +#endif +#ifndef __GNUC_PATCHLEVEL__ +#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 1 +#else +#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_GCC +#define BOOST_GCC_WORKAROUND_GUARD 1 +#define BOOST_GCC_VERSION_WORKAROUND_GUARD 1 +#else +#define BOOST_GCC_WORKAROUND_GUARD 0 +#define BOOST_GCC_VERSION_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_XLCPP_ZOS +#define BOOST_XLCPP_ZOS_WORKAROUND_GUARD 1 +#else +#define BOOST_XLCPP_ZOS_WORKAROUND_GUARD 0 +#endif +#ifndef __IBMCPP__ +#define __IBMCPP___WORKAROUND_GUARD 1 +#else +#define __IBMCPP___WORKAROUND_GUARD 0 +#endif +#ifndef __SUNPRO_CC +#define __SUNPRO_CC_WORKAROUND_GUARD 1 +#else +#define __SUNPRO_CC_WORKAROUND_GUARD 0 +#endif +#ifndef __DECCXX_VER +#define __DECCXX_VER_WORKAROUND_GUARD 1 +#else +#define __DECCXX_VER_WORKAROUND_GUARD 0 +#endif +#ifndef __MWERKS__ +#define __MWERKS___WORKAROUND_GUARD 1 +#else +#define __MWERKS___WORKAROUND_GUARD 0 +#endif +#ifndef __EDG__ +#define __EDG___WORKAROUND_GUARD 1 +#else +#define __EDG___WORKAROUND_GUARD 0 +#endif +#ifndef __EDG_VERSION__ +#define __EDG_VERSION___WORKAROUND_GUARD 1 +#else +#define __EDG_VERSION___WORKAROUND_GUARD 0 +#endif +#ifndef __HP_aCC +#define __HP_aCC_WORKAROUND_GUARD 1 +#else +#define __HP_aCC_WORKAROUND_GUARD 0 +#endif +#ifndef __hpxstd98 +#define __hpxstd98_WORKAROUND_GUARD 1 +#else +#define __hpxstd98_WORKAROUND_GUARD 0 +#endif +#ifndef _CRAYC +#define _CRAYC_WORKAROUND_GUARD 1 +#else +#define _CRAYC_WORKAROUND_GUARD 0 +#endif +#ifndef __DMC__ +#define __DMC___WORKAROUND_GUARD 1 +#else +#define __DMC___WORKAROUND_GUARD 0 +#endif +#ifndef MPW_CPLUS +#define MPW_CPLUS_WORKAROUND_GUARD 1 +#else +#define MPW_CPLUS_WORKAROUND_GUARD 0 +#endif +#ifndef __COMO__ +#define __COMO___WORKAROUND_GUARD 1 +#else +#define __COMO___WORKAROUND_GUARD 0 +#endif +#ifndef __COMO_VERSION__ +#define __COMO_VERSION___WORKAROUND_GUARD 1 +#else +#define __COMO_VERSION___WORKAROUND_GUARD 0 +#endif +#ifndef __INTEL_COMPILER +#define __INTEL_COMPILER_WORKAROUND_GUARD 1 +#else +#define __INTEL_COMPILER_WORKAROUND_GUARD 0 +#endif +#ifndef __ICL +#define __ICL_WORKAROUND_GUARD 1 +#else +#define __ICL_WORKAROUND_GUARD 0 +#endif +#ifndef _COMPILER_VERSION +#define _COMPILER_VERSION_WORKAROUND_GUARD 1 +#else +#define _COMPILER_VERSION_WORKAROUND_GUARD 0 +#endif + +#ifndef _RWSTD_VER +#define _RWSTD_VER_WORKAROUND_GUARD 1 +#else +#define _RWSTD_VER_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_RWSTD_VER +#define BOOST_RWSTD_VER_WORKAROUND_GUARD 1 +#else +#define BOOST_RWSTD_VER_WORKAROUND_GUARD 0 +#endif +#ifndef __GLIBCPP__ +#define __GLIBCPP___WORKAROUND_GUARD 1 +#else +#define __GLIBCPP___WORKAROUND_GUARD 0 +#endif +#ifndef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC +#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1 +#else +#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 0 +#endif +#ifndef __SGI_STL_PORT +#define __SGI_STL_PORT_WORKAROUND_GUARD 1 +#else +#define __SGI_STL_PORT_WORKAROUND_GUARD 0 +#endif +#ifndef _STLPORT_VERSION +#define _STLPORT_VERSION_WORKAROUND_GUARD 1 +#else +#define _STLPORT_VERSION_WORKAROUND_GUARD 0 +#endif +#ifndef __LIBCOMO_VERSION__ +#define __LIBCOMO_VERSION___WORKAROUND_GUARD 1 +#else +#define __LIBCOMO_VERSION___WORKAROUND_GUARD 0 +#endif +#ifndef _CPPLIB_VER +#define _CPPLIB_VER_WORKAROUND_GUARD 1 +#else +#define _CPPLIB_VER_WORKAROUND_GUARD 0 +#endif + +#ifndef BOOST_INTEL_CXX_VERSION +#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 1 +#else +#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_INTEL_WIN +#define BOOST_INTEL_WIN_WORKAROUND_GUARD 1 +#else +#define BOOST_INTEL_WIN_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_DINKUMWARE_STDLIB +#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 1 +#else +#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 0 +#endif +#ifndef BOOST_INTEL +#define BOOST_INTEL_WORKAROUND_GUARD 1 +#else +#define BOOST_INTEL_WORKAROUND_GUARD 0 +#endif +// Always define to zero, if it's used it'll be defined my MPL: +#define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0 + +#define BOOST_WORKAROUND(symbol, test) \ + ((symbol ## _WORKAROUND_GUARD + 0 == 0) && \ + (symbol != 0) && (1 % (( (symbol test) ) + 1))) +// ^ ^ ^ ^ +// The extra level of parenthesis nesting above, along with the +// BOOST_OPEN_PAREN indirection below, is required to satisfy the +// broken preprocessor in MWCW 8.3 and earlier. +// +// The basic mechanism works as follows: +// (symbol test) + 1 => if (symbol test) then 2 else 1 +// 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0 +// +// The complication with % is for cooperation with BOOST_TESTED_AT(). +// When "test" is BOOST_TESTED_AT(x) and +// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined, +// +// symbol test => if (symbol <= x) then 1 else -1 +// (symbol test) + 1 => if (symbol <= x) then 2 else 0 +// 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero +// + +#ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS +# define BOOST_OPEN_PAREN ( +# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1 +#else +# define BOOST_TESTED_AT(value) != ((value)-(value)) +#endif + +#else + +#define BOOST_WORKAROUND(symbol, test) 0 + +#endif + +#endif // BOOST_CONFIG_WORKAROUND_HPP diff --git a/third_party/boost_parts/boost/container/allocator_traits.hpp b/third_party/boost_parts/boost/container/allocator_traits.hpp index e6a882e5..af32f182 100644 --- a/third_party/boost_parts/boost/container/allocator_traits.hpp +++ b/third_party/boost_parts/boost/container/allocator_traits.hpp @@ -50,21 +50,21 @@ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace container_detail { +#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl { #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 2 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 2 #include #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME destroy -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace container_detail { +#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl { #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 1 #include #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME construct -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace container_detail { +#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl { #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1 #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 9 @@ -87,7 +87,7 @@ BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_select_on_container_copy_co } //namespace allocator_traits_detail { -namespace container_detail { +namespace dtl { //workaround needed for C++03 compilers with no construct() //supporting rvalue references @@ -121,7 +121,7 @@ BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(is_always_equal) BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type) BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(is_partially_propagable) -} //namespace container_detail { +} //namespace dtl { #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED @@ -196,59 +196,59 @@ struct allocator_traits { typedef see_documentation type; }; #else //pointer - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator, + typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, pointer, value_type*) pointer; //const_pointer - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Allocator, + typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator, const_pointer, typename boost::intrusive::pointer_traits::template rebind_pointer) const_pointer; //reference - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator, - reference, typename container_detail::unvoid_ref::type) + typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, + reference, typename dtl::unvoid_ref::type) reference; //const_reference - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator, - const_reference, typename container_detail::unvoid_ref::type) + typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, + const_reference, typename dtl::unvoid_ref::type) const_reference; //void_pointer - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Allocator, + typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator, void_pointer, typename boost::intrusive::pointer_traits::template rebind_pointer) void_pointer; //const_void_pointer - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, Allocator, + typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator, const_void_pointer, typename boost::intrusive::pointer_traits::template rebind_pointer) const_void_pointer; //difference_type - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator, + typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, difference_type, std::ptrdiff_t) difference_type; //size_type - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator, + typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, size_type, std::size_t) size_type; //propagate_on_container_copy_assignment - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator, - propagate_on_container_copy_assignment, container_detail::false_type) + typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, + propagate_on_container_copy_assignment, dtl::false_type) propagate_on_container_copy_assignment; //propagate_on_container_move_assignment - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator, - propagate_on_container_move_assignment, container_detail::false_type) + typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, + propagate_on_container_move_assignment, dtl::false_type) propagate_on_container_move_assignment; //propagate_on_container_swap - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator, - propagate_on_container_swap, container_detail::false_type) + typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, + propagate_on_container_swap, dtl::false_type) propagate_on_container_swap; //is_always_equal - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator, - is_always_equal, container_detail::is_empty) + typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, + is_always_equal, dtl::is_empty) is_always_equal; //is_partially_propagable - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator, - is_partially_propagable, container_detail::false_type) + typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator, + is_partially_propagable, dtl::false_type) is_partially_propagable; //rebind_alloc & rebind_traits @@ -289,143 +289,143 @@ struct allocator_traits //! Returns: a.allocate(n) //! - static pointer allocate(Allocator &a, size_type n) + BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n) { return a.allocate(n); } //! Returns: a.deallocate(p, n) //! //! Throws: Nothing - static void deallocate(Allocator &a, pointer p, size_type n) + BOOST_CONTAINER_FORCEINLINE static void deallocate(Allocator &a, pointer p, size_type n) { a.deallocate(p, n); } //! Effects: calls a.allocate(n, p) if that call is well-formed; //! otherwise, invokes a.allocate(n) - static pointer allocate(Allocator &a, size_type n, const_void_pointer p) + BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n, const_void_pointer p) { - const bool value = boost::container::container_detail:: + const bool value = boost::container::dtl:: has_member_function_callable_with_allocate ::value; - container_detail::bool_ flag; + dtl::bool_ flag; return allocator_traits::priv_allocate(flag, a, n, p); } //! Effects: calls a.destroy(p) if that call is well-formed; //! otherwise, invokes p->~T(). template - static void destroy(Allocator &a, T*p) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static void destroy(Allocator &a, T*p) BOOST_NOEXCEPT_OR_NOTHROW { typedef T* destroy_pointer; - const bool value = boost::container::container_detail:: + const bool value = boost::container::dtl:: has_member_function_callable_with_destroy ::value; - container_detail::bool_ flag; + dtl::bool_ flag; allocator_traits::priv_destroy(flag, a, p); } //! Returns: a.max_size() if that expression is well-formed; otherwise, //! numeric_limits::max(). - static size_type max_size(const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static size_type max_size(const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW { const bool value = allocator_traits_detail::has_max_size::value; - container_detail::bool_ flag; + dtl::bool_ flag; return allocator_traits::priv_max_size(flag, a); } //! Returns: a.select_on_container_copy_construction() if that expression is well-formed; //! otherwise, a. - static BOOST_CONTAINER_DOC1ST(Allocator, - typename container_detail::if_c + BOOST_CONTAINER_FORCEINLINE static BOOST_CONTAINER_DOC1ST(Allocator, + typename dtl::if_c < allocator_traits_detail::has_select_on_container_copy_construction::value BOOST_MOVE_I Allocator BOOST_MOVE_I const Allocator & >::type) select_on_container_copy_construction(const Allocator &a) { const bool value = allocator_traits_detail::has_select_on_container_copy_construction ::value; - container_detail::bool_ flag; + dtl::bool_ flag; return allocator_traits::priv_select_on_container_copy_construction(flag, a); } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) //! Effects: calls a.construct(p, std::forward(args)...) if that call is well-formed; - //! otherwise, invokes ::new (static_cast(p)) T(std::forward(args)...) + //! otherwise, invokes `placement new` (static_cast(p)) T(std::forward(args)...) template - static void construct(Allocator & a, T* p, BOOST_FWD_REF(Args)... args) + BOOST_CONTAINER_FORCEINLINE static void construct(Allocator & a, T* p, BOOST_FWD_REF(Args)... args) { static const bool value = ::boost::move_detail::and_ - < container_detail::is_not_std_allocator - , boost::container::container_detail::has_member_function_callable_with_construct + < dtl::is_not_std_allocator + , boost::container::dtl::has_member_function_callable_with_construct < Allocator, T*, Args... > >::value; - container_detail::bool_ flag; + dtl::bool_ flag; allocator_traits::priv_construct(flag, a, p, ::boost::forward(args)...); } #endif //! Returns: a.storage_is_unpropagable(p) if is_partially_propagable::value is true; otherwise, //! false. - static bool storage_is_unpropagable(const Allocator &a, pointer p) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static bool storage_is_unpropagable(const Allocator &a, pointer p) BOOST_NOEXCEPT_OR_NOTHROW { - container_detail::bool_ flag; + dtl::bool_ flag; return allocator_traits::priv_storage_is_unpropagable(flag, a, p); } //! Returns: true if is_always_equal::value == true, otherwise, //! a == b. - static bool equal(const Allocator &a, const Allocator &b) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static bool equal(const Allocator &a, const Allocator &b) BOOST_NOEXCEPT_OR_NOTHROW { - container_detail::bool_ flag; + dtl::bool_ flag; return allocator_traits::priv_equal(flag, a, b); } #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) private: - static pointer priv_allocate(container_detail::true_type, Allocator &a, size_type n, const_void_pointer p) + BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(dtl::true_type, Allocator &a, size_type n, const_void_pointer p) { return a.allocate(n, p); } - static pointer priv_allocate(container_detail::false_type, Allocator &a, size_type n, const_void_pointer) + BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(dtl::false_type, Allocator &a, size_type n, const_void_pointer) { return a.allocate(n); } template - static void priv_destroy(container_detail::true_type, Allocator &a, T* p) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static void priv_destroy(dtl::true_type, Allocator &a, T* p) BOOST_NOEXCEPT_OR_NOTHROW { a.destroy(p); } template - static void priv_destroy(container_detail::false_type, Allocator &, T* p) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static void priv_destroy(dtl::false_type, Allocator &, T* p) BOOST_NOEXCEPT_OR_NOTHROW { p->~T(); (void)p; } - static size_type priv_max_size(container_detail::true_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(dtl::true_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW { return a.max_size(); } - static size_type priv_max_size(container_detail::false_type, const Allocator &) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(dtl::false_type, const Allocator &) BOOST_NOEXCEPT_OR_NOTHROW { return size_type(-1)/sizeof(value_type); } - static Allocator priv_select_on_container_copy_construction(container_detail::true_type, const Allocator &a) + BOOST_CONTAINER_FORCEINLINE static Allocator priv_select_on_container_copy_construction(dtl::true_type, const Allocator &a) { return a.select_on_container_copy_construction(); } - static const Allocator &priv_select_on_container_copy_construction(container_detail::false_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW + BOOST_CONTAINER_FORCEINLINE static const Allocator &priv_select_on_container_copy_construction(dtl::false_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW { return a; } #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template - static void priv_construct(container_detail::true_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args) + BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::true_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args) { a.construct( p, ::boost::forward(args)...); } template - static void priv_construct(container_detail::false_type, Allocator &, T *p, BOOST_FWD_REF(Args) ...args) + BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p, BOOST_FWD_REF(Args) ...args) { ::new((void*)p, boost_container_new_t()) T(::boost::forward(args)...); } #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) public: #define BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL(N) \ template\ - static void construct(Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + BOOST_CONTAINER_FORCEINLINE static void construct(Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ {\ static const bool value = ::boost::move_detail::and_ \ - < container_detail::is_not_std_allocator \ - , boost::container::container_detail::has_member_function_callable_with_construct \ + < dtl::is_not_std_allocator \ + , boost::container::dtl::has_member_function_callable_with_construct \ < Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_FWD_T##N > \ >::value; \ - container_detail::bool_ flag;\ + dtl::bool_ flag;\ (priv_construct)(flag, a, p BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ }\ // @@ -438,11 +438,11 @@ struct allocator_traits ///////////////////////////////// #define BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL(N) \ template\ - static void priv_construct(container_detail::true_type, Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::true_type, Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { a.construct( p BOOST_MOVE_I##N BOOST_MOVE_FWD##N ); }\ \ template\ - static void priv_construct(container_detail::false_type, Allocator &, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ + BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ { ::new((void*)p, boost_container_new_t()) T(BOOST_MOVE_FWD##N); }\ // BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL) @@ -451,19 +451,19 @@ struct allocator_traits #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template - static void priv_construct(container_detail::false_type, Allocator &, T *p, const ::boost::container::default_init_t&) + BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p, const ::boost::container::default_init_t&) { ::new((void*)p, boost_container_new_t()) T; } - static bool priv_storage_is_unpropagable(container_detail::true_type, const Allocator &a, pointer p) + BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(dtl::true_type, const Allocator &a, pointer p) { return a.storage_is_unpropagable(p); } - static bool priv_storage_is_unpropagable(container_detail::false_type, const Allocator &, pointer) + BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(dtl::false_type, const Allocator &, pointer) { return false; } - static bool priv_equal(container_detail::true_type, const Allocator &, const Allocator &) + BOOST_CONTAINER_FORCEINLINE static bool priv_equal(dtl::true_type, const Allocator &, const Allocator &) { return true; } - static bool priv_equal(container_detail::false_type, const Allocator &a, const Allocator &b) + BOOST_CONTAINER_FORCEINLINE static bool priv_equal(dtl::false_type, const Allocator &a, const Allocator &b) { return a == b; } #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) diff --git a/third_party/boost_parts/boost/container/container_fwd.hpp b/third_party/boost_parts/boost/container/container_fwd.hpp index e85a6ce9..e4fe6f85 100644 --- a/third_party/boost_parts/boost/container/container_fwd.hpp +++ b/third_party/boost_parts/boost/container/container_fwd.hpp @@ -67,7 +67,7 @@ namespace detail{ //Create namespace to avoid compilation errors }}} -namespace boost{ namespace container{ namespace container_detail{ +namespace boost{ namespace container{ namespace dtl{ namespace bi = boost::intrusive; namespace bid = boost::intrusive::detail; }}} @@ -88,23 +88,14 @@ namespace boost{ namespace container{ namespace pmr{ namespace boost { namespace container { -//! Enumeration used to configure ordered associative containers -//! with a concrete tree implementation. -enum tree_type_enum -{ - red_black_tree, - avl_tree, - scapegoat_tree, - splay_tree -}; - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED template class new_allocator; template > + ,class Allocator = new_allocator + ,class Options = void> class vector; template > class slist; -template -struct tree_opt; - -typedef tree_opt tree_assoc_defaults; - template ,class Allocator = new_allocator - ,class Options = tree_assoc_defaults > + ,class Options = void> class set; template ,class Allocator = new_allocator - ,class Options = tree_assoc_defaults > + ,class Options = void > class multiset; template ,class Allocator = new_allocator > - ,class Options = tree_assoc_defaults > + ,class Options = void > class map; template ,class Allocator = new_allocator > - ,class Options = tree_assoc_defaults > + ,class Options = void > class multimap; template -//! - optimize_size -typedef implementation_defined tree_assoc_defaults; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED //! Type used to tag that the input range is diff --git a/third_party/boost_parts/boost/container/detail/memory_util.hpp b/third_party/boost_parts/boost/container/detail/memory_util.hpp deleted file mode 100644 index ed899548..00000000 --- a/third_party/boost_parts/boost/container/detail/memory_util.hpp +++ /dev/null @@ -1,83 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2011-2012. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_ALLOCATOR_MEMORY_UTIL_HPP -#define BOOST_CONTAINER_ALLOCATOR_MEMORY_UTIL_HPP - -#if defined(_MSC_VER) -# pragma once -#endif - -#include -#include -#include -#include - - -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace container { namespace container_detail { -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} -#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 2, )) -#include BOOST_PP_ITERATE() - -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME destroy -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace container { namespace container_detail { -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} -#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 3, )) -#include BOOST_PP_ITERATE() - -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME max_size -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace container { namespace container_detail { -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} -#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 0, )) -#include BOOST_PP_ITERATE() - -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME select_on_container_copy_construction -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace container { namespace container_detail { -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} -#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 0, )) -#include BOOST_PP_ITERATE() - -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME construct -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace container { namespace container_detail { -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} -#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS+1, )) -#include BOOST_PP_ITERATE() - -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME swap -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace container { namespace container_detail { -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} -#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 1, )) -#include BOOST_PP_ITERATE() - -namespace boost { -namespace container { -namespace container_detail { - - -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(pointer) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_pointer) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reference) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_reference) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(void_pointer) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_void_pointer) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(size_type) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_copy_assignment) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_move_assignment) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_swap) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type) - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#include - -#endif // ! defined(BOOST_CONTAINER_ALLOCATOR_MEMORY_UTIL_HPP) diff --git a/third_party/boost_parts/boost/container/detail/mpl.hpp b/third_party/boost_parts/boost/container/detail/mpl.hpp index e1684ea0..4bb3cc7d 100644 --- a/third_party/boost_parts/boost/container/detail/mpl.hpp +++ b/third_party/boost_parts/boost/container/detail/mpl.hpp @@ -30,7 +30,7 @@ namespace boost { namespace container { -namespace container_detail { +namespace dtl { using boost::move_detail::integral_constant; using boost::move_detail::true_type; @@ -62,22 +62,21 @@ using boost::move_detail::disable_if_and; using boost::move_detail::enable_if_or; using boost::move_detail::disable_if_or; - -template +template struct select1st { - typedef Pair argument_type; - typedef typename Pair::first_type result_type; + typedef FirstType type; - template - const typename Pair::first_type& operator()(const OtherPair& x) const + template + const type& operator()(const T& x) const { return x.first; } - const typename Pair::first_type& operator()(const typename Pair::first_type& x) const - { return x; } + template + type& operator()(T& x) + { return const_cast(x.first); } }; -} //namespace container_detail { +} //namespace dtl { } //namespace container { } //namespace boost { diff --git a/third_party/boost_parts/boost/container/detail/preprocessor.hpp b/third_party/boost_parts/boost/container/detail/preprocessor.hpp deleted file mode 100644 index 41d1f553..00000000 --- a/third_party/boost_parts/boost/container/detail/preprocessor.hpp +++ /dev/null @@ -1,232 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2008-2012. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_PREPROCESSOR_HPP -#define BOOST_CONTAINER_DETAIL_PREPROCESSOR_HPP - -#if defined(_MSC_VER) -# pragma once -#endif - -#include -#include -#include - -#ifdef BOOST_CONTAINER_PERFECT_FORWARDING -//#error "This file is not needed when perfect forwarding is available" -#endif //BOOST_CONTAINER_PERFECT_FORWARDING - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define BOOST_CONTAINER_MAX_CONSTRUCTOR_PARAMETERS 10 - -//Note: -//We define template parameters as const references to -//be able to bind temporaries. After that we will un-const them. -//This cast is ugly but it is necessary until "perfect forwarding" -//is achieved in C++0x. Meanwhile, if we want to be able to -//bind rvalues with non-const references, we have to be ugly -#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES - #define BOOST_CONTAINER_PP_PARAM_LIST(z, n, data) \ - BOOST_PP_CAT(P, n) && BOOST_PP_CAT(p, n) \ - //! -#else - #define BOOST_CONTAINER_PP_PARAM_LIST(z, n, data) \ - const BOOST_PP_CAT(P, n) & BOOST_PP_CAT(p, n) \ - //! -#endif //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES - -#define BOOST_CONTAINER_PP_CONST_REF_PARAM_LIST_Q(z, n, Data) \ -const BOOST_PP_CAT(Q, n) & BOOST_PP_CAT(q, n) \ -//! - -#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES - #define BOOST_CONTAINER_PP_PARAM(U, u) \ - U && u \ - //! -#else - #define BOOST_CONTAINER_PP_PARAM(U, u) \ - const U & u \ - //! -#endif //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES - -#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES - - #define BOOST_CONTAINER_PP_PARAM_INIT(z, n, data) \ - BOOST_PP_CAT(m_p, n) (::boost::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(p, n) )) \ - //! - -#else //BOOST_NO_CXX11_RVALUE_REFERENCES - - #define BOOST_CONTAINER_PP_PARAM_INIT(z, n, data) \ - BOOST_PP_CAT(m_p, n) (const_cast(BOOST_PP_CAT(p, n))) \ - //! -#endif //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES - -#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES - - #if defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) - - namespace boost { - namespace container { - namespace container_detail { - template - struct ref_holder; - - template - struct ref_holder - { - explicit ref_holder(T &t) - : t_(t) - {} - T &t_; - T & get() { return t_; } - }; - - template - struct ref_holder - { - explicit ref_holder(const T &t) - : t_(t) - {} - const T &t_; - const T & get() { return t_; } - }; - - template - struct ref_holder - { - explicit ref_holder(const T &t) - : t_(t) - {} - const T &t_; - const T & get() { return t_; } - }; - - template - struct ref_holder - { - explicit ref_holder(T &&t) - : t_(t) - {} - T &t_; - T && get() { return ::boost::move(t_); } - }; - - template - struct ref_holder - { - explicit ref_holder(T &&t) - : t_(t) - {} - T &t_; - T && get() { return ::boost::move(t_); } - }; - - } //namespace container_detail { - } //namespace container { - } //namespace boost { - - #define BOOST_CONTAINER_PP_PARAM_DEFINE(z, n, data) \ - ::boost::container::container_detail::ref_holder BOOST_PP_CAT(m_p, n); \ - //! - - #else //BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG - - #define BOOST_CONTAINER_PP_PARAM_DEFINE(z, n, data) \ - BOOST_PP_CAT(P, n) && BOOST_PP_CAT(m_p, n); \ - //! - - #endif //defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) - -#else //BOOST_NO_CXX11_RVALUE_REFERENCES - - #define BOOST_CONTAINER_PP_PARAM_DEFINE(z, n, data) \ - BOOST_PP_CAT(P, n) & BOOST_PP_CAT(m_p, n); \ - //! -#endif //#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES - -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) - - #define BOOST_CONTAINER_PP_MEMBER_FORWARD(z, n, data) BOOST_PP_CAT(this->m_p, n).get() \ - //! - -#else //!defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) - - #define BOOST_CONTAINER_PP_MEMBER_FORWARD(z, n, data) \ - ::boost::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(this->m_p, n) ) \ - //! - -#endif //!defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG) - -#define BOOST_CONTAINER_PP_PARAM_INC(z, n, data) \ - BOOST_PP_CAT(++this->m_p, n) \ -//! - -#define BOOST_CONTAINER_PP_IDENTITY(z, n, data) data - - -#define BOOST_CONTAINER_PP_PARAM_FORWARD(z, n, data) \ -::boost::forward< BOOST_PP_CAT(P, n) >( BOOST_PP_CAT(p, n) ) \ -//! - -#define BOOST_CONTAINER_PP_DECLVAL(z, n, data) \ -::boost::move_detail::declval< BOOST_PP_CAT(P, n) >() \ -//! - -#define BOOST_CONTAINER_PP_MEMBER_IT_FORWARD(z, n, data) \ -BOOST_PP_CAT(*this->m_p, n) \ -//! - -#define BOOST_CONTAINER_PP_TEMPLATE_PARAM_VOID_DEFAULT(z, n, data) \ - BOOST_PP_CAT(class P, n) = void \ -//! - -#define BOOST_CONTAINER_PP_TEMPLATE_PARAM_WITH_DEFAULT(z, n, default_type) \ - BOOST_PP_CAT(class P, n) = default_type \ -//! - -#define BOOST_CONTAINER_PP_STATIC_PARAM_REF_DECLARE(z, n, data) \ - static BOOST_PP_CAT(P, n) & BOOST_PP_CAT(p, n); \ -//! - -#define BOOST_CONTAINER_PP_PARAM_PASS(z, n, data) \ - BOOST_PP_CAT(p, n) \ -//! - -#define BOOST_CONTAINER_PP_FWD_TYPE(z, n, data) \ - typename ::boost::move_detail::forward_type< BOOST_PP_CAT(P, n) >::type \ -//! - -#include - -//#else - -//#ifdef BOOST_CONTAINER_PERFECT_FORWARDING -//#error "This file is not needed when perfect forwarding is available" -//#endif //BOOST_CONTAINER_PERFECT_FORWARDING - -#endif //#ifndef BOOST_CONTAINER_DETAIL_PREPROCESSOR_HPP diff --git a/third_party/boost_parts/boost/container/detail/type_traits.hpp b/third_party/boost_parts/boost/container/detail/type_traits.hpp index e1453a65..686cc409 100644 --- a/third_party/boost_parts/boost/container/detail/type_traits.hpp +++ b/third_party/boost_parts/boost/container/detail/type_traits.hpp @@ -28,7 +28,7 @@ namespace boost { namespace container { -namespace container_detail { +namespace dtl { using ::boost::move_detail::enable_if; using ::boost::move_detail::enable_if_and; @@ -63,7 +63,7 @@ using ::boost::move_detail::aligned_storage; using ::boost::move_detail::nat; using ::boost::move_detail::max_align_t; -} //namespace container_detail { +} //namespace dtl { } //namespace container { } //namespace boost { diff --git a/third_party/boost_parts/boost/container/detail/workaround.hpp b/third_party/boost_parts/boost/container/detail/workaround.hpp index ae9151c3..736326b7 100644 --- a/third_party/boost_parts/boost/container/detail/workaround.hpp +++ b/third_party/boost_parts/boost/container/detail/workaround.hpp @@ -29,10 +29,26 @@ #define BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST #endif -#if !defined(BOOST_FALLTHOUGH) - #define BOOST_CONTAINER_FALLTHOUGH -#else - #define BOOST_CONTAINER_FALLTHOUGH BOOST_FALLTHOUGH; +#if defined(BOOST_GCC_VERSION) +# if (BOOST_GCC_VERSION < 40700) || !defined(BOOST_GCC_CXX11) +# define BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS +# endif +#elif defined(BOOST_MSVC) +# if _MSC_FULL_VER < 180020827 +# define BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS +# endif +#elif defined(BOOST_CLANG) +# if !__has_feature(cxx_delegating_constructors) +# define BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS +# endif +#endif + +#if defined(BOOST_MSVC) && (_MSC_VER < 1400) + #define BOOST_CONTAINER_TEMPLATED_CONVERSION_OPERATOR_BROKEN +#endif + +#if !defined(BOOST_NO_CXX11_HDR_TUPLE) || (defined(BOOST_MSVC) && (BOOST_MSVC == 1700 || BOOST_MSVC == 1600)) +#define BOOST_CONTAINER_PAIR_TEST_HAS_HEADER_TUPLE #endif //Macros for documentation purposes. For code, expands to the argument @@ -85,6 +101,9 @@ #elif defined(BOOST_MSVC) && defined(_DEBUG) //"__forceinline" and MSVC seems to have some bugs in debug mode #define BOOST_CONTAINER_FORCEINLINE inline +#elif defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ < 5))) + //Older GCCs have problems with forceinline + #define BOOST_CONTAINER_FORCEINLINE inline #else #define BOOST_CONTAINER_FORCEINLINE BOOST_FORCEINLINE #endif diff --git a/third_party/boost_parts/boost/functional/hash/detail/float_functions.hpp b/third_party/boost_parts/boost/container_hash/detail/float_functions.hpp similarity index 100% rename from third_party/boost_parts/boost/functional/hash/detail/float_functions.hpp rename to third_party/boost_parts/boost/container_hash/detail/float_functions.hpp diff --git a/third_party/boost_parts/boost/functional/hash/detail/hash_float.hpp b/third_party/boost_parts/boost/container_hash/detail/hash_float.hpp similarity index 96% rename from third_party/boost_parts/boost/functional/hash/detail/hash_float.hpp rename to third_party/boost_parts/boost/container_hash/detail/hash_float.hpp index eb9264f7..f7634285 100644 --- a/third_party/boost_parts/boost/functional/hash/detail/hash_float.hpp +++ b/third_party/boost_parts/boost/container_hash/detail/hash_float.hpp @@ -11,9 +11,9 @@ #pragma once #endif -#include -#include -#include +#include +#include +#include #include #include #include @@ -179,7 +179,7 @@ namespace boost hash_float_combine(seed, part); } - hash_float_combine(seed, exp); + hash_float_combine(seed, static_cast(exp)); return seed; } @@ -241,7 +241,7 @@ namespace boost template inline bool is_zero(T v) { -#if !defined(__GNUC__) +#if !defined(__GNUC__) && !defined(__clang__) return v == 0; #else // GCC's '-Wfloat-equal' will complain about comparing diff --git a/third_party/boost_parts/boost/functional/hash/detail/limits.hpp b/third_party/boost_parts/boost/container_hash/detail/limits.hpp similarity index 100% rename from third_party/boost_parts/boost/functional/hash/detail/limits.hpp rename to third_party/boost_parts/boost/container_hash/detail/limits.hpp diff --git a/third_party/boost_parts/boost/functional/hash/extensions.hpp b/third_party/boost_parts/boost/container_hash/extensions.hpp similarity index 68% rename from third_party/boost_parts/boost/functional/hash/extensions.hpp rename to third_party/boost_parts/boost/container_hash/extensions.hpp index eafaefe8..4eebb4bc 100644 --- a/third_party/boost_parts/boost/functional/hash/extensions.hpp +++ b/third_party/boost_parts/boost/container_hash/extensions.hpp @@ -5,7 +5,7 @@ // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf -// issue 6.18. +// issue 6.18. // This implements the extensions to the standard. // It's undocumented, so you shouldn't use it.... @@ -18,12 +18,11 @@ #pragma once #endif -#include +#include #include -#include +#include #include -#include -#include +#include #if !defined(BOOST_NO_CXX11_HDR_ARRAY) # include @@ -72,6 +71,56 @@ namespace boost return seed; } + inline std::size_t hash_range( + std::vector::iterator first, + std::vector::iterator last) + { + std::size_t seed = 0; + + for(; first != last; ++first) + { + hash_combine(seed, *first); + } + + return seed; + } + + inline std::size_t hash_range( + std::vector::const_iterator first, + std::vector::const_iterator last) + { + std::size_t seed = 0; + + for(; first != last; ++first) + { + hash_combine(seed, *first); + } + + return seed; + } + + inline void hash_range( + std::size_t& seed, + std::vector::iterator first, + std::vector::iterator last) + { + for(; first != last; ++first) + { + hash_combine(seed, *first); + } + } + + inline void hash_range( + std::size_t& seed, + std::vector::const_iterator first, + std::vector::const_iterator last) + { + for(; first != last; ++first) + { + hash_combine(seed, *first); + } + } + template std::size_t hash_value(std::vector const& v) { @@ -171,19 +220,66 @@ namespace boost return boost::hash_detail::hash_tuple(v); } -# define BOOST_HASH_TUPLE_F(z, n, _) \ - template< \ - BOOST_PP_ENUM_PARAMS_Z(z, n, typename A) \ - > \ - inline std::size_t hash_value(std::tuple< \ - BOOST_PP_ENUM_PARAMS_Z(z, n, A) \ - > const& v) \ - { \ - return boost::hash_detail::hash_tuple(v); \ + template + inline std::size_t hash_value(std::tuple const& v) + { + return boost::hash_detail::hash_tuple(v); + } + + template + inline std::size_t hash_value(std::tuple const& v) + { + return boost::hash_detail::hash_tuple(v); + } + + template + inline std::size_t hash_value(std::tuple const& v) + { + return boost::hash_detail::hash_tuple(v); + } + + template + inline std::size_t hash_value(std::tuple const& v) + { + return boost::hash_detail::hash_tuple(v); + } + + template + inline std::size_t hash_value(std::tuple const& v) + { + return boost::hash_detail::hash_tuple(v); + } + + template + inline std::size_t hash_value(std::tuple const& v) + { + return boost::hash_detail::hash_tuple(v); + } + + template + inline std::size_t hash_value(std::tuple const& v) + { + return boost::hash_detail::hash_tuple(v); + } + + template + inline std::size_t hash_value(std::tuple const& v) + { + return boost::hash_detail::hash_tuple(v); + } + + template + inline std::size_t hash_value(std::tuple const& v) + { + return boost::hash_detail::hash_tuple(v); + } + + template + inline std::size_t hash_value(std::tuple const& v) + { + return boost::hash_detail::hash_tuple(v); } - BOOST_PP_REPEAT_FROM_TO(1, 11, BOOST_HASH_TUPLE_F, _) -# undef BOOST_HASH_TUPLE_F #endif #endif @@ -254,7 +350,7 @@ namespace boost #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct hash - : std::unary_function + : boost::hash_detail::hash_base { #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) std::size_t operator()(T const& val) const @@ -271,7 +367,7 @@ namespace boost #if BOOST_WORKAROUND(__DMC__, <= 0x848) template struct hash - : std::unary_function + : boost::hash_detail::hash_base { std::size_t operator()(const T* val) const { @@ -296,7 +392,7 @@ namespace boost { template struct inner - : std::unary_function + : boost::hash_detail::hash_base { #if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) std::size_t operator()(T const& val) const diff --git a/third_party/boost_parts/boost/functional/hash/hash.hpp b/third_party/boost_parts/boost/container_hash/hash.hpp similarity index 71% rename from third_party/boost_parts/boost/functional/hash/hash.hpp rename to third_party/boost_parts/boost/container_hash/hash.hpp index 2fb9f211..76de7939 100644 --- a/third_party/boost_parts/boost/functional/hash/hash.hpp +++ b/third_party/boost_parts/boost/container_hash/hash.hpp @@ -5,7 +5,7 @@ // Based on Peter Dimov's proposal // http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1756.pdf -// issue 6.18. +// issue 6.18. // // This also contains public domain code from MurmurHash. From the // MurmurHash header: @@ -16,14 +16,14 @@ #if !defined(BOOST_FUNCTIONAL_HASH_HASH_HPP) #define BOOST_FUNCTIONAL_HASH_HASH_HPP -#include +#include #include -#include +#include #include #include #include #include -#include +#include #include #if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) @@ -34,6 +34,10 @@ #include #endif +#if !defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) +#include +#endif + #if defined(BOOST_MSVC) #pragma warning(push) @@ -58,10 +62,74 @@ # define BOOST_FUNCTIONAL_HASH_ROTL32(x, r) (x << r) | (x >> (32 - r)) #endif +// Detect whether standard library has C++17 headers + +#if !defined(BOOST_HASH_CXX17) +# if defined(BOOST_MSVC) +# if defined(_HAS_CXX17) && _HAS_CXX17 +# define BOOST_HASH_CXX17 1 +# endif +# elif defined(__cplusplus) && __cplusplus >= 201703 +# define BOOST_HASH_CXX17 1 +# endif +#endif + +#if !defined(BOOST_HASH_CXX17) +# define BOOST_HASH_CXX17 0 +#endif + +#if BOOST_HASH_CXX17 && defined(__has_include) +# if !defined(BOOST_HASH_HAS_STRING_VIEW) && __has_include() +# define BOOST_HASH_HAS_STRING_VIEW 1 +# endif +# if !defined(BOOST_HASH_HAS_OPTIONAL) && __has_include() +# define BOOST_HASH_HAS_OPTIONAL 1 +# endif +# if !defined(BOOST_HASH_HAS_VARIANT) && __has_include() +# define BOOST_HASH_HAS_VARIANT 1 +# endif +#endif + +#if !defined(BOOST_HASH_HAS_STRING_VIEW) +# define BOOST_HASH_HAS_STRING_VIEW 0 +#endif + +#if !defined(BOOST_HASH_HAS_OPTIONAL) +# define BOOST_HASH_HAS_OPTIONAL 0 +#endif + +#if !defined(BOOST_HASH_HAS_VARIANT) +# define BOOST_HASH_HAS_VARIANT 0 +#endif + +#if BOOST_HASH_HAS_STRING_VIEW +# include +#endif + +#if BOOST_HASH_HAS_OPTIONAL +# include +#endif + +#if BOOST_HASH_HAS_VARIANT +# include +#endif + namespace boost { namespace hash_detail { +#if defined(_HAS_AUTO_PTR_ETC) && !_HAS_AUTO_PTR_ETC + template + struct hash_base + { + typedef T argument_type; + typedef std::size_t result_type; + }; +#else + template + struct hash_base : std::unary_function {}; +#endif + struct enable_hash_value { typedef std::size_t type; }; template struct basic_numbers {}; @@ -95,6 +163,16 @@ namespace boost boost::hash_detail::enable_hash_value {}; #endif +#if !defined(BOOST_NO_CXX11_CHAR16_T) + template <> struct basic_numbers : + boost::hash_detail::enable_hash_value {}; +#endif + +#if !defined(BOOST_NO_CXX11_CHAR32_T) + template <> struct basic_numbers : + boost::hash_detail::enable_hash_value {}; +#endif + // long_numbers is defined like this to allow for separate // specialization for long_long and int128_type, in case // they conflict. @@ -154,13 +232,35 @@ namespace boost std::size_t hash_value( std::basic_string, A> const&); +#if BOOST_HASH_HAS_STRING_VIEW + template + std::size_t hash_value( + std::basic_string_view > const&); +#endif + template typename boost::hash_detail::float_numbers::type hash_value(T); +#if BOOST_HASH_HAS_OPTIONAL + template + std::size_t hash_value(std::optional const&); +#endif + +#if BOOST_HASH_HAS_VARIANT + std::size_t hash_value(std::monostate); + template + std::size_t hash_value(std::variant const&); +#endif + #if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX) std::size_t hash_value(std::type_index); #endif +#if !defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) + std::size_t hash_value(std::error_code const&); + std::size_t hash_value(std::error_condition const&); +#endif + // Implementation namespace hash_detail @@ -168,10 +268,10 @@ namespace boost template inline std::size_t hash_value_signed(T val) { - const int size_t_bits = std::numeric_limits::digits; + const unsigned int size_t_bits = std::numeric_limits::digits; // ceiling(std::numeric_limits::digits / size_t_bits) - 1 const int length = (std::numeric_limits::digits - 1) - / size_t_bits; + / static_cast(size_t_bits); std::size_t seed = 0; T positive = val < 0 ? -1 - val : val; @@ -189,10 +289,10 @@ namespace boost template inline std::size_t hash_value_unsigned(T val) { - const int size_t_bits = std::numeric_limits::digits; + const unsigned int size_t_bits = std::numeric_limits::digits; // ceiling(std::numeric_limits::digits / size_t_bits) - 1 const int length = (std::numeric_limits::digits - 1) - / size_t_bits; + / static_cast(size_t_bits); std::size_t seed = 0; @@ -212,7 +312,6 @@ namespace boost seed ^= value + 0x9e3779b9 + (seed<<6) + (seed>>2); } - template inline void hash_combine_impl(boost::uint32_t& h1, boost::uint32_t k1) { @@ -229,16 +328,15 @@ namespace boost } -// Don't define 64-bit hash combine on platforms with 64 bit integers, +// Don't define 64-bit hash combine on platforms without 64 bit integers, // and also not for 32-bit gcc as it warns about the 64-bit constant. #if !defined(BOOST_NO_INT64_T) && \ !(defined(__GNUC__) && ULONG_MAX == 0xffffffff) - template inline void hash_combine_impl(boost::uint64_t& h, boost::uint64_t k) { - const uint64_t m = UINT64_C(0xc6a4a7935bd1e995); + const boost::uint64_t m = UINT64_C(0xc6a4a7935bd1e995); const int r = 47; k *= m; @@ -247,6 +345,10 @@ namespace boost h ^= k; h *= m; + + // Completely arbitrary number, to prevent 0's + // from hashing to 0. + h += 0xe6546b64; } #endif // BOOST_NO_INT64_T @@ -386,12 +488,49 @@ namespace boost return hash_range(v.begin(), v.end()); } +#if BOOST_HASH_HAS_STRING_VIEW + template + inline std::size_t hash_value( + std::basic_string_view > const& v) + { + return hash_range(v.begin(), v.end()); + } +#endif + template typename boost::hash_detail::float_numbers::type hash_value(T v) { return boost::hash_detail::float_hash_value(v); } +#if BOOST_HASH_HAS_OPTIONAL + template + inline std::size_t hash_value(std::optional const& v) { + if (!v) { + // Arbitray value for empty optional. + return 0x12345678; + } else { + boost::hash hf; + return hf(*v); + } + } +#endif + +#if BOOST_HASH_HAS_VARIANT + inline std::size_t hash_value(std::monostate) { + return 0x87654321; + } + + template + inline std::size_t hash_value(std::variant const& v) { + std::size_t seed = 0; + hash_combine(seed, v.index()); + std::visit([&seed](auto&& x) { hash_combine(seed, x); }, v); + return seed; + } +#endif + + #if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX) inline std::size_t hash_value(std::type_index v) { @@ -399,14 +538,30 @@ namespace boost } #endif +#if !defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) + inline std::size_t hash_value(std::error_code const& v) { + std::size_t seed = 0; + hash_combine(seed, v.value()); + hash_combine(seed, &v.category()); + return seed; + } + + inline std::size_t hash_value(std::error_condition const& v) { + std::size_t seed = 0; + hash_combine(seed, v.value()); + hash_combine(seed, &v.category()); + return seed; + } +#endif + // // boost::hash // - + // Define the specializations required by the standard. The general purpose // boost::hash is defined later in extensions.hpp if // BOOST_HASH_NO_EXTENSIONS is not defined. - + // BOOST_HASH_SPECIALIZE - define a specialization for a type which is // passed by copy. // @@ -417,7 +572,7 @@ namespace boost #define BOOST_HASH_SPECIALIZE(type) \ template <> struct hash \ - : public std::unary_function \ + : public boost::hash_detail::hash_base \ { \ std::size_t operator()(type v) const \ { \ @@ -427,7 +582,17 @@ namespace boost #define BOOST_HASH_SPECIALIZE_REF(type) \ template <> struct hash \ - : public std::unary_function \ + : public boost::hash_detail::hash_base \ + { \ + std::size_t operator()(type const& v) const \ + { \ + return boost::hash_value(v); \ + } \ + }; + +#define BOOST_HASH_SPECIALIZE_TEMPLATE_REF(type) \ + struct hash \ + : public boost::hash_detail::hash_base \ { \ std::size_t operator()(type const& v) const \ { \ @@ -441,6 +606,12 @@ namespace boost BOOST_HASH_SPECIALIZE(unsigned char) #if !defined(BOOST_NO_INTRINSIC_WCHAR_T) BOOST_HASH_SPECIALIZE(wchar_t) +#endif +#if !defined(BOOST_NO_CXX11_CHAR16_T) + BOOST_HASH_SPECIALIZE(char16_t) +#endif +#if !defined(BOOST_NO_CXX11_CHAR32_T) + BOOST_HASH_SPECIALIZE(char32_t) #endif BOOST_HASH_SPECIALIZE(short) BOOST_HASH_SPECIALIZE(unsigned short) @@ -454,9 +625,28 @@ namespace boost BOOST_HASH_SPECIALIZE(long double) BOOST_HASH_SPECIALIZE_REF(std::string) -#if !defined(BOOST_NO_STD_WSTRING) +#if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) BOOST_HASH_SPECIALIZE_REF(std::wstring) #endif +#if !defined(BOOST_NO_CXX11_CHAR16_T) + BOOST_HASH_SPECIALIZE_REF(std::basic_string) +#endif +#if !defined(BOOST_NO_CXX11_CHAR32_T) + BOOST_HASH_SPECIALIZE_REF(std::basic_string) +#endif + +#if BOOST_HASH_HAS_STRING_VIEW + BOOST_HASH_SPECIALIZE_REF(std::string_view) +# if !defined(BOOST_NO_STD_WSTRING) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) + BOOST_HASH_SPECIALIZE_REF(std::wstring_view) +# endif +# if !defined(BOOST_NO_CXX11_CHAR16_T) + BOOST_HASH_SPECIALIZE_REF(std::basic_string_view) +# endif +# if !defined(BOOST_NO_CXX11_CHAR32_T) + BOOST_HASH_SPECIALIZE_REF(std::basic_string_view) +# endif +#endif #if !defined(BOOST_NO_LONG_LONG) BOOST_HASH_SPECIALIZE(boost::long_long_type) @@ -468,12 +658,24 @@ namespace boost BOOST_HASH_SPECIALIZE(boost::uint128_type) #endif +#if BOOST_HASH_HAS_OPTIONAL + template + BOOST_HASH_SPECIALIZE_TEMPLATE_REF(std::optional) +#endif + +#if !defined(BOOST_HASH_HAS_VARIANT) + template + BOOST_HASH_SPECIALIZE_TEMPLATE_REF(std::variant) + BOOST_HASH_SPECIALIZE(std::monostate) +#endif + #if !defined(BOOST_NO_CXX11_HDR_TYPEINDEX) BOOST_HASH_SPECIALIZE(std::type_index) #endif #undef BOOST_HASH_SPECIALIZE #undef BOOST_HASH_SPECIALIZE_REF +#undef BOOST_HASH_SPECIALIZE_TEMPLATE_REF // Specializing boost::hash for pointers. @@ -481,7 +683,7 @@ namespace boost template struct hash - : public std::unary_function + : public boost::hash_detail::hash_base { std::size_t operator()(T* v) const { @@ -514,7 +716,7 @@ namespace boost { template struct inner - : public std::unary_function + : public boost::hash_detail::hash_base { std::size_t operator()(T val) const { @@ -555,5 +757,5 @@ namespace boost #if !defined(BOOST_HASH_NO_EXTENSIONS) \ && !defined(BOOST_FUNCTIONAL_HASH_EXTENSIONS_HPP) -#include +#include #endif diff --git a/third_party/boost_parts/boost/functional/hash/hash_fwd.hpp b/third_party/boost_parts/boost/container_hash/hash_fwd.hpp similarity index 93% rename from third_party/boost_parts/boost/functional/hash/hash_fwd.hpp rename to third_party/boost_parts/boost/container_hash/hash_fwd.hpp index 01fe012e..a87c182d 100644 --- a/third_party/boost_parts/boost/functional/hash/hash_fwd.hpp +++ b/third_party/boost_parts/boost/container_hash/hash_fwd.hpp @@ -10,13 +10,13 @@ #if !defined(BOOST_FUNCTIONAL_HASH_FWD_HPP) #define BOOST_FUNCTIONAL_HASH_FWD_HPP -#include +#include +#include + #if defined(BOOST_HAS_PRAGMA_ONCE) #pragma once #endif -#include -#include namespace boost { diff --git a/third_party/boost_parts/boost/core/addressof.hpp b/third_party/boost_parts/boost/core/addressof.hpp index 889b5825..f7eab06b 100644 --- a/third_party/boost_parts/boost/core/addressof.hpp +++ b/third_party/boost_parts/boost/core/addressof.hpp @@ -1,162 +1,274 @@ -// Copyright (C) 2002 Brad King (brad.king@kitware.com) -// Douglas Gregor (gregod@cs.rpi.edu) -// -// Copyright (C) 2002, 2008, 2013 Peter Dimov -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) +/* +Copyright (C) 2002 Brad King (brad.king@kitware.com) + Douglas Gregor (gregod@cs.rpi.edu) -// For more information, see http://www.boost.org +Copyright (C) 2002, 2008, 2013 Peter Dimov + +Copyright (C) 2017 Glen Joseph Fernandes (glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(See accompanying file LICENSE_1_0.txt or copy at +http://www.boost.org/LICENSE_1_0.txt) +*/ #ifndef BOOST_CORE_ADDRESSOF_HPP #define BOOST_CORE_ADDRESSOF_HPP -# include -# include -# include +#include -namespace boost -{ +#if defined(BOOST_MSVC_FULL_VER) && BOOST_MSVC_FULL_VER >= 190024215 +#define BOOST_CORE_HAS_BUILTIN_ADDRESSOF +#elif defined(BOOST_GCC) && BOOST_GCC >= 70000 +#define BOOST_CORE_HAS_BUILTIN_ADDRESSOF +#elif defined(__has_builtin) +#if __has_builtin(__builtin_addressof) +#define BOOST_CORE_HAS_BUILTIN_ADDRESSOF +#endif +#endif -namespace detail -{ +#if defined(BOOST_CORE_HAS_BUILTIN_ADDRESSOF) +#if defined(BOOST_NO_CXX11_CONSTEXPR) +#define BOOST_CORE_NO_CONSTEXPR_ADDRESSOF +#endif + +namespace boost { -template struct addr_impl_ref +template +BOOST_CONSTEXPR inline T* +addressof(T& o) BOOST_NOEXCEPT { - T & v_; + return __builtin_addressof(o); +} + +} /* boost */ +#else +#include +#include - BOOST_FORCEINLINE addr_impl_ref( T & v ): v_( v ) {} - BOOST_FORCEINLINE operator T& () const { return v_; } +namespace boost { +namespace detail { +template +class addrof_ref { +public: + BOOST_FORCEINLINE addrof_ref(T& o) BOOST_NOEXCEPT + : o_(o) { } + BOOST_FORCEINLINE operator T&() const BOOST_NOEXCEPT { + return o_; + } private: - addr_impl_ref & operator=(const addr_impl_ref &); + addrof_ref& operator=(const addrof_ref&); + T& o_; }; -template struct addressof_impl -{ - static BOOST_FORCEINLINE T * f( T & v, long ) - { - return reinterpret_cast( - &const_cast(reinterpret_cast(v))); +template +struct addrof { + static BOOST_FORCEINLINE T* get(T& o, long) BOOST_NOEXCEPT { + return reinterpret_cast(& + const_cast(reinterpret_cast(o))); } - - static BOOST_FORCEINLINE T * f( T * v, int ) - { - return v; + static BOOST_FORCEINLINE T* get(T* p, int) BOOST_NOEXCEPT { + return p; } }; -#if !defined( BOOST_NO_CXX11_NULLPTR ) - -#if !defined( BOOST_NO_CXX11_DECLTYPE ) && ( ( defined( __clang__ ) && !defined( _LIBCPP_VERSION ) ) || defined( __INTEL_COMPILER ) ) - - typedef decltype(nullptr) addr_nullptr_t; - +#if !defined(BOOST_NO_CXX11_NULLPTR) +#if !defined(BOOST_NO_CXX11_DECLTYPE) && \ + (defined(__INTEL_COMPILER) || \ + (defined(__clang__) && !defined(_LIBCPP_VERSION))) +typedef decltype(nullptr) addrof_null_t; #else - - typedef std::nullptr_t addr_nullptr_t; - +typedef std::nullptr_t addrof_null_t; #endif -template<> struct addressof_impl< addr_nullptr_t > -{ - typedef addr_nullptr_t T; - - static BOOST_FORCEINLINE T * f( T & v, int ) - { - return &v; +template<> +struct addrof { + typedef addrof_null_t type; + static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT { + return &o; } }; -template<> struct addressof_impl< addr_nullptr_t const > -{ - typedef addr_nullptr_t const T; - - static BOOST_FORCEINLINE T * f( T & v, int ) - { - return &v; +template<> +struct addrof { + typedef const addrof_null_t type; + static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT { + return &o; } }; -template<> struct addressof_impl< addr_nullptr_t volatile > -{ - typedef addr_nullptr_t volatile T; +template<> +struct addrof { + typedef volatile addrof_null_t type; + static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT { + return &o; + } +}; - static BOOST_FORCEINLINE T * f( T & v, int ) - { - return &v; +template<> +struct addrof { + typedef const volatile addrof_null_t type; + static BOOST_FORCEINLINE type* get(type& o, int) BOOST_NOEXCEPT { + return &o; } }; +#endif + +} /* detail */ -template<> struct addressof_impl< addr_nullptr_t const volatile > +#if defined(BOOST_NO_CXX11_SFINAE_EXPR) || \ + defined(BOOST_NO_CXX11_CONSTEXPR) || \ + defined(BOOST_NO_CXX11_DECLTYPE) +#define BOOST_CORE_NO_CONSTEXPR_ADDRESSOF + +template +BOOST_FORCEINLINE T* +addressof(T& o) BOOST_NOEXCEPT { - typedef addr_nullptr_t const volatile T; +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) || \ + BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5120) + return boost::detail::addrof::get(o, 0); +#else + return boost::detail::addrof::get(boost::detail::addrof_ref(o), 0); +#endif +} - static BOOST_FORCEINLINE T * f( T & v, int ) - { - return &v; - } +#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) +namespace detail { + +template +struct addrof_result { + typedef T* type; }; +} /* detail */ + +template +BOOST_FORCEINLINE typename boost::detail::addrof_result::type +addressof(T (&o)[N]) BOOST_NOEXCEPT +{ + return &o; +} #endif -} // namespace detail +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +template +BOOST_FORCEINLINE +T (*addressof(T (&o)[N]) BOOST_NOEXCEPT)[N] +{ + return reinterpret_cast(&o); +} -template +template BOOST_FORCEINLINE -T * addressof( T & v ) +const T (*addressof(const T (&o)[N]) BOOST_NOEXCEPT)[N] { -#if (defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) ) || (defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5120)) + return reinterpret_cast(&o); +} +#endif +#else +namespace detail { - return boost::detail::addressof_impl::f( v, 0 ); +template +T addrof_declval() BOOST_NOEXCEPT; -#else +template +struct addrof_void { + typedef void type; +}; + +template +struct addrof_member_operator { + static constexpr bool value = false; +}; + +template +struct addrof_member_operator().operator&())>::type> { + static constexpr bool value = true; +}; - return boost::detail::addressof_impl::f( boost::detail::addr_impl_ref( v ), 0 ); +#if BOOST_WORKAROUND(BOOST_INTEL, < 1600) +struct addrof_addressable { }; +addrof_addressable* +operator&(addrof_addressable&) BOOST_NOEXCEPT; #endif -} -#if defined( __SUNPRO_CC ) && BOOST_WORKAROUND( __SUNPRO_CC, BOOST_TESTED_AT( 0x590 ) ) +template +struct addrof_non_member_operator { + static constexpr bool value = false; +}; -namespace detail -{ +template +struct addrof_non_member_operator()))>::type> { + static constexpr bool value = true; +}; -template struct addressof_addp -{ - typedef T * type; +template +struct addrof_expression { + static constexpr bool value = false; }; -} // namespace detail +template +struct addrof_expression())>::type> { + static constexpr bool value = true; +}; -template< class T, std::size_t N > +template +struct addrof_is_constexpr { + static constexpr bool value = addrof_expression::value && + !addrof_member_operator::value && + !addrof_non_member_operator::value; +}; + +template +struct addrof_if { }; + +template +struct addrof_if { + typedef T* type; +}; + +template BOOST_FORCEINLINE -typename detail::addressof_addp< T[N] >::type addressof( T (&t)[N] ) +typename addrof_if::value, T>::type +addressof(T& o) BOOST_NOEXCEPT { - return &t; + return addrof::get(addrof_ref(o), 0); } -#endif - -// Borland doesn't like casting an array reference to a char reference -// but these overloads work around the problem. -#if defined( __BORLANDC__ ) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -template -BOOST_FORCEINLINE -T (*addressof(T (&t)[N]))[N] +template +constexpr BOOST_FORCEINLINE +typename addrof_if::value, T>::type +addressof(T& o) BOOST_NOEXCEPT { - return reinterpret_cast(&t); + return &o; } -template -BOOST_FORCEINLINE -const T (*addressof(const T (&t)[N]))[N] +} /* detail */ + +template +constexpr BOOST_FORCEINLINE T* +addressof(T& o) BOOST_NOEXCEPT { - return reinterpret_cast(&t); + return boost::detail::addressof(o); } #endif -} // namespace boost +} /* boost */ +#endif + +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \ + !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) +namespace boost { -#endif // BOOST_CORE_ADDRESSOF_HPP +template +const T* addressof(const T&&) = delete; + +} /* boost */ +#endif + +#endif diff --git a/third_party/boost_parts/boost/core/demangle.hpp b/third_party/boost_parts/boost/core/demangle.hpp index f13c26a7..dc714d80 100644 --- a/third_party/boost_parts/boost/core/demangle.hpp +++ b/third_party/boost_parts/boost/core/demangle.hpp @@ -93,15 +93,10 @@ inline void demangle_free( char const * name ) BOOST_NOEXCEPT inline std::string demangle( char const * name ) { scoped_demangled_name demangled_name( name ); - char const * const p = demangled_name.get(); - if( p ) - { - return p; - } - else - { - return name; - } + char const * p = demangled_name.get(); + if( !p ) + p = name; + return p; } #else diff --git a/third_party/boost_parts/boost/core/ignore_unused.hpp b/third_party/boost_parts/boost/core/ignore_unused.hpp new file mode 100644 index 00000000..994e5f64 --- /dev/null +++ b/third_party/boost_parts/boost/core/ignore_unused.hpp @@ -0,0 +1,70 @@ +// Copyright (c) 2014 Adam Wulkiewicz, Lodz, Poland. +// +// Use, modification and distribution is subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_CORE_IGNORE_UNUSED_HPP +#define BOOST_CORE_IGNORE_UNUSED_HPP + +#include + +namespace boost { + +#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(Ts const& ...) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +#else + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&, T4 const&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused(T1 const&, T2 const&, T3 const&, T4 const&, T5 const&) +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +template +BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore_unused() +{} + +#endif + +} // namespace boost + +#endif // BOOST_CORE_IGNORE_UNUSED_HPP diff --git a/third_party/boost_parts/boost/core/no_exceptions_support.hpp b/third_party/boost_parts/boost/core/no_exceptions_support.hpp index a697f01a..e2453d08 100644 --- a/third_party/boost_parts/boost/core/no_exceptions_support.hpp +++ b/third_party/boost_parts/boost/core/no_exceptions_support.hpp @@ -21,7 +21,7 @@ //---------------------------------------------------------------------- #include -#include +#include #if !(defined BOOST_NO_EXCEPTIONS) # define BOOST_TRY { try diff --git a/third_party/boost_parts/boost/core/pointer_traits.hpp b/third_party/boost_parts/boost/core/pointer_traits.hpp new file mode 100644 index 00000000..e0ebfb07 --- /dev/null +++ b/third_party/boost_parts/boost/core/pointer_traits.hpp @@ -0,0 +1,233 @@ +/* +Copyright 2017-2018 Glen Joseph Fernandes +(glenjofe@gmail.com) + +Distributed under the Boost Software License, Version 1.0. +(http://www.boost.org/LICENSE_1_0.txt) +*/ +#ifndef BOOST_CORE_POINTER_TRAITS_HPP +#define BOOST_CORE_POINTER_TRAITS_HPP + +#include +#if !defined(BOOST_NO_CXX11_POINTER_TRAITS) +#include +#else +#include +#endif + +namespace boost { + +#if !defined(BOOST_NO_CXX11_POINTER_TRAITS) +template +struct pointer_traits + : std::pointer_traits { + template + struct rebind_to { + typedef typename std::pointer_traits::template rebind type; + }; +}; + +template +struct pointer_traits + : std::pointer_traits { + template + struct rebind_to { + typedef U* type; + }; +}; +#else +namespace detail { + +template +struct ptr_void { + typedef void type; +}; + +template +struct ptr_first; + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +template class T, class U, class... Args> +struct ptr_first > { + typedef U type; +}; +#else +template class T, class U> +struct ptr_first > { + typedef U type; +}; + +template class T, class U1, class U2> +struct ptr_first > { + typedef U1 type; +}; + +template class T, class U1, class U2, class U3> +struct ptr_first > { + typedef U1 type; +}; +#endif + +template +struct ptr_element { + typedef typename ptr_first::type type; +}; + +template +struct ptr_element::type> { + typedef typename T::element_type type; +}; + +template +struct ptr_difference { + typedef std::ptrdiff_t type; +}; + +template +struct ptr_difference::type> { + typedef typename T::difference_type type; +}; + +template +struct ptr_transform; + +#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +template class T, class U, class... Args, class V> +struct ptr_transform, V> { + typedef T type; +}; +#else +template class T, class U, class V> +struct ptr_transform, V> { + typedef T type; +}; + +template class T, class U1, class U2, class V> +struct ptr_transform, V> { + typedef T type; +}; + +template class T, + class U1, class U2, class U3, class V> +struct ptr_transform, V> { + typedef T type; +}; +#endif + +template +struct ptr_rebind { + typedef typename ptr_transform::type type; +}; + +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) +template +struct ptr_rebind >::type> { + typedef typename T::template rebind type; +}; +#endif + +template +struct ptr_value { + typedef T type; +}; + +template<> +struct ptr_value { + typedef struct { } type; +}; + +} /* detail */ + +template +struct pointer_traits { + typedef T pointer; + typedef typename detail::ptr_element::type element_type; + typedef typename detail::ptr_difference::type difference_type; + template + struct rebind_to { + typedef typename detail::ptr_rebind::type type; + }; +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + template + using rebind = typename detail::ptr_rebind::type; +#endif + static pointer + pointer_to(typename detail::ptr_value::type& v) { + return pointer::pointer_to(v); + } +}; + +template +struct pointer_traits { + typedef T* pointer; + typedef T element_type; + typedef std::ptrdiff_t difference_type; + template + struct rebind_to { + typedef U* type; + }; +#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) + template + using rebind = U*; +#endif + static T* + pointer_to(typename detail::ptr_value::type& v) BOOST_NOEXCEPT { + return boost::addressof(v); + } +}; +#endif + +template +BOOST_CONSTEXPR inline T* +to_address(T* v) BOOST_NOEXCEPT +{ + return v; +} + +#if !defined(BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION) +namespace detail { + +template +inline T* +ptr_address(T* v, int) BOOST_NOEXCEPT +{ + return v; +} + +template +inline auto +ptr_address(const T& v, int) BOOST_NOEXCEPT +-> decltype(boost::pointer_traits::to_address(v)) +{ + return boost::pointer_traits::to_address(v); +} + +template +inline auto +ptr_address(const T& v, long) BOOST_NOEXCEPT +{ + return boost::detail::ptr_address(v.operator->(), 0); +} + +} /* detail */ + +template +inline auto +to_address(const T& v) BOOST_NOEXCEPT +{ + return boost::detail::ptr_address(v, 0); +} +#else +template +inline typename pointer_traits::element_type* +to_address(const T& v) BOOST_NOEXCEPT +{ + return boost::to_address(v.operator->()); +} +#endif + +} /* boost */ + +#endif diff --git a/third_party/boost_parts/boost/core/ref.hpp b/third_party/boost_parts/boost/core/ref.hpp index 47dc8580..7d768ffc 100644 --- a/third_party/boost_parts/boost/core/ref.hpp +++ b/third_party/boost_parts/boost/core/ref.hpp @@ -8,8 +8,8 @@ #endif #include -#include -#include +#include +#include // // ref.hpp - ref/cref, useful helper functions diff --git a/third_party/boost_parts/boost/cstdint.hpp b/third_party/boost_parts/boost/cstdint.hpp index bf7097ec..c8474c46 100644 --- a/third_party/boost_parts/boost/cstdint.hpp +++ b/third_party/boost_parts/boost/cstdint.hpp @@ -34,6 +34,17 @@ #endif #include +// +// For the following code we get several warnings along the lines of: +// +// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant +// +// So we declare this a system header to suppress these warnings. +// See also https://github.com/boostorg/config/issues/190 +// +#if defined(__GNUC__) && (__GNUC__ >= 4) +#pragma GCC system_header +#endif // // Note that GLIBC is a bit inconsistent about whether int64_t is defined or not @@ -60,7 +71,7 @@ # include // There is a bug in Cygwin two _C macros -# if defined(__STDC_CONSTANT_MACROS) && defined(__CYGWIN__) +# if defined(INTMAX_C) && defined(__CYGWIN__) # undef INTMAX_C # undef UINTMAX_C # define INTMAX_C(c) c##LL @@ -367,14 +378,11 @@ namespace boost #include #endif -// PGI seems to not support intptr_t/uintptr_t properly. BOOST_HAS_STDINT_H is not defined for this compiler by Boost.Config. -#if !defined(__PGIC__) - #if (defined(BOOST_WINDOWS) && !defined(_WIN32_WCE)) \ || (defined(_XOPEN_UNIX) && (_XOPEN_UNIX+0 > 0) && !defined(__UCLIBC__)) \ - || defined(__CYGWIN__) \ + || defined(__CYGWIN__) || defined(__VXWORKS__) \ || defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) \ - || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(sun) + || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || (defined(sun) && !defined(BOOST_HAS_STDINT_H)) || defined(INTPTR_MAX) namespace boost { using ::intptr_t; @@ -393,8 +401,6 @@ namespace boost { #endif -#endif // !defined(__PGIC__) - #endif // BOOST_CSTDINT_HPP @@ -413,15 +419,19 @@ INT#_C macros if they're not already defined (John Maddock). #if !defined(BOOST__STDC_CONSTANT_MACROS_DEFINED) && \ (!defined(INT8_C) || !defined(INT16_C) || !defined(INT32_C) || !defined(INT64_C)) // -// For the following code we get several warnings along the lines of: -// -// boost/cstdint.hpp:428:35: error: use of C99 long long integer constant -// -// So we declare this a system header to suppress these warnings. +// Undef the macros as a precaution, since we may get here if has failed +// to define them all, see https://svn.boost.org/trac/boost/ticket/12786 // -#if defined(__GNUC__) && (__GNUC__ >= 4) -#pragma GCC system_header -#endif +#undef INT8_C +#undef INT16_C +#undef INT32_C +#undef INT64_C +#undef INTMAX_C +#undef UINT8_C +#undef UINT16_C +#undef UINT32_C +#undef UINT64_C +#undef UINTMAX_C #include # define BOOST__STDC_CONSTANT_MACROS_DEFINED diff --git a/third_party/boost_parts/boost/current_function.hpp b/third_party/boost_parts/boost/current_function.hpp index 5c113f80..86955cb0 100644 --- a/third_party/boost_parts/boost/current_function.hpp +++ b/third_party/boost_parts/boost/current_function.hpp @@ -28,7 +28,11 @@ namespace detail inline void current_function_helper() { -#if defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__) +#if defined( BOOST_DISABLE_CURRENT_FUNCTION ) + +# define BOOST_CURRENT_FUNCTION "(unknown)" + +#elif defined(__GNUC__) || (defined(__MWERKS__) && (__MWERKS__ >= 0x3000)) || (defined(__ICC) && (__ICC >= 600)) || defined(__ghs__) # define BOOST_CURRENT_FUNCTION __PRETTY_FUNCTION__ diff --git a/third_party/boost_parts/boost/detail/allocator_utilities.hpp b/third_party/boost_parts/boost/detail/allocator_utilities.hpp index ed3de846..11eecbe1 100644 --- a/third_party/boost_parts/boost/detail/allocator_utilities.hpp +++ b/third_party/boost_parts/boost/detail/allocator_utilities.hpp @@ -121,8 +121,13 @@ struct rebinder template struct result { - typedef typename Allocator::BOOST_NESTED_TEMPLATE +#ifdef BOOST_NO_CXX11_ALLOCATOR + typedef typename Allocator::BOOST_NESTED_TEMPLATE rebind::other other; +#else + typedef typename std::allocator_traits::BOOST_NESTED_TEMPLATE + rebind_alloc other; +#endif }; }; @@ -159,7 +164,7 @@ void construct(void* p,const Type& t) */ #pragma warning(push) -#pragma warning(disable:4100) +#pragma warning(disable:4100) #endif template diff --git a/third_party/boost_parts/boost/detail/atomic_count.hpp b/third_party/boost_parts/boost/detail/atomic_count.hpp deleted file mode 100644 index 5411c7ae..00000000 --- a/third_party/boost_parts/boost/detail/atomic_count.hpp +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED -#define BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// boost/detail/atomic_count.hpp - thread/SMP safe reference counter -// -// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. -// -// Distributed under the Boost Software License, Version 1.0. -// See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt - -#include - -#endif // #ifndef BOOST_DETAIL_ATOMIC_COUNT_HPP_INCLUDED diff --git a/third_party/boost_parts/boost/detail/interlocked.hpp b/third_party/boost_parts/boost/detail/interlocked.hpp deleted file mode 100644 index 1152f710..00000000 --- a/third_party/boost_parts/boost/detail/interlocked.hpp +++ /dev/null @@ -1,210 +0,0 @@ -#ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED -#define BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED - -// -// boost/detail/interlocked.hpp -// -// Copyright 2005 Peter Dimov -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -#include - -// MS compatible compilers support #pragma once -#ifdef BOOST_HAS_PRAGMA_ONCE -#pragma once -#endif - -#if defined( BOOST_USE_WINDOWS_H ) - -# include - -# define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement -# define BOOST_INTERLOCKED_DECREMENT InterlockedDecrement -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange -# define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange -# define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER InterlockedCompareExchangePointer -# define BOOST_INTERLOCKED_EXCHANGE_POINTER InterlockedExchangePointer - -#elif defined( BOOST_USE_INTRIN_H ) - -#include - -# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement -# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange -# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange -# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd - -# if defined(_M_IA64) || defined(_M_AMD64) || defined(__x86_64__) || defined(__x86_64) - -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer -# define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer - -# else - -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \ - ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare))) -# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ - ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange))) - -# endif - -#elif defined(_WIN32_WCE) - -#if _WIN32_WCE >= 0x600 - -extern "C" long __cdecl _InterlockedIncrement( long volatile * ); -extern "C" long __cdecl _InterlockedDecrement( long volatile * ); -extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long ); -extern "C" long __cdecl _InterlockedExchange( long volatile *, long ); -extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long ); - -# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement -# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange -# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange -# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd - -#else -// under Windows CE we still have old-style Interlocked* functions - -extern "C" long __cdecl InterlockedIncrement( long* ); -extern "C" long __cdecl InterlockedDecrement( long* ); -extern "C" long __cdecl InterlockedCompareExchange( long*, long, long ); -extern "C" long __cdecl InterlockedExchange( long*, long ); -extern "C" long __cdecl InterlockedExchangeAdd( long*, long ); - -# define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement -# define BOOST_INTERLOCKED_DECREMENT InterlockedDecrement -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange -# define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange -# define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd - -#endif - -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \ - ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long*)(dest),(long)(exchange),(long)(compare))) -# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ - ((void*)BOOST_INTERLOCKED_EXCHANGE((long*)(dest),(long)(exchange))) - -#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN ) - -#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1500 - -#include - -#elif defined( __CLRCALL_PURE_OR_CDECL ) - -extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedIncrement( long volatile * ); -extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedDecrement( long volatile * ); -extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( long volatile *, long, long ); -extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchange( long volatile *, long ); -extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( long volatile *, long ); - -#else - -extern "C" long __cdecl _InterlockedIncrement( long volatile * ); -extern "C" long __cdecl _InterlockedDecrement( long volatile * ); -extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long ); -extern "C" long __cdecl _InterlockedExchange( long volatile *, long ); -extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long ); - -#endif - -# if defined(_M_IA64) || defined(_M_AMD64) - -extern "C" void* __cdecl _InterlockedCompareExchangePointer( void* volatile *, void*, void* ); -extern "C" void* __cdecl _InterlockedExchangePointer( void* volatile *, void* ); - -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer -# define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer - -# else - -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \ - ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare))) -# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ - ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange))) - -# endif - -# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement -# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange -# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange -# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd - -// Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets. -#elif defined(__MINGW64_VERSION_MAJOR) - -// MinGW-w64 provides intrin.h for both 32 and 64-bit targets. -#include - -# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement -# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange -# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange -# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd -# if defined(__x86_64__) || defined(__x86_64) -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer -# define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer -# else -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \ - ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare))) -# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ - ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange))) -# endif - -#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ ) - -#define BOOST_INTERLOCKED_IMPORT __declspec(dllimport) - -namespace boost -{ - -namespace detail -{ - -extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedIncrement( long volatile * ); -extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedDecrement( long volatile * ); -extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedCompareExchange( long volatile *, long, long ); -extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchange( long volatile *, long ); -extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchangeAdd( long volatile *, long ); - -# if defined(_M_IA64) || defined(_M_AMD64) -extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* ); -extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer( void* volatile *, void* ); -# endif - -} // namespace detail - -} // namespace boost - -# define BOOST_INTERLOCKED_INCREMENT ::boost::detail::InterlockedIncrement -# define BOOST_INTERLOCKED_DECREMENT ::boost::detail::InterlockedDecrement -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE ::boost::detail::InterlockedCompareExchange -# define BOOST_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange -# define BOOST_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd - -# if defined(_M_IA64) || defined(_M_AMD64) -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER ::boost::detail::InterlockedCompareExchangePointer -# define BOOST_INTERLOCKED_EXCHANGE_POINTER ::boost::detail::InterlockedExchangePointer -# else -# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \ - ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare))) -# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \ - ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange))) -# endif - -#else - -# error "Interlocked intrinsics not available" - -#endif - -#endif // #ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED diff --git a/third_party/boost_parts/boost/detail/is_function_ref_tester.hpp b/third_party/boost_parts/boost/detail/is_function_ref_tester.hpp deleted file mode 100644 index 8e7d1d77..00000000 --- a/third_party/boost_parts/boost/detail/is_function_ref_tester.hpp +++ /dev/null @@ -1,136 +0,0 @@ - -// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, -// Aleksey Gurtovoy, Howard Hinnant & John Maddock 2000. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#if !defined(BOOST_PP_IS_ITERATING) - -///// header body - -#ifndef BOOST_DETAIL_IS_FUNCTION_REF_TESTER_HPP_INCLUDED -#define BOOST_DETAIL_IS_FUNCTION_REF_TESTER_HPP_INCLUDED - -#include "boost/type_traits/detail/yes_no_type.hpp" -#include "boost/type_traits/config.hpp" - -#if defined(BOOST_TT_PREPROCESSING_MODE) -# include "boost/preprocessor/iterate.hpp" -# include "boost/preprocessor/enum_params.hpp" -# include "boost/preprocessor/comma_if.hpp" -#endif - -namespace boost { -namespace detail { -namespace is_function_ref_tester_ { - -template -boost::type_traits::no_type BOOST_TT_DECL is_function_ref_tester(T& ...); - -#if !defined(BOOST_TT_PREPROCESSING_MODE) -// preprocessor-generated part, don't edit by hand! - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23), int); - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(T0,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,T13,T14,T15,T16,T17,T18,T19,T20,T21,T22,T23,T24), int); - -#else - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3, (0, 25, "boost/detail/is_function_ref_tester.hpp")) -#include BOOST_PP_ITERATE() - -#endif // BOOST_TT_PREPROCESSING_MODE - -} // namespace detail -} // namespace python -} // namespace boost - -#endif // BOOST_DETAIL_IS_FUNCTION_REF_TESTER_HPP_INCLUDED - -///// iteration - -#else -#define i BOOST_PP_FRAME_ITERATION(1) - -template -boost::type_traits::yes_type is_function_ref_tester(R (&)(BOOST_PP_ENUM_PARAMS(i,T)), int); - -#undef i -#endif // BOOST_PP_IS_ITERATING - diff --git a/third_party/boost_parts/boost/detail/iterator.hpp b/third_party/boost_parts/boost/detail/iterator.hpp index c2e8f1e2..2498ef44 100644 --- a/third_party/boost_parts/boost/detail/iterator.hpp +++ b/third_party/boost_parts/boost/detail/iterator.hpp @@ -9,6 +9,9 @@ // This header is obsolete and will be deprecated. #include +#if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) +#include +#endif namespace boost { @@ -19,6 +22,16 @@ namespace detail using std::iterator_traits; using std::distance; +#if defined(__SUNPRO_CC) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) +// std::distance from stlport with Oracle compiler 12.4 and 12.5 fails to deduce template parameters +// when one of the arguments is an array and the other one is a pointer. +template< typename T, std::size_t N > +inline typename std::iterator_traits< T* >::difference_type distance(T (&left)[N], T* right) +{ + return std::distance(static_cast< T* >(left), right); +} +#endif + } // namespace detail } // namespace boost diff --git a/third_party/boost_parts/boost/detail/lcast_precision.hpp b/third_party/boost_parts/boost/detail/lcast_precision.hpp index 93abce18..2be88fd8 100644 --- a/third_party/boost_parts/boost/detail/lcast_precision.hpp +++ b/third_party/boost_parts/boost/detail/lcast_precision.hpp @@ -125,6 +125,7 @@ inline std::streamsize lcast_get_precision(T* = 0) limits::radix == 10 && limits::digits10 > 0; std::streamsize const streamsize_max = (boost::integer_traits::max)(); + (void)streamsize_max; if(is_specialized_bin) { // Floating-point types with diff --git a/third_party/boost_parts/boost/detail/numeric_traits.hpp b/third_party/boost_parts/boost/detail/numeric_traits.hpp index 2f97ebf9..a62affb3 100644 --- a/third_party/boost_parts/boost/detail/numeric_traits.hpp +++ b/third_party/boost_parts/boost/detail/numeric_traits.hpp @@ -56,65 +56,39 @@ // 21 Jan 2001 - Created (David Abrahams) #ifndef BOOST_NUMERIC_TRAITS_HPP_DWA20001901 -# define BOOST_NUMERIC_TRAITS_HPP_DWA20001901 - -# include -# include -# include -# include -# include -# include +#define BOOST_NUMERIC_TRAITS_HPP_DWA20001901 + +#include +#include +#include +#include +#include +#include +#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +#include +#include +#endif namespace boost { namespace detail { - // Template class is_signed -- determine whether a numeric type is signed - // Requires that T is constructable from the literals -1 and 0. Compile-time - // error results if that requirement is not met (and thus signedness is not - // likely to have meaning for that type). - template - struct is_signed - { -#if defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) - BOOST_STATIC_CONSTANT(bool, value = (Number(-1) < Number(0))); -#else - BOOST_STATIC_CONSTANT(bool, value = std::numeric_limits::is_signed); -#endif - }; - -# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS // digit_traits - compute the number of digits in a built-in integer // type. Needed for implementations on which numeric_limits is not specialized - // for intmax_t (e.g. VC6). - template struct digit_traits_select; - - // numeric_limits is specialized; just select that version of digits - template <> struct digit_traits_select + // for some integer types, like __int128 in libstdc++ (gcc). + template ::is_specialized> + struct digit_traits { - template struct traits - { - BOOST_STATIC_CONSTANT(int, digits = std::numeric_limits::digits); - }; + BOOST_STATIC_CONSTANT(int, digits = std::numeric_limits::digits); }; // numeric_limits is not specialized; compute digits from sizeof(T) - template <> struct digit_traits_select + template + struct digit_traits { - template struct traits - { - BOOST_STATIC_CONSTANT(int, digits = ( - sizeof(T) * std::numeric_limits::digits - - (is_signed::value ? 1 : 0)) - ); - }; - }; - - // here's the "usable" template - template struct digit_traits - { - typedef digit_traits_select< - ::std::numeric_limits::is_specialized> selector; - typedef typename selector::template traits traits; - BOOST_STATIC_CONSTANT(int, digits = traits::digits); + BOOST_STATIC_CONSTANT(int, digits = ( + sizeof(T) * std::numeric_limits::digits + - (boost::is_signed::value ? 1 : 0)) + ); }; #endif @@ -124,44 +98,48 @@ namespace boost { namespace detail { template struct integer_traits { -# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS +#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS private: typedef Integer integer_type; typedef std::numeric_limits x; public: - typedef typename - if_true<(int(x::is_signed) - && (!int(x::is_bounded) - // digits is the number of no-sign bits - || (int(x::digits) + 1 >= digit_traits::digits)))>::template then< + typedef typename boost::conditional< + (int(x::is_signed) + && (!int(x::is_bounded) + // digits is the number of no-sign bits + || (int(x::digits) + 1 >= digit_traits::digits))), Integer, - - typename if_true<(int(x::digits) + 1 < digit_traits::digits)>::template then< - signed int, - typename if_true<(int(x::digits) + 1 < digit_traits::digits)>::template then< - signed long, + typename boost::conditional< + (int(x::digits) + 1 < digit_traits::digits), + signed int, - // else - intmax_t - >::type>::type>::type difference_type; + typename boost::conditional< + (int(x::digits) + 1 < digit_traits::digits), + signed long, + boost::intmax_t + >::type + >::type + >::type difference_type; #else BOOST_STATIC_ASSERT(boost::is_integral::value); - typedef typename - if_true<(sizeof(Integer) >= sizeof(intmax_t))>::template then< - - typename if_true<(is_signed::value)>::template then< + typedef typename boost::conditional< + (sizeof(Integer) >= sizeof(intmax_t)), + + boost::conditional< + (boost::is_signed::value), Integer, - intmax_t - >::type, + boost::intmax_t + >, - typename if_true<(sizeof(Integer) < sizeof(std::ptrdiff_t))>::template then< + boost::conditional< + (sizeof(Integer) < sizeof(std::ptrdiff_t)), std::ptrdiff_t, - intmax_t - >::type - >::type difference_type; -# endif + boost::intmax_t + > + >::type::type difference_type; +#endif }; // Right now, only supports integers, but should be expanded. @@ -172,7 +150,7 @@ namespace boost { namespace detail { }; template - typename numeric_traits::difference_type numeric_distance(Number x, Number y) + inline BOOST_CONSTEXPR typename numeric_traits::difference_type numeric_distance(Number x, Number y) { typedef typename numeric_traits::difference_type difference_type; return difference_type(y) - difference_type(x); diff --git a/third_party/boost_parts/boost/detail/ob_call_traits.hpp b/third_party/boost_parts/boost/detail/ob_call_traits.hpp deleted file mode 100644 index eb4df7a3..00000000 --- a/third_party/boost_parts/boost/detail/ob_call_traits.hpp +++ /dev/null @@ -1,168 +0,0 @@ -// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. -// Use, modification and distribution are subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt). -// -// See http://www.boost.org/libs/utility for most recent version including documentation. -// -// Crippled version for crippled compilers: -// see libs/utility/call_traits.htm -// - -/* Release notes: - 01st October 2000: - Fixed call_traits on VC6, using "poor man's partial specialisation", - using ideas taken from "Generative programming" by Krzysztof Czarnecki - & Ulrich Eisenecker. -*/ - -#ifndef BOOST_OB_CALL_TRAITS_HPP -#define BOOST_OB_CALL_TRAITS_HPP - -#ifndef BOOST_CONFIG_HPP -#include -#endif - -#ifndef BOOST_ARITHMETIC_TYPE_TRAITS_HPP -#include -#endif -#ifndef BOOST_COMPOSITE_TYPE_TRAITS_HPP -#include -#endif - -namespace boost{ - -#ifdef BOOST_MSVC6_MEMBER_TEMPLATES -// -// use member templates to emulate -// partial specialisation: -// -namespace detail{ - -template -struct standard_call_traits -{ - typedef T value_type; - typedef T& reference; - typedef const T& const_reference; - typedef const T& param_type; -}; -template -struct simple_call_traits -{ - typedef T value_type; - typedef T& reference; - typedef const T& const_reference; - typedef const T param_type; -}; -template -struct reference_call_traits -{ - typedef T value_type; - typedef T reference; - typedef T const_reference; - typedef T param_type; -}; - -template -struct call_traits_chooser -{ - template - struct rebind - { - typedef standard_call_traits type; - }; -}; - -template <> -struct call_traits_chooser -{ - template - struct rebind - { - typedef simple_call_traits type; - }; -}; - -template <> -struct call_traits_chooser -{ - template - struct rebind - { - typedef reference_call_traits type; - }; -}; - -template -struct call_traits_sizeof_chooser2 -{ - template - struct small_rebind - { - typedef simple_call_traits small_type; - }; -}; - -template<> -struct call_traits_sizeof_chooser2 -{ - template - struct small_rebind - { - typedef standard_call_traits small_type; - }; -}; - -template <> -struct call_traits_chooser -{ - template - struct rebind - { - enum { sizeof_choice = (sizeof(T) <= sizeof(void*)) }; - typedef call_traits_sizeof_chooser2<(sizeof(T) <= sizeof(void*))> chooser; - typedef typename chooser::template small_rebind bound_type; - typedef typename bound_type::small_type type; - }; -}; - -} // namespace detail -template -struct call_traits -{ -private: - typedef detail::call_traits_chooser< - ::boost::is_pointer::value, - ::boost::is_arithmetic::value, - ::boost::is_reference::value - > chooser; - typedef typename chooser::template rebind bound_type; - typedef typename bound_type::type call_traits_type; -public: - typedef typename call_traits_type::value_type value_type; - typedef typename call_traits_type::reference reference; - typedef typename call_traits_type::const_reference const_reference; - typedef typename call_traits_type::param_type param_type; -}; - -#else -// -// sorry call_traits is completely non-functional -// blame your broken compiler: -// - -template -struct call_traits -{ - typedef T value_type; - typedef T& reference; - typedef const T& const_reference; - typedef const T& param_type; -}; - -#endif // member templates - -} - -#endif // BOOST_OB_CALL_TRAITS_HPP diff --git a/third_party/boost_parts/boost/detail/ob_compressed_pair.hpp b/third_party/boost_parts/boost/detail/ob_compressed_pair.hpp deleted file mode 100644 index 727acab6..00000000 --- a/third_party/boost_parts/boost/detail/ob_compressed_pair.hpp +++ /dev/null @@ -1,510 +0,0 @@ -// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. -// Use, modification and distribution are subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt). -// -// See http://www.boost.org/libs/utility for most recent version including documentation. -// see libs/utility/compressed_pair.hpp -// -/* Release notes: - 20 Jan 2001: - Fixed obvious bugs (David Abrahams) - 07 Oct 2000: - Added better single argument constructor support. - 03 Oct 2000: - Added VC6 support (JM). - 23rd July 2000: - Additional comments added. (JM) - Jan 2000: - Original version: this version crippled for use with crippled compilers - - John Maddock Jan 2000. -*/ - - -#ifndef BOOST_OB_COMPRESSED_PAIR_HPP -#define BOOST_OB_COMPRESSED_PAIR_HPP - -#include -#ifndef BOOST_OBJECT_TYPE_TRAITS_HPP -#include -#endif -#ifndef BOOST_SAME_TRAITS_HPP -#include -#endif -#ifndef BOOST_CALL_TRAITS_HPP -#include -#endif - -namespace boost -{ -#ifdef BOOST_MSVC6_MEMBER_TEMPLATES -// -// use member templates to emulate -// partial specialisation. Note that due to -// problems with overload resolution with VC6 -// each of the compressed_pair versions that follow -// have one template single-argument constructor -// in place of two specific constructors: -// - -template -class compressed_pair; - -namespace detail{ - -template -struct best_conversion_traits -{ - typedef char one; - typedef char (&two)[2]; - static A a; - static one test(T1); - static two test(T2); - - enum { value = sizeof(test(a)) }; -}; - -template -struct init_one; - -template <> -struct init_one<1> -{ - template - static void init(const A& a, T1* p1, T2*) - { - *p1 = a; - } -}; - -template <> -struct init_one<2> -{ - template - static void init(const A& a, T1*, T2* p2) - { - *p2 = a; - } -}; - - -// T1 != T2, both non-empty -template -class compressed_pair_0 -{ -private: - T1 _first; - T2 _second; -public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename call_traits::param_type first_param_type; - typedef typename call_traits::param_type second_param_type; - typedef typename call_traits::reference first_reference; - typedef typename call_traits::reference second_reference; - typedef typename call_traits::const_reference first_const_reference; - typedef typename call_traits::const_reference second_const_reference; - - compressed_pair_0() : _first(), _second() {} - compressed_pair_0(first_param_type x, second_param_type y) : _first(x), _second(y) {} - template - explicit compressed_pair_0(const A& val) - { - init_one::value>::init(val, &_first, &_second); - } - compressed_pair_0(const ::boost::compressed_pair& x) - : _first(x.first()), _second(x.second()) {} - -#if 0 - compressed_pair_0& operator=(const compressed_pair_0& x) { - cout << "assigning compressed pair 0" << endl; - _first = x._first; - _second = x._second; - cout << "finished assigning compressed pair 0" << endl; - return *this; - } -#endif - - first_reference first() { return _first; } - first_const_reference first() const { return _first; } - - second_reference second() { return _second; } - second_const_reference second() const { return _second; } - - void swap(compressed_pair_0& y) - { - using std::swap; - swap(_first, y._first); - swap(_second, y._second); - } -}; - -// T1 != T2, T2 empty -template -class compressed_pair_1 : T2 -{ -private: - T1 _first; -public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename call_traits::param_type first_param_type; - typedef typename call_traits::param_type second_param_type; - typedef typename call_traits::reference first_reference; - typedef typename call_traits::reference second_reference; - typedef typename call_traits::const_reference first_const_reference; - typedef typename call_traits::const_reference second_const_reference; - - compressed_pair_1() : T2(), _first() {} - compressed_pair_1(first_param_type x, second_param_type y) : T2(y), _first(x) {} - - template - explicit compressed_pair_1(const A& val) - { - init_one::value>::init(val, &_first, static_cast(this)); - } - - compressed_pair_1(const ::boost::compressed_pair& x) - : T2(x.second()), _first(x.first()) {} - -#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 - // Total weirdness. If the assignment to _first is moved after - // the call to the inherited operator=, then this breaks graph/test/graph.cpp - // by way of iterator_adaptor. - compressed_pair_1& operator=(const compressed_pair_1& x) { - _first = x._first; - T2::operator=(x); - return *this; - } -#endif - - first_reference first() { return _first; } - first_const_reference first() const { return _first; } - - second_reference second() { return *this; } - second_const_reference second() const { return *this; } - - void swap(compressed_pair_1& y) - { - // no need to swap empty base class: - using std::swap; - swap(_first, y._first); - } -}; - -// T1 != T2, T1 empty -template -class compressed_pair_2 : T1 -{ -private: - T2 _second; -public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename call_traits::param_type first_param_type; - typedef typename call_traits::param_type second_param_type; - typedef typename call_traits::reference first_reference; - typedef typename call_traits::reference second_reference; - typedef typename call_traits::const_reference first_const_reference; - typedef typename call_traits::const_reference second_const_reference; - - compressed_pair_2() : T1(), _second() {} - compressed_pair_2(first_param_type x, second_param_type y) : T1(x), _second(y) {} - template - explicit compressed_pair_2(const A& val) - { - init_one::value>::init(val, static_cast(this), &_second); - } - compressed_pair_2(const ::boost::compressed_pair& x) - : T1(x.first()), _second(x.second()) {} - -#if 0 - compressed_pair_2& operator=(const compressed_pair_2& x) { - cout << "assigning compressed pair 2" << endl; - T1::operator=(x); - _second = x._second; - cout << "finished assigning compressed pair 2" << endl; - return *this; - } -#endif - first_reference first() { return *this; } - first_const_reference first() const { return *this; } - - second_reference second() { return _second; } - second_const_reference second() const { return _second; } - - void swap(compressed_pair_2& y) - { - // no need to swap empty base class: - using std::swap; - swap(_second, y._second); - } -}; - -// T1 != T2, both empty -template -class compressed_pair_3 : T1, T2 -{ -public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename call_traits::param_type first_param_type; - typedef typename call_traits::param_type second_param_type; - typedef typename call_traits::reference first_reference; - typedef typename call_traits::reference second_reference; - typedef typename call_traits::const_reference first_const_reference; - typedef typename call_traits::const_reference second_const_reference; - - compressed_pair_3() : T1(), T2() {} - compressed_pair_3(first_param_type x, second_param_type y) : T1(x), T2(y) {} - template - explicit compressed_pair_3(const A& val) - { - init_one::value>::init(val, static_cast(this), static_cast(this)); - } - compressed_pair_3(const ::boost::compressed_pair& x) - : T1(x.first()), T2(x.second()) {} - - first_reference first() { return *this; } - first_const_reference first() const { return *this; } - - second_reference second() { return *this; } - second_const_reference second() const { return *this; } - - void swap(compressed_pair_3& y) - { - // no need to swap empty base classes: - } -}; - -// T1 == T2, and empty -template -class compressed_pair_4 : T1 -{ -public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename call_traits::param_type first_param_type; - typedef typename call_traits::param_type second_param_type; - typedef typename call_traits::reference first_reference; - typedef typename call_traits::reference second_reference; - typedef typename call_traits::const_reference first_const_reference; - typedef typename call_traits::const_reference second_const_reference; - - compressed_pair_4() : T1() {} - compressed_pair_4(first_param_type x, second_param_type y) : T1(x), m_second(y) {} - // only one single argument constructor since T1 == T2 - explicit compressed_pair_4(first_param_type x) : T1(x), m_second(x) {} - compressed_pair_4(const ::boost::compressed_pair& x) - : T1(x.first()), m_second(x.second()) {} - - first_reference first() { return *this; } - first_const_reference first() const { return *this; } - - second_reference second() { return m_second; } - second_const_reference second() const { return m_second; } - - void swap(compressed_pair_4& y) - { - // no need to swap empty base classes: - } -private: - T2 m_second; -}; - -// T1 == T2, not empty -template -class compressed_pair_5 -{ -private: - T1 _first; - T2 _second; -public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename call_traits::param_type first_param_type; - typedef typename call_traits::param_type second_param_type; - typedef typename call_traits::reference first_reference; - typedef typename call_traits::reference second_reference; - typedef typename call_traits::const_reference first_const_reference; - typedef typename call_traits::const_reference second_const_reference; - - compressed_pair_5() : _first(), _second() {} - compressed_pair_5(first_param_type x, second_param_type y) : _first(x), _second(y) {} - // only one single argument constructor since T1 == T2 - explicit compressed_pair_5(first_param_type x) : _first(x), _second(x) {} - compressed_pair_5(const ::boost::compressed_pair& c) - : _first(c.first()), _second(c.second()) {} - - first_reference first() { return _first; } - first_const_reference first() const { return _first; } - - second_reference second() { return _second; } - second_const_reference second() const { return _second; } - - void swap(compressed_pair_5& y) - { - using std::swap; - swap(_first, y._first); - swap(_second, y._second); - } -}; - -template -struct compressed_pair_chooser -{ - template - struct rebind - { - typedef compressed_pair_0 type; - }; -}; - -template <> -struct compressed_pair_chooser -{ - template - struct rebind - { - typedef compressed_pair_1 type; - }; -}; - -template <> -struct compressed_pair_chooser -{ - template - struct rebind - { - typedef compressed_pair_2 type; - }; -}; - -template <> -struct compressed_pair_chooser -{ - template - struct rebind - { - typedef compressed_pair_3 type; - }; -}; - -template <> -struct compressed_pair_chooser -{ - template - struct rebind - { - typedef compressed_pair_4 type; - }; -}; - -template <> -struct compressed_pair_chooser -{ - template - struct rebind - { - typedef compressed_pair_5 type; - }; -}; - -template -struct compressed_pair_traits -{ -private: - typedef compressed_pair_chooser::value, is_empty::value, is_same::value> chooser; - typedef typename chooser::template rebind bound_type; -public: - typedef typename bound_type::type type; -}; - -} // namespace detail - -template -class compressed_pair : public detail::compressed_pair_traits::type -{ -private: - typedef typename detail::compressed_pair_traits::type base_type; -public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename call_traits::param_type first_param_type; - typedef typename call_traits::param_type second_param_type; - typedef typename call_traits::reference first_reference; - typedef typename call_traits::reference second_reference; - typedef typename call_traits::const_reference first_const_reference; - typedef typename call_traits::const_reference second_const_reference; - - compressed_pair() : base_type() {} - compressed_pair(first_param_type x, second_param_type y) : base_type(x, y) {} - template - explicit compressed_pair(const A& x) : base_type(x){} - - first_reference first() { return base_type::first(); } - first_const_reference first() const { return base_type::first(); } - - second_reference second() { return base_type::second(); } - second_const_reference second() const { return base_type::second(); } -}; - -template -inline void swap(compressed_pair& x, compressed_pair& y) -{ - x.swap(y); -} - -#else -// no partial specialisation, no member templates: - -template -class compressed_pair -{ -private: - T1 _first; - T2 _second; -public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename call_traits::param_type first_param_type; - typedef typename call_traits::param_type second_param_type; - typedef typename call_traits::reference first_reference; - typedef typename call_traits::reference second_reference; - typedef typename call_traits::const_reference first_const_reference; - typedef typename call_traits::const_reference second_const_reference; - - compressed_pair() : _first(), _second() {} - compressed_pair(first_param_type x, second_param_type y) : _first(x), _second(y) {} - explicit compressed_pair(first_param_type x) : _first(x), _second() {} - // can't define this in case T1 == T2: - // explicit compressed_pair(second_param_type y) : _first(), _second(y) {} - - first_reference first() { return _first; } - first_const_reference first() const { return _first; } - - second_reference second() { return _second; } - second_const_reference second() const { return _second; } - - void swap(compressed_pair& y) - { - using std::swap; - swap(_first, y._first); - swap(_second, y._second); - } -}; - -template -inline void swap(compressed_pair& x, compressed_pair& y) -{ - x.swap(y); -} - -#endif - -} // boost - -#endif // BOOST_OB_COMPRESSED_PAIR_HPP - - - diff --git a/third_party/boost_parts/boost/detail/quick_allocator.hpp b/third_party/boost_parts/boost/detail/quick_allocator.hpp deleted file mode 100644 index d54b3a79..00000000 --- a/third_party/boost_parts/boost/detail/quick_allocator.hpp +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef BOOST_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED -#define BOOST_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// detail/quick_allocator.hpp -// -// Copyright (c) 2003 David Abrahams -// Copyright (c) 2003 Peter Dimov -// -// Distributed under the Boost Software License, Version 1.0. -// See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt -// - -#include - -#endif // #ifndef BOOST_DETAIL_QUICK_ALLOCATOR_HPP_INCLUDED diff --git a/third_party/boost_parts/boost/detail/utf8_codecvt_facet.hpp b/third_party/boost_parts/boost/detail/utf8_codecvt_facet.hpp index b3c7346d..12ae19ba 100644 --- a/third_party/boost_parts/boost/detail/utf8_codecvt_facet.hpp +++ b/third_party/boost_parts/boost/detail/utf8_codecvt_facet.hpp @@ -109,16 +109,14 @@ BOOST_UTF8_BEGIN_NAMESPACE #define BOOST_UTF8_DECL #endif -struct BOOST_SYMBOL_VISIBLE utf8_codecvt_facet : +struct BOOST_UTF8_DECL utf8_codecvt_facet : public std::codecvt { public: - BOOST_UTF8_DECL explicit utf8_codecvt_facet(std::size_t no_locale_manage=0) - : std::codecvt(no_locale_manage) - {} - virtual ~utf8_codecvt_facet(){} + explicit utf8_codecvt_facet(std::size_t no_locale_manage=0); + virtual ~utf8_codecvt_facet(){} protected: - BOOST_UTF8_DECL virtual std::codecvt_base::result do_in( + virtual std::codecvt_base::result do_in( std::mbstate_t& state, const char * from, const char * from_end, @@ -128,7 +126,7 @@ struct BOOST_SYMBOL_VISIBLE utf8_codecvt_facet : wchar_t*& to_next ) const; - BOOST_UTF8_DECL virtual std::codecvt_base::result do_out( + virtual std::codecvt_base::result do_out( std::mbstate_t & state, const wchar_t * from, const wchar_t * from_end, @@ -152,11 +150,11 @@ struct BOOST_SYMBOL_VISIBLE utf8_codecvt_facet : return get_octet_count(lead_octet) - 1; } - BOOST_UTF8_DECL static unsigned int get_octet_count(unsigned char lead_octet); + static unsigned int get_octet_count(unsigned char lead_octet); // How many "continuing octets" will be needed for this word // == total octets - 1. - BOOST_UTF8_DECL int get_cont_octet_out_count(wchar_t word) const ; + int get_cont_octet_out_count(wchar_t word) const ; virtual bool do_always_noconv() const BOOST_NOEXCEPT_OR_NOTHROW { return false; @@ -180,8 +178,8 @@ struct BOOST_SYMBOL_VISIBLE utf8_codecvt_facet : // How many char objects can I process to get <= max_limit // wchar_t objects? - BOOST_UTF8_DECL virtual int do_length( - const std::mbstate_t &, + virtual int do_length( + std::mbstate_t &, const char * from, const char * from_end, std::size_t max_limit @@ -190,8 +188,10 @@ struct BOOST_SYMBOL_VISIBLE utf8_codecvt_facet : throw() #endif ; + + // Nonstandard override virtual int do_length( - std::mbstate_t & s, + const std::mbstate_t & s, const char * from, const char * from_end, std::size_t max_limit @@ -201,12 +201,13 @@ struct BOOST_SYMBOL_VISIBLE utf8_codecvt_facet : #endif { return do_length( - const_cast(s), + const_cast(s), from, from_end, max_limit ); } + // Largest possible value do_length(state,from,from_end,1) could return. virtual int do_max_length() const BOOST_NOEXCEPT_OR_NOTHROW { return 6; // largest UTF-8 encoding of a UCS-4 character diff --git a/third_party/boost_parts/boost/detail/utf8_codecvt_facet.ipp b/third_party/boost_parts/boost/detail/utf8_codecvt_facet.ipp index a6a5e2d3..d60f9063 100644 --- a/third_party/boost_parts/boost/detail/utf8_codecvt_facet.ipp +++ b/third_party/boost_parts/boost/detail/utf8_codecvt_facet.ipp @@ -30,8 +30,14 @@ BOOST_UTF8_BEGIN_NAMESPACE /////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 // implementation for wchar_t +utf8_codecvt_facet::utf8_codecvt_facet( + std::size_t no_locale_manage +) : + std::codecvt(no_locale_manage) +{} + // Translate incoming UTF-8 into UCS-4 -BOOST_UTF8_DECL std::codecvt_base::result utf8_codecvt_facet::do_in( +std::codecvt_base::result utf8_codecvt_facet::do_in( std::mbstate_t& /*state*/, const char * from, const char * from_end, @@ -108,7 +114,7 @@ BOOST_UTF8_DECL std::codecvt_base::result utf8_codecvt_facet::do_in( else return std::codecvt_base::partial; } -BOOST_UTF8_DECL std::codecvt_base::result utf8_codecvt_facet::do_out( +std::codecvt_base::result utf8_codecvt_facet::do_out( std::mbstate_t& /*state*/, const wchar_t * from, const wchar_t * from_end, @@ -170,8 +176,8 @@ BOOST_UTF8_DECL std::codecvt_base::result utf8_codecvt_facet::do_out( // How many char objects can I process to get <= max_limit // wchar_t objects? -BOOST_UTF8_DECL int utf8_codecvt_facet::do_length( - const std::mbstate_t &, +int utf8_codecvt_facet::do_length( + std::mbstate_t &, const char * from, const char * from_end, std::size_t max_limit @@ -198,11 +204,11 @@ BOOST_UTF8_DECL int utf8_codecvt_facet::do_length( last_octet_count = (get_octet_count(*from_next)); ++char_count; } - return static_cast(from_next-from_end); + return static_cast(from_next-from); } -BOOST_UTF8_DECL unsigned int utf8_codecvt_facet::get_octet_count( - unsigned char lead_octet +unsigned int utf8_codecvt_facet::get_octet_count( + unsigned char lead_octet ){ // if the 0-bit (MSB) is 0, then 1 character if (lead_octet <= 0x7f) return 1; @@ -273,7 +279,7 @@ int get_cont_octet_out_count_impl<4>(wchar_t word){ // How many "continuing octets" will be needed for this word // == total octets - 1. -BOOST_UTF8_DECL int utf8_codecvt_facet::get_cont_octet_out_count( +int utf8_codecvt_facet::get_cont_octet_out_count( wchar_t word ) const { return detail::get_cont_octet_out_count_impl(word); diff --git a/third_party/boost_parts/boost/detail/workaround.hpp b/third_party/boost_parts/boost/detail/workaround.hpp index 40b3423b..fb961158 100644 --- a/third_party/boost_parts/boost/detail/workaround.hpp +++ b/third_party/boost_parts/boost/detail/workaround.hpp @@ -3,265 +3,8 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef WORKAROUND_DWA2002126_HPP -# define WORKAROUND_DWA2002126_HPP +#define WORKAROUND_DWA2002126_HPP -// Compiler/library version workaround macro -// -// Usage: -// -// #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) -// // workaround for eVC4 and VC6 -// ... // workaround code here -// #endif -// -// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the -// first argument must be undefined or expand to a numeric -// value. The above expands to: -// -// (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300 -// -// When used for workarounds that apply to the latest known version -// and all earlier versions of a compiler, the following convention -// should be observed: -// -// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301)) -// -// The version number in this case corresponds to the last version in -// which the workaround was known to have been required. When -// BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro -// BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates -// the workaround for any version of the compiler. When -// BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or -// error will be issued if the compiler version exceeds the argument -// to BOOST_TESTED_AT(). This can be used to locate workarounds which -// may be obsoleted by newer versions. - -# ifndef BOOST_STRICT_CONFIG - -#include - -#ifndef __BORLANDC__ -#define __BORLANDC___WORKAROUND_GUARD 1 -#else -#define __BORLANDC___WORKAROUND_GUARD 0 -#endif -#ifndef __CODEGEARC__ -#define __CODEGEARC___WORKAROUND_GUARD 1 -#else -#define __CODEGEARC___WORKAROUND_GUARD 0 -#endif -#ifndef _MSC_VER -#define _MSC_VER_WORKAROUND_GUARD 1 -#else -#define _MSC_VER_WORKAROUND_GUARD 0 -#endif -#ifndef _MSC_FULL_VER -#define _MSC_FULL_VER_WORKAROUND_GUARD 1 -#else -#define _MSC_FULL_VER_WORKAROUND_GUARD 0 -#endif -#ifndef BOOST_MSVC -#define BOOST_MSVC_WORKAROUND_GUARD 1 -#else -#define BOOST_MSVC_WORKAROUND_GUARD 0 -#endif -#ifndef BOOST_MSVC_FULL_VER -#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1 -#else -#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0 -#endif -#ifndef __GNUC__ -#define __GNUC___WORKAROUND_GUARD 1 -#else -#define __GNUC___WORKAROUND_GUARD 0 -#endif -#ifndef __GNUC_MINOR__ -#define __GNUC_MINOR___WORKAROUND_GUARD 1 -#else -#define __GNUC_MINOR___WORKAROUND_GUARD 0 -#endif -#ifndef __GNUC_PATCHLEVEL__ -#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 1 -#else -#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0 -#endif -#ifndef __IBMCPP__ -#define __IBMCPP___WORKAROUND_GUARD 1 -#else -#define __IBMCPP___WORKAROUND_GUARD 0 -#endif -#ifndef __SUNPRO_CC -#define __SUNPRO_CC_WORKAROUND_GUARD 1 -#else -#define __SUNPRO_CC_WORKAROUND_GUARD 0 -#endif -#ifndef __DECCXX_VER -#define __DECCXX_VER_WORKAROUND_GUARD 1 -#else -#define __DECCXX_VER_WORKAROUND_GUARD 0 -#endif -#ifndef __MWERKS__ -#define __MWERKS___WORKAROUND_GUARD 1 -#else -#define __MWERKS___WORKAROUND_GUARD 0 -#endif -#ifndef __EDG__ -#define __EDG___WORKAROUND_GUARD 1 -#else -#define __EDG___WORKAROUND_GUARD 0 -#endif -#ifndef __EDG_VERSION__ -#define __EDG_VERSION___WORKAROUND_GUARD 1 -#else -#define __EDG_VERSION___WORKAROUND_GUARD 0 -#endif -#ifndef __HP_aCC -#define __HP_aCC_WORKAROUND_GUARD 1 -#else -#define __HP_aCC_WORKAROUND_GUARD 0 -#endif -#ifndef __hpxstd98 -#define __hpxstd98_WORKAROUND_GUARD 1 -#else -#define __hpxstd98_WORKAROUND_GUARD 0 -#endif -#ifndef _CRAYC -#define _CRAYC_WORKAROUND_GUARD 1 -#else -#define _CRAYC_WORKAROUND_GUARD 0 -#endif -#ifndef __DMC__ -#define __DMC___WORKAROUND_GUARD 1 -#else -#define __DMC___WORKAROUND_GUARD 0 -#endif -#ifndef MPW_CPLUS -#define MPW_CPLUS_WORKAROUND_GUARD 1 -#else -#define MPW_CPLUS_WORKAROUND_GUARD 0 -#endif -#ifndef __COMO__ -#define __COMO___WORKAROUND_GUARD 1 -#else -#define __COMO___WORKAROUND_GUARD 0 -#endif -#ifndef __COMO_VERSION__ -#define __COMO_VERSION___WORKAROUND_GUARD 1 -#else -#define __COMO_VERSION___WORKAROUND_GUARD 0 -#endif -#ifndef __INTEL_COMPILER -#define __INTEL_COMPILER_WORKAROUND_GUARD 1 -#else -#define __INTEL_COMPILER_WORKAROUND_GUARD 0 -#endif -#ifndef __ICL -#define __ICL_WORKAROUND_GUARD 1 -#else -#define __ICL_WORKAROUND_GUARD 0 -#endif -#ifndef _COMPILER_VERSION -#define _COMPILER_VERSION_WORKAROUND_GUARD 1 -#else -#define _COMPILER_VERSION_WORKAROUND_GUARD 0 -#endif - -#ifndef _RWSTD_VER -#define _RWSTD_VER_WORKAROUND_GUARD 1 -#else -#define _RWSTD_VER_WORKAROUND_GUARD 0 -#endif -#ifndef BOOST_RWSTD_VER -#define BOOST_RWSTD_VER_WORKAROUND_GUARD 1 -#else -#define BOOST_RWSTD_VER_WORKAROUND_GUARD 0 -#endif -#ifndef __GLIBCPP__ -#define __GLIBCPP___WORKAROUND_GUARD 1 -#else -#define __GLIBCPP___WORKAROUND_GUARD 0 -#endif -#ifndef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC -#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1 -#else -#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 0 -#endif -#ifndef __SGI_STL_PORT -#define __SGI_STL_PORT_WORKAROUND_GUARD 1 -#else -#define __SGI_STL_PORT_WORKAROUND_GUARD 0 -#endif -#ifndef _STLPORT_VERSION -#define _STLPORT_VERSION_WORKAROUND_GUARD 1 -#else -#define _STLPORT_VERSION_WORKAROUND_GUARD 0 -#endif -#ifndef __LIBCOMO_VERSION__ -#define __LIBCOMO_VERSION___WORKAROUND_GUARD 1 -#else -#define __LIBCOMO_VERSION___WORKAROUND_GUARD 0 -#endif -#ifndef _CPPLIB_VER -#define _CPPLIB_VER_WORKAROUND_GUARD 1 -#else -#define _CPPLIB_VER_WORKAROUND_GUARD 0 -#endif - -#ifndef BOOST_INTEL_CXX_VERSION -#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 1 -#else -#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 0 -#endif -#ifndef BOOST_INTEL_WIN -#define BOOST_INTEL_WIN_WORKAROUND_GUARD 1 -#else -#define BOOST_INTEL_WIN_WORKAROUND_GUARD 0 -#endif -#ifndef BOOST_DINKUMWARE_STDLIB -#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 1 -#else -#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 0 -#endif -#ifndef BOOST_INTEL -#define BOOST_INTEL_WORKAROUND_GUARD 1 -#else -#define BOOST_INTEL_WORKAROUND_GUARD 0 -#endif -// Always define to zero, if it's used it'll be defined my MPL: -#define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0 - -# define BOOST_WORKAROUND(symbol, test) \ - ((symbol ## _WORKAROUND_GUARD + 0 == 0) && \ - (symbol != 0) && (1 % (( (symbol test) ) + 1))) -// ^ ^ ^ ^ -// The extra level of parenthesis nesting above, along with the -// BOOST_OPEN_PAREN indirection below, is required to satisfy the -// broken preprocessor in MWCW 8.3 and earlier. -// -// The basic mechanism works as follows: -// (symbol test) + 1 => if (symbol test) then 2 else 1 -// 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0 -// -// The complication with % is for cooperation with BOOST_TESTED_AT(). -// When "test" is BOOST_TESTED_AT(x) and -// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined, -// -// symbol test => if (symbol <= x) then 1 else -1 -// (symbol test) + 1 => if (symbol <= x) then 2 else 0 -// 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero -// - -# ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS -# define BOOST_OPEN_PAREN ( -# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1 -# else -# define BOOST_TESTED_AT(value) != ((value)-(value)) -# endif - -# else - -# define BOOST_WORKAROUND(symbol, test) 0 - -# endif +#include #endif // WORKAROUND_DWA2002126_HPP diff --git a/third_party/boost_parts/boost/dynamic_bitset/dynamic_bitset.hpp b/third_party/boost_parts/boost/dynamic_bitset/dynamic_bitset.hpp index f6002d84..83fcb61a 100644 --- a/third_party/boost_parts/boost/dynamic_bitset/dynamic_bitset.hpp +++ b/third_party/boost_parts/boost/dynamic_bitset/dynamic_bitset.hpp @@ -86,7 +86,7 @@ class dynamic_bitset // the one and only non-copy ctor - reference(block_type & b, block_type pos) + reference(block_type & b, block_width_type pos) :m_block(b), m_mask( (assert(pos < bits_per_block), block_type(1) << pos ) @@ -305,6 +305,9 @@ class dynamic_bitset size_type num_blocks() const BOOST_NOEXCEPT; size_type max_size() const BOOST_NOEXCEPT; bool empty() const BOOST_NOEXCEPT; + size_type capacity() const BOOST_NOEXCEPT; + void reserve(size_type num_bits); + void shrink_to_fit(); bool is_subset_of(const dynamic_bitset& a) const; bool is_proper_subset_of(const dynamic_bitset& a) const; @@ -325,6 +328,10 @@ class dynamic_bitset friend bool operator<(const dynamic_bitset& a, const dynamic_bitset& b); + template + friend bool oplessthan(const dynamic_bitset& a, + const dynamic_bitset& b); + template friend void to_block_range(const dynamic_bitset& b, @@ -345,6 +352,10 @@ class dynamic_bitset #endif +public: + // forward declaration for optional zero-copy serialization support + class serialize_impl; + friend class serialize_impl; private: BOOST_STATIC_CONSTANT(block_width_type, ulong_width = std::numeric_limits::digits); @@ -750,15 +761,15 @@ push_back(bool bit) template void dynamic_bitset:: -pop_back() +pop_back() { const size_type old_num_blocks = num_blocks(); const size_type required_blocks = calc_num_blocks(m_num_bits - 1); - + if (required_blocks != old_num_blocks) { - m_bits.pop_back(); + m_bits.pop_back(); } - + --m_num_bits; m_zero_unused_bits(); } @@ -966,7 +977,7 @@ template dynamic_bitset& dynamic_bitset::set() { - std::fill(m_bits.begin(), m_bits.end(), ~Block(0)); + std::fill(m_bits.begin(), m_bits.end(), static_cast(~0)); m_zero_unused_bits(); return *this; } @@ -1045,7 +1056,7 @@ bool dynamic_bitset::all() const } const block_width_type extra_bits = count_extra_bits(); - block_type const all_ones = ~static_cast(0); + block_type const all_ones = static_cast(~0); if (extra_bits == 0) { for (size_type i = 0, e = num_blocks(); i < e; ++i) { @@ -1059,7 +1070,7 @@ bool dynamic_bitset::all() const return false; } } - block_type const mask = ~(~static_cast(0) << extra_bits); + const block_type mask = (block_type(1) << extra_bits) - 1; if (m_highest_block() != mask) { return false; } @@ -1267,6 +1278,27 @@ inline bool dynamic_bitset::empty() const BOOST_NOEXCEPT return size() == 0; } +template +inline typename dynamic_bitset::size_type +dynamic_bitset::capacity() const BOOST_NOEXCEPT +{ + return m_bits.capacity() * bits_per_block; +} + +template +inline void dynamic_bitset::reserve(size_type num_bits) +{ + m_bits.reserve(calc_num_blocks(num_bits)); +} + +template +void dynamic_bitset::shrink_to_fit() +{ + if (m_bits.size() < m_bits.capacity()) { + buffer_type(m_bits).swap(m_bits); + } +} + template bool dynamic_bitset:: is_subset_of(const dynamic_bitset& a) const @@ -1392,23 +1424,95 @@ template bool operator<(const dynamic_bitset& a, const dynamic_bitset& b) { - assert(a.size() == b.size()); - typedef typename dynamic_bitset::size_type size_type; +// assert(a.size() == b.size()); - //if (a.size() == 0) - // return false; + typedef BOOST_DEDUCED_TYPENAME dynamic_bitset::size_type size_type; + + size_type asize(a.size()); + size_type bsize(b.size()); - // Since we are storing the most significant bit - // at pos == size() - 1, we need to do the comparisons in reverse. - // - for (size_type ii = a.num_blocks(); ii > 0; --ii) { - size_type i = ii-1; - if (a.m_bits[i] < b.m_bits[i]) + if (!bsize) + { + return false; + } + else if (!asize) + { return true; - else if (a.m_bits[i] > b.m_bits[i]) + } + else if (asize == bsize) + { + for (size_type ii = a.num_blocks(); ii > 0; --ii) + { + size_type i = ii-1; + if (a.m_bits[i] < b.m_bits[i]) + return true; + else if (a.m_bits[i] > b.m_bits[i]) + return false; + } return false; - } - return false; + } + else + { + + size_type leqsize(std::min BOOST_PREVENT_MACRO_SUBSTITUTION(asize,bsize)); + + for (size_type ii = 0; ii < leqsize; ++ii,--asize,--bsize) + { + size_type i = asize-1; + size_type j = bsize-1; + if (a[i] < b[j]) + return true; + else if (a[i] > b[j]) + return false; + } + return (a.size() < b.size()); + } +} + +template +bool oplessthan(const dynamic_bitset& a, + const dynamic_bitset& b) +{ +// assert(a.size() == b.size()); + + typedef BOOST_DEDUCED_TYPENAME dynamic_bitset::size_type size_type; + + size_type asize(a.num_blocks()); + size_type bsize(b.num_blocks()); + assert(asize == 3); + assert(bsize == 4); + + if (!bsize) + { + return false; + } + else if (!asize) + { + return true; + } + else + { + + size_type leqsize(std::min BOOST_PREVENT_MACRO_SUBSTITUTION(asize,bsize)); + assert(leqsize == 3); + + //if (a.size() == 0) + // return false; + + // Since we are storing the most significant bit + // at pos == size() - 1, we need to do the comparisons in reverse. + // + for (size_type ii = 0; ii < leqsize; ++ii,--asize,--bsize) + { + size_type i = asize-1; + size_type j = bsize-1; + if (a.m_bits[i] < b.m_bits[j]) + return true; + else if (a.m_bits[i] > b.m_bits[j]) + return false; + } + return (a.num_blocks() < b.num_blocks()); + } } template @@ -1836,8 +1940,7 @@ inline void dynamic_bitset::m_zero_unused_bits() const block_width_type extra_bits = count_extra_bits(); if (extra_bits != 0) - m_highest_block() &= ~(~static_cast(0) << extra_bits); - + m_highest_block() &= (Block(1) << extra_bits) - 1; } // check class invariants @@ -1846,7 +1949,7 @@ bool dynamic_bitset::m_check_invariants() const { const block_width_type extra_bits = count_extra_bits(); if (extra_bits > 0) { - block_type const mask = (~static_cast(0) << extra_bits); + const block_type mask = block_type(~0) << extra_bits; if ((m_highest_block() & mask) != 0) return false; } diff --git a/third_party/boost_parts/boost/exception/detail/attribute_noreturn.hpp b/third_party/boost_parts/boost/exception/detail/attribute_noreturn.hpp deleted file mode 100644 index ae9f031e..00000000 --- a/third_party/boost_parts/boost/exception/detail/attribute_noreturn.hpp +++ /dev/null @@ -1,17 +0,0 @@ -//Copyright (c) 2009 Emil Dotchevski and Reverge Studios, Inc. - -//Distributed under the Boost Software License, Version 1.0. (See accompanying -//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef UUID_61531AB0680611DEADD5846855D89593 -#define UUID_61531AB0680611DEADD5846855D89593 - -#if defined(_MSC_VER) -#define BOOST_ATTRIBUTE_NORETURN __declspec(noreturn) -#elif defined(__GNUC__) -#define BOOST_ATTRIBUTE_NORETURN __attribute__((__noreturn__)) -#else -#define BOOST_ATTRIBUTE_NORETURN -#endif - -#endif diff --git a/third_party/boost_parts/boost/exception/exception.hpp b/third_party/boost_parts/boost/exception/exception.hpp index 1f2bd9c2..c0fdaf9e 100644 --- a/third_party/boost_parts/boost/exception/exception.hpp +++ b/third_party/boost_parts/boost/exception/exception.hpp @@ -12,6 +12,14 @@ #pragma warning(push,1) #endif +#ifdef BOOST_EXCEPTION_MINI_BOOST +#include +namespace boost { namespace exception_detail { using std::shared_ptr; } } +#else +namespace boost { template class shared_ptr; }; +namespace boost { namespace exception_detail { using boost::shared_ptr; } } +#endif + namespace boost { @@ -144,9 +152,6 @@ boost # endif #endif - template - class shared_ptr; - namespace exception_detail { @@ -182,6 +187,18 @@ boost template <> struct get_info; + template + struct set_info_rv; + + template <> + struct set_info_rv; + + template <> + struct set_info_rv; + + template <> + struct set_info_rv; + char const * get_diagnostic_information( exception const &, char const * ); void copy_boost_exception( exception *, exception const * ); @@ -264,6 +281,11 @@ boost friend struct exception_detail::get_info; friend struct exception_detail::get_info; friend struct exception_detail::get_info; + template + friend struct exception_detail::set_info_rv; + friend struct exception_detail::set_info_rv; + friend struct exception_detail::set_info_rv; + friend struct exception_detail::set_info_rv; friend void exception_detail::copy_boost_exception( exception *, exception const * ); #endif mutable exception_detail::refcount_ptr data_; diff --git a/third_party/boost_parts/boost/function.hpp b/third_party/boost_parts/boost/function.hpp index b72842bb..68a25ab0 100644 --- a/third_party/boost_parts/boost/function.hpp +++ b/third_party/boost_parts/boost/function.hpp @@ -10,15 +10,21 @@ // William Kempf, Jesse Jones and Karl Nelson were all very helpful in the // design of this library. +#ifndef BOOST_FUNCTION_MAX_ARGS +# define BOOST_FUNCTION_MAX_ARGS 10 +#endif // BOOST_FUNCTION_MAX_ARGS + +#if !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) || (BOOST_FUNCTION_MAX_ARGS_DEFINED != BOOST_FUNCTION_MAX_ARGS) + +#if !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) +#define BOOST_FUNCTION_MAX_ARGS_DEFINED 0 +#endif + #include // unary_function, binary_function #include #include -#ifndef BOOST_FUNCTION_MAX_ARGS -# define BOOST_FUNCTION_MAX_ARGS 10 -#endif // BOOST_FUNCTION_MAX_ARGS - // Include the prologue here so that the use of file-level iteration // in anything that may be included by function_template.hpp doesn't break #include @@ -64,3 +70,5 @@ # include BOOST_PP_ITERATE() # undef BOOST_PP_ITERATION_PARAMS_1 #endif + +#endif // !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) || (BOOST_FUNCTION_MAX_ARGS_DEFINED != BOOST_FUNCTION_MAX_ARGS) diff --git a/third_party/boost_parts/boost/function/detail/gen_maybe_include.pl b/third_party/boost_parts/boost/function/detail/gen_maybe_include.pl index d0629205..bc409840 100644 --- a/third_party/boost_parts/boost/function/detail/gen_maybe_include.pl +++ b/third_party/boost_parts/boost/function/detail/gen_maybe_include.pl @@ -27,6 +27,8 @@ print OUT "#elif"; } print OUT " BOOST_FUNCTION_NUM_ARGS == $on_arg\n"; + print OUT "# undef BOOST_FUNCTION_MAX_ARGS_DEFINED\n"; + print OUT "# define BOOST_FUNCTION_MAX_ARGS_DEFINED $on_arg\n"; print OUT "# ifndef BOOST_FUNCTION_$on_arg\n"; print OUT "# define BOOST_FUNCTION_$on_arg\n"; print OUT "# include \n"; diff --git a/third_party/boost_parts/boost/function/detail/maybe_include.hpp b/third_party/boost_parts/boost/function/detail/maybe_include.hpp index 92f71bb2..ec88905d 100644 --- a/third_party/boost_parts/boost/function/detail/maybe_include.hpp +++ b/third_party/boost_parts/boost/function/detail/maybe_include.hpp @@ -8,256 +8,358 @@ // For more information, see http://www.boost.org #if BOOST_FUNCTION_NUM_ARGS == 0 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 0 # ifndef BOOST_FUNCTION_0 # define BOOST_FUNCTION_0 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 1 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 1 # ifndef BOOST_FUNCTION_1 # define BOOST_FUNCTION_1 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 2 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 2 # ifndef BOOST_FUNCTION_2 # define BOOST_FUNCTION_2 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 3 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 3 # ifndef BOOST_FUNCTION_3 # define BOOST_FUNCTION_3 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 4 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 4 # ifndef BOOST_FUNCTION_4 # define BOOST_FUNCTION_4 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 5 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 5 # ifndef BOOST_FUNCTION_5 # define BOOST_FUNCTION_5 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 6 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 6 # ifndef BOOST_FUNCTION_6 # define BOOST_FUNCTION_6 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 7 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 7 # ifndef BOOST_FUNCTION_7 # define BOOST_FUNCTION_7 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 8 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 8 # ifndef BOOST_FUNCTION_8 # define BOOST_FUNCTION_8 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 9 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 9 # ifndef BOOST_FUNCTION_9 # define BOOST_FUNCTION_9 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 10 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 10 # ifndef BOOST_FUNCTION_10 # define BOOST_FUNCTION_10 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 11 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 11 # ifndef BOOST_FUNCTION_11 # define BOOST_FUNCTION_11 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 12 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 12 # ifndef BOOST_FUNCTION_12 # define BOOST_FUNCTION_12 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 13 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 13 # ifndef BOOST_FUNCTION_13 # define BOOST_FUNCTION_13 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 14 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 14 # ifndef BOOST_FUNCTION_14 # define BOOST_FUNCTION_14 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 15 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 15 # ifndef BOOST_FUNCTION_15 # define BOOST_FUNCTION_15 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 16 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 16 # ifndef BOOST_FUNCTION_16 # define BOOST_FUNCTION_16 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 17 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 17 # ifndef BOOST_FUNCTION_17 # define BOOST_FUNCTION_17 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 18 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 18 # ifndef BOOST_FUNCTION_18 # define BOOST_FUNCTION_18 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 19 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 19 # ifndef BOOST_FUNCTION_19 # define BOOST_FUNCTION_19 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 20 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 20 # ifndef BOOST_FUNCTION_20 # define BOOST_FUNCTION_20 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 21 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 21 # ifndef BOOST_FUNCTION_21 # define BOOST_FUNCTION_21 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 22 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 22 # ifndef BOOST_FUNCTION_22 # define BOOST_FUNCTION_22 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 23 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 23 # ifndef BOOST_FUNCTION_23 # define BOOST_FUNCTION_23 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 24 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 24 # ifndef BOOST_FUNCTION_24 # define BOOST_FUNCTION_24 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 25 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 25 # ifndef BOOST_FUNCTION_25 # define BOOST_FUNCTION_25 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 26 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 26 # ifndef BOOST_FUNCTION_26 # define BOOST_FUNCTION_26 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 27 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 27 # ifndef BOOST_FUNCTION_27 # define BOOST_FUNCTION_27 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 28 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 28 # ifndef BOOST_FUNCTION_28 # define BOOST_FUNCTION_28 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 29 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 29 # ifndef BOOST_FUNCTION_29 # define BOOST_FUNCTION_29 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 30 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 30 # ifndef BOOST_FUNCTION_30 # define BOOST_FUNCTION_30 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 31 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 31 # ifndef BOOST_FUNCTION_31 # define BOOST_FUNCTION_31 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 32 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 32 # ifndef BOOST_FUNCTION_32 # define BOOST_FUNCTION_32 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 33 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 33 # ifndef BOOST_FUNCTION_33 # define BOOST_FUNCTION_33 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 34 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 34 # ifndef BOOST_FUNCTION_34 # define BOOST_FUNCTION_34 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 35 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 35 # ifndef BOOST_FUNCTION_35 # define BOOST_FUNCTION_35 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 36 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 36 # ifndef BOOST_FUNCTION_36 # define BOOST_FUNCTION_36 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 37 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 37 # ifndef BOOST_FUNCTION_37 # define BOOST_FUNCTION_37 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 38 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 38 # ifndef BOOST_FUNCTION_38 # define BOOST_FUNCTION_38 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 39 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 39 # ifndef BOOST_FUNCTION_39 # define BOOST_FUNCTION_39 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 40 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 40 # ifndef BOOST_FUNCTION_40 # define BOOST_FUNCTION_40 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 41 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 41 # ifndef BOOST_FUNCTION_41 # define BOOST_FUNCTION_41 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 42 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 42 # ifndef BOOST_FUNCTION_42 # define BOOST_FUNCTION_42 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 43 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 43 # ifndef BOOST_FUNCTION_43 # define BOOST_FUNCTION_43 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 44 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 44 # ifndef BOOST_FUNCTION_44 # define BOOST_FUNCTION_44 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 45 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 45 # ifndef BOOST_FUNCTION_45 # define BOOST_FUNCTION_45 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 46 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 46 # ifndef BOOST_FUNCTION_46 # define BOOST_FUNCTION_46 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 47 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 47 # ifndef BOOST_FUNCTION_47 # define BOOST_FUNCTION_47 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 48 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 48 # ifndef BOOST_FUNCTION_48 # define BOOST_FUNCTION_48 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 49 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 49 # ifndef BOOST_FUNCTION_49 # define BOOST_FUNCTION_49 # include # endif #elif BOOST_FUNCTION_NUM_ARGS == 50 +# undef BOOST_FUNCTION_MAX_ARGS_DEFINED +# define BOOST_FUNCTION_MAX_ARGS_DEFINED 50 # ifndef BOOST_FUNCTION_50 # define BOOST_FUNCTION_50 # include diff --git a/third_party/boost_parts/boost/function/function_base.hpp b/third_party/boost_parts/boost/function/function_base.hpp index 35c1995e..841affb4 100644 --- a/third_party/boost_parts/boost/function/function_base.hpp +++ b/third_party/boost_parts/boost/function/function_base.hpp @@ -16,9 +16,9 @@ #include #include #include -#include #include #include +#include #include #include #include @@ -41,28 +41,6 @@ # pragma warning( push ) # pragma warning( disable : 4793 ) // complaint about native code generation # pragma warning( disable : 4127 ) // "conditional expression is constant" -#endif - -// Define BOOST_FUNCTION_STD_NS to the namespace that contains type_info. -#ifdef BOOST_NO_STD_TYPEINFO -// Embedded VC++ does not have type_info in namespace std -# define BOOST_FUNCTION_STD_NS -#else -# define BOOST_FUNCTION_STD_NS std -#endif - -// Borrowed from Boost.Python library: determines the cases where we -// need to use std::type_info::name to compare instead of operator==. -#if defined( BOOST_NO_TYPEID ) -# define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y)) -#elif defined(__GNUC__) \ - || defined(_AIX) \ - || ( defined(__sgi) && defined(__host_mips)) -# include -# define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) \ - (std::strcmp((X).name(),(Y).name()) == 0) -# else -# define BOOST_FUNCTION_COMPARE_TYPE_ID(X,Y) ((X)==(Y)) #endif #if defined(__ICL) && __ICL <= 600 || defined(__MWERKS__) && __MWERKS__ < 0x2406 && !defined(BOOST_STRICT_CONFIG) @@ -87,15 +65,16 @@ namespace boost { * object pointers, and a structure that resembles a bound * member function pointer. */ - union function_buffer + union function_buffer_members { // For pointers to function objects - mutable void* obj_ptr; + typedef void* obj_ptr_t; + mutable obj_ptr_t obj_ptr; // For pointers to std::type_info objects struct type_t { // (get_functor_type_tag, check_functor_type_tag). - const detail::sp_typeinfo* type; + const boost::typeindex::type_info* type; // Whether the type is const-qualified. bool const_qualified; @@ -104,7 +83,8 @@ namespace boost { } type; // For function pointers of all kinds - mutable void (*func_ptr)(); + typedef void (*func_ptr_t)(); + mutable func_ptr_t func_ptr; // For bound member pointers struct bound_memfunc_ptr_t { @@ -119,9 +99,15 @@ namespace boost { bool is_const_qualified; bool is_volatile_qualified; } obj_ref; + }; + + union function_buffer + { + // Type-specific union members + mutable function_buffer_members members; // To relax aliasing constraints - mutable char data; + mutable char data[sizeof(function_buffer_members)]; }; /** @@ -188,45 +174,42 @@ namespace boost { struct reference_manager { static inline void - manage(const function_buffer& in_buffer, function_buffer& out_buffer, + manage(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op) { switch (op) { - case clone_functor_tag: - out_buffer.obj_ref = in_buffer.obj_ref; + case clone_functor_tag: + out_buffer.members.obj_ref = in_buffer.members.obj_ref; return; case move_functor_tag: - out_buffer.obj_ref = in_buffer.obj_ref; - in_buffer.obj_ref.obj_ptr = 0; + out_buffer.members.obj_ref = in_buffer.members.obj_ref; + in_buffer.members.obj_ref.obj_ptr = 0; return; case destroy_functor_tag: - out_buffer.obj_ref.obj_ptr = 0; + out_buffer.members.obj_ref.obj_ptr = 0; return; case check_functor_type_tag: { - const detail::sp_typeinfo& check_type - = *out_buffer.type.type; - // Check whether we have the same type. We can add // cv-qualifiers, but we can't take them away. - if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(F)) - && (!in_buffer.obj_ref.is_const_qualified - || out_buffer.type.const_qualified) - && (!in_buffer.obj_ref.is_volatile_qualified - || out_buffer.type.volatile_qualified)) - out_buffer.obj_ptr = in_buffer.obj_ref.obj_ptr; + if (*out_buffer.members.type.type == boost::typeindex::type_id() + && (!in_buffer.members.obj_ref.is_const_qualified + || out_buffer.members.type.const_qualified) + && (!in_buffer.members.obj_ref.is_volatile_qualified + || out_buffer.members.type.volatile_qualified)) + out_buffer.members.obj_ptr = in_buffer.members.obj_ref.obj_ptr; else - out_buffer.obj_ptr = 0; + out_buffer.members.obj_ptr = 0; } return; case get_functor_type_tag: - out_buffer.type.type = &BOOST_SP_TYPEID(F); - out_buffer.type.const_qualified = in_buffer.obj_ref.is_const_qualified; - out_buffer.type.volatile_qualified = in_buffer.obj_ref.is_volatile_qualified; + out_buffer.members.type.type = &boost::typeindex::type_id().type_info(); + out_buffer.members.type.const_qualified = in_buffer.members.obj_ref.is_const_qualified; + out_buffer.members.type.volatile_qualified = in_buffer.members.obj_ref.is_volatile_qualified; return; } } @@ -240,9 +223,9 @@ namespace boost { struct function_allows_small_object_optimization { BOOST_STATIC_CONSTANT - (bool, + (bool, value = ((sizeof(F) <= sizeof(function_buffer) && - (alignment_of::value + (alignment_of::value % alignment_of::value == 0)))); }; @@ -254,7 +237,7 @@ namespace boost { A(a) { } - + functor_wrapper(const functor_wrapper& f) : F(static_cast(f)), A(static_cast(f)) @@ -273,61 +256,57 @@ namespace boost { // Function pointers static inline void - manage_ptr(const function_buffer& in_buffer, function_buffer& out_buffer, + manage_ptr(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op) { if (op == clone_functor_tag) - out_buffer.func_ptr = in_buffer.func_ptr; + out_buffer.members.func_ptr = in_buffer.members.func_ptr; else if (op == move_functor_tag) { - out_buffer.func_ptr = in_buffer.func_ptr; - in_buffer.func_ptr = 0; + out_buffer.members.func_ptr = in_buffer.members.func_ptr; + in_buffer.members.func_ptr = 0; } else if (op == destroy_functor_tag) - out_buffer.func_ptr = 0; + out_buffer.members.func_ptr = 0; else if (op == check_functor_type_tag) { - const boost::detail::sp_typeinfo& check_type - = *out_buffer.type.type; - if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) - out_buffer.obj_ptr = &in_buffer.func_ptr; + if (*out_buffer.members.type.type == boost::typeindex::type_id()) + out_buffer.members.obj_ptr = &in_buffer.members.func_ptr; else - out_buffer.obj_ptr = 0; + out_buffer.members.obj_ptr = 0; } else /* op == get_functor_type_tag */ { - out_buffer.type.type = &BOOST_SP_TYPEID(Functor); - out_buffer.type.const_qualified = false; - out_buffer.type.volatile_qualified = false; + out_buffer.members.type.type = &boost::typeindex::type_id().type_info(); + out_buffer.members.type.const_qualified = false; + out_buffer.members.type.volatile_qualified = false; } } // Function objects that fit in the small-object buffer. static inline void - manage_small(const function_buffer& in_buffer, function_buffer& out_buffer, + manage_small(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op) { if (op == clone_functor_tag || op == move_functor_tag) { - const functor_type* in_functor = - reinterpret_cast(&in_buffer.data); - new (reinterpret_cast(&out_buffer.data)) functor_type(*in_functor); + const functor_type* in_functor = + reinterpret_cast(in_buffer.data); + new (reinterpret_cast(out_buffer.data)) functor_type(*in_functor); if (op == move_functor_tag) { - functor_type* f = reinterpret_cast(&in_buffer.data); + functor_type* f = reinterpret_cast(in_buffer.data); (void)f; // suppress warning about the value of f not being used (MSVC) f->~Functor(); } } else if (op == destroy_functor_tag) { // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type. - functor_type* f = reinterpret_cast(&out_buffer.data); + functor_type* f = reinterpret_cast(out_buffer.data); (void)f; // suppress warning about the value of f not being used (MSVC) f->~Functor(); } else if (op == check_functor_type_tag) { - const detail::sp_typeinfo& check_type - = *out_buffer.type.type; - if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) - out_buffer.obj_ptr = &in_buffer.data; + if (*out_buffer.members.type.type == boost::typeindex::type_id()) + out_buffer.members.obj_ptr = in_buffer.data; else - out_buffer.obj_ptr = 0; + out_buffer.members.obj_ptr = 0; } else /* op == get_functor_type_tag */ { - out_buffer.type.type = &BOOST_SP_TYPEID(Functor); - out_buffer.type.const_qualified = false; - out_buffer.type.volatile_qualified = false; + out_buffer.members.type.type = &boost::typeindex::type_id().type_info(); + out_buffer.members.type.const_qualified = false; + out_buffer.members.type.volatile_qualified = false; } } }; @@ -340,7 +319,7 @@ namespace boost { // Function pointers static inline void - manager(const function_buffer& in_buffer, function_buffer& out_buffer, + manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, function_ptr_tag) { functor_manager_common::manage_ptr(in_buffer,out_buffer,op); @@ -348,15 +327,15 @@ namespace boost { // Function objects that fit in the small-object buffer. static inline void - manager(const function_buffer& in_buffer, function_buffer& out_buffer, + manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, mpl::true_) { functor_manager_common::manage_small(in_buffer,out_buffer,op); } - + // Function objects that require heap allocation static inline void - manager(const function_buffer& in_buffer, function_buffer& out_buffer, + manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, mpl::false_) { if (op == clone_functor_tag) { @@ -366,29 +345,27 @@ namespace boost { // jewillco: Changing this to static_cast because GCC 2.95.3 is // obsolete. const functor_type* f = - static_cast(in_buffer.obj_ptr); + static_cast(in_buffer.members.obj_ptr); functor_type* new_f = new functor_type(*f); - out_buffer.obj_ptr = new_f; + out_buffer.members.obj_ptr = new_f; } else if (op == move_functor_tag) { - out_buffer.obj_ptr = in_buffer.obj_ptr; - in_buffer.obj_ptr = 0; + out_buffer.members.obj_ptr = in_buffer.members.obj_ptr; + in_buffer.members.obj_ptr = 0; } else if (op == destroy_functor_tag) { /* Cast from the void pointer to the functor pointer type */ functor_type* f = - static_cast(out_buffer.obj_ptr); + static_cast(out_buffer.members.obj_ptr); delete f; - out_buffer.obj_ptr = 0; + out_buffer.members.obj_ptr = 0; } else if (op == check_functor_type_tag) { - const detail::sp_typeinfo& check_type - = *out_buffer.type.type; - if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) - out_buffer.obj_ptr = in_buffer.obj_ptr; + if (*out_buffer.members.type.type == boost::typeindex::type_id()) + out_buffer.members.obj_ptr = in_buffer.members.obj_ptr; else - out_buffer.obj_ptr = 0; + out_buffer.members.obj_ptr = 0; } else /* op == get_functor_type_tag */ { - out_buffer.type.type = &BOOST_SP_TYPEID(Functor); - out_buffer.type.const_qualified = false; - out_buffer.type.volatile_qualified = false; + out_buffer.members.type.type = &boost::typeindex::type_id().type_info(); + out_buffer.members.type.const_qualified = false; + out_buffer.members.type.volatile_qualified = false; } } @@ -396,7 +373,7 @@ namespace boost { // object can use the small-object optimization buffer or // whether we need to allocate it on the heap. static inline void - manager(const function_buffer& in_buffer, function_buffer& out_buffer, + manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, function_obj_tag) { manager(in_buffer, out_buffer, op, @@ -405,7 +382,7 @@ namespace boost { // For member pointers, we use the small-object optimization buffer. static inline void - manager(const function_buffer& in_buffer, function_buffer& out_buffer, + manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, member_ptr_tag) { manager(in_buffer, out_buffer, op, mpl::true_()); @@ -415,15 +392,15 @@ namespace boost { /* Dispatch to an appropriate manager based on whether we have a function pointer or a function object pointer. */ static inline void - manage(const function_buffer& in_buffer, function_buffer& out_buffer, + manage(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op) { typedef typename get_function_tag::type tag_type; switch (op) { case get_functor_type_tag: - out_buffer.type.type = &BOOST_SP_TYPEID(functor_type); - out_buffer.type.const_qualified = false; - out_buffer.type.volatile_qualified = false; + out_buffer.members.type.type = &boost::typeindex::type_id().type_info(); + out_buffer.members.type.const_qualified = false; + out_buffer.members.type.volatile_qualified = false; return; default: @@ -441,7 +418,7 @@ namespace boost { // Function pointers static inline void - manager(const function_buffer& in_buffer, function_buffer& out_buffer, + manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, function_ptr_tag) { functor_manager_common::manage_ptr(in_buffer,out_buffer,op); @@ -449,57 +426,68 @@ namespace boost { // Function objects that fit in the small-object buffer. static inline void - manager(const function_buffer& in_buffer, function_buffer& out_buffer, + manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, mpl::true_) { functor_manager_common::manage_small(in_buffer,out_buffer,op); } - + // Function objects that require heap allocation static inline void - manager(const function_buffer& in_buffer, function_buffer& out_buffer, + manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, mpl::false_) { typedef functor_wrapper functor_wrapper_type; +#if defined(BOOST_NO_CXX11_ALLOCATOR) typedef typename Allocator::template rebind::other wrapper_allocator_type; typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type; +#else + using wrapper_allocator_type = typename std::allocator_traits::template rebind_alloc; + using wrapper_allocator_pointer_type = typename std::allocator_traits::pointer; +#endif if (op == clone_functor_tag) { // Clone the functor // GCC 2.95.3 gets the CV qualifiers wrong here, so we // can't do the static_cast that we should do. const functor_wrapper_type* f = - static_cast(in_buffer.obj_ptr); + static_cast(in_buffer.members.obj_ptr); wrapper_allocator_type wrapper_allocator(static_cast(*f)); wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1); +#if defined(BOOST_NO_CXX11_ALLOCATOR) wrapper_allocator.construct(copy, *f); +#else + std::allocator_traits::construct(wrapper_allocator, copy, *f); +#endif // Get back to the original pointer type functor_wrapper_type* new_f = static_cast(copy); - out_buffer.obj_ptr = new_f; + out_buffer.members.obj_ptr = new_f; } else if (op == move_functor_tag) { - out_buffer.obj_ptr = in_buffer.obj_ptr; - in_buffer.obj_ptr = 0; + out_buffer.members.obj_ptr = in_buffer.members.obj_ptr; + in_buffer.members.obj_ptr = 0; } else if (op == destroy_functor_tag) { /* Cast from the void pointer to the functor_wrapper_type */ functor_wrapper_type* victim = - static_cast(in_buffer.obj_ptr); + static_cast(in_buffer.members.obj_ptr); wrapper_allocator_type wrapper_allocator(static_cast(*victim)); +#if defined(BOOST_NO_CXX11_ALLOCATOR) wrapper_allocator.destroy(victim); +#else + std::allocator_traits::destroy(wrapper_allocator, victim); +#endif wrapper_allocator.deallocate(victim,1); - out_buffer.obj_ptr = 0; + out_buffer.members.obj_ptr = 0; } else if (op == check_functor_type_tag) { - const detail::sp_typeinfo& check_type - = *out_buffer.type.type; - if (BOOST_FUNCTION_COMPARE_TYPE_ID(check_type, BOOST_SP_TYPEID(Functor))) - out_buffer.obj_ptr = in_buffer.obj_ptr; + if (*out_buffer.members.type.type == boost::typeindex::type_id()) + out_buffer.members.obj_ptr = in_buffer.members.obj_ptr; else - out_buffer.obj_ptr = 0; + out_buffer.members.obj_ptr = 0; } else /* op == get_functor_type_tag */ { - out_buffer.type.type = &BOOST_SP_TYPEID(Functor); - out_buffer.type.const_qualified = false; - out_buffer.type.volatile_qualified = false; + out_buffer.members.type.type = &boost::typeindex::type_id().type_info(); + out_buffer.members.type.const_qualified = false; + out_buffer.members.type.volatile_qualified = false; } } @@ -507,7 +495,7 @@ namespace boost { // object can use the small-object optimization buffer or // whether we need to allocate it on the heap. static inline void - manager(const function_buffer& in_buffer, function_buffer& out_buffer, + manager(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op, function_obj_tag) { manager(in_buffer, out_buffer, op, @@ -518,15 +506,15 @@ namespace boost { /* Dispatch to an appropriate manager based on whether we have a function pointer or a function object pointer. */ static inline void - manage(const function_buffer& in_buffer, function_buffer& out_buffer, + manage(const function_buffer& in_buffer, function_buffer& out_buffer, functor_manager_operation_type op) { typedef typename get_function_tag::type tag_type; switch (op) { case get_functor_type_tag: - out_buffer.type.type = &BOOST_SP_TYPEID(functor_type); - out_buffer.type.const_qualified = false; - out_buffer.type.volatile_qualified = false; + out_buffer.members.type.type = &boost::typeindex::type_id().type_info(); + out_buffer.members.type.const_qualified = false; + out_buffer.members.type.volatile_qualified = false; return; default: @@ -604,8 +592,8 @@ namespace boost { */ struct vtable_base { - void (*manager)(const function_buffer& in_buffer, - function_buffer& out_buffer, + void (*manager)(const function_buffer& in_buffer, + function_buffer& out_buffer, functor_manager_operation_type op); }; } // end namespace function @@ -625,15 +613,15 @@ class function_base /** Determine if the function is empty (i.e., has no target). */ bool empty() const { return !vtable; } - /** Retrieve the type of the stored function object, or BOOST_SP_TYPEID(void) + /** Retrieve the type of the stored function object, or type_id() if this is empty. */ - const detail::sp_typeinfo& target_type() const + const boost::typeindex::type_info& target_type() const { - if (!vtable) return BOOST_SP_TYPEID(void); + if (!vtable) return boost::typeindex::type_id().type_info(); detail::function::function_buffer type; get_vtable()->manager(functor, type, detail::function::get_functor_type_tag); - return *type.type.type; + return *type.members.type.type; } template @@ -642,12 +630,12 @@ class function_base if (!vtable) return 0; detail::function::function_buffer type_result; - type_result.type.type = &BOOST_SP_TYPEID(Functor); - type_result.type.const_qualified = is_const::value; - type_result.type.volatile_qualified = is_volatile::value; - get_vtable()->manager(functor, type_result, + type_result.members.type.type = &boost::typeindex::type_id().type_info(); + type_result.members.type.const_qualified = is_const::value; + type_result.members.type.volatile_qualified = is_volatile::value; + get_vtable()->manager(functor, type_result, detail::function::check_functor_type_tag); - return static_cast(type_result.obj_ptr); + return static_cast(type_result.members.obj_ptr); } template @@ -656,14 +644,14 @@ class function_base if (!vtable) return 0; detail::function::function_buffer type_result; - type_result.type.type = &BOOST_SP_TYPEID(Functor); - type_result.type.const_qualified = true; - type_result.type.volatile_qualified = is_volatile::value; - get_vtable()->manager(functor, type_result, + type_result.members.type.type = &boost::typeindex::type_id().type_info(); + type_result.members.type.const_qualified = true; + type_result.members.type.volatile_qualified = is_volatile::value; + get_vtable()->manager(functor, type_result, detail::function::check_functor_type_tag); // GCC 2.95.3 gets the CV qualifiers wrong here, so we // can't do the static_cast that we should do. - return static_cast(type_result.obj_ptr); + return static_cast(type_result.members.obj_ptr); } template @@ -714,6 +702,10 @@ class function_base mutable detail::function::function_buffer functor; }; +#if defined(BOOST_CLANG) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wweak-vtables" +#endif /** * The bad_function_call exception class is thrown when a boost::function * object is invoked @@ -723,6 +715,9 @@ class bad_function_call : public std::runtime_error public: bad_function_call() : std::runtime_error("call to empty boost::function") {} }; +#if defined(BOOST_CLANG) +# pragma clang diagnostic pop +#endif #ifndef BOOST_NO_SFINAE inline bool operator==(const function_base& f, @@ -883,10 +878,9 @@ namespace detail { } // end namespace boost #undef BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL -#undef BOOST_FUNCTION_COMPARE_TYPE_ID #if defined(BOOST_MSVC) # pragma warning( pop ) -#endif +#endif #endif // BOOST_FUNCTION_BASE_HEADER diff --git a/third_party/boost_parts/boost/function/function_template.hpp b/third_party/boost_parts/boost/function/function_template.hpp index 211b81db..0b05940b 100644 --- a/third_party/boost_parts/boost/function/function_template.hpp +++ b/third_party/boost_parts/boost/function/function_template.hpp @@ -16,7 +16,7 @@ #if defined(BOOST_MSVC) # pragma warning( push ) # pragma warning( disable : 4127 ) // "conditional expression is constant" -#endif +#endif #define BOOST_FUNCTION_TEMPLATE_PARMS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, typename T) @@ -97,7 +97,7 @@ namespace boost { static R invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA BOOST_FUNCTION_PARMS) { - FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); + FunctionPtr f = reinterpret_cast(function_ptr.members.func_ptr); return f(BOOST_FUNCTION_ARGS); } }; @@ -114,7 +114,7 @@ namespace boost { BOOST_FUNCTION_PARMS) { - FunctionPtr f = reinterpret_cast(function_ptr.func_ptr); + FunctionPtr f = reinterpret_cast(function_ptr.members.func_ptr); BOOST_FUNCTION_RETURN(f(BOOST_FUNCTION_ARGS)); } }; @@ -132,9 +132,9 @@ namespace boost { { FunctionObj* f; if (function_allows_small_object_optimization::value) - f = reinterpret_cast(&function_obj_ptr.data); + f = reinterpret_cast(function_obj_ptr.data); else - f = reinterpret_cast(function_obj_ptr.obj_ptr); + f = reinterpret_cast(function_obj_ptr.members.obj_ptr); return (*f)(BOOST_FUNCTION_ARGS); } }; @@ -153,9 +153,9 @@ namespace boost { { FunctionObj* f; if (function_allows_small_object_optimization::value) - f = reinterpret_cast(&function_obj_ptr.data); + f = reinterpret_cast(function_obj_ptr.data); else - f = reinterpret_cast(function_obj_ptr.obj_ptr); + f = reinterpret_cast(function_obj_ptr.members.obj_ptr); BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS)); } }; @@ -171,8 +171,8 @@ namespace boost { BOOST_FUNCTION_PARMS) { - FunctionObj* f = - reinterpret_cast(function_obj_ptr.obj_ptr); + FunctionObj* f = + reinterpret_cast(function_obj_ptr.members.obj_ptr); return (*f)(BOOST_FUNCTION_ARGS); } }; @@ -189,8 +189,8 @@ namespace boost { BOOST_FUNCTION_PARMS) { - FunctionObj* f = - reinterpret_cast(function_obj_ptr.obj_ptr); + FunctionObj* f = + reinterpret_cast(function_obj_ptr.members.obj_ptr); BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS)); } }; @@ -208,8 +208,8 @@ namespace boost { BOOST_FUNCTION_PARMS) { - MemberPtr* f = - reinterpret_cast(&function_obj_ptr.data); + MemberPtr* f = + reinterpret_cast(function_obj_ptr.data); return boost::mem_fn(*f)(BOOST_FUNCTION_ARGS); } }; @@ -226,8 +226,8 @@ namespace boost { BOOST_FUNCTION_PARMS) { - MemberPtr* f = - reinterpret_cast(&function_obj_ptr.data); + MemberPtr* f = + reinterpret_cast(function_obj_ptr.data); BOOST_FUNCTION_RETURN(boost::mem_fn(*f)(BOOST_FUNCTION_ARGS)); } }; @@ -322,7 +322,7 @@ namespace boost { /* Given the tag returned by get_function_tag, retrieve the actual invoker that will be used for the given function - object. + object. Each specialization contains an "apply" nested class template that accepts the function object, return type, function @@ -513,21 +513,21 @@ namespace boost { private: // Function pointers template - bool + bool assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const { this->clear(functor); if (f) { // should be a reinterpret cast, but some compilers insist // on giving cv-qualifiers to free functions - functor.func_ptr = reinterpret_cast(f); + functor.members.func_ptr = reinterpret_cast(f); return true; } else { return false; } } template - bool + bool assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const { return assign_to(f,functor,function_ptr_tag()); @@ -566,13 +566,13 @@ namespace boost { // Function objects // Assign to a function object using the small object optimization template - void + void assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const { - new (reinterpret_cast(&functor.data)) FunctionObj(f); + new (reinterpret_cast(functor.data)) FunctionObj(f); } template - void + void assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const { assign_functor(f,functor,mpl::true_()); @@ -580,32 +580,41 @@ namespace boost { // Assign to a function object allocated on the heap. template - void + void assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const { - functor.obj_ptr = new FunctionObj(f); + functor.members.obj_ptr = new FunctionObj(f); } template - void + void assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const { typedef functor_wrapper functor_wrapper_type; +#if defined(BOOST_NO_CXX11_ALLOCATOR) typedef typename Allocator::template rebind::other wrapper_allocator_type; typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type; +#else + using wrapper_allocator_type = typename std::allocator_traits::template rebind_alloc; + using wrapper_allocator_pointer_type = typename std::allocator_traits::pointer; +#endif wrapper_allocator_type wrapper_allocator(a); wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1); +#if defined(BOOST_NO_CXX11_ALLOCATOR) wrapper_allocator.construct(copy, functor_wrapper_type(f,a)); +#else + std::allocator_traits::construct(wrapper_allocator, copy, functor_wrapper_type(f,a)); +#endif functor_wrapper_type* new_f = static_cast(copy); - functor.obj_ptr = new_f; + functor.members.obj_ptr = new_f; } template - bool + bool assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const { if (!boost::detail::function::has_empty_target(boost::addressof(f))) { - assign_functor(f, functor, + assign_functor(f, functor, mpl::bool_<(function_allows_small_object_optimization::value)>()); return true; } else { @@ -613,7 +622,7 @@ namespace boost { } } template - bool + bool assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const { if (!boost::detail::function::has_empty_target(boost::addressof(f))) { @@ -627,18 +636,18 @@ namespace boost { // Reference to a function object template - bool - assign_to(const reference_wrapper& f, + bool + assign_to(const reference_wrapper& f, function_buffer& functor, function_obj_ref_tag) const { - functor.obj_ref.obj_ptr = (void *)(f.get_pointer()); - functor.obj_ref.is_const_qualified = is_const::value; - functor.obj_ref.is_volatile_qualified = is_volatile::value; + functor.members.obj_ref.obj_ptr = (void *)(f.get_pointer()); + functor.members.obj_ref.is_const_qualified = is_const::value; + functor.members.obj_ref.is_volatile_qualified = is_volatile::value; return true; } template - bool - assign_to_a(const reference_wrapper& f, + bool + assign_to_a(const reference_wrapper& f, function_buffer& functor, Allocator, function_obj_ref_tag) const { return assign_to(f,functor,function_obj_ref_tag()); @@ -656,17 +665,6 @@ namespace boost { BOOST_FUNCTION_TEMPLATE_PARMS > class BOOST_FUNCTION_FUNCTION : public function_base - -#if BOOST_FUNCTION_NUM_ARGS == 1 - - , public std::unary_function - -#elif BOOST_FUNCTION_NUM_ARGS == 2 - - , public std::binary_function - -#endif - { public: #ifndef BOOST_NO_VOID_RETURNS @@ -752,14 +750,14 @@ namespace boost { { this->assign_to_own(f); } - + #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES BOOST_FUNCTION_FUNCTION(BOOST_FUNCTION_FUNCTION&& f) : function_base() { this->move_assign(f); } #endif - + ~BOOST_FUNCTION_FUNCTION() { clear(); } result_type operator()(BOOST_FUNCTION_PARMS) const @@ -840,12 +838,11 @@ namespace boost { BOOST_CATCH_END return *this; } - + #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES // Move assignment from another BOOST_FUNCTION_FUNCTION BOOST_FUNCTION_FUNCTION& operator=(BOOST_FUNCTION_FUNCTION&& f) { - if (&f == this) return *this; @@ -922,10 +919,10 @@ namespace boost { typedef typename boost::detail::function::get_function_tag::type tag; typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER get_invoker; typedef typename get_invoker:: - template apply handler_type; - + typedef typename handler_type::invoker_type invoker_type; typedef typename handler_type::manager_type manager_type; @@ -933,7 +930,7 @@ namespace boost { // static initialization. Otherwise, we will have a race // condition here in multi-threaded code. See // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/. - static const vtable_type stored_vtable = + static const vtable_type stored_vtable = { { &manager_type::manage }, &invoker_type::invoke }; if (stored_vtable.assign_to(f, functor)) { @@ -944,7 +941,7 @@ namespace boost { boost::detail::function::function_allows_small_object_optimization::value) value |= static_cast(0x01); vtable = reinterpret_cast(value); - } else + } else vtable = 0; } @@ -956,11 +953,11 @@ namespace boost { typedef typename boost::detail::function::get_function_tag::type tag; typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER get_invoker; typedef typename get_invoker:: - template apply_a handler_type; - + typedef typename handler_type::invoker_type invoker_type; typedef typename handler_type::manager_type manager_type; @@ -971,7 +968,7 @@ namespace boost { static const vtable_type stored_vtable = { { &manager_type::manage }, &invoker_type::invoke }; - if (stored_vtable.assign_to_a(f, functor, a)) { + if (stored_vtable.assign_to_a(f, functor, a)) { std::size_t value = reinterpret_cast(&stored_vtable.base); // coverity[pointless_expression]: suppress coverity warnings on apparant if(const). if (boost::has_trivial_copy_constructor::value && @@ -979,15 +976,15 @@ namespace boost { boost::detail::function::function_allows_small_object_optimization::value) value |= static_cast(0x01); vtable = reinterpret_cast(value); - } else + } else vtable = 0; } - // Moves the value from the specified argument to *this. If the argument - // has its function object allocated on the heap, move_assign will pass - // its buffer to *this, and set the argument's buffer pointer to NULL. - void move_assign(BOOST_FUNCTION_FUNCTION& f) - { + // Moves the value from the specified argument to *this. If the argument + // has its function object allocated on the heap, move_assign will pass + // its buffer to *this, and set the argument's buffer pointer to NULL. + void move_assign(BOOST_FUNCTION_FUNCTION& f) + { if (&f == this) return; @@ -1098,7 +1095,7 @@ class function function(self_type&& f): base_type(static_cast(f)){} function(base_type&& f): base_type(static_cast(f)){} #endif - + self_type& operator=(const self_type& f) { self_type(f).swap(*this); @@ -1111,7 +1108,7 @@ class function self_type(static_cast(f)).swap(*this); return *this; } -#endif +#endif template #ifndef BOOST_NO_SFINAE @@ -1140,14 +1137,14 @@ class function self_type(f).swap(*this); return *this; } - + #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES self_type& operator=(base_type&& f) { self_type(static_cast(f)).swap(*this); return *this; } -#endif +#endif }; #undef BOOST_FUNCTION_PARTIAL_SPEC @@ -1187,4 +1184,4 @@ class function #if defined(BOOST_MSVC) # pragma warning( pop ) -#endif +#endif diff --git a/third_party/boost_parts/boost/functional/hash.hpp b/third_party/boost_parts/boost/functional/hash.hpp index 44983f19..327a3eca 100644 --- a/third_party/boost_parts/boost/functional/hash.hpp +++ b/third_party/boost_parts/boost/functional/hash.hpp @@ -3,5 +3,4 @@ // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#include - +#include diff --git a/third_party/boost_parts/boost/functional/hash_fwd.hpp b/third_party/boost_parts/boost/functional/hash_fwd.hpp index eea90738..62bc23c7 100644 --- a/third_party/boost_parts/boost/functional/hash_fwd.hpp +++ b/third_party/boost_parts/boost/functional/hash_fwd.hpp @@ -3,9 +3,4 @@ // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -#include -#if defined(BOOST_HAS_PRAGMA_ONCE) -#pragma once -#endif - -#include +#include diff --git a/third_party/boost_parts/boost/fusion/container/deque/deque_fwd.hpp b/third_party/boost_parts/boost/fusion/container/deque/deque_fwd.hpp index ebbeb4c1..5b8ea56f 100644 --- a/third_party/boost_parts/boost/fusion/container/deque/deque_fwd.hpp +++ b/third_party/boost_parts/boost/fusion/container/deque/deque_fwd.hpp @@ -23,8 +23,7 @@ # endif #endif -// MSVC variadics at this point in time is not ready yet (ICE!) -#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1900)) +#if BOOST_WORKAROUND(BOOST_MSVC, < 1910) # if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) # undef BOOST_FUSION_HAS_VARIADIC_DEQUE # endif diff --git a/third_party/boost_parts/boost/fusion/container/map/map_fwd.hpp b/third_party/boost_parts/boost/fusion/container/map/map_fwd.hpp index 99239673..18e445b0 100644 --- a/third_party/boost_parts/boost/fusion/container/map/map_fwd.hpp +++ b/third_party/boost_parts/boost/fusion/container/map/map_fwd.hpp @@ -23,8 +23,7 @@ # endif #endif -// MSVC variadics at this point in time is not ready yet (ICE!) -#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1900)) +#if BOOST_WORKAROUND(BOOST_MSVC, < 1910) # if defined(BOOST_FUSION_HAS_VARIADIC_MAP) # undef BOOST_FUSION_HAS_VARIADIC_MAP # endif diff --git a/third_party/boost_parts/boost/fusion/container/vector/detail/config.hpp b/third_party/boost_parts/boost/fusion/container/vector/detail/config.hpp index 84f4605d..718b2d79 100644 --- a/third_party/boost_parts/boost/fusion/container/vector/detail/config.hpp +++ b/third_party/boost_parts/boost/fusion/container/vector/detail/config.hpp @@ -15,6 +15,8 @@ || defined(BOOST_NO_CXX11_RVALUE_REFERENCES) \ || defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) \ || defined(BOOST_NO_CXX11_DECLTYPE)) \ + || defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) \ + || defined(BOOST_FUSION_DISABLE_VARIADIC_VECTOR) \ || (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)) # if defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) # undef BOOST_FUSION_HAS_VARIADIC_VECTOR @@ -25,8 +27,7 @@ # endif #endif -// Sometimes, MSVC 12 shows compile error with std::size_t of template parameter. -#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1800)) +#if BOOST_WORKAROUND(BOOST_MSVC, < 1910) # if defined(BOOST_FUSION_HAS_VARIADIC_VECTOR) # undef BOOST_FUSION_HAS_VARIADIC_VECTOR # endif diff --git a/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp b/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp index 0b4e2574..12b7a570 100644 --- a/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp +++ b/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp @@ -65,7 +65,9 @@ namespace boost { namespace fusion # endif BOOST_FUSION_GPU_ENABLED explicit - vector(U0 && arg0) + vector(U0 && arg0 + , typename boost::disable_if_c::type>::value, detail::enabler_>::type = detail::enabler + ) : vec(std::forward( arg0)) {} # endif @@ -82,7 +84,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1) + vector(U0 && arg0 , U1 && arg1 + ) : vec(std::forward( arg0) , std::forward( arg1)) {} # endif @@ -99,7 +102,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2)) {} # endif @@ -116,7 +120,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3)) {} # endif @@ -133,7 +138,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4)) {} # endif @@ -150,7 +156,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5)) {} # endif @@ -167,7 +174,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6)) {} # endif @@ -184,7 +192,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7)) {} # endif @@ -201,7 +210,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8)) {} # endif @@ -218,7 +228,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9)) {} # endif template @@ -257,7 +268,10 @@ namespace boost { namespace fusion } template BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector& + typename boost::disable_if_c< + boost::is_same::type>::value + , vector& + >::type operator=(T&& rhs) { vec = std::forward( rhs); diff --git a/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp b/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp index 44e8832f..9c64ef05 100644 --- a/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp +++ b/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp @@ -65,7 +65,9 @@ namespace boost { namespace fusion # endif BOOST_FUSION_GPU_ENABLED explicit - vector(U0 && arg0) + vector(U0 && arg0 + , typename boost::disable_if_c::type>::value, detail::enabler_>::type = detail::enabler + ) : vec(std::forward( arg0)) {} # endif @@ -82,7 +84,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1) + vector(U0 && arg0 , U1 && arg1 + ) : vec(std::forward( arg0) , std::forward( arg1)) {} # endif @@ -99,7 +102,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2)) {} # endif @@ -116,7 +120,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3)) {} # endif @@ -133,7 +138,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4)) {} # endif @@ -150,7 +156,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5)) {} # endif @@ -167,7 +174,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6)) {} # endif @@ -184,7 +192,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7)) {} # endif @@ -201,7 +210,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8)) {} # endif @@ -218,7 +228,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9)) {} # endif @@ -235,7 +246,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10)) {} # endif @@ -252,7 +264,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11)) {} # endif @@ -269,7 +282,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12)) {} # endif @@ -286,7 +300,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13)) {} # endif @@ -303,7 +318,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14)) {} # endif @@ -320,7 +336,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15)) {} # endif @@ -337,7 +354,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16)) {} # endif @@ -354,7 +372,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17)) {} # endif @@ -371,7 +390,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18)) {} # endif @@ -388,7 +408,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19)) {} # endif template @@ -427,7 +448,10 @@ namespace boost { namespace fusion } template BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector& + typename boost::disable_if_c< + boost::is_same::type>::value + , vector& + >::type operator=(T&& rhs) { vec = std::forward( rhs); diff --git a/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp b/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp index 13f7a626..9df40b53 100644 --- a/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp +++ b/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp @@ -65,7 +65,9 @@ namespace boost { namespace fusion # endif BOOST_FUSION_GPU_ENABLED explicit - vector(U0 && arg0) + vector(U0 && arg0 + , typename boost::disable_if_c::type>::value, detail::enabler_>::type = detail::enabler + ) : vec(std::forward( arg0)) {} # endif @@ -82,7 +84,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1) + vector(U0 && arg0 , U1 && arg1 + ) : vec(std::forward( arg0) , std::forward( arg1)) {} # endif @@ -99,7 +102,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2)) {} # endif @@ -116,7 +120,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3)) {} # endif @@ -133,7 +138,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4)) {} # endif @@ -150,7 +156,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5)) {} # endif @@ -167,7 +174,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6)) {} # endif @@ -184,7 +192,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7)) {} # endif @@ -201,7 +210,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8)) {} # endif @@ -218,7 +228,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9)) {} # endif @@ -235,7 +246,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10)) {} # endif @@ -252,7 +264,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11)) {} # endif @@ -269,7 +282,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12)) {} # endif @@ -286,7 +300,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13)) {} # endif @@ -303,7 +318,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14)) {} # endif @@ -320,7 +336,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15)) {} # endif @@ -337,7 +354,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16)) {} # endif @@ -354,7 +372,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17)) {} # endif @@ -371,7 +390,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18)) {} # endif @@ -388,7 +408,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19)) {} # endif @@ -405,7 +426,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20)) {} # endif @@ -422,7 +444,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21)) {} # endif @@ -439,7 +462,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22)) {} # endif @@ -456,7 +480,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23)) {} # endif @@ -473,7 +498,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24)) {} # endif @@ -490,7 +516,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25)) {} # endif @@ -507,7 +534,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26)) {} # endif @@ -524,7 +552,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27)) {} # endif @@ -541,7 +570,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28)) {} # endif @@ -558,7 +588,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29)) {} # endif template @@ -597,7 +628,10 @@ namespace boost { namespace fusion } template BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector& + typename boost::disable_if_c< + boost::is_same::type>::value + , vector& + >::type operator=(T&& rhs) { vec = std::forward( rhs); diff --git a/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp b/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp index 1730d988..5da47eeb 100644 --- a/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp +++ b/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp @@ -65,7 +65,9 @@ namespace boost { namespace fusion # endif BOOST_FUSION_GPU_ENABLED explicit - vector(U0 && arg0) + vector(U0 && arg0 + , typename boost::disable_if_c::type>::value, detail::enabler_>::type = detail::enabler + ) : vec(std::forward( arg0)) {} # endif @@ -82,7 +84,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1) + vector(U0 && arg0 , U1 && arg1 + ) : vec(std::forward( arg0) , std::forward( arg1)) {} # endif @@ -99,7 +102,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2)) {} # endif @@ -116,7 +120,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3)) {} # endif @@ -133,7 +138,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4)) {} # endif @@ -150,7 +156,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5)) {} # endif @@ -167,7 +174,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6)) {} # endif @@ -184,7 +192,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7)) {} # endif @@ -201,7 +210,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8)) {} # endif @@ -218,7 +228,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9)) {} # endif @@ -235,7 +246,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10)) {} # endif @@ -252,7 +264,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11)) {} # endif @@ -269,7 +282,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12)) {} # endif @@ -286,7 +300,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13)) {} # endif @@ -303,7 +318,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14)) {} # endif @@ -320,7 +336,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15)) {} # endif @@ -337,7 +354,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16)) {} # endif @@ -354,7 +372,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17)) {} # endif @@ -371,7 +390,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18)) {} # endif @@ -388,7 +408,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19)) {} # endif @@ -405,7 +426,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20)) {} # endif @@ -422,7 +444,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21)) {} # endif @@ -439,7 +462,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22)) {} # endif @@ -456,7 +480,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23)) {} # endif @@ -473,7 +498,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24)) {} # endif @@ -490,7 +516,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25)) {} # endif @@ -507,7 +534,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26)) {} # endif @@ -524,7 +552,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27)) {} # endif @@ -541,7 +570,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28)) {} # endif @@ -558,7 +588,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29)) {} # endif @@ -575,7 +606,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30)) {} # endif @@ -592,7 +624,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31)) {} # endif @@ -609,7 +642,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32)) {} # endif @@ -626,7 +660,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33)) {} # endif @@ -643,7 +678,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34)) {} # endif @@ -660,7 +696,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35)) {} # endif @@ -677,7 +714,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36)) {} # endif @@ -694,7 +732,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36) , std::forward( arg37)) {} # endif @@ -711,7 +750,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36) , std::forward( arg37) , std::forward( arg38)) {} # endif @@ -728,7 +768,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36) , std::forward( arg37) , std::forward( arg38) , std::forward( arg39)) {} # endif template @@ -767,7 +808,10 @@ namespace boost { namespace fusion } template BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector& + typename boost::disable_if_c< + boost::is_same::type>::value + , vector& + >::type operator=(T&& rhs) { vec = std::forward( rhs); diff --git a/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp b/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp index fb334d1a..47e878bc 100644 --- a/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp +++ b/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp @@ -65,7 +65,9 @@ namespace boost { namespace fusion # endif BOOST_FUSION_GPU_ENABLED explicit - vector(U0 && arg0) + vector(U0 && arg0 + , typename boost::disable_if_c::type>::value, detail::enabler_>::type = detail::enabler + ) : vec(std::forward( arg0)) {} # endif @@ -82,7 +84,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1) + vector(U0 && arg0 , U1 && arg1 + ) : vec(std::forward( arg0) , std::forward( arg1)) {} # endif @@ -99,7 +102,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2)) {} # endif @@ -116,7 +120,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3)) {} # endif @@ -133,7 +138,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4)) {} # endif @@ -150,7 +156,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5)) {} # endif @@ -167,7 +174,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6)) {} # endif @@ -184,7 +192,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7)) {} # endif @@ -201,7 +210,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8)) {} # endif @@ -218,7 +228,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9)) {} # endif @@ -235,7 +246,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10)) {} # endif @@ -252,7 +264,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11)) {} # endif @@ -269,7 +282,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12)) {} # endif @@ -286,7 +300,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13)) {} # endif @@ -303,7 +318,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14)) {} # endif @@ -320,7 +336,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15)) {} # endif @@ -337,7 +354,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16)) {} # endif @@ -354,7 +372,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17)) {} # endif @@ -371,7 +390,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18)) {} # endif @@ -388,7 +408,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19)) {} # endif @@ -405,7 +426,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20)) {} # endif @@ -422,7 +444,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21)) {} # endif @@ -439,7 +462,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22)) {} # endif @@ -456,7 +480,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23)) {} # endif @@ -473,7 +498,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24)) {} # endif @@ -490,7 +516,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25)) {} # endif @@ -507,7 +534,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26)) {} # endif @@ -524,7 +552,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27)) {} # endif @@ -541,7 +570,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28)) {} # endif @@ -558,7 +588,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29)) {} # endif @@ -575,7 +606,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30)) {} # endif @@ -592,7 +624,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31)) {} # endif @@ -609,7 +642,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32)) {} # endif @@ -626,7 +660,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33)) {} # endif @@ -643,7 +678,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34)) {} # endif @@ -660,7 +696,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35)) {} # endif @@ -677,7 +714,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36)) {} # endif @@ -694,7 +732,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36) , std::forward( arg37)) {} # endif @@ -711,7 +750,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36) , std::forward( arg37) , std::forward( arg38)) {} # endif @@ -728,7 +768,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36) , std::forward( arg37) , std::forward( arg38) , std::forward( arg39)) {} # endif @@ -745,7 +786,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36) , std::forward( arg37) , std::forward( arg38) , std::forward( arg39) , std::forward( arg40)) {} # endif @@ -762,7 +804,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36) , std::forward( arg37) , std::forward( arg38) , std::forward( arg39) , std::forward( arg40) , std::forward( arg41)) {} # endif @@ -779,7 +822,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41 , U42 && arg42) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41 , U42 && arg42 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36) , std::forward( arg37) , std::forward( arg38) , std::forward( arg39) , std::forward( arg40) , std::forward( arg41) , std::forward( arg42)) {} # endif @@ -796,7 +840,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41 , U42 && arg42 , U43 && arg43) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41 , U42 && arg42 , U43 && arg43 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36) , std::forward( arg37) , std::forward( arg38) , std::forward( arg39) , std::forward( arg40) , std::forward( arg41) , std::forward( arg42) , std::forward( arg43)) {} # endif @@ -813,7 +858,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41 , U42 && arg42 , U43 && arg43 , U44 && arg44) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41 , U42 && arg42 , U43 && arg43 , U44 && arg44 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36) , std::forward( arg37) , std::forward( arg38) , std::forward( arg39) , std::forward( arg40) , std::forward( arg41) , std::forward( arg42) , std::forward( arg43) , std::forward( arg44)) {} # endif @@ -830,7 +876,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41 , U42 && arg42 , U43 && arg43 , U44 && arg44 , U45 && arg45) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41 , U42 && arg42 , U43 && arg43 , U44 && arg44 , U45 && arg45 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36) , std::forward( arg37) , std::forward( arg38) , std::forward( arg39) , std::forward( arg40) , std::forward( arg41) , std::forward( arg42) , std::forward( arg43) , std::forward( arg44) , std::forward( arg45)) {} # endif @@ -847,7 +894,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41 , U42 && arg42 , U43 && arg43 , U44 && arg44 , U45 && arg45 , U46 && arg46) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41 , U42 && arg42 , U43 && arg43 , U44 && arg44 , U45 && arg45 , U46 && arg46 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36) , std::forward( arg37) , std::forward( arg38) , std::forward( arg39) , std::forward( arg40) , std::forward( arg41) , std::forward( arg42) , std::forward( arg43) , std::forward( arg44) , std::forward( arg45) , std::forward( arg46)) {} # endif @@ -864,7 +912,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41 , U42 && arg42 , U43 && arg43 , U44 && arg44 , U45 && arg45 , U46 && arg46 , U47 && arg47) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41 , U42 && arg42 , U43 && arg43 , U44 && arg44 , U45 && arg45 , U46 && arg46 , U47 && arg47 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36) , std::forward( arg37) , std::forward( arg38) , std::forward( arg39) , std::forward( arg40) , std::forward( arg41) , std::forward( arg42) , std::forward( arg43) , std::forward( arg44) , std::forward( arg45) , std::forward( arg46) , std::forward( arg47)) {} # endif @@ -881,7 +930,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41 , U42 && arg42 , U43 && arg43 , U44 && arg44 , U45 && arg45 , U46 && arg46 , U47 && arg47 , U48 && arg48) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41 , U42 && arg42 , U43 && arg43 , U44 && arg44 , U45 && arg45 , U46 && arg46 , U47 && arg47 , U48 && arg48 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36) , std::forward( arg37) , std::forward( arg38) , std::forward( arg39) , std::forward( arg40) , std::forward( arg41) , std::forward( arg42) , std::forward( arg43) , std::forward( arg44) , std::forward( arg45) , std::forward( arg46) , std::forward( arg47) , std::forward( arg48)) {} # endif @@ -898,7 +948,8 @@ namespace boost { namespace fusion BOOST_CXX14_CONSTEXPR # endif BOOST_FUSION_GPU_ENABLED - vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41 , U42 && arg42 , U43 && arg43 , U44 && arg44 , U45 && arg45 , U46 && arg46 , U47 && arg47 , U48 && arg48 , U49 && arg49) + vector(U0 && arg0 , U1 && arg1 , U2 && arg2 , U3 && arg3 , U4 && arg4 , U5 && arg5 , U6 && arg6 , U7 && arg7 , U8 && arg8 , U9 && arg9 , U10 && arg10 , U11 && arg11 , U12 && arg12 , U13 && arg13 , U14 && arg14 , U15 && arg15 , U16 && arg16 , U17 && arg17 , U18 && arg18 , U19 && arg19 , U20 && arg20 , U21 && arg21 , U22 && arg22 , U23 && arg23 , U24 && arg24 , U25 && arg25 , U26 && arg26 , U27 && arg27 , U28 && arg28 , U29 && arg29 , U30 && arg30 , U31 && arg31 , U32 && arg32 , U33 && arg33 , U34 && arg34 , U35 && arg35 , U36 && arg36 , U37 && arg37 , U38 && arg38 , U39 && arg39 , U40 && arg40 , U41 && arg41 , U42 && arg42 , U43 && arg43 , U44 && arg44 , U45 && arg45 , U46 && arg46 , U47 && arg47 , U48 && arg48 , U49 && arg49 + ) : vec(std::forward( arg0) , std::forward( arg1) , std::forward( arg2) , std::forward( arg3) , std::forward( arg4) , std::forward( arg5) , std::forward( arg6) , std::forward( arg7) , std::forward( arg8) , std::forward( arg9) , std::forward( arg10) , std::forward( arg11) , std::forward( arg12) , std::forward( arg13) , std::forward( arg14) , std::forward( arg15) , std::forward( arg16) , std::forward( arg17) , std::forward( arg18) , std::forward( arg19) , std::forward( arg20) , std::forward( arg21) , std::forward( arg22) , std::forward( arg23) , std::forward( arg24) , std::forward( arg25) , std::forward( arg26) , std::forward( arg27) , std::forward( arg28) , std::forward( arg29) , std::forward( arg30) , std::forward( arg31) , std::forward( arg32) , std::forward( arg33) , std::forward( arg34) , std::forward( arg35) , std::forward( arg36) , std::forward( arg37) , std::forward( arg38) , std::forward( arg39) , std::forward( arg40) , std::forward( arg41) , std::forward( arg42) , std::forward( arg43) , std::forward( arg44) , std::forward( arg45) , std::forward( arg46) , std::forward( arg47) , std::forward( arg48) , std::forward( arg49)) {} # endif template @@ -937,7 +988,10 @@ namespace boost { namespace fusion } template BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector& + typename boost::disable_if_c< + boost::is_same::type>::value + , vector& + >::type operator=(T&& rhs) { vec = std::forward( rhs); diff --git a/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/vector.hpp b/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/vector.hpp index 8a7a4e5d..f5c3024e 100644 --- a/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/vector.hpp +++ b/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/vector.hpp @@ -1,5 +1,6 @@ /*============================================================================= Copyright (c) 2001-2011 Joel de Guzman + Copyright (c) 2017 Kohei Takahashi Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) @@ -22,6 +23,7 @@ #include #include #include +#include #include #include @@ -177,7 +179,10 @@ FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector& + typename boost::disable_if_c< + boost::is_same::type>::value + , vector& + >::type operator=(T&& rhs) { vec = BOOST_FUSION_FWD_ELEM(T, rhs); diff --git a/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp b/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp index 682f0ce3..3422e4b9 100644 --- a/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp +++ b/third_party/boost_parts/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp @@ -64,7 +64,11 @@ FUSION_HASH endif #if M == 1 explicit #endif - vector(BOOST_PP_ENUM_BINARY_PARAMS(M, U, && arg)) + vector(BOOST_PP_ENUM_BINARY_PARAMS(M, U, && arg) +#if M == 1 + , typename boost::disable_if_c::type>::value, detail::enabler_>::type = detail::enabler +#endif + ) : vec(BOOST_PP_ENUM(M, FUSION_FORWARD_CTOR_FORWARD, arg)) {} #endif #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) diff --git a/third_party/boost_parts/boost/fusion/container/vector/detail/value_at_impl.hpp b/third_party/boost_parts/boost/fusion/container/vector/detail/value_at_impl.hpp index 6c8c41fb..a2b9b2f6 100644 --- a/third_party/boost_parts/boost/fusion/container/vector/detail/value_at_impl.hpp +++ b/third_party/boost_parts/boost/fusion/container/vector/detail/value_at_impl.hpp @@ -23,7 +23,6 @@ /////////////////////////////////////////////////////////////////////////////// #include #include -#include namespace boost { namespace fusion { @@ -31,8 +30,12 @@ namespace boost { namespace fusion namespace vector_detail { - template - struct vector_data; + template + struct store; + + template + static inline BOOST_FUSION_GPU_ENABLED + U value_at_impl(store const volatile*); } namespace extension @@ -46,8 +49,9 @@ namespace boost { namespace fusion template struct apply { - typedef typename boost::remove_cv::type seq; - typedef typename mpl::identity(boost::declval()))>::type::type type; + typedef + decltype(vector_detail::value_at_impl(boost::declval())) + type; }; }; } diff --git a/third_party/boost_parts/boost/fusion/container/vector/vector.hpp b/third_party/boost_parts/boost/fusion/container/vector/vector.hpp index 65bffd0b..4993e2eb 100644 --- a/third_party/boost_parts/boost/fusion/container/vector/vector.hpp +++ b/third_party/boost_parts/boost/fusion/container/vector/vector.hpp @@ -24,23 +24,21 @@ /////////////////////////////////////////////////////////////////////////////// #include #include -#include -#include +#include #include #include #include #include #include -#include #include +#include #include #include #include #include -#include -#include +#include +#include #include -#include #include #include #include @@ -53,52 +51,48 @@ namespace boost { namespace fusion namespace vector_detail { struct each_elem {}; - struct copy_or_move {}; - template struct from_sequence {}; - template - struct make_indices_from_seq - : detail::make_index_sequence< - fusion::result_of::size::type>::value + template < + typename This, typename T, typename T_, std::size_t Size, bool IsSeq + > + struct can_convert_impl : false_type {}; + + template + struct can_convert_impl : true_type {}; + + template + struct can_convert_impl + : integral_constant< + bool + , !is_convertible< + Sequence + , typename fusion::extension::value_at_impl:: + template apply< This, mpl::int_<0> >::type + >::value > {}; - template - struct pure : remove_cv::type> {}; - - template ::value> - struct is_convertible_to_first - : boost::is_convertible::type> - {}; - - template - struct is_convertible_to_first - : mpl::false_ + template + struct can_convert + : can_convert_impl< + This, T, T_, Size, traits::is_sequence::value + > {}; - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline each_elem - dispatch(T const&...) BOOST_NOEXCEPT { return each_elem(); } - - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline copy_or_move - dispatch(This const&) BOOST_NOEXCEPT { return copy_or_move(); } + template + struct is_longer_sequence_impl : false_type {}; - template - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline from_sequence< - typename lazy_enable_if_c< - (traits::is_sequence::type>::value && - !is_same::type>::value && - !is_convertible_to_first::value) - , make_indices_from_seq - >::type - > - dispatch(Sequence&&) BOOST_NOEXCEPT - { return from_sequence::type>(); } + template + struct is_longer_sequence_impl + : integral_constant< + bool, (fusion::result_of::size::value >= Size) + > + {}; + template + struct is_longer_sequence + : is_longer_sequence_impl::value, Size> + {}; // forward_at_c allows to access Nth element even if ForwardSequence // since fusion::at_c requires RandomAccessSequence. @@ -139,51 +133,41 @@ namespace boost { namespace fusion BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED store(store const& rhs) - : elem(rhs.get()) + : elem(rhs.elem) {} BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED store& operator=(store const& rhs) { - elem = rhs.get(); + elem = rhs.elem; return *this; } BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED store(store&& rhs) - : elem(static_cast(rhs.get())) + : elem(static_cast(rhs.elem)) {} BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED store& operator=(store&& rhs) { - elem = static_cast(rhs.get()); + elem = static_cast(rhs.elem); return *this; } - template + template < + typename U + , typename = typename boost::disable_if< + is_base_of::type> + >::type + > BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - store(U&& rhs - , typename disable_if::type, store>, detail::enabler_>::type = detail::enabler) + store(U&& rhs) : elem(std::forward(rhs)) {} - template - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - typename disable_if::type, store>, store&>::type - operator=(U&& rhs) - { - elem = std::forward(rhs); - return *this; - } - - BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - T & get() { return elem; } - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - T const& get() const { return elem; } - T elem; }; @@ -203,24 +187,19 @@ namespace boost { namespace fusion typedef vector type_sequence; BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector_data() - {} - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector_data(copy_or_move, vector_data const& rhs) - : store(static_cast const&>(rhs))... - {} - - BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector_data(copy_or_move, vector_data&& rhs) - : store(std::forward >(rhs))... - {} - - template + BOOST_DEFAULTED_FUNCTION(vector_data(), {}) + + template < + typename Sequence + , typename Sequence_ = typename remove_reference::type + , typename = typename boost::enable_if< + can_convert + >::type + > BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED explicit - vector_data(from_sequence >, Sequence&& rhs) - : store(forward_at_c(rhs))... + vector_data(each_elem, Sequence&& rhs) + : store(forward_at_c(std::forward(rhs)))... {} template @@ -230,6 +209,14 @@ namespace boost { namespace fusion : store(std::forward(var))... {} + template + BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED + void + assign_sequence(Sequence&& seq) + { + assign(std::forward(seq), detail::index_sequence()); + } + template BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED void @@ -246,35 +233,31 @@ namespace boost { namespace fusion template static BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - auto at_detail(store* this_) -> decltype(this_->get()) + U& at_detail(store* this_) { - return this_->get(); + return this_->elem; } template static BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - auto at_detail(store const* this_) -> decltype(this_->get()) + U const& at_detail(store const* this_) { - return this_->get(); + return this_->elem; } template BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED - auto at_impl(J) -> decltype(at_detail(this)) + auto at_impl(J) -> decltype(at_detail(&std::declval())) { return at_detail(this); } template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - auto at_impl(J) const -> decltype(at_detail(this)) + auto at_impl(J) const -> decltype(at_detail(&std::declval())) { return at_detail(this); } - - template - static BOOST_FUSION_GPU_ENABLED - mpl::identity value_at_impl(store*); }; } // namespace boost::fusion::vector_detail @@ -291,18 +274,36 @@ namespace boost { namespace fusion > base; BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - vector() - {} - - // rvalue-references is required here in order to forward any arguments to - // base: vector(T const&...) doesn't work with trailing void_ and - // vector(U const&...) cannot forward any arguments to base. - template + BOOST_DEFAULTED_FUNCTION(vector(), {}) + + template < + typename... U + , typename = typename boost::enable_if_c<( + sizeof...(U) >= 1 && + fusion::detail::and_...>::value && + !fusion::detail::and_< + is_base_of::type>... + >::value + )>::type + > // XXX: constexpr become error due to pull-request #79, booooo!! // In the (near) future release, should be fixed. /* BOOST_CONSTEXPR */ BOOST_FUSION_GPU_ENABLED - vector(U&&... u) - : base(vector_detail::dispatch(std::forward(u)...), std::forward(u)...) + explicit vector(U&&... u) + : base(vector_detail::each_elem(), std::forward(u)...) + {} + + template < + typename Sequence + , typename = typename boost::enable_if_c< + vector_detail::is_longer_sequence< + typename remove_reference::type, sizeof...(T) + >::value + >::type + > + BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED + vector(Sequence&& seq) + : base(vector_detail::each_elem(), std::forward(seq)) {} template @@ -310,10 +311,7 @@ namespace boost { namespace fusion vector& operator=(Sequence&& rhs) { - typedef typename - vector_detail::make_indices_from_seq::type - indices; - base::assign(std::forward(rhs), indices()); + base::assign_sequence(std::forward(rhs)); return *this; } }; diff --git a/third_party/boost_parts/boost/fusion/support/detail/and.hpp b/third_party/boost_parts/boost/fusion/support/detail/and.hpp new file mode 100644 index 00000000..1b310dda --- /dev/null +++ b/third_party/boost_parts/boost/fusion/support/detail/and.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2016 Lee Clagett + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ +#ifndef FUSION_AND_07152016_1625 +#define FUSION_AND_07152016_1625 + +#include +#include + +#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +#error fusion::detail::and_ requires variadic templates +#endif + +namespace boost { namespace fusion { namespace detail { + template + struct and_impl : false_type {}; + + template + struct and_impl...> : true_type {}; + + // This specialization is necessary to avoid MSVC-12 variadics bug. + template + struct and_impl1 : and_impl...> {}; + + /* fusion::detail::and_ differs from mpl::and_ in the following ways: + - The empty set is valid and returns true + - A single element set is valid and returns the identity + - There is no upper bound on the set size + - The conditions are evaluated at once, and are not short-circuited. This + reduces instantations when returning true; the implementation is not + recursive. */ + template + struct and_ : and_impl1 {}; +}}} + +#endif // FUSION_AND_07152016_1625 diff --git a/third_party/boost_parts/boost/fusion/support/detail/is_mpl_sequence.hpp b/third_party/boost_parts/boost/fusion/support/detail/is_mpl_sequence.hpp index 1c485f91..24b86624 100644 --- a/third_party/boost_parts/boost/fusion/support/detail/is_mpl_sequence.hpp +++ b/third_party/boost_parts/boost/fusion/support/detail/is_mpl_sequence.hpp @@ -13,6 +13,7 @@ #include #include #include +#include #include namespace boost { namespace fusion { namespace detail @@ -20,7 +21,7 @@ namespace boost { namespace fusion { namespace detail template struct is_mpl_sequence : mpl::and_< - mpl::not_ > + mpl::not_, is_convertible > > , mpl::is_sequence > {}; }}} diff --git a/third_party/boost_parts/boost/fusion/support/is_sequence.hpp b/third_party/boost_parts/boost/fusion/support/is_sequence.hpp index 6b9b2118..af7c84e1 100644 --- a/third_party/boost_parts/boost/fusion/support/is_sequence.hpp +++ b/third_party/boost_parts/boost/fusion/support/is_sequence.hpp @@ -10,9 +10,11 @@ #include #include #include +#include +#include #include #include -#include +#include #include #include @@ -69,7 +71,10 @@ namespace boost { namespace fusion template struct is_native_fusion_sequence - : is_convertible + : mpl::and_< + is_complete, + is_convertible + > {}; } }} diff --git a/third_party/boost_parts/boost/graph/adjacency_iterator.hpp b/third_party/boost_parts/boost/graph/adjacency_iterator.hpp index d5006064..c134fe5a 100644 --- a/third_party/boost_parts/boost/graph/adjacency_iterator.hpp +++ b/third_party/boost_parts/boost/graph/adjacency_iterator.hpp @@ -10,6 +10,7 @@ #ifndef BOOST_ADJACENCY_ITERATOR_HPP #define BOOST_ADJACENCY_ITERATOR_HPP +#include #include #include diff --git a/third_party/boost_parts/boost/graph/adjacency_list.hpp b/third_party/boost_parts/boost/graph/adjacency_list.hpp index d7fbc06d..da80063d 100644 --- a/third_party/boost_parts/boost/graph/adjacency_list.hpp +++ b/third_party/boost_parts/boost/graph/adjacency_list.hpp @@ -20,14 +20,6 @@ #include -#if !defined BOOST_NO_SLIST -# ifdef BOOST_SLIST_HEADER -# include BOOST_SLIST_HEADER -# else -# include -# endif -#endif - #include #include @@ -52,10 +44,6 @@ namespace boost { // to map the selectors to the container type used to implement the // graph. -#if !defined BOOST_NO_SLIST - struct slistS {}; -#endif - struct vecS { }; struct listS { }; struct setS { }; @@ -74,12 +62,7 @@ namespace boost { struct container_gen { typedef std::list type; }; -#if !defined BOOST_NO_SLIST - template - struct container_gen { - typedef BOOST_STD_EXTENSION_NAMESPACE::slist type; - }; -#endif + template struct container_gen { typedef std::vector type; @@ -136,12 +119,6 @@ namespace boost { struct parallel_edge_traits { typedef allow_parallel_edge_tag type; }; -#if !defined BOOST_NO_SLIST - template <> - struct parallel_edge_traits { - typedef allow_parallel_edge_tag type; }; -#endif - template <> struct parallel_edge_traits { typedef disallow_parallel_edge_tag type; }; diff --git a/third_party/boost_parts/boost/graph/buffer_concepts.hpp b/third_party/boost_parts/boost/graph/buffer_concepts.hpp index 2bad8af3..233a7206 100644 --- a/third_party/boost_parts/boost/graph/buffer_concepts.hpp +++ b/third_party/boost_parts/boost/graph/buffer_concepts.hpp @@ -6,13 +6,13 @@ #ifndef BOOST_GRAPH_BUFFER_CONCEPTS_HPP #define BOOST_GRAPH_BUFFER_CONCEPTS_HPP 1 #include -#include #include #include #include #include #include +#include namespace boost { BOOST_concept(Buffer, (B)) @@ -87,5 +87,6 @@ namespace boost { }; } // end `namespace boost` +#include #endif // !BOOST_GRAPH_BUFFER_CONCEPTS_HPP diff --git a/third_party/boost_parts/boost/graph/depth_first_search.hpp b/third_party/boost_parts/boost/graph/depth_first_search.hpp index b002d367..cf60e1ac 100644 --- a/third_party/boost_parts/boost/graph/depth_first_search.hpp +++ b/third_party/boost_parts/boost/graph/depth_first_search.hpp @@ -64,19 +64,27 @@ namespace boost { template struct do_call_finish_edge { template - static void call_finish_edge(Vis& vis, const E& e, const G& g) { + static void call_finish_edge(Vis& vis, E e, const G& g) { vis.finish_edge(e, g); } }; template <> struct do_call_finish_edge { template - static void call_finish_edge(Vis&, const E&, const G&) {} + static void call_finish_edge(Vis&, E, const G&) {} }; template - void call_finish_edge(Vis& vis, const E& e, const G& g) { // Only call if method exists + void call_finish_edge(Vis& vis, E e, const G& g) { // Only call if method exists +#if ((defined(__GNUC__) && (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9))) || \ + defined(__clang__) || \ + (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1200))) + do_call_finish_edge< + has_member_function_finish_edge >::value>::call_finish_edge(vis, e, g); +#else do_call_finish_edge::value>::call_finish_edge(vis, e, g); +#endif } @@ -137,6 +145,11 @@ namespace boost { src_e = back.second.first; boost::tie(ei, ei_end) = back.second.second; stack.pop_back(); + // finish_edge has to be called here, not after the + // loop. Think of the pop as the return from a recursive call. + if (src_e) { + call_finish_edge(vis, src_e.get(), g); + } while (ei != ei_end) { Vertex v = target(*ei, g); vis.examine_edge(*ei, g); @@ -164,7 +177,6 @@ namespace boost { } put(color, u, Color::black()); vis.finish_vertex(u, g); - if (src_e) call_finish_edge(vis, src_e.get(), g); } } diff --git a/third_party/boost_parts/boost/graph/detail/adjacency_list.hpp b/third_party/boost_parts/boost/graph/detail/adjacency_list.hpp index 1145d88d..3c3ab0ec 100644 --- a/third_party/boost_parts/boost/graph/detail/adjacency_list.hpp +++ b/third_party/boost_parts/boost/graph/detail/adjacency_list.hpp @@ -237,12 +237,6 @@ namespace boost { inline stored_edge() { } inline stored_edge(Vertex target, const no_property& = no_property()) : m_target(target) { } - // Need to write this explicitly so stored_edge_property can - // invoke Base::operator= (at least, for SGI MIPSPro compiler) - inline stored_edge& operator=(const stored_edge& x) { - m_target = x.m_target; - return *this; - } inline Vertex& get_target() const { return m_target; } inline const no_property& get_property() const { return s_prop; } inline bool operator==(const stored_edge& x) const @@ -258,7 +252,7 @@ namespace boost { template no_property stored_edge::s_prop; -#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) +#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_NO_CXX11_SMART_PTR) template class stored_edge_property : public stored_edge { typedef stored_edge_property self; @@ -270,12 +264,24 @@ namespace boost { const Property& p = Property()) : stored_edge(target), m_property(new Property(p)) { } stored_edge_property(const self& x) - : Base(x), m_property(const_cast(x).m_property) { } + : Base(static_cast< Base const& >(x)), m_property(const_cast(x).m_property) { } self& operator=(const self& x) { - Base::operator=(x); + // NOTE: avoid 'Base::operator=(x);' broken on SGI MIPSpro (bug 55771 of Mozilla). + static_cast(*this) = static_cast< Base const& >(x); m_property = const_cast(x).m_property; return *this; } +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + // NOTE Don't rely on default operators, their behavior is broken on several compilers (GCC 4.6). + stored_edge_property(self&& x) + : Base(static_cast< Base&& >(x)), m_property(std::move(x.m_property)) { } + self& operator=(self&& x) { + // NOTE: avoid 'Base::operator=(x);' broken on SGI MIPSpro (bug 55771 of Mozilla). + static_cast(*this) = static_cast< Base&& >(x); + m_property = std::move(x.m_property); + return *this; + } +#endif inline Property& get_property() { return *m_property; } inline const Property& get_property() const { return *m_property; } protected: @@ -296,27 +302,22 @@ namespace boost { inline stored_edge_property(Vertex target, const Property& p = Property()) : stored_edge(target), m_property(new Property(p)) { } -#if defined(BOOST_MSVC) || (defined(BOOST_GCC) && (BOOST_GCC / 100) < 406) - stored_edge_property(self&& x) : Base(static_cast< Base const& >(x)) { - m_property.swap(x.m_property); - } - stored_edge_property(self const& x) : Base(static_cast< Base const& >(x)) { - m_property.swap(const_cast(x).m_property); - } + stored_edge_property(self&& x) : Base(static_cast< Base&& >(x)), + m_property(std::move(x.m_property)) { } + stored_edge_property(self const& x) : Base(static_cast< Base const& >(x)), + m_property(std::move(const_cast(x).m_property)) { } self& operator=(self&& x) { - Base::operator=(static_cast< Base const& >(x)); + // NOTE: avoid 'Base::operator=(x);' broken on SGI MIPSpro (bug 55771 of Mozilla). + static_cast(*this) = static_cast< Base&& >(x); m_property = std::move(x.m_property); return *this; } self& operator=(self const& x) { - Base::operator=(static_cast< Base const& >(x)); + // NOTE: avoid 'Base::operator=(x);' broken on SGI MIPSpro (bug 55771 of Mozilla). + static_cast(*this) = static_cast< Base const& >(x); m_property = std::move(const_cast(x).m_property); return *this; } -#else - stored_edge_property(self&& x) = default; - self& operator=(self&& x) = default; -#endif inline Property& get_property() { return *m_property; } inline const Property& get_property() const { return *m_property; } protected: diff --git a/third_party/boost_parts/boost/graph/detail/edge.hpp b/third_party/boost_parts/boost/graph/detail/edge.hpp index badf28d4..3aba9f8d 100644 --- a/third_party/boost_parts/boost/graph/detail/edge.hpp +++ b/third_party/boost_parts/boost/graph/detail/edge.hpp @@ -13,6 +13,8 @@ #include +#include + namespace boost { namespace detail { diff --git a/third_party/boost_parts/boost/graph/distributed/unsafe_serialize.hpp b/third_party/boost_parts/boost/graph/distributed/unsafe_serialize.hpp deleted file mode 100644 index 38ad8a67..00000000 --- a/third_party/boost_parts/boost/graph/distributed/unsafe_serialize.hpp +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (C) 2006 The Trustees of Indiana University. - -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// Authors: Douglas Gregor -// Andrew Lumsdaine - -// This file contains the "unsafe_serialize" routine, which transforms -// types they may not be serializable (such as void*) into -// serializable equivalents. -#ifndef PBGL_UNSAFE_SERIALIZE_HPP -#define PBGL_UNSAFE_SERIALIZE_HPP - -#ifndef BOOST_GRAPH_USE_MPI -#error "Parallel BGL files should not be included unless has been included" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -BOOST_IS_BITWISE_SERIALIZABLE(void*) -namespace boost { namespace mpi { - template<> struct is_mpi_datatype : mpl::true_ { }; -} } // end namespace boost::mpi - -namespace boost { - typedef mpl::if_c<(sizeof(int) == sizeof(void*)), - int, - mpl::if_c<(sizeof(long) == sizeof(void*)), - long, - mpl::if_c<(sizeof(void*) <= sizeof(boost::intmax_t)), - boost::intmax_t, - void>::type - >::type - >::type ptr_serialize_type; - - BOOST_STATIC_ASSERT ((!boost::is_void::value)); - - template inline T& unsafe_serialize(T& x) { return x; } - - inline ptr_serialize_type& unsafe_serialize(void*& x) - { return reinterpret_cast(x); } - - // Force Boost.MPI to serialize a void* like a ptr_serialize_type - namespace mpi { - template<> inline MPI_Datatype get_mpi_datatype(void* const& x) - { - return get_mpi_datatype(); - } - } - - template - struct unsafe_pair - { - unsafe_pair() { } - unsafe_pair(const T& t, const U& u) : first(t), second(u) { } - unsafe_pair(const std::pair& p) : first(p.first), second(p.second) { } - T first; - U second; - - template - void serialize(Archiver& ar, const unsigned /*version*/) - { - ar & unsafe_serialize(first) & unsafe_serialize(second); - } - }; - - template - bool operator<(unsafe_pair const& x, unsafe_pair const& y) - { - return std::make_pair(x.first, x.second) < - std::make_pair(y.first, y.second); - } - -} // end namespace boost - -#endif // PBGL_UNSAFE_SERIALIZE_HPP diff --git a/third_party/boost_parts/boost/graph/dominator_tree.hpp b/third_party/boost_parts/boost/graph/dominator_tree.hpp index 9371eee0..e4a7eef5 100644 --- a/third_party/boost_parts/boost/graph/dominator_tree.hpp +++ b/third_party/boost_parts/boost/graph/dominator_tree.hpp @@ -70,29 +70,31 @@ namespace boost { /** * @param g [in] the target graph of the dominator tree * @param entry [in] the entry node of g + * @param indexMap [in] the vertex index map for g * @param domTreePredMap [out] the immediate dominator map * (parent map in dominator tree) */ dominator_visitor(const Graph& g, const Vertex& entry, + const IndexMap& indexMap, DomTreePredMap domTreePredMap) : semi_(num_vertices(g)), ancestor_(num_vertices(g), graph_traits::null_vertex()), samedom_(ancestor_), best_(semi_), semiMap_(make_iterator_property_map(semi_.begin(), - get(vertex_index, g))), + indexMap)), ancestorMap_(make_iterator_property_map(ancestor_.begin(), - get(vertex_index, g))), + indexMap)), bestMap_(make_iterator_property_map(best_.begin(), - get(vertex_index, g))), + indexMap)), buckets_(num_vertices(g)), bucketMap_(make_iterator_property_map(buckets_.begin(), - get(vertex_index, g))), + indexMap)), entry_(entry), domTreePredMap_(domTreePredMap), numOfVertices_(num_vertices(g)), samedomMap(make_iterator_property_map(samedom_.begin(), - get(vertex_index, g))) + indexMap)) { } @@ -237,7 +239,7 @@ namespace boost { lengauer_tarjan_dominator_tree_without_dfs (const Graph& g, const typename graph_traits::vertex_descriptor& entry, - const IndexMap& /*indexMap*/, + const IndexMap& indexMap, TimeMap dfnumMap, PredMap parentMap, VertexVector& verticesByDFNum, DomTreePredMap domTreePredMap) { @@ -252,7 +254,7 @@ namespace boost { // 1. Visit each vertex in reverse post order and calculate sdom. detail::dominator_visitor - visitor(g, entry, domTreePredMap); + visitor(g, entry, indexMap, domTreePredMap); VerticesSizeType i; for (i = 0; i < numOfVertices; ++i) diff --git a/third_party/boost_parts/boost/graph/filtered_graph.hpp b/third_party/boost_parts/boost/graph/filtered_graph.hpp index 74fea461..5426eac6 100644 --- a/third_party/boost_parts/boost/graph/filtered_graph.hpp +++ b/third_party/boost_parts/boost/graph/filtered_graph.hpp @@ -409,6 +409,26 @@ namespace boost { return n; } + template + typename enable_if::type, + typename filtered_graph::degree_size_type + >::type + degree(typename filtered_graph::vertex_descriptor u, + const filtered_graph& g) + { + return out_degree(u, g) + in_degree(u, g); + } + + template + typename disable_if::type, + typename filtered_graph::degree_size_type + >::type + degree(typename filtered_graph::vertex_descriptor u, + const filtered_graph& g) + { + return out_degree(u, g); + } + template std::pair::edge_descriptor, bool> edge(typename filtered_graph::vertex_descriptor u, diff --git a/third_party/boost_parts/boost/graph/graph_concepts.hpp b/third_party/boost_parts/boost/graph/graph_concepts.hpp index 875f8184..3b873a82 100644 --- a/third_party/boost_parts/boost/graph/graph_concepts.hpp +++ b/third_party/boost_parts/boost/graph/graph_concepts.hpp @@ -128,12 +128,14 @@ typename T::ThereReallyIsNoMemberByThisNameInT vertices(T const&); p = in_edges(v, g); n = in_degree(v, g); + n = degree(v, g); e = *p.first; const_constraints(g); } void const_constraints(const G& cg) { p = in_edges(v, cg); n = in_degree(v, cg); + n = degree(v, cg); e = *p.first; } std::pair p; diff --git a/third_party/boost_parts/boost/graph/named_function_params.hpp b/third_party/boost_parts/boost/graph/named_function_params.hpp index 26d3d5e4..a9a9add6 100644 --- a/third_party/boost_parts/boost/graph/named_function_params.hpp +++ b/third_party/boost_parts/boost/graph/named_function_params.hpp @@ -323,9 +323,17 @@ BOOST_BGL_DECLARE_NAMED_PARAMS struct edge_capacity_value { typedef bgl_named_params Params; - typedef typename detail::choose_impl_result::type, edge_capacity_t>::type CapacityEdgeMap; + typedef typename detail::choose_impl_result::type, edge_capacity_t>::type CapacityEdgeMap; typedef typename property_traits::value_type type; }; + // used in the max-flow algorithms + template + struct edge_weight_value + { + typedef bgl_named_params Params; + typedef typename detail::choose_impl_result::type, edge_weight_t>::type WeightMap; + typedef typename property_traits::value_type type; + }; } diff --git a/third_party/boost_parts/boost/graph/parallel/basic_reduce.hpp b/third_party/boost_parts/boost/graph/parallel/basic_reduce.hpp deleted file mode 100644 index ee23b3a9..00000000 --- a/third_party/boost_parts/boost/graph/parallel/basic_reduce.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright 2005 The Trustees of Indiana University. - -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// Authors: Douglas Gregor -// Andrew Lumsdaine - -#ifndef BOOST_PARALLEL_BASIC_REDUCE_HPP -#define BOOST_PARALLEL_BASIC_REDUCE_HPP - -#ifndef BOOST_GRAPH_USE_MPI -#error "Parallel BGL files should not be included unless has been included" -#endif - -namespace boost { namespace parallel { - -/** Reduction operation used to reconcile differences between local - * and remote values for a particular key in a property map. The - * type @c T is typically the @c value_type of the property - * map. This basic reduction returns a default-constructed @c T as - * the default value and always resolves to the remote value. - */ -template -struct basic_reduce -{ - BOOST_STATIC_CONSTANT(bool, non_default_resolver = false); - - /// Returns a default-constructed T object - template - T operator()(const Key&) const { return T(); } - - /// Returns the remote value - template - const T& operator()(const Key&, const T&, const T& remote) const - { return remote; } -}; - -} } // end namespace boost::parallel - -#endif // BOOST_PARALLEL_BASIC_REDUCE_HPP diff --git a/third_party/boost_parts/boost/graph/parallel/detail/untracked_pair.hpp b/third_party/boost_parts/boost/graph/parallel/detail/untracked_pair.hpp deleted file mode 100644 index 3554910f..00000000 --- a/third_party/boost_parts/boost/graph/parallel/detail/untracked_pair.hpp +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (C) 2007 Matthias Troyer -// -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// -// This file contains helper data structures for use in transmitting -// properties. The basic idea is to optimize away any storage for the -// properties when no properties are specified. -#ifndef BOOST_PARALLEL_DETAIL_UNTRACKED_PAIR_HPP -#define BOOST_PARALLEL_DETAIL_UNTRACKED_PAIR_HPP - -#ifndef BOOST_GRAPH_USE_MPI -#error "Parallel BGL files should not be included unless has been included" -#endif - -#include -#include // for std::pair -#include - -namespace boost { namespace parallel { namespace detail { - -/** - * This structure is like std::pair, with the only difference - * that tracking in the serialization library is turned off. - */ - -template -struct untracked_pair : public std::pair -{ - untracked_pair() {} - - untracked_pair(const T& t, const U& u) - : std::pair(t,u) {} - - template - untracked_pair(std::pair const& p) - : std::pair(p) {} -}; - -template -inline untracked_pair -make_untracked_pair(const T& t, const U& u) -{ - return untracked_pair(t,u); -} - -} } } // end namespace boost::parallel::detail - -namespace boost { namespace mpi { - -template -struct is_mpi_datatype > - : is_mpi_datatype > {}; - -} } // end namespace boost::mpi - -namespace boost { namespace serialization { - -// pair -template -inline void serialize( - Archive & ar, - boost::parallel::detail::untracked_pair & p, - const unsigned int /* file_version */ -){ - ar & boost::serialization::make_nvp("first", p.first); - ar & boost::serialization::make_nvp("second", p.second); -} - -template -struct is_bitwise_serializable< - boost::parallel::detail::untracked_pair > - : is_bitwise_serializable > {}; - -template -struct implementation_level > - : mpl::int_ {} ; - -template -struct tracking_level > - : mpl::int_ {} ; - -} } // end namespace boost::serialization - -#endif // BOOST_PARALLEL_DETAIL_UNTRACKED_PAIR_HPP diff --git a/third_party/boost_parts/boost/graph/parallel/properties.hpp b/third_party/boost_parts/boost/graph/parallel/properties.hpp index c6bb0bb0..852a7262 100644 --- a/third_party/boost_parts/boost/graph/parallel/properties.hpp +++ b/third_party/boost_parts/boost/graph/parallel/properties.hpp @@ -92,8 +92,10 @@ namespace boost { public: BOOST_STATIC_CONSTANT(bool, non_default_resolver = true); - T operator()(T key) const { return key; } - T operator()(T key, T, T y) const { return y; } + template + T operator()(Key key) const { return key; } + template + T operator()(Key key, T, T y) const { return y; } }; }; diff --git a/third_party/boost_parts/boost/graph/properties.hpp b/third_party/boost_parts/boost/graph/properties.hpp index ca6a4e9b..660102b4 100644 --- a/third_party/boost_parts/boost/graph/properties.hpp +++ b/third_party/boost_parts/boost/graph/properties.hpp @@ -324,13 +324,6 @@ namespace boost { } -#if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590)) && !defined (BOOST_GRAPH_NO_BUNDLED_PROPERTIES) -// This compiler cannot define a partial specialization based on a -// pointer-to-member type, as seen in boost/graph/subgraph.hpp line 985 (as of -// trunk r53912) -# define BOOST_GRAPH_NO_BUNDLED_PROPERTIES -#endif - // NOTE: These functions are declared, but never defined since they need to // be overloaded by graph implementations. However, we need them to be // declared for the functions below. diff --git a/third_party/boost_parts/boost/graph/reverse_graph.hpp b/third_party/boost_parts/boost/graph/reverse_graph.hpp index 24eb1c7c..56ffe72d 100644 --- a/third_party/boost_parts/boost/graph/reverse_graph.hpp +++ b/third_party/boost_parts/boost/graph/reverse_graph.hpp @@ -322,6 +322,13 @@ target(const detail::reverse_graph_edge_descriptor& e, const reverse_graph return source(e.underlying_descx, g.m_g); } +template +inline typename graph_traits::degree_size_type +degree(const typename graph_traits::vertex_descriptor u, + const reverse_graph& g) +{ + return degree(u, g.m_g); +} namespace detail { diff --git a/third_party/boost_parts/boost/integer_fwd.hpp b/third_party/boost_parts/boost/integer_fwd.hpp index 10577ae2..18519dd6 100644 --- a/third_party/boost_parts/boost/integer_fwd.hpp +++ b/third_party/boost_parts/boost/integer_fwd.hpp @@ -159,6 +159,8 @@ template #ifdef BOOST_NO_INTEGRAL_INT64_T @@ -180,6 +182,7 @@ template < typename IntegerType > template < typename IntegerType > class lcm_evaluator; +} // namespace integer } // namespace boost diff --git a/third_party/boost_parts/boost/intrusive/detail/config_begin.hpp b/third_party/boost_parts/boost/intrusive/detail/config_begin.hpp index cef86168..8bd57a3b 100644 --- a/third_party/boost_parts/boost/intrusive/detail/config_begin.hpp +++ b/third_party/boost_parts/boost/intrusive/detail/config_begin.hpp @@ -17,33 +17,20 @@ #ifdef BOOST_MSVC #pragma warning (push) - // - //'function' : resolved overload was found by argument-dependent lookup - //A function found by argument-dependent lookup (Koenig lookup) was eventually - //chosen by overload resolution. - // - //In Visual C++ .NET and earlier compilers, a different function would have - //been called. To pick the original function, use an explicitly qualified name. - // - - //warning C4275: non dll-interface class 'x' used as base for - //dll-interface class 'Y' - #pragma warning (disable : 4275) - //warning C4251: 'x' : class 'y' needs to have dll-interface to - //be used by clients of class 'z' - #pragma warning (disable : 4251) - #pragma warning (disable : 4675) - #pragma warning (disable : 4996) - #pragma warning (disable : 4503) + #pragma warning (disable : 4275) // non DLL-interface classkey "identifier" used as base for DLL-interface classkey "identifier" + #pragma warning (disable : 4251) // "identifier" : class "type" needs to have dll-interface to be used by clients of class "type2" + #pragma warning (disable : 4675) // "method" should be declared "static" and have exactly one parameter + #pragma warning (disable : 4996) // "function": was declared deprecated + #pragma warning (disable : 4503) // "identifier" : decorated name length exceeded, name was truncated #pragma warning (disable : 4284) // odd return type for operator-> #pragma warning (disable : 4244) // possible loss of data #pragma warning (disable : 4521) ////Disable "multiple copy constructors specified" #pragma warning (disable : 4127) //conditional expression is constant - #pragma warning (disable : 4146) + #pragma warning (disable : 4146) // unary minus operator applied to unsigned type, result still unsigned #pragma warning (disable : 4267) //conversion from 'X' to 'Y', possible loss of data #pragma warning (disable : 4541) //'typeid' used on polymorphic type 'boost::exception' with /GR- #pragma warning (disable : 4512) //'typeid' used on polymorphic type 'boost::exception' with /GR- - #pragma warning (disable : 4522) + #pragma warning (disable : 4522) // "class" : multiple assignment operators specified #pragma warning (disable : 4706) //assignment within conditional expression #pragma warning (disable : 4710) // function not inlined #pragma warning (disable : 4714) // "function": marked as __forceinline not inlined diff --git a/third_party/boost_parts/boost/intrusive/detail/has_member_function_callable_with.hpp b/third_party/boost_parts/boost/intrusive/detail/has_member_function_callable_with.hpp index 2e73305d..92ef60ee 100644 --- a/third_party/boost_parts/boost/intrusive/detail/has_member_function_callable_with.hpp +++ b/third_party/boost_parts/boost/intrusive/detail/has_member_function_callable_with.hpp @@ -11,13 +11,22 @@ #ifndef BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_CALLABLE_WITH_HPP #define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_CALLABLE_WITH_HPP -//Mark that we don't support 0 arg calls due to compiler ICE in GCC 3.4/4.0/4.1 and -//wrong SFINAE for GCC 4.2/4.3 -#if defined(__GNUC__) && !defined(__clang__) && ((__GNUC__*100 + __GNUC_MINOR__*10) >= 340) && ((__GNUC__*100 + __GNUC_MINOR__*10) <= 430) - #define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED -#elif defined(BOOST_INTEL) && (BOOST_INTEL < 1200 ) - #define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED +#ifndef BOOST_CONFIG_HPP +# include #endif + +//In case no decltype and no variadics, mark that we don't support 0 arg calls due to +//compiler ICE in GCC 3.4/4.0/4.1 and, wrong SFINAE for GCC 4.2/4.3/MSVC10/MSVC11 +#if defined(BOOST_NO_CXX11_DECLTYPE) && defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +# if defined(BOOST_GCC) && (BOOST_GCC < 40400) +# define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED +# elif defined(BOOST_INTEL) && (BOOST_INTEL < 1200) +# define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED +# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1800) +# define BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED +# endif +#endif //#if defined(BOOST_NO_CXX11_DECLTYPE) && defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) + #include #include #include @@ -27,6 +36,11 @@ namespace boost_intrusive_hmfcw { typedef char yes_type; struct no_type{ char dummy[2]; }; +struct dont_care +{ + dont_care(...); +}; + #if defined(BOOST_NO_CXX11_DECLTYPE) #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) @@ -39,11 +53,6 @@ struct make_dontcare #endif -struct dont_care -{ - dont_care(...); -}; - struct private_type { static private_type p; @@ -56,7 +65,7 @@ yes_type is_private_type(private_type const &); #endif //#if defined(BOOST_NO_CXX11_DECLTYPE) -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_NO_CXX11_DECLTYPE) template struct remove_cv { typedef T type; }; template struct remove_cv { typedef T type; }; @@ -124,7 +133,31 @@ BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG // declaration, special case and 0 arg specializaton // ///////////////////////////////////////////////////////// - ///////////////////////////////////////////////////////// + + template + class BOOST_MOVE_CAT(has_member_function_named_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME) + { + struct BaseMixin + { + void BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME() + {} //Some compilers require the definition or linker errors happen + }; + + struct Base + : public boost_intrusive_hmfcw::remove_cv::type, public BaseMixin + { //Declare the unneeded default constructor as some old compilers wrongly require it with is_convertible + Base(){} + }; + template class Helper{}; + + template + static boost_intrusive_hmfcw::no_type deduce + (U*, Helper* = 0); + static boost_intrusive_hmfcw::yes_type deduce(...); + + public: + static const bool value = sizeof(boost_intrusive_hmfcw::yes_type) == sizeof(deduce((Base*)0)); + }; #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) ///////////////////////////////////////////////////////// @@ -136,53 +169,45 @@ BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG ///////////////////////////////////////////////////////// //defined(BOOST_NO_CXX11_DECLTYPE) must be true - template + template struct FunWrapTmpl : Fun { using Fun::BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME; + FunWrapTmpl(); + template boost_intrusive_hmfcw::private_type BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME(DontCares...) const; }; + template + struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME); + + //No BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME member specialization template - struct BOOST_MOVE_CAT(has_member_function_callable_with_,BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME) + struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME) + { - typedef FunWrapTmpl::type...> FunWrap; + static const bool value = false; + }; - static bool const value = (sizeof(boost_intrusive_hmfcw::no_type) == - sizeof(boost_intrusive_hmfcw::is_private_type - ( (::boost::move_detail::declval< FunWrap >(). + template + struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_,BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME) + { + static bool const value = (sizeof(boost_intrusive_hmfcw::no_type) == sizeof(boost_intrusive_hmfcw::is_private_type + ( (::boost::move_detail::declval + < FunWrapTmpl >(). BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME(::boost::move_detail::declval()...), 0) ) ) ); }; - #else //defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - //Preprocessor must be used to generate specializations instead of variadic templates - template - class BOOST_MOVE_CAT(has_member_function_named_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME) - { - struct BaseMixin - { - void BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME() - {} //Some compilers require the definition or linker errors happen - }; - - struct Base - : public boost_intrusive_hmfcw::remove_cv::type, public BaseMixin - { //Declare the unneeded default constructor as some old compilers wrongly require it with is_convertible - Base(){} - }; - template class Helper{}; - - template - static boost_intrusive_hmfcw::no_type deduce - (U*, Helper* = 0); - static boost_intrusive_hmfcw::yes_type deduce(...); - - public: - static const bool value = sizeof(boost_intrusive_hmfcw::yes_type) == sizeof(deduce((Base*)0)); - }; + template + struct BOOST_MOVE_CAT(has_member_function_callable_with_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME) + : public BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME) + ::value + , Args...> + {}; + #else //defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) ///////////////////////////////////////////////////////// ///////////////////////////////////////////////////////// @@ -222,24 +247,24 @@ BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG #if !defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED) - template().BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME(), 0)> - struct BOOST_MOVE_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME) - { boost_intrusive_hmfcw::yes_type dummy[N ? 1 : 2]; }; + template().BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME(), 0)> + struct BOOST_MOVE_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME) + { boost_intrusive_hmfcw::yes_type dummy[N ? 1 : 2]; }; - template - struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME) - { - template static BOOST_MOVE_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME) - Test(BOOST_MOVE_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)*); - template static boost_intrusive_hmfcw::no_type Test(...); - static const bool value = sizeof(Test< Fun >(0)) == sizeof(boost_intrusive_hmfcw::yes_type); - }; + template + struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME) + { + template static BOOST_MOVE_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME) + Test(BOOST_MOVE_CAT(zeroarg_checker_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME)*); + template static boost_intrusive_hmfcw::no_type Test(...); + static const bool value = sizeof(Test< Fun >(0)) == sizeof(boost_intrusive_hmfcw::yes_type); + }; #else //defined(BOOST_INTRUSIVE_DETAIL_HAS_MEMBER_FUNCTION_CALLABLE_WITH_0_ARGS_UNSUPPORTED) template struct BOOST_MOVE_CAT(has_member_function_callable_with_impl_, BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME) - {//GCC [3.4-4.3) gives ICE when instantiating the 0 arg version so it is not supported. + { //Some compilers gives ICE when instantiating the 0 arg version so it is not supported. static const bool value = true; }; diff --git a/third_party/boost_parts/boost/intrusive/detail/memory_util.hpp b/third_party/boost_parts/boost/intrusive/detail/memory_util.hpp deleted file mode 100644 index bfc9b149..00000000 --- a/third_party/boost_parts/boost/intrusive/detail/memory_util.hpp +++ /dev/null @@ -1,292 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Pablo Halpern 2009. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2011-2013. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/intrusive for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_INTRUSIVE_ALLOCATOR_MEMORY_UTIL_HPP -#define BOOST_INTRUSIVE_ALLOCATOR_MEMORY_UTIL_HPP - -#if (defined _MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include -#include -#include -#include - -namespace boost { -namespace intrusive { -namespace detail { - -template -inline T* addressof(T& obj) -{ - return static_cast - (static_cast - (const_cast - (&reinterpret_cast(obj)) - ) - ); -} - -template struct unvoid { typedef T type; }; -template <> struct unvoid { struct type { }; }; -template <> struct unvoid { struct type { }; }; - -template struct unvoid_ref { typedef T &type; }; -template <> struct unvoid_ref { struct type_impl { }; typedef type_impl & type; }; -template <> struct unvoid_ref { struct type_impl { }; typedef type_impl & type; }; - -template -struct LowPriorityConversion -{ - // Convertible from T with user-defined-conversion rank. - LowPriorityConversion(const T&) { } -}; - -// Infrastructure for providing a default type for T::TNAME if absent. -#define BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(TNAME) \ - template \ - struct boost_intrusive_default_type_ ## TNAME \ - { \ - template \ - static char test(int, typename X::TNAME*); \ - \ - template \ - static int test(boost::intrusive::detail:: \ - LowPriorityConversion, void*); \ - \ - struct DefaultWrap { typedef DefaultType TNAME; }; \ - \ - static const bool value = (1 == sizeof(test(0, 0))); \ - \ - typedef typename \ - ::boost::intrusive::detail::if_c \ - ::type::TNAME type; \ - }; \ - \ - template \ - struct boost_intrusive_eval_default_type_ ## TNAME \ - { \ - template \ - static char test(int, typename X::TNAME*); \ - \ - template \ - static int test(boost::intrusive::detail:: \ - LowPriorityConversion, void*); \ - \ - struct DefaultWrap \ - { typedef typename DefaultType::type TNAME; }; \ - \ - static const bool value = (1 == sizeof(test(0, 0))); \ - \ - typedef typename \ - ::boost::intrusive::detail::eval_if_c \ - < value \ - , ::boost::intrusive::detail::identity \ - , ::boost::intrusive::detail::identity \ - >::type::TNAME type; \ - }; \ -// - -#define BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(INSTANTIATION_NS_PREFIX, T, TNAME, TIMPL) \ - typename INSTANTIATION_NS_PREFIX \ - boost_intrusive_default_type_ ## TNAME< T, TIMPL >::type \ -// - -#define BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(INSTANTIATION_NS_PREFIX, T, TNAME, TIMPL) \ - typename INSTANTIATION_NS_PREFIX \ - boost_intrusive_eval_default_type_ ## TNAME< T, TIMPL >::type \ -// - -}}} //namespace boost::intrusive::detail - -#include - -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME pointer_to -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace intrusive { namespace detail { -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} -#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 1, )) -#include BOOST_PP_ITERATE() - -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME static_cast_from -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace intrusive { namespace detail { -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} -#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 1, )) -#include BOOST_PP_ITERATE() - -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME const_cast_from -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace intrusive { namespace detail { -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} -#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 1, )) -#include BOOST_PP_ITERATE() - -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME dynamic_cast_from -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEGIN namespace boost { namespace intrusive { namespace detail { -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}} -#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, 1, )) -#include BOOST_PP_ITERATE() - -namespace boost { -namespace intrusive { -namespace detail { - -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(element_type) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type) - -////////////////////// -//struct first_param -////////////////////// - -template struct first_param -{ typedef void type; }; - -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - template