diff --git a/.gitmodules b/.gitmodules index 98e031e8b6f..ab5c0c7bb74 100644 --- a/.gitmodules +++ b/.gitmodules @@ -34,3 +34,6 @@ [submodule "contrib/ssl"] path = contrib/ssl url = https://github.com/ClickHouse-Extras/ssl.git +[submodule "contrib/boost"] + path = contrib/boost + url = https://github.com/ClickHouse-Extras/boost.git diff --git a/CHANGELOG.md b/CHANGELOG.md index 88ba69e6c77..847d0506427 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,87 @@ +# ClickHouse 1.1.54356 Release Candidate, 2018-03-06 + +## New features: + +* Aggregation without `GROUP BY` for an empty set (such as `SELECT count(*) FROM table WHERE 0`) now returns a result with one row with null values for aggregate functions, in compliance with the SQL standard. To restore the old behavior (return an empty result), set `empty_result_for_aggregation_by_empty_set` to 1. +* Added type conversion for `UNION ALL`. Different alias names are allowed in `SELECT` positions in `UNION ALL`, in compliance with the SQL standard. +* Arbitrary expressions are supported in `LIMIT BY` sections. Previously, it was only possible to use columns resulting from `SELECT`. +* An index of `MergeTree` tables is used when `IN` is applied to a tuple of expressions from the columns of the primary key. Example: `WHERE (UserID, EventDate) IN ((123, '2000-01-01'), ...)` (Anastasiya Tsarkova). +* Added the `clickhouse-copier` tool for copying between clusters and resharding data (beta). +* Added consistent hashing functions: `yandexConsistentHash`, `jumpConsistentHash`, `sumburConsistentHash`. They can be used as a sharding key in order to reduce the amount of network traffic during subsequent reshardings. +* Added functions: `arrayAny`, `arrayAll`, `hasAny`, `hasAll`, `arrayIntersect`, `arrayResize`. +* Added the `arrayCumSum` function (Javi Santana). +* Added the `parseDateTimeBestEffort`, `parseDateTimeBestEffortOrZero`, and `parseDateTimeBestEffortOrNull`functions to read the DateTime from a string containing text in a wide variety of possible formats. +* It is now possible to change the logging settings without restarting the server. +* Added the `cluster` table function. Example: `cluster(cluster_name, db, table)`. The `remote` table function can accept the cluster name as the first argument, if it is specified as an identifier. +* Added the `create_table_query` and `engine_full` virtual columns to the `system.tables`table . The `metadata_modification_time` column is virtual. +* Added the `data_path` and `metadata_path` columns to `system.tables` and` system.databases` tables, and added the `path` column to the `system.parts` and `system.parts_columns` tables. +* Added additional information about merges in the `system.part_log` table. +* An arbitrary partitioning key can be used for the `system.query_log` table (Kirill Shvakov). +* The `SHOW TABLES` query now also shows temporary tables. Added temporary tables and the `is_temporary` column to `system.tables` (zhang2014). +* Added the `DROP TEMPORARY TABLE` query (zhang2014). +* Support for `SHOW CREATE TABLE` for temporary tables (zhang2014). +* Added the `system_profile` configuration parameter for the settings used by internal processes. +* Support for loading `object_id` as an attribute in `MongoDB` dictionaries (Pavel Litvinenko). +* Reading `null` as the default value when loading data for an external dictionary with the `MongoDB` source (Pavel Litvinenko). +* Reading `DateTime` values in the `Values` format from a Unix timestamp without single quotes. +* Failover is supported in `remote` table functions for cases when some of the replicas are missing the requested table. +* Configuration settings can be overridden in the command line when you run `clickhouse-server`. Example: `clickhouse-server -- --logger.level=information`. +* Implemented the `empty` function from a `FixedString` argument: the function returns 1 if the string consists entirely of null bytes (zhang2014). +* Added the `listen_try`configuration parameter for listening to at least one of the listen addresses without quitting, if some of the addresses can't be listened to (useful for systems with disabled support for IPv4 or IPv6). +* Added the `VersionedCollapsingMergeTree` table engine. +* Support for rows and arbitrary numeric types for the `library` dictionary source. +* `MergeTree` tables can be used without a primary key (you need to specify `ORDER BY tuple()`). +* A `Nullable` type can be `CAST` to a non-`Nullable` type if the argument is not `NULL`. +* `RENAME TABLE` can be performed for `VIEW`. +* Added the `odbc_default_field_size` option, which allows you to extend the maximum size of the value loaded from an ODBC source (by default, it is 1024). + +## Improvements: + +* Limits and quotas on the result are no longer applied to intermediate data for `INSERT SELECT` queries or for `SELECT` subqueries. +* Fewer false triggers of `force_restore_data` when checking the status of `Replicated` tables when the server starts. +* Added the `allow_distributed_ddl` option. +* Nondeterministic functions are not allowed in expressions for `MergeTree` table keys. +* Files with substitutions from `config.d` directories are loaded in alphabetical order. +* Improved performance of the `arrayElement` function in the case of a constant multidimensional array with an empty array as one of the elements. Example: `[[1], []][x]`. +* The server starts faster now when using configuration files with very large substitutions (for instance, very large lists of IP networks). +* When running a query, table valued functions run once. Previously, `remote` and `mysql` table valued functions performed the same query twice to retrieve the table structure from a remote server. +* The `MkDocs` documentation generator is used. +* When you try to delete a table column that `DEFAULT`/`MATERIALIZED` expressions of other columns depend on, an exception is thrown (zhang2014). +* Added the ability to parse an empty line in text formats as the number 0 for `Float` data types. This feature was previously available but was lost in release 1.1.54342. +* `Enum` values can be used in `min`, `max`, `sum` and some other functions. In these cases, it uses the corresponding numeric values. This feature was previously available but was lost in the release 1.1.54337. +* Added `max_expanded_ast_elements` to restrict the size of the AST after recursively expanding aliases. + +## Bug fixes: + +* Fixed cases when unnecessary columns were removed from subqueries in error, or not removed from subqueries containing `UNION ALL`. +* Fixed a bug in merges for `ReplacingMergeTree` tables. +* Fixed synchronous insertions in `Distributed` tables (`insert_distributed_sync = 1`). +* Fixed segfault for certain uses of `FULL` and `RIGHT JOIN` with duplicate columns in subqueries. +* Fixed the order of the `source` and `last_exception` columns in the `system.dictionaries` table. +* Fixed a bug when the `DROP DATABASE` query did not delete the file with metadata. +* Fixed the `DROP DATABASE` query for `Dictionary` databases. +* Fixed the low precision of `uniqHLL12` and `uniqCombined` functions for cardinalities greater than 100 million items (Alex Bocharov). +* Fixed the calculation of implicit default values when necessary to simultaneously calculate default explicit expressions in `INSERT` queries (zhang2014). +* Fixed a rare case when a query to a `MergeTree` table couldn't finish (chenxing-xc). +* Fixed a crash that occurred when running a `CHECK` query for `Distributed` tables if all shards are local (chenxing.xc). +* Fixed a slight performance regression with functions that use regular expressions. +* Fixed a performance regression when creating multidimensional arrays from complex expressions. +* Fixed a bug that could cause an extra `FORMAT` section to appear in an `.sql` file with metadata. +* Fixed a bug that caused the `max_table_size_to_drop` limit to apply when trying to delete a `MATERIALIZED VIEW` looking at an explicitly specified table. +* Fixed incompatibility with old clients (old clients were sometimes sent data with the `DateTime('timezone')` type, which they do not understand). +* Fixed a bug when reading `Nested` column elements of structures that were added using `ALTER` but that are empty for the old partitions, when the conditions for these columns moved to `PREWHERE`. +* Fixed a bug when filtering tables by virtual `_table` columns in queries to `Merge` tables. +* Fixed a bug when using `ALIAS` columns in `Distributed` tables. +* Fixed a bug that made dynamic compilation impossible for queries with aggregate functions from the `quantile` family. +* Fixed a race condition in the query execution pipeline that occurred in very rare cases when using `Merge` tables with a large number of tables, and when using `GLOBAL` subqueries. +* Fixed a crash when passing arrays of different sizes to an `arrayReduce` function when using aggregate functions from multiple arguments. +* Prohibited the use of queries with `UNION ALL` in a `MATERIALIZED VIEW`. + +## Backward incompatible changes: + +* Removed the `distributed_ddl_allow_replicated_alter` option. This behavior is enabled by default. +* Removed the `UnsortedMergeTree` engine. + # ClickHouse release 1.1.54343, 2018-02-05 * Added macros support for defining cluster names in distributed DDL queries and constructors of Distributed tables: `CREATE TABLE distr ON CLUSTER '{cluster}' (...) ENGINE = Distributed('{cluster}', 'db', 'table')`. @@ -6,7 +90,7 @@ # ClickHouse release 1.1.54342, 2018-01-22 -This release contains bug fixes for the previous release 1.1.54342: +This release contains bug fixes for the previous release 1.1.54337: * Fixed a regression in 1.1.54337: if the default user has readonly access, then the server refuses to start up with the message `Cannot create database in readonly mode`. * Fixed a regression in 1.1.54337: on systems with `systemd`, logs are always written to syslog regardless of the configuration; the watchdog script still uses `init.d`. * Fixed a regression in 1.1.54337: wrong default configuration in the Docker image. diff --git a/CHANGELOG_RU.md b/CHANGELOG_RU.md index bf81ce720bf..2dfbdccb7a4 100644 --- a/CHANGELOG_RU.md +++ b/CHANGELOG_RU.md @@ -1,3 +1,93 @@ +# ClickHouse 1.1.54362 Release Candidate, 2018-03-11 + +## Новые возможности: + +* Агрегация без `GROUP BY` по пустому множеству (как например, `SELECT count(*) FROM table WHERE 0`) теперь возвращает результат из одной строки с нулевыми значениями агрегатных функций, в соответствии со стандартом SQL. Вы можете вернуть старое поведение (возвращать пустой результат), выставив настройку `empty_result_for_aggregation_by_empty_set` в значение 1. +* Добавлено приведение типов при `UNION ALL`. Допустимо использование столбцов с разными алиасами в соответствующих позициях `SELECT` в `UNION ALL`, что соответствует стандарту SQL. +* Поддержка произвольных выражений в секции `LIMIT BY`. Ранее было возможно лишь использование столбцов - результата `SELECT`. +* Использование индекса таблиц семейства `MergeTree` при наличии условия `IN` на кортеж от выражений от столбцов первичного ключа. Пример `WHERE (UserID, EventDate) IN ((123, '2000-01-01'), ...)` (Anastasiya Tsarkova). +* Добавлен инструмент `clickhouse-copier` для межкластерного копирования и перешардирования данных (бета). +* Добавлены функции консистентного хэширования `yandexConsistentHash`, `jumpConsistentHash`, `sumburConsistentHash`. Их можно использовать в качестве ключа шардирования для того, чтобы уменьшить объём сетевого трафика при последующих перешардированиях. +* Добавлены функции `arrayAny`, `arrayAll`, `hasAny`, `hasAll`, `arrayIntersect`, `arrayResize`. +* Добавлена функция `arrayCumSum` (Javi Santana). +* Добавлена функция `parseDateTimeBestEffort`, `parseDateTimeBestEffortOrZero`, `parseDateTimeBestEffortOrNull`, позволяющая прочитать DateTime из строки, содержащей текст в широком множестве возможных форматов. +* Возможность частичной перезагрузки данных внешних словарей при их обновлении (загрузка лишь записей со значением заданного поля большим, чем при предыдущей загрузке) (Arsen Hakobyan). +* Добавлена табличная функция `cluster`. Пример: `cluster(cluster_name, db, table)`. Табличная функция `remote` может принимать имя кластера в качестве первого аргумента, если оно указано в виде идентификатора. +* Возможность использования табличных функций `remote`, `cluster` в `INSERT` запросах. +* Добавлены виртуальные столбцы `create_table_query`, `engine_full` в таблице `system.tables`. Столбец `metadata_modification_time` сделан виртуальным. +* Добавлены столбцы `data_path`, `metadata_path` в таблицы `system.tables` и` system.databases`, а также столбец `path` в таблицы `system.parts` и `system.parts_columns`. +* Добавлена дополнительная информация о слияниях в таблице `system.part_log`. +* Возможность использования произвольного ключа партиционирования для таблицы `system.query_log` (Kirill Shvakov). +* Запрос `SHOW TABLES` теперь показывает также и временные таблицы. Добавлены временные таблицы и столбец `is_temporary` в таблице `system.tables` (zhang2014). +* Добавлен запрос `DROP TEMPORARY TABLE`, `EXISTS TEMPORARY TABLE` (zhang2014). +* Поддержка `SHOW CREATE TABLE` для временных таблиц (zhang2014). +* Добавлен конфигурационный параметр `system_profile` для настроек, используемых внутренними процессами. +* Поддержка загрузки `object_id` в качестве атрибута в словарях с источником `MongoDB` (Павел Литвиненко). +* Возможность читать `null` как значение по-умолчанию при загрузке данных для внешнего словаря с источником `MongoDB` (Павел Литвиненко). +* Возможность чтения значения типа `DateTime` в формате `Values` из unix timestamp без одинарных кавычек. +* Поддержан failover в табличной функции `remote` для случая, когда на части реплик отсутствует запрошенная таблица. +* Возможность переопределять параметры конфигурации в параметрах командной строки при запуске `clickhouse-server`, пример: `clickhouse-server -- --logger.level=information`. +* Реализована функция `empty` от аргумента типа `FixedString`: функция возвращает 1, если строка состоит полностью из нулевых байт (zhang2014). +* Добавлен конфигурационный параметр `listen_try`, позволяющий слушать хотя бы один из listen адресов и не завершать работу, если некоторые адреса не удаётся слушать (полезно для систем с выключенной поддержкой IPv4 или IPv6). +* Добавлен движок таблиц `VersionedCollapsingMergeTree`. +* Поддержка строк и произвольных числовых типов для источника словарей `library`. +* Возможность использования таблиц семейства `MergeTree` без первичного ключа (для этого необходимо указать `ORDER BY tuple()`). +* Добавлена возможность выполнить преобразование (`CAST`) `Nullable` типа в не `Nullable` тип, если аргумент не является `NULL`. +* Возможность выполнения `RENAME TABLE` для `VIEW`. +* Добавлена функция `throwIf`. +* Добавлена настройка `odbc_default_field_size`, позволяющая расширить максимальный размер значения, загружаемого из ODBC источника (по-умолчанию - 1024). +* В таблицу `system.processes` и в `SHOW PROCESSLIST` добавлены столбцы `is_cancelled` и `peak_memory_usage`. + +## Улучшения: + +* Ограничения на результат и квоты на результат теперь не применяются к промежуточным данным для запросов `INSERT SELECT` и для подзапросов в `SELECT`. +* Уменьшено количество ложных срабатываний при проверке состояния `Replicated` таблиц при запуске сервера, приводивших к необходимости выставления флага `force_restore_data`. +* Добавлена настройка `allow_distributed_ddl`. +* Запрещено использование недетерминированных функций в выражениях для ключей таблиц семейства `MergeTree`. +* Файлы с подстановками из `config.d` директорий загружаются в алфавитном порядке. +* Увеличена производительность функции `arrayElement` в случае константного многомерного массива с пустым массивом в качестве одного из элементов. Пример: `[[1], []][x]`. +* Увеличена скорость запуска сервера при использовании конфигурационных файлов с очень большими подстановками (например, очень большими списками IP-сетей). +* При выполнении запроса, табличные функции выполняются один раз. Ранее табличные функции `remote`, `mysql` дважды делали одинаковый запрос на получение структуры таблицы с удалённого сервера. +* Используется генератор документации `MkDocs`. +* При попытке удалить столбец таблицы, от которого зависят `DEFAULT`/`MATERIALIZED` выражения других столбцов, кидается исключение (zhang2014). +* Добавлена возможность парсинга пустой строки в текстовых форматах как числа 0 для `Float` типов данных. Эта возможность присутствовала раньше, но была потеряна в релизе 1.1.54342. +* Значения типа `Enum` можно использовать в функциях `min`, `max`, `sum` и некоторых других - в этих случаях используются соответствующие числовые значения. Эта возможность присутствовала ранее, но была потеряна в релизе 1.1.54337. +* Добавлено ограничение `max_expanded_ast_elements` действующее на размер AST после рекурсивного раскрытия алиасов. + +## Исправление ошибок: + +* Исправлены случаи ошибочного удаления ненужных столбцов из подзапросов, а также отсутствие удаления ненужных столбцов из подзапросов, содержащих `UNION ALL`. +* Исправлена ошибка в слияниях для таблиц типа `ReplacingMergeTree`. +* Исправлена работа синхронного режима вставки в `Distributed` таблицы (`insert_distributed_sync = 1`). +* Исправлены segfault при некоторых случаях использования `FULL` и `RIGHT JOIN` с дублирующимися столбцами в подзапросах. +* Исправлены segfault, которые могут возникать при использовании функциональности `replace_running_query` и `KILL QUERY`. +* Исправлен порядок столбцов `source` и `last_exception` в таблице `system.dictionaries`. +* Исправлена ошибка - запрос `DROP DATABASE` не удалял файл с метаданными. +* Исправлен запрос `DROP DATABASE` для базы данных типа `Dictionary`. +* Исправлена неоправданно низкая точность работы функций `uniqHLL12` и `uniqCombined` для кардинальностей больше 100 млн. элементов (Alex Bocharov). +* Исправлено вычисление неявных значений по-умолчанию при необходимости одновременного вычисления явных выражений по-умолчанию в запросах `INSERT` (zhang2014). +* Исправлен редкий случай, в котором запрос к таблице типа `MergeTree` мог не завершаться (chenxing-xc). +* Исправлено падение при выполнении запроса `CHECK` для `Distributed` таблиц, если все шарды локальные (chenxing.xc). +* Исправлена незначительная регрессия производительности при работе функций, использующих регулярные выражения. +* Исправлена регрессия производительности при создании многомерных массивов от сложных выражений. +* Исправлена ошибка, из-за которой в `.sql` файл с метаданными может записываться лишняя секция `FORMAT`. +* Исправлена ошибка, приводящая к тому, что ограничение `max_table_size_to_drop` действует при попытке удаления `MATERIALIZED VIEW`, смотрящего на явно указанную таблицу. +* Исправлена несовместимость со старыми клиентами (на старые клиенты могли отправляться данные с типом `DateTime('timezone')`, который они не понимают). +* Исправлена ошибка при чтении столбцов-элементов `Nested` структур, которые были добавлены с помощью `ALTER`, но являются пустыми для старых партиций, когда условия на такие столбцы переносятся в `PREWHERE`. +* Исправлена ошибка при фильтрации таблиц по условию на виртуальных столбец `_table` в запросах к таблицам типа `Merge`. +* Исправлена ошибка при использовании `ALIAS` столбцов в `Distributed` таблицах. +* Исправлена ошибка, приводящая к невозможности динамической компиляции запросов с агрегатными функциями из семейства `quantile`. +* Исправлен race condition в конвейере выполнения запроса, который мог проявляться в очень редких случаях при использовании `Merge` таблиц над большим количеством таблиц, а также при использовании `GLOBAL` подзапросов. +* Исправлено падение при передаче массивов разных размеров в функцию `arrayReduce` при использовании агрегатных функций от нескольких аргументов. +* Запрещено использование запросов с `UNION ALL` в `MATERIALIZED VIEW`. +* Исправлена ошибка, которая может возникать при инициализации системной таблицы `part_log` при старте сервера (по-умолчанию `part_log` выключен). + +## Обратно несовместимые изменения: + +* Удалена настройка `distributed_ddl_allow_replicated_alter`. Соответствующее поведение включено по-умолчанию. +* Удалена настройка `strict_insert_defaults`. Если вы использовали эту функциональность, напишите на `clickhouse-feedback@yandex-team.com`. +* Удалён движок таблиц `UnsortedMergeTree`. + # Релиз ClickHouse 1.1.54343, 2018-02-05 * Добавлена возможность использовать макросы при задании имени кластера в распределенных DLL запросах и создании Distributed-таблиц: `CREATE TABLE distr ON CLUSTER '{cluster}' (...) ENGINE = Distributed('{cluster}', 'db', 'table')`. @@ -6,7 +96,7 @@ # Релиз ClickHouse 1.1.54342, 2018-01-22 -Релиз содержит исправление к предыдущему релизу 1.1.54318: +Релиз содержит исправление к предыдущему релизу 1.1.54337: * Исправлена регрессия в версии 1.1.54337: если пользователь по-умолчанию имеет readonly доступ, то сервер отказывался стартовать с сообщением `Cannot create database in readonly mode`. * Исправлена регрессия в версии 1.1.54337: на системах под управлением systemd, логи по ошибке всегда записываются в syslog; watchdog скрипт по ошибке использует init.d. * Исправлена регрессия в версии 1.1.54337: неправильная конфигурация по-умоланию в Docker образе. diff --git a/CMakeLists.txt b/CMakeLists.txt index cf546c72f83..ca4be1f5893 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,6 +162,8 @@ if (ARCH_LINUX AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GLIBC_COMPATIBILITY_LINK_FLAGS} ${CXX11_ABI_FLAGS}") option (USE_LIBCXX "Use libc++ and libc++abi instead of libstdc++ (only make sense on Linux with Clang)" ${HAVE_LIBCXX}) + set (LIBCXX_PATH "" CACHE STRING "Use custom path for libc++. It should be used for MSan.") + if (USE_LIBCXX) set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") # Ok for clang6, for older can cause 'not used option' warning set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_LIBCPP_DEBUG=0") # More checks in debug build. @@ -170,6 +172,11 @@ if (ARCH_LINUX AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang") else () link_libraries (-stdlib=libc++ c++ c++abi) endif () + + if (LIBCXX_PATH) +# include_directories (BEFORE SYSTEM "${LIBCXX_PATH}/include" "${LIBCXX_PATH}/include/c++/v1") + link_directories ("${LIBCXX_PATH}/lib") + endif () endif () endif () diff --git a/cmake/find_boost.cmake b/cmake/find_boost.cmake index 603b8d51d2f..a99211efe08 100644 --- a/cmake/find_boost.cmake +++ b/cmake/find_boost.cmake @@ -1,5 +1,11 @@ option (USE_INTERNAL_BOOST_LIBRARY "Set to FALSE to use system boost library instead of bundled" ${NOT_UNBUNDLED}) +# Test random file existing in all package variants +if (USE_INTERNAL_BOOST_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/boost/libs/system/src/error_code.cpp") + message (WARNING "submodules in contrib/boost is missing. to fix try run: \n git submodule update --init --recursive") + set (USE_INTERNAL_BOOST_LIBRARY 0) +endif () + if (NOT USE_INTERNAL_BOOST_LIBRARY) set (Boost_USE_STATIC_LIBS ${USE_STATIC_LIBRARIES}) set (BOOST_ROOT "/usr/local") @@ -10,7 +16,7 @@ if (NOT USE_INTERNAL_BOOST_LIBRARY) # set (BOOST_PATHS "") # find_library (Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options PATHS ${BOOST_PATHS}) # find_library (Boost_SYSTEM_LIBRARY boost_system PATHS ${BOOST_PATHS}) - # find_library (Boost_FILESYSTEM_LIBRARY boost_filesystem PATHS ${BOOST_PATHS}) + # find_library (Boost_FILESYSTEM_LIBRARY boost_filesystem PATHS ${BOOST_PATHS}) # maybe found but incorrect version. set (Boost_INCLUDE_DIRS "") set (Boost_SYSTEM_LIBRARY "") @@ -23,7 +29,19 @@ if (NOT Boost_SYSTEM_LIBRARY) set (Boost_PROGRAM_OPTIONS_LIBRARY boost_program_options_internal) set (Boost_SYSTEM_LIBRARY boost_system_internal) set (Boost_FILESYSTEM_LIBRARY boost_filesystem_internal) - set (Boost_INCLUDE_DIRS "${ClickHouse_SOURCE_DIR}/contrib/libboost/boost_1_65_0/") + + set (Boost_INCLUDE_DIRS) + + # For boost from github: + file (GLOB Boost_INCLUDE_DIRS_ "${ClickHouse_SOURCE_DIR}/contrib/boost/libs/*/include") + list (APPEND Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIRS_}) + # numeric has additional level + file (GLOB Boost_INCLUDE_DIRS_ "${ClickHouse_SOURCE_DIR}/contrib/boost/libs/numeric/*/include") + list (APPEND Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIRS_}) + + # For packaged version: + list (APPEND Boost_INCLUDE_DIRS "${ClickHouse_SOURCE_DIR}/contrib/boost") + endif () message (STATUS "Using Boost: ${Boost_INCLUDE_DIRS} : ${Boost_PROGRAM_OPTIONS_LIBRARY},${Boost_SYSTEM_LIBRARY},${Boost_FILESYSTEM_LIBRARY}") diff --git a/cmake/sanitize.cmake b/cmake/sanitize.cmake index d54e1f23eed..bac27578663 100644 --- a/cmake/sanitize.cmake +++ b/cmake/sanitize.cmake @@ -1,4 +1,4 @@ -set (SAN_FLAGS "${SAN_FLAGS} -g -fno-omit-frame-pointer") +set (SAN_FLAGS "${SAN_FLAGS} -g -fno-omit-frame-pointer -DSANITIZER") if (SAN_DEBUG) set (SAN_FLAGS "${SAN_FLAGS} -O0") else () diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index d7631a8c9d6..e74e9a5b7db 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -3,7 +3,7 @@ if (NOT MSVC) endif () if (USE_INTERNAL_BOOST_LIBRARY) - add_subdirectory (libboost) + add_subdirectory (boost-cmake) endif () if (USE_INTERNAL_LZ4_LIBRARY) diff --git a/contrib/boost b/contrib/boost new file mode 160000 index 00000000000..eb5943711e8 --- /dev/null +++ b/contrib/boost @@ -0,0 +1 @@ +Subproject commit eb5943711e88d1008583e6ae3720a5489313d02e diff --git a/contrib/boost-cmake/CMakeLists.txt b/contrib/boost-cmake/CMakeLists.txt new file mode 100644 index 00000000000..2a89293c902 --- /dev/null +++ b/contrib/boost-cmake/CMakeLists.txt @@ -0,0 +1,51 @@ +# Supported contrib/boost source variants: +# 1. Default - Minimized vrsion from release archive : https://github.com/ClickHouse-Extras/boost +# 2. Release archive unpacked to contrib/boost +# 3. Full boost https://github.com/boostorg/boost + +# if boostorg/boost connected as submodule: Update all boost internal submodules to tag: +# git submodule foreach "git fetch --all && git checkout boost-1.66.0 || true" + +# +# Important boost patch: 094c18b +# + +set (LIBRARY_DIR ${ClickHouse_SOURCE_DIR}/contrib/boost) + +if (NOT MSVC) + add_definitions(-Wno-unused-variable -Wno-deprecated-declarations) +endif () + +add_library(boost_program_options_internal +${LIBRARY_DIR}/libs/program_options/src/cmdline.cpp +${LIBRARY_DIR}/libs/program_options/src/config_file.cpp +${LIBRARY_DIR}/libs/program_options/src/convert.cpp +${LIBRARY_DIR}/libs/program_options/src/options_description.cpp +${LIBRARY_DIR}/libs/program_options/src/parsers.cpp +${LIBRARY_DIR}/libs/program_options/src/positional_options.cpp +${LIBRARY_DIR}/libs/program_options/src/split.cpp +${LIBRARY_DIR}/libs/program_options/src/utf8_codecvt_facet.cpp +${LIBRARY_DIR}/libs/program_options/src/value_semantic.cpp +${LIBRARY_DIR}/libs/program_options/src/variables_map.cpp +${LIBRARY_DIR}/libs/program_options/src/winmain.cpp) + +add_library(boost_filesystem_internal +${LIBRARY_DIR}/libs/filesystem/src/codecvt_error_category.cpp +${LIBRARY_DIR}/libs/filesystem/src/operations.cpp +${LIBRARY_DIR}/libs/filesystem/src/path.cpp +${LIBRARY_DIR}/libs/filesystem/src/path_traits.cpp +${LIBRARY_DIR}/libs/filesystem/src/portability.cpp +${LIBRARY_DIR}/libs/filesystem/src/unique_path.cpp +${LIBRARY_DIR}/libs/filesystem/src/utf8_codecvt_facet.cpp +${LIBRARY_DIR}/libs/filesystem/src/windows_file_codecvt.cpp) + +add_library(boost_system_internal +${LIBRARY_DIR}/libs/system/src/error_code.cpp) + +target_include_directories (boost_program_options_internal BEFORE PUBLIC ${Boost_INCLUDE_DIRS}) +target_include_directories (boost_filesystem_internal BEFORE PUBLIC ${Boost_INCLUDE_DIRS}) +target_include_directories (boost_system_internal BEFORE PUBLIC ${Boost_INCLUDE_DIRS}) + +target_compile_definitions (boost_program_options_internal PUBLIC BOOST_SYSTEM_NO_DEPRECATED) +target_compile_definitions (boost_filesystem_internal PUBLIC BOOST_SYSTEM_NO_DEPRECATED) +target_compile_definitions (boost_system_internal PUBLIC BOOST_SYSTEM_NO_DEPRECATED) diff --git a/contrib/libboost/README b/contrib/boost-cmake/README similarity index 100% rename from contrib/libboost/README rename to contrib/boost-cmake/README diff --git a/contrib/libboost/CMakeLists.txt b/contrib/libboost/CMakeLists.txt deleted file mode 100644 index 8533951a14b..00000000000 --- a/contrib/libboost/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -if (NOT MSVC) - add_definitions(-Wno-unused-variable -Wno-deprecated-declarations) -endif () - -add_library(boost_program_options_internal -boost_1_65_0/libs/program_options/src/cmdline.cpp -boost_1_65_0/libs/program_options/src/config_file.cpp -boost_1_65_0/libs/program_options/src/convert.cpp -boost_1_65_0/libs/program_options/src/options_description.cpp -boost_1_65_0/libs/program_options/src/parsers.cpp -boost_1_65_0/libs/program_options/src/positional_options.cpp -boost_1_65_0/libs/program_options/src/split.cpp -boost_1_65_0/libs/program_options/src/utf8_codecvt_facet.cpp -boost_1_65_0/libs/program_options/src/value_semantic.cpp -boost_1_65_0/libs/program_options/src/variables_map.cpp -boost_1_65_0/libs/program_options/src/winmain.cpp) - -add_library(boost_filesystem_internal -boost_1_65_0/libs/filesystem/src/codecvt_error_category.cpp -boost_1_65_0/libs/filesystem/src/operations.cpp -boost_1_65_0/libs/filesystem/src/path.cpp -boost_1_65_0/libs/filesystem/src/path_traits.cpp -boost_1_65_0/libs/filesystem/src/portability.cpp -boost_1_65_0/libs/filesystem/src/unique_path.cpp -boost_1_65_0/libs/filesystem/src/utf8_codecvt_facet.cpp -boost_1_65_0/libs/filesystem/src/windows_file_codecvt.cpp) - -add_library(boost_system_internal -boost_1_65_0/libs/system/src/error_code.cpp) - -target_include_directories (boost_program_options_internal BEFORE PUBLIC ${Boost_INCLUDE_DIRS}) -target_include_directories (boost_filesystem_internal BEFORE PUBLIC ${Boost_INCLUDE_DIRS}) -target_include_directories (boost_system_internal BEFORE PUBLIC ${Boost_INCLUDE_DIRS}) - -target_compile_definitions (boost_program_options_internal PUBLIC BOOST_SYSTEM_NO_DEPRECATED) -target_compile_definitions (boost_filesystem_internal PUBLIC BOOST_SYSTEM_NO_DEPRECATED) -target_compile_definitions (boost_system_internal PUBLIC BOOST_SYSTEM_NO_DEPRECATED) diff --git a/contrib/libboost/boost_1_65_0/LICENSE_1_0.txt b/contrib/libboost/boost_1_65_0/LICENSE_1_0.txt deleted file mode 100644 index 36b7cd93cdf..00000000000 --- a/contrib/libboost/boost_1_65_0/LICENSE_1_0.txt +++ /dev/null @@ -1,23 +0,0 @@ -Boost Software License - Version 1.0 - August 17th, 2003 - -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, -execute, and transmit the Software, and to prepare derivative works of the -Software, and to permit third-parties to whom the Software is furnished to -do so, all subject to the following: - -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, -must be included in all copies of the Software, in whole or in part, and -all derivative works of the Software, unless such copies or derivative -works are solely in the form of machine-executable object code generated by -a source language processor. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/algorithm.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/algorithm.hpp deleted file mode 100644 index ab0d4aff583..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/algorithm.hpp +++ /dev/null @@ -1,88 +0,0 @@ -/* - Copyright (c) Marshall Clow 2014. - - 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) - - Revision history: - 2 Dec 2014 mtc First version; power - -*/ - -/// \file algorithm.hpp -/// \brief Misc Algorithms -/// \author Marshall Clow -/// - -#ifndef BOOST_ALGORITHM_HPP -#define BOOST_ALGORITHM_HPP - -#include // for plus and multiplies - -#include // for boost::disable_if -#include - -namespace boost { namespace algorithm { - -template -T identity_operation ( std::multiplies ) { return T(1); } - -template -T identity_operation ( std::plus ) { return T(0); } - - -/// \fn power ( T x, Integer n ) -/// \return the value "x" raised to the power "n" -/// -/// \param x The value to be exponentiated -/// \param n The exponent (must be >= 0) -/// -// \remark Taken from Knuth, The Art of Computer Programming, Volume 2: -// Seminumerical Algorithms, Section 4.6.3 -template -typename boost::enable_if, T>::type -power (T x, Integer n) { - T y = 1; // Should be "T y{1};" - if (n == 0) return y; - while (true) { - if (n % 2 == 1) { - y = x * y; - if (n == 1) - return y; - } - n = n / 2; - x = x * x; - } - return y; - } - -/// \fn power ( T x, Integer n, Operation op ) -/// \return the value "x" raised to the power "n" -/// using the operation "op". -/// -/// \param x The value to be exponentiated -/// \param n The exponent (must be >= 0) -/// \param op The operation used -/// -// \remark Taken from Knuth, The Art of Computer Programming, Volume 2: -// Seminumerical Algorithms, Section 4.6.3 -template -typename boost::enable_if, T>::type -power (T x, Integer n, Operation op) { - T y = identity_operation(op); - if (n == 0) return y; - while (true) { - if (n % 2 == 1) { - y = op(x, y); - if (n == 1) - return y; - } - n = n / 2; - x = op(x, x); - } - return y; - } - -}} - -#endif // BOOST_ALGORITHM_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/clamp.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/clamp.hpp deleted file mode 100644 index 7bfa47ec9b6..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/clamp.hpp +++ /dev/null @@ -1,175 +0,0 @@ -/* - Copyright (c) Marshall Clow 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) - - Revision history: - 27 June 2009 mtc First version - 23 Oct 2010 mtc Added predicate version - -*/ - -/// \file clamp.hpp -/// \brief Clamp algorithm -/// \author Marshall Clow -/// -/// Suggested by olafvdspek in https://svn.boost.org/trac/boost/ticket/3215 - -#ifndef BOOST_ALGORITHM_CLAMP_HPP -#define BOOST_ALGORITHM_CLAMP_HPP - -#include // For std::less -#include // For std::iterator_traits -#include - -#include -#include -#include // for identity -#include // for boost::disable_if - -namespace boost { namespace algorithm { - -/// \fn clamp ( T const& val, -/// typename boost::mpl::identity::type const & lo, -/// typename boost::mpl::identity::type const & hi, Pred p ) -/// \return the value "val" brought into the range [ lo, hi ] -/// using the comparison predicate p. -/// If p ( val, lo ) return lo. -/// If p ( hi, val ) return hi. -/// Otherwise, return the original value. -/// -/// \param val The value to be clamped -/// \param lo The lower bound of the range to be clamped to -/// \param hi The upper bound of the range to be clamped to -/// \param p A predicate to use to compare the values. -/// p ( a, b ) returns a boolean. -/// - template - T const & clamp ( T const& val, - typename boost::mpl::identity::type const & lo, - typename boost::mpl::identity::type const & hi, Pred p ) - { -// assert ( !p ( hi, lo )); // Can't assert p ( lo, hi ) b/c they might be equal - return p ( val, lo ) ? lo : p ( hi, val ) ? hi : val; - } - - -/// \fn clamp ( T const& val, -/// typename boost::mpl::identity::type const & lo, -/// typename boost::mpl::identity::type const & hi ) -/// \return the value "val" brought into the range [ lo, hi ]. -/// If the value is less than lo, return lo. -/// If the value is greater than "hi", return hi. -/// Otherwise, return the original value. -/// -/// \param val The value to be clamped -/// \param lo The lower bound of the range to be clamped to -/// \param hi The upper bound of the range to be clamped to -/// - template - T const& clamp ( const T& val, - typename boost::mpl::identity::type const & lo, - typename boost::mpl::identity::type const & hi ) - { - return (clamp) ( val, lo, hi, std::less()); - } - -/// \fn clamp_range ( InputIterator first, InputIterator last, OutputIterator out, -/// std::iterator_traits::value_type const & lo, -/// std::iterator_traits::value_type const & hi ) -/// \return clamp the sequence of values [first, last) into [ lo, hi ] -/// -/// \param first The start of the range of values -/// \param last One past the end of the range of input values -/// \param out An output iterator to write the clamped values into -/// \param lo The lower bound of the range to be clamped to -/// \param hi The upper bound of the range to be clamped to -/// - template - OutputIterator clamp_range ( InputIterator first, InputIterator last, OutputIterator out, - typename std::iterator_traits::value_type const & lo, - typename std::iterator_traits::value_type const & hi ) - { - // this could also be written with bind and std::transform - while ( first != last ) - *out++ = clamp ( *first++, lo, hi ); - return out; - } - -/// \fn clamp_range ( const Range &r, OutputIterator out, -/// typename std::iterator_traits::type>::value_type const & lo, -/// typename std::iterator_traits::type>::value_type const & hi ) -/// \return clamp the sequence of values [first, last) into [ lo, hi ] -/// -/// \param r The range of values to be clamped -/// \param out An output iterator to write the clamped values into -/// \param lo The lower bound of the range to be clamped to -/// \param hi The upper bound of the range to be clamped to -/// - template - typename boost::disable_if_c::value, OutputIterator>::type - clamp_range ( const Range &r, OutputIterator out, - typename std::iterator_traits::type>::value_type const & lo, - typename std::iterator_traits::type>::value_type const & hi ) - { - return clamp_range ( boost::begin ( r ), boost::end ( r ), out, lo, hi ); - } - - -/// \fn clamp_range ( InputIterator first, InputIterator last, OutputIterator out, -/// std::iterator_traits::value_type const & lo, -/// std::iterator_traits::value_type const & hi, Pred p ) -/// \return clamp the sequence of values [first, last) into [ lo, hi ] -/// using the comparison predicate p. -/// -/// \param first The start of the range of values -/// \param last One past the end of the range of input values -/// \param out An output iterator to write the clamped values into -/// \param lo The lower bound of the range to be clamped to -/// \param hi The upper bound of the range to be clamped to -/// \param p A predicate to use to compare the values. -/// p ( a, b ) returns a boolean. - -/// - template - OutputIterator clamp_range ( InputIterator first, InputIterator last, OutputIterator out, - typename std::iterator_traits::value_type const & lo, - typename std::iterator_traits::value_type const & hi, Pred p ) - { - // this could also be written with bind and std::transform - while ( first != last ) - *out++ = clamp ( *first++, lo, hi, p ); - return out; - } - -/// \fn clamp_range ( const Range &r, OutputIterator out, -/// typename std::iterator_traits::type>::value_type const & lo, -/// typename std::iterator_traits::type>::value_type const & hi, -/// Pred p ) -/// \return clamp the sequence of values [first, last) into [ lo, hi ] -/// using the comparison predicate p. -/// -/// \param r The range of values to be clamped -/// \param out An output iterator to write the clamped values into -/// \param lo The lower bound of the range to be clamped to -/// \param hi The upper bound of the range to be clamped to -/// \param p A predicate to use to compare the values. -/// p ( a, b ) returns a boolean. -// -// Disable this template if the first two parameters are the same type; -// In that case, the user will get the two iterator version. - template - typename boost::disable_if_c::value, OutputIterator>::type - clamp_range ( const Range &r, OutputIterator out, - typename std::iterator_traits::type>::value_type const & lo, - typename std::iterator_traits::type>::value_type const & hi, - Pred p ) - { - return clamp_range ( boost::begin ( r ), boost::end ( r ), out, lo, hi, p ); - } - - -}} - -#endif // BOOST_ALGORITHM_CLAMP_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/all_of.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/all_of.hpp deleted file mode 100644 index 8280b18d62f..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/all_of.hpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - Copyright (c) Marshall Clow 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) -*/ - -/// \file all_of.hpp -/// \brief Test ranges to see if all elements match a value or predicate. -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_ALL_OF_HPP -#define BOOST_ALGORITHM_ALL_OF_HPP - -#include -#include - -namespace boost { namespace algorithm { - -/// \fn all_of ( InputIterator first, InputIterator last, Predicate p ) -/// \return true if all elements in [first, last) satisfy the predicate 'p' -/// \note returns true on an empty range -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param p A predicate for testing the elements of the sequence -/// -/// \note This function is part of the C++2011 standard library. -template -bool all_of ( InputIterator first, InputIterator last, Predicate p ) -{ - for ( ; first != last; ++first ) - if ( !p(*first)) - return false; - return true; -} - -/// \fn all_of ( const Range &r, Predicate p ) -/// \return true if all elements in the range satisfy the predicate 'p' -/// \note returns true on an empty range -/// -/// \param r The input range -/// \param p A predicate for testing the elements of the range -/// -template -bool all_of ( const Range &r, Predicate p ) -{ - return boost::algorithm::all_of ( boost::begin (r), boost::end (r), p ); -} - -/// \fn all_of_equal ( InputIterator first, InputIterator last, const T &val ) -/// \return true if all elements in [first, last) are equal to 'val' -/// \note returns true on an empty range -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param val A value to compare against -/// -template -bool all_of_equal ( InputIterator first, InputIterator last, const T &val ) -{ - for ( ; first != last; ++first ) - if ( val != *first ) - return false; - return true; -} - -/// \fn all_of_equal ( const Range &r, const T &val ) -/// \return true if all elements in the range are equal to 'val' -/// \note returns true on an empty range -/// -/// \param r The input range -/// \param val A value to compare against -/// -template -bool all_of_equal ( const Range &r, const T &val ) -{ - return boost::algorithm::all_of_equal ( boost::begin (r), boost::end (r), val ); -} - -}} // namespace boost and algorithm - -#endif // BOOST_ALGORITHM_ALL_OF_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/any_of.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/any_of.hpp deleted file mode 100644 index e68135a2b3c..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/any_of.hpp +++ /dev/null @@ -1,84 +0,0 @@ -/* - Copyright (c) Marshall Clow 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) - - For more information, see http://www.boost.org -*/ - -/// \file -/// \brief Test ranges to see if any elements match a value or predicate. -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_ANY_OF_HPP -#define BOOST_ALGORITHM_ANY_OF_HPP - -#include -#include - -namespace boost { namespace algorithm { - -/// \fn any_of ( InputIterator first, InputIterator last, Predicate p ) -/// \return true if any of the elements in [first, last) satisfy the predicate -/// \note returns false on an empty range -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param p A predicate for testing the elements of the sequence -/// -template -bool any_of ( InputIterator first, InputIterator last, Predicate p ) -{ - for ( ; first != last; ++first ) - if ( p(*first)) - return true; - return false; -} - -/// \fn any_of ( const Range &r, Predicate p ) -/// \return true if any elements in the range satisfy the predicate 'p' -/// \note returns false on an empty range -/// -/// \param r The input range -/// \param p A predicate for testing the elements of the range -/// -template -bool any_of ( const Range &r, Predicate p ) -{ - return boost::algorithm::any_of (boost::begin (r), boost::end (r), p); -} - -/// \fn any_of_equal ( InputIterator first, InputIterator last, const V &val ) -/// \return true if any of the elements in [first, last) are equal to 'val' -/// \note returns false on an empty range -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param val A value to compare against -/// -template -bool any_of_equal ( InputIterator first, InputIterator last, const V &val ) -{ - for ( ; first != last; ++first ) - if ( val == *first ) - return true; - return false; -} - -/// \fn any_of_equal ( const Range &r, const V &val ) -/// \return true if any of the elements in the range are equal to 'val' -/// \note returns false on an empty range -/// -/// \param r The input range -/// \param val A value to compare against -/// -template -bool any_of_equal ( const Range &r, const V &val ) -{ - return boost::algorithm::any_of_equal (boost::begin (r), boost::end (r), val); -} - -}} // namespace boost and algorithm - -#endif // BOOST_ALGORITHM_ANY_OF_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/copy_if.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/copy_if.hpp deleted file mode 100644 index 73e85d99c61..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/copy_if.hpp +++ /dev/null @@ -1,129 +0,0 @@ -/* - Copyright (c) Marshall Clow 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) -*/ - -/// \file copy_if.hpp -/// \brief Copy a subset of a sequence to a new sequence -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_COPY_IF_HPP -#define BOOST_ALGORITHM_COPY_IF_HPP - -#include // for std::pair, std::make_pair -#include -#include - -namespace boost { namespace algorithm { - -/// \fn copy_if ( InputIterator first, InputIterator last, OutputIterator result, Predicate p ) -/// \brief Copies all the elements from the input range that satisfy the -/// predicate to the output range. -/// \return The updated output iterator -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param result An output iterator to write the results into -/// \param p A predicate for testing the elements of the range -/// \note This function is part of the C++2011 standard library. -template -OutputIterator copy_if ( InputIterator first, InputIterator last, OutputIterator result, Predicate p ) -{ - for ( ; first != last; ++first ) - if (p(*first)) - *result++ = *first; - return result; -} - -/// \fn copy_if ( const Range &r, OutputIterator result, Predicate p ) -/// \brief Copies all the elements from the input range that satisfy the -/// predicate to the output range. -/// \return The updated output iterator -/// -/// \param r The input range -/// \param result An output iterator to write the results into -/// \param p A predicate for testing the elements of the range -/// -template -OutputIterator copy_if ( const Range &r, OutputIterator result, Predicate p ) -{ - return boost::algorithm::copy_if (boost::begin (r), boost::end(r), result, p); -} - - -/// \fn copy_while ( InputIterator first, InputIterator last, OutputIterator result, Predicate p ) -/// \brief Copies all the elements at the start of the input range that -/// satisfy the predicate to the output range. -/// \return The updated input and output iterators -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param result An output iterator to write the results into -/// \param p A predicate for testing the elements of the range -/// -template -std::pair -copy_while ( InputIterator first, InputIterator last, OutputIterator result, Predicate p ) -{ - for ( ; first != last && p(*first); ++first ) - *result++ = *first; - return std::make_pair(first, result); -} - -/// \fn copy_while ( const Range &r, OutputIterator result, Predicate p ) -/// \brief Copies all the elements at the start of the input range that -/// satisfy the predicate to the output range. -/// \return The updated input and output iterators -/// -/// \param r The input range -/// \param result An output iterator to write the results into -/// \param p A predicate for testing the elements of the range -/// -template -std::pair::type, OutputIterator> -copy_while ( const Range &r, OutputIterator result, Predicate p ) -{ - return boost::algorithm::copy_while (boost::begin (r), boost::end(r), result, p); -} - - -/// \fn copy_until ( InputIterator first, InputIterator last, OutputIterator result, Predicate p ) -/// \brief Copies all the elements at the start of the input range that do not -/// satisfy the predicate to the output range. -/// \return The updated output iterator -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param result An output iterator to write the results into -/// \param p A predicate for testing the elements of the range -/// -template -std::pair -copy_until ( InputIterator first, InputIterator last, OutputIterator result, Predicate p ) -{ - for ( ; first != last && !p(*first); ++first ) - *result++ = *first; - return std::make_pair(first, result); -} - -/// \fn copy_until ( const Range &r, OutputIterator result, Predicate p ) -/// \brief Copies all the elements at the start of the input range that do not -/// satisfy the predicate to the output range. -/// \return The updated output iterator -/// -/// \param r The input range -/// \param result An output iterator to write the results into -/// \param p A predicate for testing the elements of the range -/// -template -std::pair::type, OutputIterator> -copy_until ( const Range &r, OutputIterator result, Predicate p ) -{ - return boost::algorithm::copy_until (boost::begin (r), boost::end(r), result, p); -} - -}} // namespace boost and algorithm - -#endif // BOOST_ALGORITHM_COPY_IF_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/copy_n.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/copy_n.hpp deleted file mode 100644 index ac880856db7..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/copy_n.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - Copyright (c) Marshall Clow 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) -*/ - -/// \file copy_n.hpp -/// \brief Copy n items from one sequence to another -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_COPY_N_HPP -#define BOOST_ALGORITHM_COPY_N_HPP - -namespace boost { namespace algorithm { - -/// \fn copy_n ( InputIterator first, Size n, OutputIterator result ) -/// \brief Copies exactly n (n > 0) elements from the range starting at first to -/// the range starting at result. -/// \return The updated output iterator -/// -/// \param first The start of the input sequence -/// \param n The number of elements to copy -/// \param result An output iterator to write the results into -/// \note This function is part of the C++2011 standard library. -template -OutputIterator copy_n ( InputIterator first, Size n, OutputIterator result ) -{ - for ( ; n > 0; --n, ++first, ++result ) - *result = *first; - return result; -} -}} // namespace boost and algorithm - -#endif // BOOST_ALGORITHM_COPY_IF_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/find_if_not.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/find_if_not.hpp deleted file mode 100644 index 02ff4dce7b0..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/find_if_not.hpp +++ /dev/null @@ -1,51 +0,0 @@ -/* - Copyright (c) Marshall Clow 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) -*/ - -/// \file find_if_not.hpp -/// \brief Find the first element in a sequence that does not satisfy a predicate. -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_FIND_IF_NOT_HPP -#define BOOST_ALGORITHM_FIND_IF_NOT_HPP - -#include -#include - -namespace boost { namespace algorithm { - -/// \fn find_if_not(InputIterator first, InputIterator last, Predicate p) -/// \brief Finds the first element in the sequence that does not satisfy the predicate. -/// \return The iterator pointing to the desired element. -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param p A predicate for testing the elements of the range -/// \note This function is part of the C++2011 standard library. -template -InputIterator find_if_not ( InputIterator first, InputIterator last, Predicate p ) -{ - for ( ; first != last; ++first ) - if ( !p(*first)) - break; - return first; -} - -/// \fn find_if_not ( const Range &r, Predicate p ) -/// \brief Finds the first element in the sequence that does not satisfy the predicate. -/// \return The iterator pointing to the desired element. -/// -/// \param r The input range -/// \param p A predicate for testing the elements of the range -/// -template -typename boost::range_iterator::type find_if_not ( const Range &r, Predicate p ) -{ - return boost::algorithm::find_if_not (boost::begin (r), boost::end(r), p); -} - -}} -#endif // BOOST_ALGORITHM_FIND_IF_NOT_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/iota.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/iota.hpp deleted file mode 100644 index 675093f02d6..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/iota.hpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright (c) Marshall Clow 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) -*/ - -/// \file iota.hpp -/// \brief Generate an increasing series -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_IOTA_HPP -#define BOOST_ALGORITHM_IOTA_HPP - -#include -#include - -namespace boost { namespace algorithm { - -/// \fn iota ( ForwardIterator first, ForwardIterator last, T value ) -/// \brief Generates an increasing sequence of values, and stores them in [first, last) -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param value The initial value of the sequence to be generated -/// \note This function is part of the C++2011 standard library. -template -void iota ( ForwardIterator first, ForwardIterator last, T value ) -{ - for ( ; first != last; ++first, ++value ) - *first = value; -} - -/// \fn iota ( Range &r, T value ) -/// \brief Generates an increasing sequence of values, and stores them in the input Range. -/// -/// \param r The input range -/// \param value The initial value of the sequence to be generated -/// -template -void iota ( Range &r, T value ) -{ - boost::algorithm::iota (boost::begin(r), boost::end(r), value); -} - - -/// \fn iota_n ( OutputIterator out, T value, std::size_t n ) -/// \brief Generates an increasing sequence of values, and stores them in the input Range. -/// -/// \param out An output iterator to write the results into -/// \param value The initial value of the sequence to be generated -/// \param n The number of items to write -/// -template -OutputIterator iota_n ( OutputIterator out, T value, std::size_t n ) -{ - for ( ; n > 0; --n, ++value ) - *out++ = value; - - return out; -} - -}} - -#endif // BOOST_ALGORITHM_IOTA_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/is_partitioned.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/is_partitioned.hpp deleted file mode 100644 index c0076b932bc..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/is_partitioned.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (c) Marshall Clow 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) -*/ - -/// \file is_partitioned.hpp -/// \brief Tell if a sequence is partitioned -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_IS_PARTITIONED_HPP -#define BOOST_ALGORITHM_IS_PARTITIONED_HPP - -#include -#include - -namespace boost { namespace algorithm { - -/// \fn is_partitioned ( InputIterator first, InputIterator last, UnaryPredicate p ) -/// \brief Tests to see if a sequence is partitioned according to a predicate. -/// In other words, all the items in the sequence that satisfy the predicate are at the beginning of the sequence. -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param p The predicate to test the values with -/// \note This function is part of the C++2011 standard library. -template -bool is_partitioned ( InputIterator first, InputIterator last, UnaryPredicate p ) -{ -// Run through the part that satisfy the predicate - for ( ; first != last; ++first ) - if ( !p (*first)) - break; -// Now the part that does not satisfy the predicate - for ( ; first != last; ++first ) - if ( p (*first)) - return false; - return true; -} - -/// \fn is_partitioned ( const Range &r, UnaryPredicate p ) -/// \brief Tests to see if a sequence is partitioned according to a predicate. -/// In other words, all the items in the sequence that satisfy the predicate are at the beginning of the sequence. -/// -/// \param r The input range -/// \param p The predicate to test the values with -/// -template -bool is_partitioned ( const Range &r, UnaryPredicate p ) -{ - return boost::algorithm::is_partitioned (boost::begin(r), boost::end(r), p); -} - - -}} - -#endif // BOOST_ALGORITHM_IS_PARTITIONED_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/is_permutation.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/is_permutation.hpp deleted file mode 100644 index 0098cd53fed..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/is_permutation.hpp +++ /dev/null @@ -1,185 +0,0 @@ -/* - Copyright (c) Marshall Clow 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) -*/ - -/// \file is_permutation.hpp -/// \brief Is a sequence a permutation of another sequence -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_IS_PERMUTATION11_HPP -#define BOOST_ALGORITHM_IS_PERMUTATION11_HPP - -#include // for std::find_if, count_if, mismatch -#include // for std::pair -#include // for std::equal_to -#include - -#include -#include -#include -#include - -namespace boost { namespace algorithm { - -/// \cond DOXYGEN_HIDE -namespace detail { - template - struct value_predicate { - value_predicate ( Predicate p, Iterator it ) : p_ ( p ), it_ ( it ) {} - - template - bool operator () ( const T1 &t1 ) const { return p_ ( *it_, t1 ); } - private: - Predicate p_; - Iterator it_; - }; - -// Preconditions: -// 1. The sequences are the same length -// 2. Any common elements on the front have been removed (not necessary for correctness, just for performance) - template< class ForwardIterator1, class ForwardIterator2, class BinaryPredicate > - bool is_permutation_inner ( ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate p ) { - // for each unique value in the sequence [first1,last1), count how many times - // it occurs, and make sure it occurs the same number of times in [first2, last2) - for ( ForwardIterator1 iter = first1; iter != last1; ++iter ) { - value_predicate pred ( p, iter ); - - /* For each value we haven't seen yet... */ - if ( std::find_if ( first1, iter, pred ) == iter ) { - std::size_t dest_count = std::count_if ( first2, last2, pred ); - if ( dest_count == 0 || dest_count != (std::size_t) std::count_if ( iter, last1, pred )) - return false; - } - } - - return true; - } - - template< class ForwardIterator1, class ForwardIterator2, class BinaryPredicate> - bool is_permutation_tag ( ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate p, - std::forward_iterator_tag, std::forward_iterator_tag ) { - - // Skip the common prefix (if any) - while ( first1 != last1 && first2 != last2 && p ( *first1, *first2 )) { - ++first1; - ++first2; - } - if ( first1 != last1 && first2 != last2 ) - return boost::algorithm::detail::is_permutation_inner ( first1, last1, first2, last2, - std::equal_to::value_type> ()); - return first1 == last1 && first2 == last2; - } - - template - bool is_permutation_tag ( RandomAccessIterator1 first1, RandomAccessIterator1 last1, - RandomAccessIterator2 first2, RandomAccessIterator2 last2, - BinaryPredicate p, - std::random_access_iterator_tag, std::random_access_iterator_tag ) { - // Cheap check - if ( std::distance ( first1, last1 ) != std::distance ( first2, last2 )) - return false; - // Skip the common prefix (if any) - while ( first1 != last1 && first2 != last2 && p ( *first1, *first2 )) { - ++first1; - ++first2; - } - - if ( first1 != last1 && first2 != last2 ) - return is_permutation_inner (first1, last1, first2, last2, p); - return first1 == last1 && first2 == last2; - } - -} -/// \endcond - -/// \fn is_permutation ( ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 first2, BinaryPredicate p ) -/// \brief Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2 -/// -/// \param first1 The start of the input sequence -/// \param last1 One past the end of the input sequence -/// \param first2 The start of the second sequence -/// \param p The predicate to compare elements with -/// -/// \note This function is part of the C++2011 standard library. -template< class ForwardIterator1, class ForwardIterator2, class BinaryPredicate > -bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, BinaryPredicate p ) -{ -// Skip the common prefix (if any) - std::pair eq = std::mismatch (first1, last1, first2, p); - first1 = eq.first; - first2 = eq.second; - if ( first1 != last1 ) { - // Create last2 - ForwardIterator2 last2 = first2; - std::advance ( last2, std::distance (first1, last1)); - return boost::algorithm::detail::is_permutation_inner ( first1, last1, first2, last2, p ); - } - - return true; -} - -/// \fn is_permutation ( ForwardIterator1 first, ForwardIterator1 last, ForwardIterator2 first2 ) -/// \brief Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2 -/// -/// \param first1 The start of the input sequence -/// \param last2 One past the end of the input sequence -/// \param first2 The start of the second sequence -/// \note This function is part of the C++2011 standard library. -template< class ForwardIterator1, class ForwardIterator2 > -bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2 ) -{ -// How should I deal with the idea that ForwardIterator1::value_type -// and ForwardIterator2::value_type could be different? Define my own comparison predicate? -// Skip the common prefix (if any) - std::pair eq = std::mismatch (first1, last1, first2 ); - first1 = eq.first; - first2 = eq.second; - if ( first1 != last1 ) { - // Create last2 - ForwardIterator2 last2 = first2; - std::advance ( last2, std::distance (first1, last1)); - return boost::algorithm::detail::is_permutation_inner ( first1, last1, first2, last2, - std::equal_to::value_type> ()); - } - return true; -} - - -/// \fn is_permutation ( const Range &r, ForwardIterator first2 ) -/// \brief Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2 -/// -/// \param r The input range -/// \param first2 The start of the second sequence -template -bool is_permutation ( const Range &r, ForwardIterator first2 ) -{ - return boost::algorithm::is_permutation (boost::begin (r), boost::end (r), first2 ); -} - -/// \fn is_permutation ( const Range &r, ForwardIterator first2, BinaryPredicate pred ) -/// \brief Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2 -/// -/// \param r The input range -/// \param first2 The start of the second sequence -/// \param pred The predicate to compare elements with -/// -// Disable this template when the first two parameters are the same type -// That way the non-range version will be chosen. -template -typename boost::disable_if_c::value, bool>::type -is_permutation ( const Range &r, ForwardIterator first2, BinaryPredicate pred ) -{ - return boost::algorithm::is_permutation (boost::begin (r), boost::end (r), first2, pred ); -} - -}} - -#endif // BOOST_ALGORITHM_IS_PERMUTATION11_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/is_sorted.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/is_sorted.hpp deleted file mode 100644 index f4dbb38c085..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/is_sorted.hpp +++ /dev/null @@ -1,280 +0,0 @@ -// Copyright (c) 2010 Nuovation System Designs, LLC -// Grant Erickson -// -// Reworked somewhat by Marshall Clow; August 2010 -// -// 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 latest version. -// - -#ifndef BOOST_ALGORITHM_ORDERED_HPP -#define BOOST_ALGORITHM_ORDERED_HPP - -#include -#include - -#include -#include - -#include -#include -#include - -namespace boost { namespace algorithm { - -/// \fn is_sorted_until ( ForwardIterator first, ForwardIterator last, Pred p ) -/// \return the point in the sequence [first, last) where the elements are unordered -/// (according to the comparison predicate 'p'). -/// -/// \param first The start of the sequence to be tested. -/// \param last One past the end of the sequence -/// \param p A binary predicate that returns true if two elements are ordered. -/// - template - ForwardIterator is_sorted_until ( ForwardIterator first, ForwardIterator last, Pred p ) - { - if ( first == last ) return last; // the empty sequence is ordered - ForwardIterator next = first; - while ( ++next != last ) - { - if ( p ( *next, *first )) - return next; - first = next; - } - return last; - } - -/// \fn is_sorted_until ( ForwardIterator first, ForwardIterator last ) -/// \return the point in the sequence [first, last) where the elements are unordered -/// -/// \param first The start of the sequence to be tested. -/// \param last One past the end of the sequence -/// - template - ForwardIterator is_sorted_until ( ForwardIterator first, ForwardIterator last ) - { - typedef typename std::iterator_traits::value_type value_type; - return boost::algorithm::is_sorted_until ( first, last, std::less()); - } - - -/// \fn is_sorted ( ForwardIterator first, ForwardIterator last, Pred p ) -/// \return whether or not the entire sequence is sorted -/// -/// \param first The start of the sequence to be tested. -/// \param last One past the end of the sequence -/// \param p A binary predicate that returns true if two elements are ordered. -/// - template - bool is_sorted ( ForwardIterator first, ForwardIterator last, Pred p ) - { - return boost::algorithm::is_sorted_until (first, last, p) == last; - } - -/// \fn is_sorted ( ForwardIterator first, ForwardIterator last ) -/// \return whether or not the entire sequence is sorted -/// -/// \param first The start of the sequence to be tested. -/// \param last One past the end of the sequence -/// - template - bool is_sorted ( ForwardIterator first, ForwardIterator last ) - { - return boost::algorithm::is_sorted_until (first, last) == last; - } - -/// -/// -- Range based versions of the C++11 functions -/// - -/// \fn is_sorted_until ( const R &range, Pred p ) -/// \return the point in the range R where the elements are unordered -/// (according to the comparison predicate 'p'). -/// -/// \param range The range to be tested. -/// \param p A binary predicate that returns true if two elements are ordered. -/// - template - typename boost::lazy_disable_if_c< - boost::is_same::value, - typename boost::range_iterator - >::type is_sorted_until ( const R &range, Pred p ) - { - return boost::algorithm::is_sorted_until ( boost::begin ( range ), boost::end ( range ), p ); - } - - -/// \fn is_sorted_until ( const R &range ) -/// \return the point in the range R where the elements are unordered -/// -/// \param range The range to be tested. -/// - template - typename boost::range_iterator::type is_sorted_until ( const R &range ) - { - return boost::algorithm::is_sorted_until ( boost::begin ( range ), boost::end ( range )); - } - -/// \fn is_sorted ( const R &range, Pred p ) -/// \return whether or not the entire range R is sorted -/// (according to the comparison predicate 'p'). -/// -/// \param range The range to be tested. -/// \param p A binary predicate that returns true if two elements are ordered. -/// - template - typename boost::lazy_disable_if_c< boost::is_same::value, boost::mpl::identity >::type - is_sorted ( const R &range, Pred p ) - { - return boost::algorithm::is_sorted ( boost::begin ( range ), boost::end ( range ), p ); - } - - -/// \fn is_sorted ( const R &range ) -/// \return whether or not the entire range R is sorted -/// -/// \param range The range to be tested. -/// - template - bool is_sorted ( const R &range ) - { - return boost::algorithm::is_sorted ( boost::begin ( range ), boost::end ( range )); - } - - -/// -/// -- Range based versions of the C++11 functions -/// - -/// \fn is_increasing ( ForwardIterator first, ForwardIterator last ) -/// \return true if the entire sequence is increasing; i.e, each item is greater than or -/// equal to the previous one. -/// -/// \param first The start of the sequence to be tested. -/// \param last One past the end of the sequence -/// -/// \note This function will return true for sequences that contain items that compare -/// equal. If that is not what you intended, you should use is_strictly_increasing instead. - template - bool is_increasing ( ForwardIterator first, ForwardIterator last ) - { - typedef typename std::iterator_traits::value_type value_type; - return boost::algorithm::is_sorted (first, last, std::less()); - } - - -/// \fn is_increasing ( const R &range ) -/// \return true if the entire sequence is increasing; i.e, each item is greater than or -/// equal to the previous one. -/// -/// \param range The range to be tested. -/// -/// \note This function will return true for sequences that contain items that compare -/// equal. If that is not what you intended, you should use is_strictly_increasing instead. - template - bool is_increasing ( const R &range ) - { - return is_increasing ( boost::begin ( range ), boost::end ( range )); - } - - - -/// \fn is_decreasing ( ForwardIterator first, ForwardIterator last ) -/// \return true if the entire sequence is decreasing; i.e, each item is less than -/// or equal to the previous one. -/// -/// \param first The start of the sequence to be tested. -/// \param last One past the end of the sequence -/// -/// \note This function will return true for sequences that contain items that compare -/// equal. If that is not what you intended, you should use is_strictly_decreasing instead. - template - bool is_decreasing ( ForwardIterator first, ForwardIterator last ) - { - typedef typename std::iterator_traits::value_type value_type; - return boost::algorithm::is_sorted (first, last, std::greater()); - } - -/// \fn is_decreasing ( const R &range ) -/// \return true if the entire sequence is decreasing; i.e, each item is less than -/// or equal to the previous one. -/// -/// \param range The range to be tested. -/// -/// \note This function will return true for sequences that contain items that compare -/// equal. If that is not what you intended, you should use is_strictly_decreasing instead. - template - bool is_decreasing ( const R &range ) - { - return is_decreasing ( boost::begin ( range ), boost::end ( range )); - } - - - -/// \fn is_strictly_increasing ( ForwardIterator first, ForwardIterator last ) -/// \return true if the entire sequence is strictly increasing; i.e, each item is greater -/// than the previous one -/// -/// \param first The start of the sequence to be tested. -/// \param last One past the end of the sequence -/// -/// \note This function will return false for sequences that contain items that compare -/// equal. If that is not what you intended, you should use is_increasing instead. - template - bool is_strictly_increasing ( ForwardIterator first, ForwardIterator last ) - { - typedef typename std::iterator_traits::value_type value_type; - return boost::algorithm::is_sorted (first, last, std::less_equal()); - } - -/// \fn is_strictly_increasing ( const R &range ) -/// \return true if the entire sequence is strictly increasing; i.e, each item is greater -/// than the previous one -/// -/// \param range The range to be tested. -/// -/// \note This function will return false for sequences that contain items that compare -/// equal. If that is not what you intended, you should use is_increasing instead. - template - bool is_strictly_increasing ( const R &range ) - { - return is_strictly_increasing ( boost::begin ( range ), boost::end ( range )); - } - - -/// \fn is_strictly_decreasing ( ForwardIterator first, ForwardIterator last ) -/// \return true if the entire sequence is strictly decreasing; i.e, each item is less than -/// the previous one -/// -/// \param first The start of the sequence to be tested. -/// \param last One past the end of the sequence -/// -/// \note This function will return false for sequences that contain items that compare -/// equal. If that is not what you intended, you should use is_decreasing instead. - template - bool is_strictly_decreasing ( ForwardIterator first, ForwardIterator last ) - { - typedef typename std::iterator_traits::value_type value_type; - return boost::algorithm::is_sorted (first, last, std::greater_equal()); - } - -/// \fn is_strictly_decreasing ( const R &range ) -/// \return true if the entire sequence is strictly decreasing; i.e, each item is less than -/// the previous one -/// -/// \param range The range to be tested. -/// -/// \note This function will return false for sequences that contain items that compare -/// equal. If that is not what you intended, you should use is_decreasing instead. - template - bool is_strictly_decreasing ( const R &range ) - { - return is_strictly_decreasing ( boost::begin ( range ), boost::end ( range )); - } - -}} // namespace boost - -#endif // BOOST_ALGORITHM_ORDERED_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/none_of.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/none_of.hpp deleted file mode 100644 index ba13144fb85..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/none_of.hpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright (c) Marshall Clow 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) -*/ - -/// \file none_of.hpp -/// \brief Test ranges to see if no elements match a value or predicate. -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_NONE_OF_HPP -#define BOOST_ALGORITHM_NONE_OF_HPP - -#include -#include - -namespace boost { namespace algorithm { - -/// \fn none_of ( InputIterator first, InputIterator last, Predicate p ) -/// \return true if none of the elements in [first, last) satisfy the predicate 'p' -/// \note returns true on an empty range -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param p A predicate for testing the elements of the sequence -/// -template -bool none_of ( InputIterator first, InputIterator last, Predicate p ) -{ - for ( ; first != last; ++first ) - if ( p(*first)) - return false; - return true; -} - -/// \fn none_of ( const Range &r, Predicate p ) -/// \return true if none of the elements in the range satisfy the predicate 'p' -/// \note returns true on an empty range -/// -/// \param r The input range -/// \param p A predicate for testing the elements of the range -/// -template -bool none_of ( const Range &r, Predicate p ) -{ - return boost::algorithm::none_of (boost::begin (r), boost::end (r), p ); -} - -/// \fn none_of_equal ( InputIterator first, InputIterator last, const V &val ) -/// \return true if none of the elements in [first, last) are equal to 'val' -/// \note returns true on an empty range -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param val A value to compare against -/// -template -bool none_of_equal ( InputIterator first, InputIterator last, const V &val ) -{ - for ( ; first != last; ++first ) - if ( val == *first ) - return false; - return true; -} - -/// \fn none_of_equal ( const Range &r, const V &val ) -/// \return true if none of the elements in the range are equal to 'val' -/// \note returns true on an empty range -/// -/// \param r The input range -/// \param val A value to compare against -/// -template -bool none_of_equal ( const Range &r, const V & val ) -{ - return boost::algorithm::none_of_equal (boost::begin (r), boost::end (r), val); -} - -}} // namespace boost and algorithm - -#endif // BOOST_ALGORITHM_NONE_OF_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/one_of.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/one_of.hpp deleted file mode 100644 index b6e8c77194e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/one_of.hpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright (c) Marshall Clow 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) -*/ - -/// \file one_of.hpp -/// \brief Test ranges to see if only one element matches a value or predicate. -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_ONE_OF_HPP -#define BOOST_ALGORITHM_ONE_OF_HPP - -#include // for std::find and std::find_if -#include - -#include -#include - -namespace boost { namespace algorithm { - -/// \fn one_of ( InputIterator first, InputIterator last, Predicate p ) -/// \return true if the predicate 'p' is true for exactly one item in [first, last). -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param p A predicate for testing the elements of the sequence -/// -template -bool one_of ( InputIterator first, InputIterator last, Predicate p ) -{ - InputIterator i = std::find_if (first, last, p); - if (i == last) - return false; // Didn't occur at all - return boost::algorithm::none_of (++i, last, p); -} - -/// \fn one_of ( const Range &r, Predicate p ) -/// \return true if the predicate 'p' is true for exactly one item in the range. -/// -/// \param r The input range -/// \param p A predicate for testing the elements of the range -/// -template -bool one_of ( const Range &r, Predicate p ) -{ - return boost::algorithm::one_of ( boost::begin (r), boost::end (r), p ); -} - - -/// \fn one_of_equal ( InputIterator first, InputIterator last, const V &val ) -/// \return true if the value 'val' exists only once in [first, last). -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param val A value to compare against -/// -template -bool one_of_equal ( InputIterator first, InputIterator last, const V &val ) -{ - InputIterator i = std::find (first, last, val); // find first occurrence of 'val' - if (i == last) - return false; // Didn't occur at all - return boost::algorithm::none_of_equal (++i, last, val); -} - -/// \fn one_of_equal ( const Range &r, const V &val ) -/// \return true if the value 'val' exists only once in the range. -/// -/// \param r The input range -/// \param val A value to compare against -/// -template -bool one_of_equal ( const Range &r, const V &val ) -{ - return boost::algorithm::one_of_equal ( boost::begin (r), boost::end (r), val ); -} - -}} // namespace boost and algorithm - -#endif // BOOST_ALGORITHM_ALL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/partition_copy.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/partition_copy.hpp deleted file mode 100644 index f347f2128f2..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/partition_copy.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - Copyright (c) Marshall Clow 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) -*/ - -/// \file partition_copy.hpp -/// \brief Copy a subset of a sequence to a new sequence -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_PARTITION_COPY_HPP -#define BOOST_ALGORITHM_PARTITION_COPY_HPP - -#include // for std::pair - -#include -#include - -namespace boost { namespace algorithm { - -/// \fn partition_copy ( InputIterator first, InputIterator last, -/// OutputIterator1 out_true, OutputIterator2 out_false, UnaryPredicate p ) -/// \brief Copies the elements that satisfy the predicate p from the range [first, last) -/// to the range beginning at d_first_true, and -/// copies the elements that do not satisfy p to the range beginning at d_first_false. -/// -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param out_true An output iterator to write the elements that satisfy the predicate into -/// \param out_false An output iterator to write the elements that do not satisfy the predicate into -/// \param p A predicate for dividing the elements of the input sequence. -/// -/// \note This function is part of the C++2011 standard library. -template -std::pair -partition_copy ( InputIterator first, InputIterator last, - OutputIterator1 out_true, OutputIterator2 out_false, UnaryPredicate p ) -{ - for ( ; first != last; ++first ) - if ( p (*first)) - *out_true++ = *first; - else - *out_false++ = *first; - return std::pair ( out_true, out_false ); -} - -/// \fn partition_copy ( const Range &r, -/// OutputIterator1 out_true, OutputIterator2 out_false, UnaryPredicate p ) -/// -/// \param r The input range -/// \param out_true An output iterator to write the elements that satisfy the predicate into -/// \param out_false An output iterator to write the elements that do not satisfy the predicate into -/// \param p A predicate for dividing the elements of the input sequence. -/// -template -std::pair -partition_copy ( const Range &r, OutputIterator1 out_true, OutputIterator2 out_false, - UnaryPredicate p ) -{ - return boost::algorithm::partition_copy - (boost::begin(r), boost::end(r), out_true, out_false, p ); -} - -}} // namespace boost and algorithm - -#endif // BOOST_ALGORITHM_PARTITION_COPY_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/partition_point.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/partition_point.hpp deleted file mode 100644 index 2c2767ae5af..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx11/partition_point.hpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - Copyright (c) Marshall Clow 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) -*/ - -/// \file partition_point.hpp -/// \brief Find the partition point in a sequence -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_PARTITION_POINT_HPP -#define BOOST_ALGORITHM_PARTITION_POINT_HPP - -#include // for std::distance, advance - -#include -#include - -namespace boost { namespace algorithm { - -/// \fn partition_point ( ForwardIterator first, ForwardIterator last, Predicate p ) -/// \brief Given a partitioned range, returns the partition point, i.e, the first element -/// that does not satisfy p -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param p The predicate to test the values with -/// \note This function is part of the C++2011 standard library. -template -ForwardIterator partition_point ( ForwardIterator first, ForwardIterator last, Predicate p ) -{ - std::size_t dist = std::distance ( first, last ); - while ( first != last ) { - std::size_t d2 = dist / 2; - ForwardIterator ret_val = first; - std::advance (ret_val, d2); - if (p (*ret_val)) { - first = ++ret_val; - dist -= d2 + 1; - } - else { - last = ret_val; - dist = d2; - } - } - return first; -} - -/// \fn partition_point ( Range &r, Predicate p ) -/// \brief Given a partitioned range, returns the partition point -/// -/// \param r The input range -/// \param p The predicate to test the values with -/// -template -typename boost::range_iterator::type partition_point ( Range &r, Predicate p ) -{ - return boost::algorithm::partition_point (boost::begin(r), boost::end(r), p); -} - - -}} - -#endif // BOOST_ALGORITHM_PARTITION_POINT_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx14/equal.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx14/equal.hpp deleted file mode 100644 index 9f97be1d626..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx14/equal.hpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - Copyright (c) Marshall Clow 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) -*/ - -/// \file equal.hpp -/// \brief Test ranges to if they are equal -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_EQUAL_HPP -#define BOOST_ALGORITHM_EQUAL_HPP - -#include // for std::equal -#include - -namespace boost { namespace algorithm { - -namespace detail { - - template - struct eq { - bool operator () ( const T1& v1, const T2& v2 ) const { return v1 == v2 ;} - }; - - template - bool equal ( RandomAccessIterator1 first1, RandomAccessIterator1 last1, - RandomAccessIterator2 first2, RandomAccessIterator2 last2, BinaryPredicate pred, - std::random_access_iterator_tag, std::random_access_iterator_tag ) - { - // Random-access iterators let is check the sizes in constant time - if ( std::distance ( first1, last1 ) != std::distance ( first2, last2 )) - return false; - // If we know that the sequences are the same size, the original version is fine - return std::equal ( first1, last1, first2, pred ); - } - - template - bool equal ( InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, BinaryPredicate pred, - std::input_iterator_tag, std::input_iterator_tag ) - { - for (; first1 != last1 && first2 != last2; ++first1, ++first2 ) - if ( !pred(*first1, *first2 )) - return false; - - return first1 == last1 && first2 == last2; - } -} - -/// \fn equal ( InputIterator1 first1, InputIterator1 last1, -/// InputIterator2 first2, InputIterator2 last2, -/// BinaryPredicate pred ) -/// \return true if all elements in the two ranges are equal -/// -/// \param first1 The start of the first range. -/// \param last1 One past the end of the first range. -/// \param first2 The start of the second range. -/// \param last2 One past the end of the second range. -/// \param pred A predicate for comparing the elements of the ranges -template -bool equal ( InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, BinaryPredicate pred ) -{ - return boost::algorithm::detail::equal ( - first1, last1, first2, last2, pred, - typename std::iterator_traits::iterator_category (), - typename std::iterator_traits::iterator_category ()); -} - -/// \fn equal ( InputIterator1 first1, InputIterator1 last1, -/// InputIterator2 first2, InputIterator2 last2 ) -/// \return true if all elements in the two ranges are equal -/// -/// \param first1 The start of the first range. -/// \param last1 One past the end of the first range. -/// \param first2 The start of the second range. -/// \param last2 One past the end of the second range. -template -bool equal ( InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 ) -{ - return boost::algorithm::detail::equal ( - first1, last1, first2, last2, - boost::algorithm::detail::eq< - typename std::iterator_traits::value_type, - typename std::iterator_traits::value_type> (), - typename std::iterator_traits::iterator_category (), - typename std::iterator_traits::iterator_category ()); -} - -// There are already range-based versions of these. - -}} // namespace boost and algorithm - -#endif // BOOST_ALGORITHM_EQUAL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx14/is_permutation.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx14/is_permutation.hpp deleted file mode 100644 index 639446bf373..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx14/is_permutation.hpp +++ /dev/null @@ -1,79 +0,0 @@ -/* - Copyright (c) Marshall Clow 2014. - - 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) -*/ - -/// \file is_permutation.hpp -/// \brief Is a sequence a permutation of another sequence (four iterator versions) -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_IS_PERMUTATION14_HPP -#define BOOST_ALGORITHM_IS_PERMUTATION14_HPP - -#include // for std::pair -#include // for std::equal_to -#include - -#include -#include - -namespace boost { namespace algorithm { - -/// \fn is_permutation ( ForwardIterator1 first, ForwardIterator1 last, -/// ForwardIterator2 first2, ForwardIterator2 last2 ) -/// \brief Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2 -/// -/// \param first1 The start of the input sequence -/// \param last2 One past the end of the input sequence -/// \param first2 The start of the second sequence -/// \param last1 One past the end of the second sequence -/// \note This function is part of the C++2014 standard library. -template< class ForwardIterator1, class ForwardIterator2 > -bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2 ) -{ -// How should I deal with the idea that ForwardIterator1::value_type -// and ForwardIterator2::value_type could be different? Define my own comparison predicate? - std::pair eq = boost::algorithm::mismatch - ( first1, last1, first2, last2 ); - if ( eq.first == last1 && eq.second == last2) - return true; - return boost::algorithm::detail::is_permutation_tag ( - eq.first, last1, eq.second, last2, - std::equal_to::value_type> (), - typename std::iterator_traits::iterator_category (), - typename std::iterator_traits::iterator_category ()); -} - -/// \fn is_permutation ( ForwardIterator1 first, ForwardIterator1 last, -/// ForwardIterator2 first2, ForwardIterator2 last2, -/// BinaryPredicate p ) -/// \brief Tests to see if the sequence [first,last) is a permutation of the sequence starting at first2 -/// -/// \param first1 The start of the input sequence -/// \param last1 One past the end of the input sequence -/// \param first2 The start of the second sequence -/// \param last2 One past the end of the second sequence -/// \param pred The predicate to compare elements with -/// -/// \note This function is part of the C++2014 standard library. -template< class ForwardIterator1, class ForwardIterator2, class BinaryPredicate > -bool is_permutation ( ForwardIterator1 first1, ForwardIterator1 last1, - ForwardIterator2 first2, ForwardIterator2 last2, - BinaryPredicate pred ) -{ - std::pair eq = boost::algorithm::mismatch - ( first1, last1, first2, last2, pred ); - if ( eq.first == last1 && eq.second == last2) - return true; - return boost::algorithm::detail::is_permutation_tag ( - first1, last1, first2, last2, pred, - typename std::iterator_traits::iterator_category (), - typename std::iterator_traits::iterator_category ()); -} - -}} - -#endif // BOOST_ALGORITHM_IS_PERMUTATION14_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx14/mismatch.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx14/mismatch.hpp deleted file mode 100644 index c3de4182225..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx14/mismatch.hpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - Copyright (c) Marshall Clow 2008-2012. - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE10.txt or copy at http://www.boost.org/LICENSE10.txt) -*/ - -/// \file mismatch.hpp -/// \brief Find the first mismatched element in a sequence -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_MISMATCH_HPP -#define BOOST_ALGORITHM_MISMATCH_HPP - -#include // for std::pair - -namespace boost { namespace algorithm { - -/// \fn mismatch ( InputIterator1 first1, InputIterator1 last1, -/// InputIterator2 first2, InputIterator2 last2, -/// BinaryPredicate pred ) -/// \return a pair of iterators pointing to the first elements in the sequence that do not match -/// -/// \param first1 The start of the first range. -/// \param last1 One past the end of the first range. -/// \param first2 The start of the second range. -/// \param last2 One past the end of the second range. -/// \param pred A predicate for comparing the elements of the ranges -template -std::pair mismatch ( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2, - BinaryPredicate pred ) -{ - for (; first1 != last1 && first2 != last2; ++first1, ++first2) - if ( !pred ( *first1, *first2 )) - break; - return std::pair(first1, first2); -} - -/// \fn mismatch ( InputIterator1 first1, InputIterator1 last1, -/// InputIterator2 first2, InputIterator2 last2 ) -/// \return a pair of iterators pointing to the first elements in the sequence that do not match -/// -/// \param first1 The start of the first range. -/// \param last1 One past the end of the first range. -/// \param first2 The start of the second range. -/// \param last2 One past the end of the second range. -template -std::pair mismatch ( - InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, InputIterator2 last2 ) -{ - for (; first1 != last1 && first2 != last2; ++first1, ++first2) - if ( *first1 != *first2 ) - break; - return std::pair(first1, first2); -} - -// There are already range-based versions of these. - -}} // namespace boost and algorithm - -#endif // BOOST_ALGORITHM_MISMATCH_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/exclusive_scan.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/exclusive_scan.hpp deleted file mode 100644 index 03ecea52ecf..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/exclusive_scan.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/* - Copyright (c) Marshall Clow 2017. - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE10.txt or copy at http://www.boost.org/LICENSE10.txt) -*/ - -/// \file exclusive_scan.hpp -/// \brief ??? -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_EXCLUSIVE_SCAN_HPP -#define BOOST_ALGORITHM_EXCLUSIVE_SCAN_HPP - -#include // for std::plus -#include // for std::iterator_traits - -#include -#include -#include - -namespace boost { namespace algorithm { - -template -OutputIterator exclusive_scan(InputIterator first, InputIterator last, - OutputIterator result, T init, BinaryOperation bOp) -{ - if (first != last) - { - T saved = init; - do - { - init = bOp(init, *first); - *result = saved; - saved = init; - ++result; - } while (++first != last); - } - return result; -} - -template -OutputIterator exclusive_scan(InputIterator first, InputIterator last, - OutputIterator result, T init) -{ - typedef typename std::iterator_traits::value_type VT; - return exclusive_scan(first, last, result, init, std::plus()); -} - -}} // namespace boost and algorithm - -#endif // BOOST_ALGORITHM_EXCLUSIVE_SCAN_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/for_each_n.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/for_each_n.hpp deleted file mode 100644 index b8134cc06ac..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/for_each_n.hpp +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright (c) Marshall Clow 2017. - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE10.txt or copy at http://www.boost.org/LICENSE10.txt) -*/ - -/// \file for_each_n.hpp -/// \brief Apply a functor to the elements of a sequence -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_FOR_EACH_N_HPP -#define BOOST_ALGORITHM_FOR_EACH_N_HPP - -#include // for std::pair - -namespace boost { namespace algorithm { - -/// \fn for_each_n(InputIterator first, Size n, Function f); -/// \return first + n -/// -/// \param first The start of the first range. -/// \param n One past the end of the first range. -/// \param f A functor to apply to the elements of the sequence -/// \note If f returns a result, the result is ignored. -template -InputIterator for_each_n(InputIterator first, Size n, Function f) -{ - for ( ; n > 0; --n, ++first ) - f(*first); - - return first; -} - -}} // namespace boost and algorithm - -#endif // BOOST_ALGORITHM_FOR_EACH_N_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/inclusive_scan.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/inclusive_scan.hpp deleted file mode 100644 index cd015f100fb..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/inclusive_scan.hpp +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (c) Marshall Clow 2017. - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE10.txt or copy at http://www.boost.org/LICENSE10.txt) -*/ - -/// \file transform_reduce.hpp -/// \brief Combine the (transformed) elements of a sequence (or two) into a single value. -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_TRANSFORM_REDUCE_HPP -#define BOOST_ALGORITHM_TRANSFORM_REDUCE_HPP - -#include // for std::plus -#include // for std::iterator_traits - -#include -#include -#include - -namespace boost { namespace algorithm { - -template -OutputIterator inclusive_scan(InputIterator first, InputIterator last, - OutputIterator result, BinaryOperation bOp, T init) -{ - for (; first != last; ++first, (void) ++result) { - init = bOp(init, *first); - *result = init; - } - return result; -} - - -template -OutputIterator inclusive_scan(InputIterator first, InputIterator last, - OutputIterator result, BinaryOperation bOp) -{ - if (first != last) { - typename std::iterator_traits::value_type init = *first; - *result++ = init; - if (++first != last) - return inclusive_scan(first, last, result, bOp, init); - } - - return result; -} - -template -OutputIterator inclusive_scan(InputIterator first, InputIterator last, - OutputIterator result) -{ - typedef typename std::iterator_traits::value_type VT; - return inclusive_scan(first, last, result, std::plus()); -} - -}} // namespace boost and algorithm - -#endif // BOOST_ALGORITHM_TRANSFORM_REDUCE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/reduce.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/reduce.hpp deleted file mode 100644 index f47695b53a6..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/reduce.hpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - Copyright (c) Marshall Clow 2017. - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE10.txt or copy at http://www.boost.org/LICENSE10.txt) -*/ - -/// \file reduce.hpp -/// \brief Combine the elements of a sequence into a single value -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_REDUCE_HPP -#define BOOST_ALGORITHM_REDUCE_HPP - -#include // for std::plus -#include // for std::iterator_traits - -#include -#include -#include - -namespace boost { namespace algorithm { - -template -T reduce(InputIterator first, InputIterator last, T init, BinaryOperation bOp) -{ - ; - for (; first != last; ++first) - init = bOp(init, *first); - return init; -} - -template -T reduce(InputIterator first, InputIterator last, T init) -{ - typedef typename std::iterator_traits::value_type VT; - return reduce(first, last, init, std::plus()); -} - -template -typename std::iterator_traits::value_type -reduce(InputIterator first, InputIterator last) -{ - return reduce(first, last, - typename std::iterator_traits::value_type()); -} - -template -typename boost::range_value::type -reduce(const Range &r) -{ - return reduce(boost::begin(r), boost::end(r)); -} - -// Not sure that this won't be ambiguous (1) -template -T reduce(const Range &r, T init) -{ - return reduce(boost::begin (r), boost::end (r), init); -} - - -// Not sure that this won't be ambiguous (2) -template -T reduce(const Range &r, T init, BinaryOperation bOp) -{ - return reduce(boost::begin(r), boost::end(r), init, bOp); -} - -}} // namespace boost and algorithm - -#endif // BOOST_ALGORITHM_REDUCE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/transform_exclusive_scan.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/transform_exclusive_scan.hpp deleted file mode 100644 index d3b4329a0a1..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/transform_exclusive_scan.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - Copyright (c) Marshall Clow 2017. - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE10.txt or copy at http://www.boost.org/LICENSE10.txt) -*/ - -/// \file transform_exclusive_scan.hpp -/// \brief ???? -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_TRANSFORM_EXCLUSIVE_SCAN_HPP -#define BOOST_ALGORITHM_TRANSFORM_EXCLUSIVE_SCAN_HPP - -#include // for std::plus -#include // for std::iterator_traits - -#include -#include -#include - -namespace boost { namespace algorithm { - -template -OutputIterator transform_exclusive_scan(InputIterator first, InputIterator last, - OutputIterator result, T init, - BinaryOperation bOp, UnaryOperation uOp) -{ - if (first != last) - { - T saved = init; - do - { - init = bOp(init, uOp(*first)); - *result = saved; - saved = init; - ++result; - } while (++first != last); - } - return result; -} - -}} // namespace boost and algorithm - -#endif // BOOST_ALGORITHM_TRANSFORM_EXCLUSIVE_SCAN_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/transform_inclusive_scan.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/transform_inclusive_scan.hpp deleted file mode 100644 index 476c117f927..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/transform_inclusive_scan.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - Copyright (c) Marshall Clow 2017. - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE10.txt or copy at http://www.boost.org/LICENSE10.txt) -*/ - -/// \file transform_reduce.hpp -/// \brief Combine the (transformed) elements of a sequence (or two) into a single value. -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_TRANSFORM_REDUCE_HPP -#define BOOST_ALGORITHM_TRANSFORM_REDUCE_HPP - -#include // for std::plus -#include // for std::iterator_traits - -#include -#include -#include - -namespace boost { namespace algorithm { - -template -OutputIterator transform_inclusive_scan(InputIterator first, InputIterator last, - OutputIterator result, - BinaryOperation bOp, UnaryOperation uOp, - T init) -{ - for (; first != last; ++first, (void) ++result) { - init = bOp(init, uOp(*first)); - *result = init; - } - - return result; -} - -template -OutputIterator transform_inclusive_scan(InputIterator first, InputIterator last, - OutputIterator result, - BinaryOperation bOp, UnaryOperation uOp) -{ - if (first != last) { - typename std::iterator_traits::value_type init = uOp(*first); - *result++ = init; - if (++first != last) - return transform_inclusive_scan(first, last, result, bOp, uOp, init); - } - - return result; -} - - -}} // namespace boost and algorithm - -#endif // BOOST_ALGORITHM_TRANSFORM_REDUCE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/transform_reduce.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/transform_reduce.hpp deleted file mode 100644 index 7ebde7d3255..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/cxx17/transform_reduce.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - Copyright (c) Marshall Clow 2017. - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE10.txt or copy at http://www.boost.org/LICENSE10.txt) -*/ - -/// \file transform_reduce.hpp -/// \brief Combine the (transformed) elements of a sequence (or two) into a single value. -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_TRANSFORM_REDUCE_HPP -#define BOOST_ALGORITHM_TRANSFORM_REDUCE_HPP - -#include // for std::plus -#include // for std::iterator_traits - -#include -#include -#include - -namespace boost { namespace algorithm { - -template -T transform_reduce(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, T init, - BinaryOperation1 bOp1, BinaryOperation2 bOp2) -{ - for (; first1 != last1; ++first1, (void) ++first2) - init = bOp1(init, bOp2(*first1, *first2)); - return init; -} - -template -T transform_reduce(InputIterator first, InputIterator last, - T init, BinaryOperation bOp, UnaryOperation uOp) -{ - for (; first != last; ++first) - init = bOp(init, uOp(*first)); - return init; -} - -template -T transform_reduce(InputIterator1 first1, InputIterator1 last1, - InputIterator2 first2, T init) -{ - return transform_reduce(first1, last1, first2, init, - std::plus(), std::multiplies()); -} - -}} // namespace boost and algorithm - -#endif // BOOST_ALGORITHM_TRANSFORM_REDUCE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/gather.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/gather.hpp deleted file mode 100644 index 944bc94348d..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/gather.hpp +++ /dev/null @@ -1,123 +0,0 @@ -/* - Copyright 2008 Adobe Systems Incorporated - - 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) - - Revision history: - January 2008 mtc Version for Adobe Source Library - January 2013 mtc Version for Boost.Algorithm - -*/ - -/**************************************************************************************************/ - -/*! -\author Marshall Clow -\date January 2008 -*/ - -#ifndef BOOST_ALGORITHM_GATHER_HPP -#define BOOST_ALGORITHM_GATHER_HPP - -#include // for std::stable_partition -#include - -#include // for boost::bind -#include // for boost::begin(range) -#include // for boost::end(range) - - -/**************************************************************************************************/ -/*! - \defgroup gather gather - \ingroup mutating_algorithm - - \c gather() takes a collection of elements defined by a pair of iterators and moves - the ones satisfying a predicate to them to a position (called the pivot) within - the sequence. The algorithm is stable. The result is a pair of iterators that - contains the items that satisfy the predicate. - - Given an sequence containing: -
-    0 1 2 3 4 5 6 7 8 9
-    
- - a call to gather ( arr, arr + 10, arr + 4, IsEven ()) will result in: - -
-    1 3 0 2 4 6 8 5 7 9
-        |---|-----|
-      first |  second
-          pivot
-    
- - - The problem is broken down into two basic steps, namely, moving the items before the pivot - and then moving the items from the pivot to the end. These "moves" are done with calls to - stable_partition. - - \par Storage Requirements: - - The algorithm uses stable_partition, which will attempt to allocate temporary memory, - but will work in-situ if there is none available. - - \par Time Complexity: - - If there is sufficient memory available, the run time is linear in N. - If there is not any memory available, then the run time is O(N log N). -*/ - -/**************************************************************************************************/ - -namespace boost { namespace algorithm { - -/**************************************************************************************************/ - -/*! - \ingroup gather - \brief iterator-based gather implementation -*/ - -template < - typename BidirectionalIterator, // Iter models BidirectionalIterator - typename Pred> // Pred models UnaryPredicate -std::pair gather - ( BidirectionalIterator first, BidirectionalIterator last, BidirectionalIterator pivot, Pred pred ) -{ -// The first call partitions everything up to (but not including) the pivot element, -// while the second call partitions the rest of the sequence. - return std::make_pair ( - std::stable_partition ( first, pivot, !boost::bind ( pred, _1 )), - std::stable_partition ( pivot, last, boost::bind ( pred, _1 ))); -} - -/**************************************************************************************************/ - -/*! - \ingroup gather - \brief range-based gather implementation -*/ - -template < - typename BidirectionalRange, // - typename Pred> // Pred models UnaryPredicate -std::pair< - typename boost::range_iterator::type, - typename boost::range_iterator::type> -gather ( - const BidirectionalRange &range, - typename boost::range_iterator::type pivot, - Pred pred ) -{ - return boost::algorithm::gather ( boost::begin ( range ), boost::end ( range ), pivot, pred ); -} - -/**************************************************************************************************/ - -}} // namespace - -/**************************************************************************************************/ - -#endif - diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/hex.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/hex.hpp deleted file mode 100644 index b8335843a88..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/hex.hpp +++ /dev/null @@ -1,325 +0,0 @@ -/* - Copyright (c) Marshall Clow 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) - - Thanks to Nevin for his comments/help. -*/ - -/* - General problem - turn a sequence of integral types into a sequence of hexadecimal characters. - - and back. -*/ - -/// \file hex.hpp -/// \brief Convert sequence of integral types into a sequence of hexadecimal -/// characters and back. Based on the MySQL functions HEX and UNHEX -/// \author Marshall Clow - -#ifndef BOOST_ALGORITHM_HEXHPP -#define BOOST_ALGORITHM_HEXHPP - -#include // for std::iterator_traits -#include - -#include -#include -#include -#include -#include - -#include -#include - - -namespace boost { namespace algorithm { - -/*! - \struct hex_decode_error - \brief Base exception class for all hex decoding errors -*/ /*! - \struct non_hex_input - \brief Thrown when a non-hex value (0-9, A-F) encountered when decoding. - Contains the offending character -*/ /*! - \struct not_enough_input - \brief Thrown when the input sequence unexpectedly ends - -*/ -struct hex_decode_error : virtual boost::exception, virtual std::exception {}; -struct not_enough_input : virtual hex_decode_error {}; -struct non_hex_input : virtual hex_decode_error {}; -typedef boost::error_info bad_char; - -namespace detail { -/// \cond DOXYGEN_HIDE - - template - OutputIterator encode_one ( T val, OutputIterator out, const char * hexDigits ) { - const std::size_t num_hex_digits = 2 * sizeof ( T ); - char res [ num_hex_digits ]; - char *p = res + num_hex_digits; - for ( std::size_t i = 0; i < num_hex_digits; ++i, val >>= 4 ) - *--p = hexDigits [ val & 0x0F ]; - return std::copy ( res, res + num_hex_digits, out ); - } - - template - unsigned char hex_char_to_int ( T val ) { - char c = static_cast ( val ); - unsigned retval = 0; - if ( c >= '0' && c <= '9' ) retval = c - '0'; - else if ( c >= 'A' && c <= 'F' ) retval = c - 'A' + 10; - else if ( c >= 'a' && c <= 'f' ) retval = c - 'a' + 10; - else BOOST_THROW_EXCEPTION (non_hex_input() << bad_char (c)); - return static_cast(retval); - } - -// My own iterator_traits class. -// It is here so that I can "reach inside" some kinds of output iterators -// and get the type to write. - template - struct hex_iterator_traits { - typedef typename std::iterator_traits::value_type value_type; - }; - - template - struct hex_iterator_traits< std::back_insert_iterator > { - typedef typename Container::value_type value_type; - }; - - template - struct hex_iterator_traits< std::front_insert_iterator > { - typedef typename Container::value_type value_type; - }; - - template - struct hex_iterator_traits< std::insert_iterator > { - typedef typename Container::value_type value_type; - }; - -// ostream_iterators have three template parameters. -// The first one is the output type, the second one is the character type of -// the underlying stream, the third is the character traits. -// We only care about the first one. - template - struct hex_iterator_traits< std::ostream_iterator > { - typedef T value_type; - }; - - template - bool iter_end ( Iterator current, Iterator last ) { return current == last; } - - template - bool ptr_end ( const T* ptr, const T* /*end*/ ) { return *ptr == '\0'; } - -// What can we assume here about the inputs? -// is std::iterator_traits::value_type always 'char' ? -// Could it be wchar_t, say? Does it matter? -// We are assuming ASCII for the values - but what about the storage? - template - typename boost::enable_if::value_type>, OutputIterator>::type - decode_one ( InputIterator &first, InputIterator last, OutputIterator out, EndPred pred ) { - typedef typename hex_iterator_traits::value_type T; - T res (0); - - // Need to make sure that we get can read that many chars here. - for ( std::size_t i = 0; i < 2 * sizeof ( T ); ++i, ++first ) { - if ( pred ( first, last )) - BOOST_THROW_EXCEPTION (not_enough_input ()); - res = ( 16 * res ) + hex_char_to_int (*first); - } - - *out = res; - return ++out; - } -/// \endcond - } - - -/// \fn hex ( InputIterator first, InputIterator last, OutputIterator out ) -/// \brief Converts a sequence of integral types into a hexadecimal sequence of characters. -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param out An output iterator to the results into -/// \return The updated output iterator -/// \note Based on the MySQL function of the same name -template -typename boost::enable_if::value_type>, OutputIterator>::type -hex ( InputIterator first, InputIterator last, OutputIterator out ) { - for ( ; first != last; ++first ) - out = detail::encode_one ( *first, out, "0123456789ABCDEF" ); - return out; - } - - -/// \fn hex_lower ( InputIterator first, InputIterator last, OutputIterator out ) -/// \brief Converts a sequence of integral types into a lower case hexadecimal sequence of characters. -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param out An output iterator to the results into -/// \return The updated output iterator -/// \note Based on the MySQL function of the same name -template -typename boost::enable_if::value_type>, OutputIterator>::type -hex_lower ( InputIterator first, InputIterator last, OutputIterator out ) { - for ( ; first != last; ++first ) - out = detail::encode_one ( *first, out, "0123456789abcdef" ); - return out; - } - - -/// \fn hex ( const T *ptr, OutputIterator out ) -/// \brief Converts a sequence of integral types into a hexadecimal sequence of characters. -/// -/// \param ptr A pointer to a 0-terminated sequence of data. -/// \param out An output iterator to the results into -/// \return The updated output iterator -/// \note Based on the MySQL function of the same name -template -typename boost::enable_if, OutputIterator>::type -hex ( const T *ptr, OutputIterator out ) { - while ( *ptr ) - out = detail::encode_one ( *ptr++, out, "0123456789ABCDEF" ); - return out; - } - - -/// \fn hex_lower ( const T *ptr, OutputIterator out ) -/// \brief Converts a sequence of integral types into a lower case hexadecimal sequence of characters. -/// -/// \param ptr A pointer to a 0-terminated sequence of data. -/// \param out An output iterator to the results into -/// \return The updated output iterator -/// \note Based on the MySQL function of the same name -template -typename boost::enable_if, OutputIterator>::type -hex_lower ( const T *ptr, OutputIterator out ) { - while ( *ptr ) - out = detail::encode_one ( *ptr++, out, "0123456789abcdef" ); - return out; - } - - -/// \fn hex ( const Range &r, OutputIterator out ) -/// \brief Converts a sequence of integral types into a hexadecimal sequence of characters. -/// -/// \param r The input range -/// \param out An output iterator to the results into -/// \return The updated output iterator -/// \note Based on the MySQL function of the same name -template -typename boost::enable_if::value_type>, OutputIterator>::type -hex ( const Range &r, OutputIterator out ) { - return hex (boost::begin(r), boost::end(r), out); -} - - -/// \fn hex_lower ( const Range &r, OutputIterator out ) -/// \brief Converts a sequence of integral types into a lower case hexadecimal sequence of characters. -/// -/// \param r The input range -/// \param out An output iterator to the results into -/// \return The updated output iterator -/// \note Based on the MySQL function of the same name -template -typename boost::enable_if::value_type>, OutputIterator>::type -hex_lower ( const Range &r, OutputIterator out ) { - return hex_lower (boost::begin(r), boost::end(r), out); -} - - -/// \fn unhex ( InputIterator first, InputIterator last, OutputIterator out ) -/// \brief Converts a sequence of hexadecimal characters into a sequence of integers. -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param out An output iterator to the results into -/// \return The updated output iterator -/// \note Based on the MySQL function of the same name -template -OutputIterator unhex ( InputIterator first, InputIterator last, OutputIterator out ) { - while ( first != last ) - out = detail::decode_one ( first, last, out, detail::iter_end ); - return out; - } - - -/// \fn unhex ( const T *ptr, OutputIterator out ) -/// \brief Converts a sequence of hexadecimal characters into a sequence of integers. -/// -/// \param ptr A pointer to a null-terminated input sequence. -/// \param out An output iterator to the results into -/// \return The updated output iterator -/// \note Based on the MySQL function of the same name -template -OutputIterator unhex ( const T *ptr, OutputIterator out ) { -// If we run into the terminator while decoding, we will throw a -// malformed input exception. It would be nicer to throw a 'Not enough input' -// exception - but how much extra work would that require? - while ( *ptr ) - out = detail::decode_one ( ptr, (const T *) NULL, out, detail::ptr_end ); - return out; - } - - -/// \fn OutputIterator unhex ( const Range &r, OutputIterator out ) -/// \brief Converts a sequence of hexadecimal characters into a sequence of integers. -/// -/// \param r The input range -/// \param out An output iterator to the results into -/// \return The updated output iterator -/// \note Based on the MySQL function of the same name -template -OutputIterator unhex ( const Range &r, OutputIterator out ) { - return unhex (boost::begin(r), boost::end(r), out); - } - - -/// \fn String hex ( const String &input ) -/// \brief Converts a sequence of integral types into a hexadecimal sequence of characters. -/// -/// \param input A container to be converted -/// \return A container with the encoded text -template -String hex ( const String &input ) { - String output; - output.reserve (input.size () * (2 * sizeof (typename String::value_type))); - (void) hex (input, std::back_inserter (output)); - return output; - } - - -/// \fn String hex_lower ( const String &input ) -/// \brief Converts a sequence of integral types into a lower case hexadecimal sequence of characters. -/// -/// \param input A container to be converted -/// \return A container with the encoded text -template -String hex_lower ( const String &input ) { - String output; - output.reserve (input.size () * (2 * sizeof (typename String::value_type))); - (void) hex_lower (input, std::back_inserter (output)); - return output; - } - - -/// \fn String unhex ( const String &input ) -/// \brief Converts a sequence of hexadecimal characters into a sequence of characters. -/// -/// \param input A container to be converted -/// \return A container with the decoded text -template -String unhex ( const String &input ) { - String output; - output.reserve (input.size () / (2 * sizeof (typename String::value_type))); - (void) unhex (input, std::back_inserter (output)); - return output; - } - -}} - -#endif // BOOST_ALGORITHM_HEXHPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/is_palindrome.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/is_palindrome.hpp deleted file mode 100644 index 09881109a37..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/is_palindrome.hpp +++ /dev/null @@ -1,140 +0,0 @@ -/* - Copyright (c) Alexander Zaitsev , 2016 - - 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 latest version. -*/ - -/// \file is_palindrome.hpp -/// \brief Checks the input sequence on palindrome. -/// \author Alexander Zaitsev - -#ifndef BOOST_ALGORITHM_IS_PALINDROME_HPP -#define BOOST_ALGORITHM_IS_PALINDROME_HPP - -#include -#include -#include - -#include -#include - -namespace boost { namespace algorithm { - -/// \fn is_palindrome ( BidirectionalIterator begin, BidirectionalIterator end, Predicate p ) -/// \return true if the entire sequence is palindrome -/// -/// \param begin The start of the input sequence -/// \param end One past the end of the input sequence -/// \param p A predicate used to compare the values. -/// -/// \note This function will return true for empty sequences and for palindromes. -/// For other sequences function will return false. -/// Complexity: O(N). -template -bool is_palindrome(BidirectionalIterator begin, BidirectionalIterator end, Predicate p) -{ - if(begin == end) - { - return true; - } - - --end; - while(begin != end) - { - if(!p(*begin, *end)) - { - return false; - } - ++begin; - if(begin == end) - { - break; - } - --end; - } - return true; -} - -/// \fn is_palindrome ( BidirectionalIterator begin, BidirectionalIterator end ) -/// \return true if the entire sequence is palindrome -/// -/// \param begin The start of the input sequence -/// \param end One past the end of the input sequence -/// -/// \note This function will return true for empty sequences and for palindromes. -/// For other sequences function will return false. -/// Complexity: O(N). -template -bool is_palindrome(BidirectionalIterator begin, BidirectionalIterator end) -{ - return is_palindrome(begin, end, - std::equal_to::value_type> ()); -} - -/// \fn is_palindrome ( const R& range ) -/// \return true if the entire sequence is palindrome -/// -/// \param range The range to be tested. -/// -/// \note This function will return true for empty sequences and for palindromes. -/// For other sequences function will return false. -/// Complexity: O(N). -template -bool is_palindrome(const R& range) -{ - return is_palindrome(boost::begin(range), boost::end(range)); -} - -/// \fn is_palindrome ( const R& range, Predicate p ) -/// \return true if the entire sequence is palindrome -/// -/// \param range The range to be tested. -/// \param p A predicate used to compare the values. -/// -/// \note This function will return true for empty sequences and for palindromes. -/// For other sequences function will return false. -/// Complexity: O(N). -template -bool is_palindrome(const R& range, Predicate p) -{ - return is_palindrome(boost::begin(range), boost::end(range), p); -} - -/// \fn is_palindrome ( const char* str ) -/// \return true if the entire sequence is palindrome -/// -/// \param str C-string to be tested. -/// -/// \note This function will return true for empty sequences and for palindromes. -/// For other sequences function will return false. -/// Complexity: O(N). -bool is_palindrome(const char* str) -{ - if(!str) - return true; - return is_palindrome(str, str + strlen(str)); -} - -/// \fn is_palindrome ( const char* str, Predicate p ) -/// \return true if the entire sequence is palindrome -/// -/// \param str C-string to be tested. -/// \param p A predicate used to compare the values. -/// -/// \note This function will return true for empty sequences and for palindromes. -/// For other sequences function will return false. -/// Complexity: O(N). -template -bool is_palindrome(const char* str, Predicate p) -{ - if(!str) - return true; - return is_palindrome(str, str + strlen(str), p); -} -}} - -#endif // BOOST_ALGORITHM_IS_PALINDROME_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/is_partitioned_until.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/is_partitioned_until.hpp deleted file mode 100644 index 42683e1d8e5..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/is_partitioned_until.hpp +++ /dev/null @@ -1,63 +0,0 @@ -/* - Copyright (c) Alexander Zaitsev , 2017. - - 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) -*/ - -/// \file is_partitioned_until.hpp -/// \brief Tell if a sequence is partitioned -/// \author Alexander Zaitsev - -#ifndef BOOST_ALGORITHM_IS_PARTITIONED_UNTIL_HPP -#define BOOST_ALGORITHM_IS_PARTITIONED_UNTIL_HPP - -#include -#include - -namespace boost { namespace algorithm { - -/// \fn is_partitioned_until ( InputIterator first, InputIterator last, UnaryPredicate p ) -/// \brief Tests to see if a sequence is partitioned according to a predicate. -/// In other words, all the items in the sequence that satisfy the predicate are at the beginning of the sequence. -/// -/// \param first The start of the input sequence -/// \param last One past the end of the input sequence -/// \param p The predicate to test the values with -/// -/// \note Returns the first iterator 'it' in the sequence [first, last) for which is_partitioned(first, it, p) is false. -/// Returns last if the entire sequence is partitioned. -/// Complexity: O(N). -template -InputIterator is_partitioned_until ( InputIterator first, InputIterator last, UnaryPredicate p ) -{ -// Run through the part that satisfy the predicate - for ( ; first != last; ++first ) - if ( !p (*first)) - break; -// Now the part that does not satisfy the predicate - for ( ; first != last; ++first ) - if ( p (*first)) - return first; - return last; -} - -/// \fn is_partitioned_until ( const Range &r, UnaryPredicate p ) -/// \brief Tests to see if a sequence is partitioned according to a predicate. -/// In other words, all the items in the sequence that satisfy the predicate are at the beginning of the sequence. -/// -/// \param r The input range -/// \param p The predicate to test the values with -/// -/// \note Returns the first iterator 'it' in the sequence [first, last) for which is_partitioned(first, it, p) is false. -/// Returns last if the entire sequence is partitioned. -/// Complexity: O(N). -template -typename boost::range_iterator::type is_partitioned_until ( const Range &r, UnaryPredicate p ) -{ - return boost::algorithm::is_partitioned_until (boost::begin(r), boost::end(r), p); -} - -}} - -#endif // BOOST_ALGORITHM_IS_PARTITIONED_UNTIL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/minmax.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/minmax.hpp deleted file mode 100644 index 053a7d60ae0..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/minmax.hpp +++ /dev/null @@ -1,47 +0,0 @@ -// (C) Copyright Herve Bronnimann 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) - -/* - Revision history: - 1 July 2004 - Split the code into two headers to lessen dependence on - Boost.tuple. (Herve) - 26 June 2004 - Added the code for the boost minmax library. (Herve) -*/ - -#ifndef BOOST_ALGORITHM_MINMAX_HPP -#define BOOST_ALGORITHM_MINMAX_HPP - -/* PROPOSED STANDARD EXTENSIONS: - * - * minmax(a, b) - * Effect: (b // for using pairs with boost::cref -#include - -namespace boost { - - template - tuple< T const&, T const& > - minmax(T const& a, T const& b) { - return (b - tuple< T const&, T const& > - minmax(T const& a, T const& b, BinaryPredicate comp) { - return comp(b,a) ? make_tuple(cref(b),cref(a)) : make_tuple(cref(a),cref(b)); - } - -} // namespace boost - -#endif // BOOST_ALGORITHM_MINMAX_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/minmax_element.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/minmax_element.hpp deleted file mode 100644 index 752f6cbdb16..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/minmax_element.hpp +++ /dev/null @@ -1,553 +0,0 @@ -// (C) Copyright Herve Bronnimann 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) - -/* - Revision history: - 1 July 2004 - Split the code into two headers to lessen dependence on - Boost.tuple. (Herve) - 26 June 2004 - Added the code for the boost minmax library. (Herve) -*/ - -#ifndef BOOST_ALGORITHM_MINMAX_ELEMENT_HPP -#define BOOST_ALGORITHM_MINMAX_ELEMENT_HPP - -/* PROPOSED STANDARD EXTENSIONS: - * - * minmax_element(first, last) - * Effect: std::make_pair( std::min_element(first, last), - * std::max_element(first, last) ); - * - * minmax_element(first, last, comp) - * Effect: std::make_pair( std::min_element(first, last, comp), - * std::max_element(first, last, comp) ); - */ - -#include // for std::pair and std::make_pair - -namespace boost { - - namespace detail { // for obtaining a uniform version of minmax_element - // that compiles with VC++ 6.0 -- avoid the iterator_traits by - // having comparison object over iterator, not over dereferenced value - - template - struct less_over_iter { - bool operator()(Iterator const& it1, - Iterator const& it2) const { return *it1 < *it2; } - }; - - template - struct binary_pred_over_iter { - explicit binary_pred_over_iter(BinaryPredicate const& p ) : m_p( p ) {} - bool operator()(Iterator const& it1, - Iterator const& it2) const { return m_p(*it1, *it2); } - private: - BinaryPredicate m_p; - }; - - // common base for the two minmax_element overloads - - template - std::pair - basic_minmax_element(ForwardIter first, ForwardIter last, Compare comp) - { - if (first == last) - return std::make_pair(last,last); - - ForwardIter min_result = first; - ForwardIter max_result = first; - - // if only one element - ForwardIter second = first; ++second; - if (second == last) - return std::make_pair(min_result, max_result); - - // treat first pair separately (only one comparison for first two elements) - ForwardIter potential_min_result = last; - if (comp(first, second)) - max_result = second; - else { - min_result = second; - potential_min_result = first; - } - - // then each element by pairs, with at most 3 comparisons per pair - first = ++second; if (first != last) ++second; - while (second != last) { - if (comp(first, second)) { - if (comp(first, min_result)) { - min_result = first; - potential_min_result = last; - } - if (comp(max_result, second)) - max_result = second; - } else { - if (comp(second, min_result)) { - min_result = second; - potential_min_result = first; - } - if (comp(max_result, first)) - max_result = first; - } - first = ++second; - if (first != last) ++second; - } - - // if odd number of elements, treat last element - if (first != last) { // odd number of elements - if (comp(first, min_result)) { - min_result = first; - potential_min_result = last; - } - else if (comp(max_result, first)) - max_result = first; - } - - // resolve min_result being incorrect with one extra comparison - // (in which case potential_min_result is necessarily the correct result) - if (potential_min_result != last - && !comp(min_result, potential_min_result)) - min_result = potential_min_result; - - return std::make_pair(min_result,max_result); - } - - } // namespace detail - - template - std::pair - minmax_element(ForwardIter first, ForwardIter last) - { - return detail::basic_minmax_element(first, last, - detail::less_over_iter() ); - } - - template - std::pair - minmax_element(ForwardIter first, ForwardIter last, BinaryPredicate comp) - { - return detail::basic_minmax_element(first, last, - detail::binary_pred_over_iter(comp) ); - } - -} - -/* PROPOSED BOOST EXTENSIONS - * In the description below, [rfirst,rlast) denotes the reversed range - * of [first,last). Even though the iterator type of first and last may - * be only a Forward Iterator, it is possible to explain the semantics - * by assuming that it is a Bidirectional Iterator. In the sequel, - * reverse(ForwardIterator&) returns the reverse_iterator adaptor. - * This is not how the functions would be implemented! - * - * first_min_element(first, last) - * Effect: std::min_element(first, last); - * - * first_min_element(first, last, comp) - * Effect: std::min_element(first, last, comp); - * - * last_min_element(first, last) - * Effect: reverse( std::min_element(reverse(last), reverse(first)) ); - * - * last_min_element(first, last, comp) - * Effect: reverse( std::min_element(reverse(last), reverse(first), comp) ); - * - * first_max_element(first, last) - * Effect: std::max_element(first, last); - * - * first_max_element(first, last, comp) - * Effect: max_element(first, last); - * - * last_max_element(first, last) - * Effect: reverse( std::max_element(reverse(last), reverse(first)) ); - * - * last_max_element(first, last, comp) - * Effect: reverse( std::max_element(reverse(last), reverse(first), comp) ); - * - * first_min_first_max_element(first, last) - * Effect: std::make_pair( first_min_element(first, last), - * first_max_element(first, last) ); - * - * first_min_first_max_element(first, last, comp) - * Effect: std::make_pair( first_min_element(first, last, comp), - * first_max_element(first, last, comp) ); - * - * first_min_last_max_element(first, last) - * Effect: std::make_pair( first_min_element(first, last), - * last_max_element(first, last) ); - * - * first_min_last_max_element(first, last, comp) - * Effect: std::make_pair( first_min_element(first, last, comp), - * last_max_element(first, last, comp) ); - * - * last_min_first_max_element(first, last) - * Effect: std::make_pair( last_min_element(first, last), - * first_max_element(first, last) ); - * - * last_min_first_max_element(first, last, comp) - * Effect: std::make_pair( last_min_element(first, last, comp), - * first_max_element(first, last, comp) ); - * - * last_min_last_max_element(first, last) - * Effect: std::make_pair( last_min_element(first, last), - * last_max_element(first, last) ); - * - * last_min_last_max_element(first, last, comp) - * Effect: std::make_pair( last_min_element(first, last, comp), - * last_max_element(first, last, comp) ); - */ - -namespace boost { - - // Min_element and max_element variants - - namespace detail { // common base for the overloads - - template - ForwardIter - basic_first_min_element(ForwardIter first, ForwardIter last, - BinaryPredicate comp) - { - if (first == last) return last; - ForwardIter min_result = first; - while (++first != last) - if (comp(first, min_result)) - min_result = first; - return min_result; - } - - template - ForwardIter - basic_last_min_element(ForwardIter first, ForwardIter last, - BinaryPredicate comp) - { - if (first == last) return last; - ForwardIter min_result = first; - while (++first != last) - if (!comp(min_result, first)) - min_result = first; - return min_result; - } - - template - ForwardIter - basic_first_max_element(ForwardIter first, ForwardIter last, - BinaryPredicate comp) - { - if (first == last) return last; - ForwardIter max_result = first; - while (++first != last) - if (comp(max_result, first)) - max_result = first; - return max_result; - } - - template - ForwardIter - basic_last_max_element(ForwardIter first, ForwardIter last, - BinaryPredicate comp) - { - if (first == last) return last; - ForwardIter max_result = first; - while (++first != last) - if (!comp(first, max_result)) - max_result = first; - return max_result; - } - - } // namespace detail - - template - ForwardIter - first_min_element(ForwardIter first, ForwardIter last) - { - return detail::basic_first_min_element(first, last, - detail::less_over_iter() ); - } - - template - ForwardIter - first_min_element(ForwardIter first, ForwardIter last, BinaryPredicate comp) - { - return detail::basic_first_min_element(first, last, - detail::binary_pred_over_iter(comp) ); - } - - template - ForwardIter - last_min_element(ForwardIter first, ForwardIter last) - { - return detail::basic_last_min_element(first, last, - detail::less_over_iter() ); - } - - template - ForwardIter - last_min_element(ForwardIter first, ForwardIter last, BinaryPredicate comp) - { - return detail::basic_last_min_element(first, last, - detail::binary_pred_over_iter(comp) ); - } - - template - ForwardIter - first_max_element(ForwardIter first, ForwardIter last) - { - return detail::basic_first_max_element(first, last, - detail::less_over_iter() ); - } - - template - ForwardIter - first_max_element(ForwardIter first, ForwardIter last, BinaryPredicate comp) - { - return detail::basic_first_max_element(first, last, - detail::binary_pred_over_iter(comp) ); - } - - template - ForwardIter - last_max_element(ForwardIter first, ForwardIter last) - { - return detail::basic_last_max_element(first, last, - detail::less_over_iter() ); - } - - template - ForwardIter - last_max_element(ForwardIter first, ForwardIter last, BinaryPredicate comp) - { - return detail::basic_last_max_element(first, last, - detail::binary_pred_over_iter(comp) ); - } - - - // Minmax_element variants -- comments removed - - namespace detail { - - template - std::pair - basic_first_min_last_max_element(ForwardIter first, ForwardIter last, - BinaryPredicate comp) - { - if (first == last) - return std::make_pair(last,last); - - ForwardIter min_result = first; - ForwardIter max_result = first; - - ForwardIter second = ++first; - if (second == last) - return std::make_pair(min_result, max_result); - - if (comp(second, min_result)) - min_result = second; - else - max_result = second; - - first = ++second; if (first != last) ++second; - while (second != last) { - if (!comp(second, first)) { - if (comp(first, min_result)) - min_result = first; - if (!comp(second, max_result)) - max_result = second; - } else { - if (comp(second, min_result)) - min_result = second; - if (!comp(first, max_result)) - max_result = first; - } - first = ++second; if (first != last) ++second; - } - - if (first != last) { - if (comp(first, min_result)) - min_result = first; - else if (!comp(first, max_result)) - max_result = first; - } - - return std::make_pair(min_result, max_result); - } - - template - std::pair - basic_last_min_first_max_element(ForwardIter first, ForwardIter last, - BinaryPredicate comp) - { - if (first == last) return std::make_pair(last,last); - - ForwardIter min_result = first; - ForwardIter max_result = first; - - ForwardIter second = ++first; - if (second == last) - return std::make_pair(min_result, max_result); - - if (comp(max_result, second)) - max_result = second; - else - min_result = second; - - first = ++second; if (first != last) ++second; - while (second != last) { - if (comp(first, second)) { - if (!comp(min_result, first)) - min_result = first; - if (comp(max_result, second)) - max_result = second; - } else { - if (!comp(min_result, second)) - min_result = second; - if (comp(max_result, first)) - max_result = first; - } - first = ++second; if (first != last) ++second; - } - - if (first != last) { - if (!comp(min_result, first)) - min_result = first; - else if (comp(max_result, first)) - max_result = first; - } - - return std::make_pair(min_result, max_result); - } - - template - std::pair - basic_last_min_last_max_element(ForwardIter first, ForwardIter last, - BinaryPredicate comp) - { - if (first == last) return std::make_pair(last,last); - - ForwardIter min_result = first; - ForwardIter max_result = first; - - ForwardIter second = first; ++second; - if (second == last) - return std::make_pair(min_result,max_result); - - ForwardIter potential_max_result = last; - if (comp(first, second)) - max_result = second; - else { - min_result = second; - potential_max_result = second; - } - - first = ++second; if (first != last) ++second; - while (second != last) { - if (comp(first, second)) { - if (!comp(min_result, first)) - min_result = first; - if (!comp(second, max_result)) { - max_result = second; - potential_max_result = last; - } - } else { - if (!comp(min_result, second)) - min_result = second; - if (!comp(first, max_result)) { - max_result = first; - potential_max_result = second; - } - } - first = ++second; - if (first != last) ++second; - } - - if (first != last) { - if (!comp(min_result, first)) - min_result = first; - if (!comp(first, max_result)) { - max_result = first; - potential_max_result = last; - } - } - - if (potential_max_result != last - && !comp(potential_max_result, max_result)) - max_result = potential_max_result; - - return std::make_pair(min_result,max_result); - } - - } // namespace detail - - template - inline std::pair - first_min_first_max_element(ForwardIter first, ForwardIter last) - { - return minmax_element(first, last); - } - - template - inline std::pair - first_min_first_max_element(ForwardIter first, ForwardIter last, - BinaryPredicate comp) - { - return minmax_element(first, last, comp); - } - - template - std::pair - first_min_last_max_element(ForwardIter first, ForwardIter last) - { - return detail::basic_first_min_last_max_element(first, last, - detail::less_over_iter() ); - } - - template - inline std::pair - first_min_last_max_element(ForwardIter first, ForwardIter last, - BinaryPredicate comp) - { - return detail::basic_first_min_last_max_element(first, last, - detail::binary_pred_over_iter(comp) ); - } - - template - std::pair - last_min_first_max_element(ForwardIter first, ForwardIter last) - { - return detail::basic_last_min_first_max_element(first, last, - detail::less_over_iter() ); - } - - template - inline std::pair - last_min_first_max_element(ForwardIter first, ForwardIter last, - BinaryPredicate comp) - { - return detail::basic_last_min_first_max_element(first, last, - detail::binary_pred_over_iter(comp) ); - } - - template - std::pair - last_min_last_max_element(ForwardIter first, ForwardIter last) - { - return detail::basic_last_min_last_max_element(first, last, - detail::less_over_iter() ); - } - - template - inline std::pair - last_min_last_max_element(ForwardIter first, ForwardIter last, - BinaryPredicate comp) - { - return detail::basic_last_min_last_max_element(first, last, - detail::binary_pred_over_iter(comp) ); - } - -} // namespace boost - -#endif // BOOST_ALGORITHM_MINMAX_ELEMENT_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/searching/boyer_moore.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/searching/boyer_moore.hpp deleted file mode 100644 index 192d4dec25b..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/searching/boyer_moore.hpp +++ /dev/null @@ -1,272 +0,0 @@ -/* - Copyright (c) Marshall Clow 2010-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) - - For more information, see http://www.boost.org -*/ - -#ifndef BOOST_ALGORITHM_BOYER_MOORE_SEARCH_HPP -#define BOOST_ALGORITHM_BOYER_MOORE_SEARCH_HPP - -#include // for std::iterator_traits - -#include -#include - -#include -#include - -#include -#include - -#include -#include - -namespace boost { namespace algorithm { - -/* - A templated version of the boyer-moore searching algorithm. - -References: - http://www.cs.utexas.edu/users/moore/best-ideas/string-searching/ - http://www.cs.utexas.edu/~moore/publications/fstrpos.pdf - -Explanations: - http://en.wikipedia.org/wiki/Boyer%E2%80%93Moore_string_search_algorithm - http://www.movsd.com/bm.htm - http://www.cs.ucdavis.edu/~gusfield/cs224f09/bnotes.pdf - -The Boyer-Moore search algorithm uses two tables, a "bad character" table -to tell how far to skip ahead when it hits a character that is not in the pattern, -and a "good character" table to tell how far to skip ahead when it hits a -mismatch on a character that _is_ in the pattern. - -Requirements: - * Random access iterators - * The two iterator types (patIter and corpusIter) must - "point to" the same underlying type and be comparable. - * Additional requirements may be imposed but the skip table, such as: - ** Numeric type (array-based skip table) - ** Hashable type (map-based skip table) -*/ - - template > - class boyer_moore { - typedef typename std::iterator_traits::difference_type difference_type; - public: - boyer_moore ( patIter first, patIter last ) - : pat_first ( first ), pat_last ( last ), - k_pattern_length ( std::distance ( pat_first, pat_last )), - skip_ ( k_pattern_length, -1 ), - suffix_ ( k_pattern_length + 1 ) - { - this->build_skip_table ( first, last ); - this->build_suffix_table ( first, last ); - } - - ~boyer_moore () {} - - /// \fn operator ( corpusIter corpus_first, corpusIter corpus_last ) - /// \brief Searches the corpus for the pattern that was passed into the constructor - /// - /// \param corpus_first The start of the data to search (Random Access Iterator) - /// \param corpus_last One past the end of the data to search - /// - template - std::pair - operator () ( corpusIter corpus_first, corpusIter corpus_last ) const { - BOOST_STATIC_ASSERT (( boost::is_same< - typename std::iterator_traits::value_type, - typename std::iterator_traits::value_type>::value )); - - if ( corpus_first == corpus_last ) return std::make_pair(corpus_last, corpus_last); // if nothing to search, we didn't find it! - if ( pat_first == pat_last ) return std::make_pair(corpus_first, corpus_first); // empty pattern matches at start - - const difference_type k_corpus_length = std::distance ( corpus_first, corpus_last ); - // If the pattern is larger than the corpus, we can't find it! - if ( k_corpus_length < k_pattern_length ) - return std::make_pair(corpus_last, corpus_last); - - // Do the search - return this->do_search ( corpus_first, corpus_last ); - } - - template - std::pair::type, typename boost::range_iterator::type> - operator () ( Range &r ) const { - return (*this) (boost::begin(r), boost::end(r)); - } - - private: -/// \cond DOXYGEN_HIDE - patIter pat_first, pat_last; - const difference_type k_pattern_length; - typename traits::skip_table_t skip_; - std::vector suffix_; - - /// \fn operator ( corpusIter corpus_first, corpusIter corpus_last, Pred p ) - /// \brief Searches the corpus for the pattern that was passed into the constructor - /// - /// \param corpus_first The start of the data to search (Random Access Iterator) - /// \param corpus_last One past the end of the data to search - /// \param p A predicate used for the search comparisons. - /// - template - std::pair - do_search ( corpusIter corpus_first, corpusIter corpus_last ) const { - /* ---- Do the matching ---- */ - corpusIter curPos = corpus_first; - const corpusIter lastPos = corpus_last - k_pattern_length; - difference_type j, k, m; - - while ( curPos <= lastPos ) { - /* while ( std::distance ( curPos, corpus_last ) >= k_pattern_length ) { */ - // Do we match right where we are? - j = k_pattern_length; - while ( pat_first [j-1] == curPos [j-1] ) { - j--; - // We matched - we're done! - if ( j == 0 ) - return std::make_pair(curPos, curPos + k_pattern_length); - } - - // Since we didn't match, figure out how far to skip forward - k = skip_ [ curPos [ j - 1 ]]; - m = j - k - 1; - if ( k < j && m > suffix_ [ j ] ) - curPos += m; - else - curPos += suffix_ [ j ]; - } - - return std::make_pair(corpus_last, corpus_last); // We didn't find anything - } - - - void build_skip_table ( patIter first, patIter last ) { - for ( std::size_t i = 0; first != last; ++first, ++i ) - skip_.insert ( *first, i ); - } - - - template - void compute_bm_prefix ( Iter first, Iter last, Container &prefix ) { - const std::size_t count = std::distance ( first, last ); - BOOST_ASSERT ( count > 0 ); - BOOST_ASSERT ( prefix.size () == count ); - - prefix[0] = 0; - std::size_t k = 0; - for ( std::size_t i = 1; i < count; ++i ) { - BOOST_ASSERT ( k < count ); - while ( k > 0 && ( first[k] != first[i] )) { - BOOST_ASSERT ( k < count ); - k = prefix [ k - 1 ]; - } - - if ( first[k] == first[i] ) - k++; - prefix [ i ] = k; - } - } - - void build_suffix_table ( patIter first, patIter last ) { - const std::size_t count = (std::size_t) std::distance ( first, last ); - - if ( count > 0 ) { // empty pattern - std::vector::value_type> reversed(count); - (void) std::reverse_copy ( first, last, reversed.begin ()); - - std::vector prefix (count); - compute_bm_prefix ( first, last, prefix ); - - std::vector prefix_reversed (count); - compute_bm_prefix ( reversed.begin (), reversed.end (), prefix_reversed ); - - for ( std::size_t i = 0; i <= count; i++ ) - suffix_[i] = count - prefix [count-1]; - - for ( std::size_t i = 0; i < count; i++ ) { - const std::size_t j = count - prefix_reversed[i]; - const difference_type k = i - prefix_reversed[i] + 1; - - if (suffix_[j] > k) - suffix_[j] = k; - } - } - } -/// \endcond - }; - - -/* Two ranges as inputs gives us four possibilities; with 2,3,3,4 parameters - Use a bit of TMP to disambiguate the 3-argument templates */ - -/// \fn boyer_moore_search ( corpusIter corpus_first, corpusIter corpus_last, -/// patIter pat_first, patIter pat_last ) -/// \brief Searches the corpus for the pattern. -/// -/// \param corpus_first The start of the data to search (Random Access Iterator) -/// \param corpus_last One past the end of the data to search -/// \param pat_first The start of the pattern to search for (Random Access Iterator) -/// \param pat_last One past the end of the data to search for -/// - template - std::pair boyer_moore_search ( - corpusIter corpus_first, corpusIter corpus_last, - patIter pat_first, patIter pat_last ) - { - boyer_moore bm ( pat_first, pat_last ); - return bm ( corpus_first, corpus_last ); - } - - template - std::pair boyer_moore_search ( - corpusIter corpus_first, corpusIter corpus_last, const PatternRange &pattern ) - { - typedef typename boost::range_iterator::type pattern_iterator; - boyer_moore bm ( boost::begin(pattern), boost::end (pattern)); - return bm ( corpus_first, corpus_last ); - } - - template - typename boost::disable_if_c< - boost::is_same::value, - std::pair::type, typename boost::range_iterator::type> > - ::type - boyer_moore_search ( CorpusRange &corpus, patIter pat_first, patIter pat_last ) - { - boyer_moore bm ( pat_first, pat_last ); - return bm (boost::begin (corpus), boost::end (corpus)); - } - - template - std::pair::type, typename boost::range_iterator::type> - boyer_moore_search ( CorpusRange &corpus, const PatternRange &pattern ) - { - typedef typename boost::range_iterator::type pattern_iterator; - boyer_moore bm ( boost::begin(pattern), boost::end (pattern)); - return bm (boost::begin (corpus), boost::end (corpus)); - } - - - // Creator functions -- take a pattern range, return an object - template - boost::algorithm::boyer_moore::type> - make_boyer_moore ( const Range &r ) { - return boost::algorithm::boyer_moore - ::type> (boost::begin(r), boost::end(r)); - } - - template - boost::algorithm::boyer_moore::type> - make_boyer_moore ( Range &r ) { - return boost::algorithm::boyer_moore - ::type> (boost::begin(r), boost::end(r)); - } - -}} - -#endif // BOOST_ALGORITHM_BOYER_MOORE_SEARCH_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/searching/boyer_moore_horspool.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/searching/boyer_moore_horspool.hpp deleted file mode 100644 index aacb5cb833b..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/searching/boyer_moore_horspool.hpp +++ /dev/null @@ -1,202 +0,0 @@ -/* - Copyright (c) Marshall Clow 2010-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) - - For more information, see http://www.boost.org -*/ - -#ifndef BOOST_ALGORITHM_BOYER_MOORE_HORSPOOOL_SEARCH_HPP -#define BOOST_ALGORITHM_BOYER_MOORE_HORSPOOOL_SEARCH_HPP - -#include // for std::iterator_traits - -#include -#include - -#include -#include - -#include -#include - -#include -#include - -// #define BOOST_ALGORITHM_BOYER_MOORE_HORSPOOL_DEBUG_HPP - -namespace boost { namespace algorithm { - -/* - A templated version of the boyer-moore-horspool searching algorithm. - - Requirements: - * Random access iterators - * The two iterator types (patIter and corpusIter) must - "point to" the same underlying type. - * Additional requirements may be imposed buy the skip table, such as: - ** Numeric type (array-based skip table) - ** Hashable type (map-based skip table) - -http://www-igm.univ-mlv.fr/%7Elecroq/string/node18.html - -*/ - - template > - class boyer_moore_horspool { - typedef typename std::iterator_traits::difference_type difference_type; - public: - boyer_moore_horspool ( patIter first, patIter last ) - : pat_first ( first ), pat_last ( last ), - k_pattern_length ( std::distance ( pat_first, pat_last )), - skip_ ( k_pattern_length, k_pattern_length ) { - - // Build the skip table - std::size_t i = 0; - if ( first != last ) // empty pattern? - for ( patIter iter = first; iter != last-1; ++iter, ++i ) - skip_.insert ( *iter, k_pattern_length - 1 - i ); -#ifdef BOOST_ALGORITHM_BOYER_MOORE_HORSPOOL_DEBUG_HPP - skip_.PrintSkipTable (); -#endif - } - - ~boyer_moore_horspool () {} - - /// \fn operator ( corpusIter corpus_first, corpusIter corpus_last) - /// \brief Searches the corpus for the pattern that was passed into the constructor - /// - /// \param corpus_first The start of the data to search (Random Access Iterator) - /// \param corpus_last One past the end of the data to search - /// - template - std::pair - operator () ( corpusIter corpus_first, corpusIter corpus_last ) const { - BOOST_STATIC_ASSERT (( boost::is_same< - typename std::iterator_traits::value_type, - typename std::iterator_traits::value_type>::value )); - - if ( corpus_first == corpus_last ) return std::make_pair(corpus_last, corpus_last); // if nothing to search, we didn't find it! - if ( pat_first == pat_last ) return std::make_pair(corpus_first, corpus_first); // empty pattern matches at start - - const difference_type k_corpus_length = std::distance ( corpus_first, corpus_last ); - // If the pattern is larger than the corpus, we can't find it! - if ( k_corpus_length < k_pattern_length ) - return std::make_pair(corpus_last, corpus_last); - - // Do the search - return this->do_search ( corpus_first, corpus_last ); - } - - template - std::pair::type, typename boost::range_iterator::type> - operator () ( Range &r ) const { - return (*this) (boost::begin(r), boost::end(r)); - } - - private: -/// \cond DOXYGEN_HIDE - patIter pat_first, pat_last; - const difference_type k_pattern_length; - typename traits::skip_table_t skip_; - - /// \fn do_search ( corpusIter corpus_first, corpusIter corpus_last ) - /// \brief Searches the corpus for the pattern that was passed into the constructor - /// - /// \param corpus_first The start of the data to search (Random Access Iterator) - /// \param corpus_last One past the end of the data to search - /// \param k_corpus_length The length of the corpus to search - /// - template - std::pair - do_search ( corpusIter corpus_first, corpusIter corpus_last ) const { - corpusIter curPos = corpus_first; - const corpusIter lastPos = corpus_last - k_pattern_length; - while ( curPos <= lastPos ) { - // Do we match right where we are? - std::size_t j = k_pattern_length - 1; - while ( pat_first [j] == curPos [j] ) { - // We matched - we're done! - if ( j == 0 ) - return std::make_pair(curPos, curPos + k_pattern_length); - j--; - } - - curPos += skip_ [ curPos [ k_pattern_length - 1 ]]; - } - - return std::make_pair(corpus_last, corpus_last); - } -// \endcond - }; - -/* Two ranges as inputs gives us four possibilities; with 2,3,3,4 parameters - Use a bit of TMP to disambiguate the 3-argument templates */ - -/// \fn boyer_moore_horspool_search ( corpusIter corpus_first, corpusIter corpus_last, -/// patIter pat_first, patIter pat_last ) -/// \brief Searches the corpus for the pattern. -/// -/// \param corpus_first The start of the data to search (Random Access Iterator) -/// \param corpus_last One past the end of the data to search -/// \param pat_first The start of the pattern to search for (Random Access Iterator) -/// \param pat_last One past the end of the data to search for -/// - template - std::pair boyer_moore_horspool_search ( - corpusIter corpus_first, corpusIter corpus_last, - patIter pat_first, patIter pat_last ) - { - boyer_moore_horspool bmh ( pat_first, pat_last ); - return bmh ( corpus_first, corpus_last ); - } - - template - std::pair boyer_moore_horspool_search ( - corpusIter corpus_first, corpusIter corpus_last, const PatternRange &pattern ) - { - typedef typename boost::range_iterator::type pattern_iterator; - boyer_moore_horspool bmh ( boost::begin(pattern), boost::end (pattern)); - return bmh ( corpus_first, corpus_last ); - } - - template - typename boost::disable_if_c< - boost::is_same::value, - std::pair::type, typename boost::range_iterator::type> > - ::type - boyer_moore_horspool_search ( CorpusRange &corpus, patIter pat_first, patIter pat_last ) - { - boyer_moore_horspool bmh ( pat_first, pat_last ); - return bm (boost::begin (corpus), boost::end (corpus)); - } - - template - std::pair::type, typename boost::range_iterator::type> - boyer_moore_horspool_search ( CorpusRange &corpus, const PatternRange &pattern ) - { - typedef typename boost::range_iterator::type pattern_iterator; - boyer_moore_horspool bmh ( boost::begin(pattern), boost::end (pattern)); - return bmh (boost::begin (corpus), boost::end (corpus)); - } - - - // Creator functions -- take a pattern range, return an object - template - boost::algorithm::boyer_moore_horspool::type> - make_boyer_moore_horspool ( const Range &r ) { - return boost::algorithm::boyer_moore_horspool - ::type> (boost::begin(r), boost::end(r)); - } - - template - boost::algorithm::boyer_moore_horspool::type> - make_boyer_moore_horspool ( Range &r ) { - return boost::algorithm::boyer_moore_horspool - ::type> (boost::begin(r), boost::end(r)); - } - -}} - -#endif // BOOST_ALGORITHM_BOYER_MOORE_HORSPOOOL_SEARCH_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/searching/detail/bm_traits.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/searching/detail/bm_traits.hpp deleted file mode 100644 index 12143636be0..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/searching/detail/bm_traits.hpp +++ /dev/null @@ -1,113 +0,0 @@ -/* - Copyright (c) Marshall Clow 2010-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) - - For more information, see http://www.boost.org -*/ - -#ifndef BOOST_ALGORITHM_SEARCH_DETAIL_BM_TRAITS_HPP -#define BOOST_ALGORITHM_SEARCH_DETAIL_BM_TRAITS_HPP - -#include // for CHAR_BIT -#include -#include // for std::iterator_traits - -#include -#include -#include -#include - -#include -#ifdef BOOST_NO_CXX11_HDR_UNORDERED_MAP -#include -#else -#include -#endif - -#include - -namespace boost { namespace algorithm { namespace detail { - -// -// Default implementations of the skip tables for B-M and B-M-H -// - template class skip_table; - -// General case for data searching other than bytes; use a map - template - class skip_table { - private: -#ifdef BOOST_NO_CXX11_HDR_UNORDERED_MAP - typedef boost::unordered_map skip_map; -#else - typedef std::unordered_map skip_map; -#endif - const value_type k_default_value; - skip_map skip_; - - public: - skip_table ( std::size_t patSize, value_type default_value ) - : k_default_value ( default_value ), skip_ ( patSize ) {} - - void insert ( key_type key, value_type val ) { - skip_ [ key ] = val; // Would skip_.insert (val) be better here? - } - - value_type operator [] ( key_type key ) const { - typename skip_map::const_iterator it = skip_.find ( key ); - return it == skip_.end () ? k_default_value : it->second; - } - - void PrintSkipTable () const { - std::cout << "BM(H) Skip Table :" << std::endl; - for ( typename skip_map::const_iterator it = skip_.begin (); it != skip_.end (); ++it ) - if ( it->second != k_default_value ) - std::cout << " " << it->first << ": " << it->second << std::endl; - std::cout << std::endl; - } - }; - - -// Special case small numeric values; use an array - template - class skip_table { - private: - typedef typename boost::make_unsigned::type unsigned_key_type; - typedef boost::array skip_map; - skip_map skip_; - const value_type k_default_value; - public: - skip_table ( std::size_t /*patSize*/, value_type default_value ) : k_default_value ( default_value ) { - std::fill_n ( skip_.begin(), skip_.size(), default_value ); - } - - void insert ( key_type key, value_type val ) { - skip_ [ static_cast ( key ) ] = val; - } - - value_type operator [] ( key_type key ) const { - return skip_ [ static_cast ( key ) ]; - } - - void PrintSkipTable () const { - std::cout << "BM(H) Skip Table :" << std::endl; - for ( typename skip_map::const_iterator it = skip_.begin (); it != skip_.end (); ++it ) - if ( *it != k_default_value ) - std::cout << " " << std::distance (skip_.begin (), it) << ": " << *it << std::endl; - std::cout << std::endl; - } - }; - - template - struct BM_traits { - typedef typename std::iterator_traits::difference_type value_type; - typedef typename std::iterator_traits::value_type key_type; - typedef boost::algorithm::detail::skip_table::value && (sizeof(key_type)==1)> skip_table_t; - }; - -}}} // namespaces - -#endif // BOOST_ALGORITHM_SEARCH_DETAIL_BM_TRAITS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/searching/detail/debugging.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/searching/detail/debugging.hpp deleted file mode 100644 index 3996e0f503c..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/searching/detail/debugging.hpp +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright (c) Marshall Clow 2010-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) - - For more information, see http://www.boost.org -*/ - -#ifndef BOOST_ALGORITHM_SEARCH_DETAIL_DEBUG_HPP -#define BOOST_ALGORITHM_SEARCH_DETAIL_DEBUG_HPP - -#include -/// \cond DOXYGEN_HIDE - -namespace boost { namespace algorithm { namespace detail { - -// Debugging support - template - void PrintTable ( Iter first, Iter last ) { - std::cout << std::distance ( first, last ) << ": { "; - for ( Iter iter = first; iter != last; ++iter ) - std::cout << *iter << " "; - std::cout << "}" << std::endl; - } - -}}} -/// \endcond - -#endif // BOOST_ALGORITHM_SEARCH_DETAIL_DEBUG_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/searching/knuth_morris_pratt.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/searching/knuth_morris_pratt.hpp deleted file mode 100644 index 5b5b64a729a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/searching/knuth_morris_pratt.hpp +++ /dev/null @@ -1,263 +0,0 @@ -/* - Copyright (c) Marshall Clow 2010-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) - - For more information, see http://www.boost.org -*/ - -#ifndef BOOST_ALGORITHM_KNUTH_MORRIS_PRATT_SEARCH_HPP -#define BOOST_ALGORITHM_KNUTH_MORRIS_PRATT_SEARCH_HPP - -#include -#include // for std::iterator_traits - -#include -#include - -#include -#include - -#include -#include - -#include - -// #define BOOST_ALGORITHM_KNUTH_MORRIS_PRATT_DEBUG - -namespace boost { namespace algorithm { - -// #define NEW_KMP - -/* - A templated version of the Knuth-Morris-Pratt searching algorithm. - - Requirements: - * Random-access iterators - * The two iterator types (I1 and I2) must "point to" the same underlying type. - - http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm - http://www.inf.fh-flensburg.de/lang/algorithmen/pattern/kmpen.htm -*/ - - template - class knuth_morris_pratt { - typedef typename std::iterator_traits::difference_type difference_type; - public: - knuth_morris_pratt ( patIter first, patIter last ) - : pat_first ( first ), pat_last ( last ), - k_pattern_length ( std::distance ( pat_first, pat_last )), - skip_ ( k_pattern_length + 1 ) { -#ifdef NEW_KMP - preKmp ( pat_first, pat_last ); -#else - init_skip_table ( pat_first, pat_last ); -#endif -#ifdef BOOST_ALGORITHM_KNUTH_MORRIS_PRATT_DEBUG - detail::PrintTable ( skip_.begin (), skip_.end ()); -#endif - } - - ~knuth_morris_pratt () {} - - /// \fn operator ( corpusIter corpus_first, corpusIter corpus_last, Pred p ) - /// \brief Searches the corpus for the pattern that was passed into the constructor - /// - /// \param corpus_first The start of the data to search (Random Access Iterator) - /// \param corpus_last One past the end of the data to search - /// \param p A predicate used for the search comparisons. - /// - template - std::pair - operator () ( corpusIter corpus_first, corpusIter corpus_last ) const { - BOOST_STATIC_ASSERT (( boost::is_same< - typename std::iterator_traits::value_type, - typename std::iterator_traits::value_type>::value )); - - if ( corpus_first == corpus_last ) return std::make_pair(corpus_last, corpus_last); // if nothing to search, we didn't find it! - if ( pat_first == pat_last ) return std::make_pair(corpus_first, corpus_first); // empty pattern matches at start - - const difference_type k_corpus_length = std::distance ( corpus_first, corpus_last ); - // If the pattern is larger than the corpus, we can't find it! - if ( k_corpus_length < k_pattern_length ) - return std::make_pair(corpus_last, corpus_last); - - return do_search ( corpus_first, corpus_last, k_corpus_length ); - } - - template - std::pair::type, typename boost::range_iterator::type> - operator () ( Range &r ) const { - return (*this) (boost::begin(r), boost::end(r)); - } - - private: -/// \cond DOXYGEN_HIDE - patIter pat_first, pat_last; - const difference_type k_pattern_length; - std::vector skip_; - - /// \fn operator ( corpusIter corpus_first, corpusIter corpus_last, Pred p ) - /// \brief Searches the corpus for the pattern that was passed into the constructor - /// - /// \param corpus_first The start of the data to search (Random Access Iterator) - /// \param corpus_last One past the end of the data to search - /// \param p A predicate used for the search comparisons. - /// - template - std::pair - do_search ( corpusIter corpus_first, corpusIter corpus_last, - difference_type k_corpus_length ) const { - difference_type match_start = 0; // position in the corpus that we're matching - -#ifdef NEW_KMP - int patternIdx = 0; - while ( match_start < k_corpus_length ) { - while ( patternIdx > -1 && pat_first[patternIdx] != corpus_first [match_start] ) - patternIdx = skip_ [patternIdx]; //<--- Shifting the pattern on mismatch - - patternIdx++; - match_start++; //<--- corpus is always increased by 1 - - if ( patternIdx >= (int) k_pattern_length ) - return corpus_first + match_start - patternIdx; - } - -#else -// At this point, we know: -// k_pattern_length <= k_corpus_length -// for all elements of skip, it holds -1 .. k_pattern_length -// -// In the loop, we have the following invariants -// idx is in the range 0 .. k_pattern_length -// match_start is in the range 0 .. k_corpus_length - k_pattern_length + 1 - - const difference_type last_match = k_corpus_length - k_pattern_length; - difference_type idx = 0; // position in the pattern we're comparing - - while ( match_start <= last_match ) { - while ( pat_first [ idx ] == corpus_first [ match_start + idx ] ) { - if ( ++idx == k_pattern_length ) - return std::make_pair(corpus_first + match_start, corpus_first + match_start + k_pattern_length); - } - // Figure out where to start searching again - // assert ( idx - skip_ [ idx ] > 0 ); // we're always moving forward - match_start += idx - skip_ [ idx ]; - idx = skip_ [ idx ] >= 0 ? skip_ [ idx ] : 0; - // assert ( idx >= 0 && idx < k_pattern_length ); - } -#endif - - // We didn't find anything - return std::make_pair(corpus_last, corpus_last); - } - - - void preKmp ( patIter first, patIter last ) { - const difference_type count = std::distance ( first, last ); - - difference_type i, j; - - i = 0; - j = skip_[0] = -1; - while (i < count) { - while (j > -1 && first[i] != first[j]) - j = skip_[j]; - i++; - j++; - if (first[i] == first[j]) - skip_[i] = skip_[j]; - else - skip_[i] = j; - } - } - - - void init_skip_table ( patIter first, patIter last ) { - const difference_type count = std::distance ( first, last ); - - difference_type j; - skip_ [ 0 ] = -1; - for ( int i = 1; i <= count; ++i ) { - j = skip_ [ i - 1 ]; - while ( j >= 0 ) { - if ( first [ j ] == first [ i - 1 ] ) - break; - j = skip_ [ j ]; - } - skip_ [ i ] = j + 1; - } - } -// \endcond - }; - - -/* Two ranges as inputs gives us four possibilities; with 2,3,3,4 parameters - Use a bit of TMP to disambiguate the 3-argument templates */ - -/// \fn knuth_morris_pratt_search ( corpusIter corpus_first, corpusIter corpus_last, -/// patIter pat_first, patIter pat_last ) -/// \brief Searches the corpus for the pattern. -/// -/// \param corpus_first The start of the data to search (Random Access Iterator) -/// \param corpus_last One past the end of the data to search -/// \param pat_first The start of the pattern to search for (Random Access Iterator) -/// \param pat_last One past the end of the data to search for -/// - template - std::pair knuth_morris_pratt_search ( - corpusIter corpus_first, corpusIter corpus_last, - patIter pat_first, patIter pat_last ) - { - knuth_morris_pratt kmp ( pat_first, pat_last ); - return kmp ( corpus_first, corpus_last ); - } - - template - std::pair knuth_morris_pratt_search ( - corpusIter corpus_first, corpusIter corpus_last, const PatternRange &pattern ) - { - typedef typename boost::range_iterator::type pattern_iterator; - knuth_morris_pratt kmp ( boost::begin(pattern), boost::end (pattern)); - return kmp ( corpus_first, corpus_last ); - } - - template - typename boost::disable_if_c< - boost::is_same::value, - std::pair::type, typename boost::range_iterator::type> > - ::type - knuth_morris_pratt_search ( CorpusRange &corpus, patIter pat_first, patIter pat_last ) - { - knuth_morris_pratt kmp ( pat_first, pat_last ); - return kmp (boost::begin (corpus), boost::end (corpus)); - } - - template - std::pair::type, typename boost::range_iterator::type> - knuth_morris_pratt_search ( CorpusRange &corpus, const PatternRange &pattern ) - { - typedef typename boost::range_iterator::type pattern_iterator; - knuth_morris_pratt kmp ( boost::begin(pattern), boost::end (pattern)); - return kmp (boost::begin (corpus), boost::end (corpus)); - } - - - // Creator functions -- take a pattern range, return an object - template - boost::algorithm::knuth_morris_pratt::type> - make_knuth_morris_pratt ( const Range &r ) { - return boost::algorithm::knuth_morris_pratt - ::type> (boost::begin(r), boost::end(r)); - } - - template - boost::algorithm::knuth_morris_pratt::type> - make_knuth_morris_pratt ( Range &r ) { - return boost::algorithm::knuth_morris_pratt - ::type> (boost::begin(r), boost::end(r)); - } -}} - -#endif // BOOST_ALGORITHM_KNUTH_MORRIS_PRATT_SEARCH_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/sort_subrange.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/sort_subrange.hpp deleted file mode 100644 index 7fb2cb55d01..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/sort_subrange.hpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - Copyright (c) Marshall Clow 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) - - Revision history: - 28 Sep 2015 mtc First version - -*/ - -/// \file sort_subrange.hpp -/// \brief Sort a subrange -/// \author Marshall Clow -/// -/// Suggested by Sean Parent in his CppCon 2015 keynote - -#ifndef BOOST_ALGORITHM_SORT_SUBRANGE_HPP -#define BOOST_ALGORITHM_SORT_SUBRANGE_HPP - -#include // For std::less -#include // For std::iterator_traits -#include // For nth_element and partial_sort - -#include -#include - -namespace boost { namespace algorithm { - -/// \fn sort_subrange ( T const& val, -/// Iterator first, Iterator last, -/// Iterator sub_first, Iterator sub_last, -/// Pred p ) -/// \brief Sort the subrange [sub_first, sub_last) that is inside -/// the range [first, last) as if you had sorted the entire range. -/// -/// \param first The start of the larger range -/// \param last The end of the larger range -/// \param sub_first The start of the sub range -/// \param sub_last The end of the sub range -/// \param p A predicate to use to compare the values. -/// p ( a, b ) returns a boolean. -/// - template - void sort_subrange ( - Iterator first, Iterator last, - Iterator sub_first, Iterator sub_last, - Pred p) - { - if (sub_first == sub_last) return; // the empty sub-range is already sorted. - - if (sub_first != first) { // sub-range is at the start, don't need to partition - (void) std::nth_element(first, sub_first, last, p); - ++sub_first; - } - std::partial_sort(sub_first, sub_last, last, p); - } - - - - template - void sort_subrange (Iterator first, Iterator last, Iterator sub_first, Iterator sub_last) - { - typedef typename std::iterator_traits::value_type value_type; - return sort_subrange(first, last, sub_first, sub_last, std::less()); - } - -/// range versions? - - -/// \fn partition_subrange ( T const& val, -/// Iterator first, Iterator last, -/// Iterator sub_first, Iterator sub_last, -/// Pred p ) -/// \brief Gather the elements of the subrange [sub_first, sub_last) that is -/// inside the range [first, last) as if you had sorted the entire range. -/// -/// \param first The start of the larger range -/// \param last The end of the larger range -/// \param sub_first The start of the sub range -/// \param sub_last The end of the sub range -/// \param p A predicate to use to compare the values. -/// p ( a, b ) returns a boolean. -/// - template - void partition_subrange ( - Iterator first, Iterator last, - Iterator sub_first, Iterator sub_last, - Pred p) - { - if (sub_first != first) { - (void) std::nth_element(first, sub_first, last, p); - ++sub_first; - } - - if (sub_last != last) - (void) std::nth_element(sub_first, sub_last, last, p); - } - - template - void partition_subrange (Iterator first, Iterator last, Iterator sub_first, Iterator sub_last) - { - typedef typename std::iterator_traits::value_type value_type; - return partition_subrange(first, last, sub_first, sub_last, std::less()); - } - -}} - -#endif // BOOST_ALGORITHM_SORT_SUBRANGE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/string.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string.hpp deleted file mode 100644 index 07715173964..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/case_conv.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/case_conv.hpp deleted file mode 100644 index 683340b8ec8..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/classification.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/classification.hpp deleted file mode 100644 index ca43602d472..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/compare.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/compare.hpp deleted file mode 100644 index 734303a9a99..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/concept.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/concept.hpp deleted file mode 100644 index 17e8349596b..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/config.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/config.hpp deleted file mode 100644 index 559750ac8aa..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/constants.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/constants.hpp deleted file mode 100644 index 6ed70effcae..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/case_conv.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/case_conv.hpp deleted file mode 100644 index 233912ca0f2..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/case_conv.hpp +++ /dev/null @@ -1,127 +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 - { - typedef CharT argument_type; - typedef CharT result_type; - // 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 - { - typedef CharT argument_type; - typedef CharT result_type; - // 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/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/classification.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/classification.hpp deleted file mode 100644 index 704d9d20ff4..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/find_format.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/find_format.hpp deleted file mode 100644 index b39875024cf..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/find_format_all.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/find_format_all.hpp deleted file mode 100644 index 52930c83ad8..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/find_format_store.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/find_format_store.hpp deleted file mode 100644 index b9f4a88d912..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/find_iterator.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/find_iterator.hpp deleted file mode 100644 index 4f90a98fc02..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/finder.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/finder.hpp deleted file mode 100644 index a2a958212de..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/finder_regex.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/finder_regex.hpp deleted file mode 100644 index 9cb01cfaf13..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/finder_regex.hpp +++ /dev/null @@ -1,122 +0,0 @@ -// Boost string_algo library find_regex.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_FINDER_REGEX_DETAIL_HPP -#define BOOST_STRING_FINDER_REGEX_DETAIL_HPP - -#include -#include - -#include -#include -#include - -namespace boost { - namespace algorithm { - namespace detail { - -// regex find functor -----------------------------------------------// - - // regex search result - template - struct regex_search_result : - public iterator_range - { - typedef regex_search_result type; - typedef iterator_range base_type; - typedef BOOST_STRING_TYPENAME base_type::value_type value_type; - typedef BOOST_STRING_TYPENAME base_type::difference_type difference_type; - typedef BOOST_STRING_TYPENAME base_type::const_iterator const_iterator; - typedef BOOST_STRING_TYPENAME base_type::iterator iterator; - typedef boost::match_results match_results_type; - - // Construction - - // Construction from the match result - regex_search_result( const match_results_type& MatchResults ) : - base_type( MatchResults[0].first, MatchResults[0].second ), - m_MatchResults( MatchResults ) {} - - // Construction of empty match. End iterator has to be specified - regex_search_result( IteratorT End ) : - base_type( End, End ) {} - - regex_search_result( const regex_search_result& Other ) : - base_type( Other.begin(), Other.end() ), - m_MatchResults( Other.m_MatchResults ) {} - - // Assignment - regex_search_result& operator=( const regex_search_result& Other ) - { - base_type::operator=( Other ); - m_MatchResults=Other.m_MatchResults; - return *this; - } - - // Match result retrieval - const match_results_type& match_results() const - { - return m_MatchResults; - } - - private: - // Saved match result - match_results_type m_MatchResults; - }; - - // find_regex - /* - Regex based search functor - */ - template - struct find_regexF - { - typedef RegExT regex_type; - typedef const RegExT& regex_reference_type; - - // Construction - find_regexF( regex_reference_type Rx, match_flag_type MatchFlags = match_default ) : - m_Rx(Rx), m_MatchFlags(MatchFlags) {} - - // Operation - template< typename ForwardIteratorT > - regex_search_result - operator()( - ForwardIteratorT Begin, - ForwardIteratorT End ) const - { - typedef ForwardIteratorT input_iterator_type; - typedef regex_search_result result_type; - - // instantiate match result - match_results result; - // search for a match - if ( ::boost::regex_search( Begin, End, result, m_Rx, m_MatchFlags ) ) - { - // construct a result - return result_type( result ); - } - else - { - // empty result - return result_type( End ); - } - } - - private: - regex_reference_type m_Rx; // Regexp - match_flag_type m_MatchFlags; // match flags - }; - - } // namespace detail - } // namespace algorithm -} // namespace boost - -#endif // BOOST_STRING_FIND_DETAIL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/formatter.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/formatter.hpp deleted file mode 100644 index c071822f2ac..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/formatter_regex.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/formatter_regex.hpp deleted file mode 100644 index 5f26407bed8..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/formatter_regex.hpp +++ /dev/null @@ -1,61 +0,0 @@ -// Boost string_algo library formatter_regex.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_REGEX_DETAIL_HPP -#define BOOST_STRING_FORMATTER_REGEX_DETAIL_HPP - -#include -#include -#include -#include - -namespace boost { - namespace algorithm { - namespace detail { - -// regex format functor -----------------------------------------// - - // regex format functor - template - struct regex_formatF - { - private: - typedef StringT result_type; - typedef BOOST_STRING_TYPENAME StringT::value_type char_type; - - public: - // Construction - regex_formatF( const StringT& Fmt, match_flag_type Flags=format_default ) : - m_Fmt(Fmt), m_Flags( Flags ) {} - - template - result_type operator()( - const regex_search_result& Replace ) const - { - if ( Replace.empty() ) - { - return result_type(); - } - else - { - return Replace.match_results().format( m_Fmt, m_Flags ); - } - } - private: - const StringT& m_Fmt; - match_flag_type m_Flags; - }; - - - } // namespace detail - } // namespace algorithm -} // namespace boost - -#endif // BOOST_STRING_FORMATTER_DETAIL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/predicate.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/predicate.hpp deleted file mode 100644 index 5acf3cc6633..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/replace_storage.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/replace_storage.hpp deleted file mode 100644 index db35e4c53be..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/sequence.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/sequence.hpp deleted file mode 100644 index dc47409115f..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/trim.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/trim.hpp deleted file mode 100644 index 1233e49d301..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/util.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/util.hpp deleted file mode 100644 index 7844b6723cc..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/string/detail/util.hpp +++ /dev/null @@ -1,107 +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 - { - typedef iterator_range argument_type; - typedef SeqT result_type; - 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/contrib/libboost/boost_1_65_0/boost/algorithm/string/erase.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/erase.hpp deleted file mode 100644 index 68837909783..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/find.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/find.hpp deleted file mode 100644 index f2c2926b509..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/find_format.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/find_format.hpp deleted file mode 100644 index 0e84a4ee68a..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/find_iterator.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/find_iterator.hpp deleted file mode 100644 index 5a52d92e41b..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/finder.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/finder.hpp deleted file mode 100644 index 93f7ec304a0..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/formatter.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/formatter.hpp deleted file mode 100644 index de8681bc3f5..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/iter_find.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/iter_find.hpp deleted file mode 100644 index 10424abc749..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/join.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/join.hpp deleted file mode 100644 index b871eb44f69..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/predicate.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/predicate.hpp deleted file mode 100644 index 0879829b5a4..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/predicate_facade.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/predicate_facade.hpp deleted file mode 100644 index a9753fc2ae6..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/regex.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/regex.hpp deleted file mode 100644 index a6c7c60ae8d..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/string/regex.hpp +++ /dev/null @@ -1,646 +0,0 @@ -// Boost string_algo library regex.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_REGEX_HPP -#define BOOST_STRING_REGEX_HPP - -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -/*! \file - Defines regex variants of the algorithms. -*/ - -namespace boost { - namespace algorithm { - -// find_regex -----------------------------------------------// - - //! Find regex algorithm - /*! - Search for a substring matching the given regex in the input. - - \param Input A container which will be searched. - \param Rx A regular expression - \param Flags Regex options - \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< - typename RangeT, - typename CharT, - typename RegexTraitsT> - inline iterator_range< - BOOST_STRING_TYPENAME range_iterator::type > - find_regex( - RangeT& Input, - const basic_regex& Rx, - match_flag_type Flags=match_default ) - { - iterator_range::type> lit_input(::boost::as_literal(Input)); - - return ::boost::algorithm::regex_finder(Rx,Flags)( - ::boost::begin(lit_input), ::boost::end(lit_input) ); - } - -// replace_regex --------------------------------------------------------------------// - - //! Replace regex algorithm - /*! - Search for a substring matching given regex and format it with - the specified format. - 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 Rx A regular expression - \param Format Regex format definition - \param Flags Regex options - \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 CharT, - typename RegexTraitsT, - typename FormatStringTraitsT, typename FormatStringAllocatorT > - inline OutputIteratorT replace_regex_copy( - OutputIteratorT Output, - const RangeT& Input, - const basic_regex& Rx, - const std::basic_string& Format, - match_flag_type Flags=match_default | format_default ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::regex_finder( Rx, Flags ), - ::boost::algorithm::regex_formatter( Format, Flags ) ); - } - - //! Replace regex algorithm - /*! - \overload - */ - template< - typename SequenceT, - typename CharT, - typename RegexTraitsT, - typename FormatStringTraitsT, typename FormatStringAllocatorT > - inline SequenceT replace_regex_copy( - const SequenceT& Input, - const basic_regex& Rx, - const std::basic_string& Format, - match_flag_type Flags=match_default | format_default ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::regex_finder( Rx, Flags ), - ::boost::algorithm::regex_formatter( Format, Flags ) ); - } - - //! Replace regex algorithm - /*! - Search for a substring matching given regex and format it with - the specified format. The input string is modified in-place. - - \param Input An input string - \param Rx A regular expression - \param Format Regex format definition - \param Flags Regex options - */ - template< - typename SequenceT, - typename CharT, - typename RegexTraitsT, - typename FormatStringTraitsT, typename FormatStringAllocatorT > - inline void replace_regex( - SequenceT& Input, - const basic_regex& Rx, - const std::basic_string& Format, - match_flag_type Flags=match_default | format_default ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::regex_finder( Rx, Flags ), - ::boost::algorithm::regex_formatter( Format, Flags ) ); - } - -// replace_all_regex --------------------------------------------------------------------// - - //! Replace all regex algorithm - /*! - Format all substrings, matching given regex, with the specified format. - 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 Rx A regular expression - \param Format Regex format definition - \param Flags Regex options - \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 CharT, - typename RegexTraitsT, - typename FormatStringTraitsT, typename FormatStringAllocatorT > - inline OutputIteratorT replace_all_regex_copy( - OutputIteratorT Output, - const RangeT& Input, - const basic_regex& Rx, - const std::basic_string& Format, - match_flag_type Flags=match_default | format_default ) - { - return ::boost::algorithm::find_format_all_copy( - Output, - Input, - ::boost::algorithm::regex_finder( Rx, Flags ), - ::boost::algorithm::regex_formatter( Format, Flags ) ); - } - - //! Replace all regex algorithm - /*! - \overload - */ - template< - typename SequenceT, - typename CharT, - typename RegexTraitsT, - typename FormatStringTraitsT, typename FormatStringAllocatorT > - inline SequenceT replace_all_regex_copy( - const SequenceT& Input, - const basic_regex& Rx, - const std::basic_string& Format, - match_flag_type Flags=match_default | format_default ) - { - return ::boost::algorithm::find_format_all_copy( - Input, - ::boost::algorithm::regex_finder( Rx, Flags ), - ::boost::algorithm::regex_formatter( Format, Flags ) ); - } - - //! Replace all regex algorithm - /*! - Format all substrings, matching given regex, with the specified format. - The input string is modified in-place. - - \param Input An input string - \param Rx A regular expression - \param Format Regex format definition - \param Flags Regex options - */ - template< - typename SequenceT, - typename CharT, - typename RegexTraitsT, - typename FormatStringTraitsT, typename FormatStringAllocatorT > - inline void replace_all_regex( - SequenceT& Input, - const basic_regex& Rx, - const std::basic_string& Format, - match_flag_type Flags=match_default | format_default ) - { - ::boost::algorithm::find_format_all( - Input, - ::boost::algorithm::regex_finder( Rx, Flags ), - ::boost::algorithm::regex_formatter( Format, Flags ) ); - } - -// erase_regex --------------------------------------------------------------------// - - //! Erase regex algorithm - /*! - Remove a substring matching given regex 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 Rx A regular expression - \param Flags Regex options - \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 CharT, - typename RegexTraitsT > - inline OutputIteratorT erase_regex_copy( - OutputIteratorT Output, - const RangeT& Input, - const basic_regex& Rx, - match_flag_type Flags=match_default ) - { - return ::boost::algorithm::find_format_copy( - Output, - Input, - ::boost::algorithm::regex_finder( Rx, Flags ), - ::boost::algorithm::empty_formatter( Input ) ); - } - - //! Erase regex algorithm - /*! - \overload - */ - template< - typename SequenceT, - typename CharT, - typename RegexTraitsT > - inline SequenceT erase_regex_copy( - const SequenceT& Input, - const basic_regex& Rx, - match_flag_type Flags=match_default ) - { - return ::boost::algorithm::find_format_copy( - Input, - ::boost::algorithm::regex_finder( Rx, Flags ), - ::boost::algorithm::empty_formatter( Input ) ); - } - - //! Erase regex algorithm - /*! - Remove a substring matching given regex from the input. - The input string is modified in-place. - - \param Input An input string - \param Rx A regular expression - \param Flags Regex options - */ - template< - typename SequenceT, - typename CharT, - typename RegexTraitsT > - inline void erase_regex( - SequenceT& Input, - const basic_regex& Rx, - match_flag_type Flags=match_default ) - { - ::boost::algorithm::find_format( - Input, - ::boost::algorithm::regex_finder( Rx, Flags ), - ::boost::algorithm::empty_formatter( Input ) ); - } - -// erase_all_regex --------------------------------------------------------------------// - - //! Erase all regex algorithm - /*! - Erase all substrings, matching given regex, 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 Rx A regular expression - \param Flags Regex options - \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 CharT, - typename RegexTraitsT > - inline OutputIteratorT erase_all_regex_copy( - OutputIteratorT Output, - const RangeT& Input, - const basic_regex& Rx, - match_flag_type Flags=match_default ) - { - return ::boost::algorithm::find_format_all_copy( - Output, - Input, - ::boost::algorithm::regex_finder( Rx, Flags ), - ::boost::algorithm::empty_formatter( Input ) ); - } - - //! Erase all regex algorithm - /*! - \overload - */ - template< - typename SequenceT, - typename CharT, - typename RegexTraitsT > - inline SequenceT erase_all_regex_copy( - const SequenceT& Input, - const basic_regex& Rx, - match_flag_type Flags=match_default ) - { - return ::boost::algorithm::find_format_all_copy( - Input, - ::boost::algorithm::regex_finder( Rx, Flags ), - ::boost::algorithm::empty_formatter( Input ) ); - } - - //! Erase all regex algorithm - /*! - Erase all substrings, matching given regex, from the input. - The input string is modified in-place. - - \param Input An input string - \param Rx A regular expression - \param Flags Regex options - */ - template< - typename SequenceT, - typename CharT, - typename RegexTraitsT> - inline void erase_all_regex( - SequenceT& Input, - const basic_regex& Rx, - match_flag_type Flags=match_default ) - { - ::boost::algorithm::find_format_all( - Input, - ::boost::algorithm::regex_finder( Rx, Flags ), - ::boost::algorithm::empty_formatter( Input ) ); - } - -// find_all_regex ------------------------------------------------------------------// - - //! Find all regex algorithm - /*! - This algorithm finds all substrings matching the give regex - 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 Rx A regular expression - \param Flags Regex options - \return A reference to 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 CharT, - typename RegexTraitsT > - inline SequenceSequenceT& find_all_regex( - SequenceSequenceT& Result, - const RangeT& Input, - const basic_regex& Rx, - match_flag_type Flags=match_default ) - { - return ::boost::algorithm::iter_find( - Result, - Input, - ::boost::algorithm::regex_finder(Rx,Flags) ); - } - -// split_regex ------------------------------------------------------------------// - - //! Split regex algorithm - /*! - Tokenize expression. This function is equivalent to C strtok. Input - sequence is split into tokens, separated by separators. Separator - is an every match of the given regex. - 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 Rx A regular expression - \param Flags Regex options - \return A reference to 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 CharT, - typename RegexTraitsT > - inline SequenceSequenceT& split_regex( - SequenceSequenceT& Result, - const RangeT& Input, - const basic_regex& Rx, - match_flag_type Flags=match_default ) - { - return ::boost::algorithm::iter_split( - Result, - Input, - ::boost::algorithm::regex_finder(Rx,Flags) ); - } - -// join_if ------------------------------------------------------------------// - -#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - //! Conditional join algorithm - /*! - This algorithm joins all strings in a 'list' into one long string. - Segments are concatenated by given separator. Only segments that - match the given regular expression will be added to the result - - This is a specialization of join_if algorithm. - - \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 Rx A regular expression - \param Flags Regex options - \return Concatenated string. - - \note This function provides the strong exception-safety guarantee - */ - template< - typename SequenceSequenceT, - typename Range1T, - typename CharT, - typename RegexTraitsT > - inline typename range_value::type - join_if( - const SequenceSequenceT& Input, - const Range1T& Separator, - const basic_regex& Rx, - match_flag_type Flags=match_default ) - { - // 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 && - !::boost::regex_match(::boost::begin(*itBegin), ::boost::end(*itBegin), Rx, Flags)) ++itBegin; - - // Add this element - if(itBegin!=itEnd) - { - detail::insert(Result, ::boost::end(Result), *itBegin); - ++itBegin; - } - - for(;itBegin!=itEnd; ++itBegin) - { - if(::boost::regex_match(::boost::begin(*itBegin), ::boost::end(*itBegin), Rx, Flags)) - { - // Add separator - detail::insert(Result, ::boost::end(Result), ::boost::as_literal(Separator)); - // Add element - detail::insert(Result, ::boost::end(Result), *itBegin); - } - } - - return Result; - } - -#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - //! Conditional join algorithm - /*! - This algorithm joins all strings in a 'list' into one long string. - Segments are concatenated by given separator. Only segments that - match the given regular expression will be added to the result - - This is a specialization of join_if algorithm. - - \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 Rx A regular expression - \param Flags Regex options - \return Concatenated string. - - \note This function provides the strong exception-safety guarantee - */ - template< - typename SequenceSequenceT, - typename Range1T, - typename CharT, - typename RegexTraitsT > - inline typename range_value::type - join_if_regex( - const SequenceSequenceT& Input, - const Range1T& Separator, - const basic_regex& Rx, - match_flag_type Flags=match_default ) - { - // 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 && - !::boost::regex_match(::boost::begin(*itBegin), ::boost::end(*itBegin), Rx, Flags)) ++itBegin; - - // Add this element - if(itBegin!=itEnd) - { - detail::insert(Result, ::boost::end(Result), *itBegin); - ++itBegin; - } - - for(;itBegin!=itEnd; ++itBegin) - { - if(::boost::regex_match(::boost::begin(*itBegin), ::boost::end(*itBegin), Rx, Flags)) - { - // Add separator - detail::insert(Result, ::boost::end(Result), ::boost::as_literal(Separator)); - // Add element - detail::insert(Result, ::boost::end(Result), *itBegin); - } - } - - return Result; - } - - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - } // namespace algorithm - - // pull names into the boost namespace - using algorithm::find_regex; - using algorithm::replace_regex; - using algorithm::replace_regex_copy; - using algorithm::replace_all_regex; - using algorithm::replace_all_regex_copy; - using algorithm::erase_regex; - using algorithm::erase_regex_copy; - using algorithm::erase_all_regex; - using algorithm::erase_all_regex_copy; - using algorithm::find_all_regex; - using algorithm::split_regex; - -#ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - using algorithm::join_if; -#else // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - using algorithm::join_if_regex; -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -} // namespace boost - - -#endif // BOOST_STRING_REGEX_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/string/regex_find_format.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/regex_find_format.hpp deleted file mode 100644 index 409afc2ba0c..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/string/regex_find_format.hpp +++ /dev/null @@ -1,90 +0,0 @@ -// Boost string_algo library regex_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_REGEX_FIND_FORMAT_HPP -#define BOOST_STRING_REGEX_FIND_FORMAT_HPP - -#include -#include -#include -#include - -/*! \file - Defines the \c regex_finder and \c regex_formatter generators. These two functors - are designed to work together. \c regex_formatter uses additional information - about a match contained in the regex_finder search result. -*/ - -namespace boost { - namespace algorithm { - -// regex_finder -----------------------------------------------// - - //! "Regex" finder - /*! - Construct the \c regex_finder. Finder uses the regex engine to search - for a match. - Result is given in \c regex_search_result. This is an extension - of the iterator_range. In addition it contains match results - from the \c regex_search algorithm. - - \param Rx A regular expression - \param MatchFlags Regex search options - \return An instance of the \c regex_finder object - */ - template< - typename CharT, - typename RegexTraitsT> - inline detail::find_regexF< basic_regex > - regex_finder( - const basic_regex& Rx, - match_flag_type MatchFlags=match_default ) - { - return detail:: - find_regexF< - basic_regex >( Rx, MatchFlags ); - } - -// regex_formater ---------------------------------------------// - - //! Regex formatter - /*! - Construct the \c regex_formatter. Regex formatter uses the regex engine to - format a match found by the \c regex_finder. - This formatted it designed to closely cooperate with \c regex_finder. - - \param Format Regex format definition - \param Flags Format flags - \return An instance of the \c regex_formatter functor - */ - template< - typename CharT, - typename TraitsT, typename AllocT > - inline detail::regex_formatF< std::basic_string< CharT, TraitsT, AllocT > > - regex_formatter( - const std::basic_string& Format, - match_flag_type Flags=format_default ) - { - return - detail::regex_formatF< std::basic_string >( - Format, - Flags ); - } - - } // namespace algorithm - - // pull the names to the boost namespace - using algorithm::regex_finder; - using algorithm::regex_formatter; - -} // namespace boost - - -#endif // BOOST_STRING_REGEX_FIND_FORMAT_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/string/replace.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/replace.hpp deleted file mode 100644 index 2adb031c59a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/string/replace.hpp +++ /dev/null @@ -1,926 +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 - */ - 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 - */ - 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/contrib/libboost/boost_1_65_0/boost/algorithm/string/sequence_traits.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/sequence_traits.hpp deleted file mode 100644 index be151f8d3d2..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/split.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/split.hpp deleted file mode 100644 index cae712c07fa..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/std/list_traits.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/std/list_traits.hpp deleted file mode 100644 index a3cf7bb18c5..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/std/rope_traits.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/std/rope_traits.hpp deleted file mode 100644 index 637059a5504..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/string/std/rope_traits.hpp +++ /dev/null @@ -1,81 +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_ROPE_TRAITS_HPP -#define BOOST_STRING_STD_ROPE_TRAITS_HPP - -#include -#include -#include - -namespace boost { - namespace algorithm { - -// SGI's std::rope<> traits -----------------------------------------------// - - - // native replace trait - template - class has_native_replace< std::rope > - { - public: -#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - enum { value = true }; -#else - BOOST_STATIC_CONSTANT(bool, value=true); -#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - typedef mpl::bool_ type; - }; - - // stable iterators trait - template - class has_stable_iterators< std::rope > - { - public: -#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - enum { value = true }; -#else - BOOST_STATIC_CONSTANT(bool, value=true); -#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - typedef mpl::bool_ type; - }; - - // const time insert trait - template - class has_const_time_insert< std::rope > - { - public: -#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - enum { value = true }; -#else - BOOST_STATIC_CONSTANT(bool, value=true); -#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - typedef mpl::bool_ type; - }; - - // const time erase trait - template - class has_const_time_erase< std::rope > - { - public: -#if BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - enum { value = true }; -#else - BOOST_STATIC_CONSTANT(bool, value=true); -#endif // BOOST_WORKAROUND( __IBMCPP__, <= 600 ) - typedef mpl::bool_ type; - }; - - - } // namespace algorithm -} // namespace boost - - -#endif // BOOST_STRING_ROPE_TRAITS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/string/std/slist_traits.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/std/slist_traits.hpp deleted file mode 100644 index c30b93c73ad..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/std/string_traits.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/std/string_traits.hpp deleted file mode 100644 index c9408307d33..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/std_containers_traits.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/std_containers_traits.hpp deleted file mode 100644 index 3f02246fda5..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/trim.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/trim.hpp deleted file mode 100644 index e740d57d933..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string/trim_all.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/trim_all.hpp deleted file mode 100644 index a616f7f33ea..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/string/trim_all.hpp +++ /dev/null @@ -1,217 +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_ALL_HPP -#define BOOST_STRING_TRIM_ALL_HPP - -#include - -#include -#include -#include -#include -#include -#include - -/*! \file - Defines trim_all algorithms. - - Just like \c trim, \c trim_all removes all trailing and leading spaces from a - sequence (string). In addition, spaces in the middle of the sequence are truncated - to just one character. Space is recognized using given locales. - - \c trim_fill acts as trim_all, but the spaces in the middle are replaces with - a user-define sequence of character. - - 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 { - - // multi line trim ----------------------------------------------- // - - //! Trim All - parametric - /*! - Remove all leading and trailing spaces from the input and - compress all other spaces to a single character. - The result is a trimmed copy of the input - - \param Input An input sequence - \param IsSpace A unary predicate identifying spaces - \return A trimmed copy of the input - */ - template - inline SequenceT trim_all_copy_if(const SequenceT& Input, PredicateT IsSpace) - { - return - ::boost::find_format_all_copy( - ::boost::trim_copy_if(Input, IsSpace), - ::boost::token_finder(IsSpace, ::boost::token_compress_on), - ::boost::dissect_formatter(::boost::head_finder(1))); - } - - - //! Trim All - /*! - Remove all leading and trailing spaces from the input and - compress all other spaces to a single character. - The input sequence is modified in-place. - - \param Input An input sequence - \param IsSpace A unary predicate identifying spaces - */ - template - inline void trim_all_if(SequenceT& Input, PredicateT IsSpace) - { - ::boost::trim_if(Input, IsSpace); - ::boost::find_format_all( - Input, - ::boost::token_finder(IsSpace, ::boost::token_compress_on), - ::boost::dissect_formatter(::boost::head_finder(1))); - } - - - //! Trim All - /*! - Remove all leading and trailing spaces from the input and - compress all other spaces to a single character. - 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 - */ - template - inline SequenceT trim_all_copy(const SequenceT& Input, const std::locale& Loc =std::locale()) - { - return trim_all_copy_if(Input, ::boost::is_space(Loc)); - } - - - //! Trim All - /*! - Remove all leading and trailing spaces from the input and - compress all other spaces to a single character. - The input sequence is modified in-place. - - \param Input An input sequence - \param Loc A locale used for 'space' classification - \return A trimmed copy of the input - */ - template - inline void trim_all(SequenceT& Input, const std::locale& Loc =std::locale()) - { - trim_all_if(Input, ::boost::is_space(Loc)); - } - - - //! Trim Fill - parametric - /*! - Remove all leading and trailing spaces from the input and - replace all every block of consecutive spaces with a fill string - defined by user. - The result is a trimmed copy of the input - - \param Input An input sequence - \param Fill A string used to fill the inner spaces - \param IsSpace A unary predicate identifying spaces - \return A trimmed copy of the input - */ - template - inline SequenceT trim_fill_copy_if(const SequenceT& Input, const RangeT& Fill, PredicateT IsSpace) - { - return - ::boost::find_format_all_copy( - ::boost::trim_copy_if(Input, IsSpace), - ::boost::token_finder(IsSpace, ::boost::token_compress_on), - ::boost::const_formatter(::boost::as_literal(Fill))); - } - - - //! Trim Fill - /*! - Remove all leading and trailing spaces from the input and - replace all every block of consecutive spaces with a fill string - defined by user. - The input sequence is modified in-place. - - \param Input An input sequence - \param Fill A string used to fill the inner spaces - \param IsSpace A unary predicate identifying spaces - */ - template - inline void trim_fill_if(SequenceT& Input, const RangeT& Fill, PredicateT IsSpace) - { - ::boost::trim_if(Input, IsSpace); - ::boost::find_format_all( - Input, - ::boost::token_finder(IsSpace, ::boost::token_compress_on), - ::boost::const_formatter(::boost::as_literal(Fill))); - } - - - //! Trim Fill - /*! - Remove all leading and trailing spaces from the input and - replace all every block of consecutive spaces with a fill string - defined by user. - The result is a trimmed copy of the input - - \param Input An input sequence - \param Fill A string used to fill the inner spaces - \param Loc A locale used for 'space' classification - \return A trimmed copy of the input - */ - template - inline SequenceT trim_fill_copy(const SequenceT& Input, const RangeT& Fill, const std::locale& Loc =std::locale()) - { - return trim_fill_copy_if(Input, Fill, ::boost::is_space(Loc)); - } - - - //! Trim Fill - /*! - Remove all leading and trailing spaces from the input and - replace all every block of consecutive spaces with a fill string - defined by user. - The input sequence is modified in-place. - - \param Input An input sequence - \param Fill A string used to fill the inner spaces - \param Loc A locale used for 'space' classification - \return A trimmed copy of the input - */ - template - inline void trim_fill(SequenceT& Input, const RangeT& Fill, const std::locale& Loc =std::locale()) - { - trim_fill_if(Input, Fill, ::boost::is_space(Loc)); - } - - - } // namespace algorithm - - // pull names to the boost namespace - using algorithm::trim_all; - using algorithm::trim_all_if; - using algorithm::trim_all_copy; - using algorithm::trim_all_copy_if; - using algorithm::trim_fill; - using algorithm::trim_fill_if; - using algorithm::trim_fill_copy; - using algorithm::trim_fill_copy_if; - -} // namespace boost - -#endif // BOOST_STRING_TRIM_ALL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/algorithm/string/yes_no_type.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string/yes_no_type.hpp deleted file mode 100644 index b76cc6c155c..00000000000 --- a/contrib/libboost/boost_1_65_0/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/contrib/libboost/boost_1_65_0/boost/algorithm/string_regex.hpp b/contrib/libboost/boost_1_65_0/boost/algorithm/string_regex.hpp deleted file mode 100644 index 791aa18481c..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/algorithm/string_regex.hpp +++ /dev/null @@ -1,23 +0,0 @@ -// Boost string_algo library string_regex.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_REGEX_HPP -#define BOOST_STRING_ALGO_REGEX_HPP - -/*! \file - Cumulative include for string_algo library. - In addition to string.hpp contains also regex-related stuff. -*/ - -#include -#include -#include - -#endif // BOOST_STRING_ALGO_REGEX_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/align/align.hpp b/contrib/libboost/boost_1_65_0/boost/align/align.hpp deleted file mode 100644 index ee4371091cb..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/align.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 2014-2015 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_ALIGN_ALIGN_HPP -#define BOOST_ALIGN_ALIGN_HPP - -#include - -#if !defined(BOOST_NO_CXX11_STD_ALIGN) -#include -#else -#include -#endif - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/align_down.hpp b/contrib/libboost/boost_1_65_0/boost/align/align_down.hpp deleted file mode 100644 index 355844f8aa2..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/align_down.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2015 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_ALIGN_ALIGN_DOWN_HPP -#define BOOST_ALIGN_ALIGN_DOWN_HPP - -#include - -namespace boost { -namespace alignment { - -BOOST_CONSTEXPR inline std::size_t -align_down(std::size_t value, std::size_t alignment) BOOST_NOEXCEPT -{ - return value & ~(alignment - 1); -} - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/align_up.hpp b/contrib/libboost/boost_1_65_0/boost/align/align_up.hpp deleted file mode 100644 index 6401ea848a6..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/align_up.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2015 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_ALIGN_ALIGN_UP_HPP -#define BOOST_ALIGN_ALIGN_UP_HPP - -#include - -namespace boost { -namespace alignment { - -BOOST_CONSTEXPR inline std::size_t -align_up(std::size_t value, std::size_t alignment) BOOST_NOEXCEPT -{ - return (value + alignment - 1) & ~(alignment - 1); -} - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/aligned_alloc.hpp b/contrib/libboost/boost_1_65_0/boost/align/aligned_alloc.hpp deleted file mode 100644 index 42128f1b24a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/aligned_alloc.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2014-2015 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_ALIGN_ALIGNED_ALLOC_HPP -#define BOOST_ALIGN_ALIGNED_ALLOC_HPP - -#include - -#if defined(BOOST_HAS_UNISTD_H) -#include -#endif - -#if defined(__APPLE__) || defined(__APPLE_CC__) || defined(macintosh) -#include -#endif - -#if defined(BOOST_ALIGN_USE_ALLOCATE) -#include -#elif defined(_MSC_VER) && !defined(UNDER_CE) -#include -#elif defined(__MINGW32__) && (__MSVCRT_VERSION__ >= 0x0700) -#include -#elif MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 -#include -#elif MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 -#include -#elif defined(__ANDROID__) -#include -#elif defined(__SunOS_5_11) || defined(__SunOS_5_12) -#include -#elif defined(sun) || defined(__sun) -#include -#elif (_POSIX_C_SOURCE >= 200112L) || (_XOPEN_SOURCE >= 600) -#include -#else -#include -#endif - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/aligned_allocator.hpp b/contrib/libboost/boost_1_65_0/boost/align/aligned_allocator.hpp deleted file mode 100644 index 6176bc27c0e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/aligned_allocator.hpp +++ /dev/null @@ -1,158 +0,0 @@ -/* -Copyright 2014-2015 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_ALIGN_ALIGNED_ALLOCATOR_HPP -#define BOOST_ALIGN_ALIGNED_ALLOCATOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) -#include -#endif - -namespace boost { -namespace alignment { - -template -class aligned_allocator { - BOOST_STATIC_ASSERT(detail::is_alignment_constant::value); - -public: - typedef T value_type; - typedef T* pointer; - typedef const T* const_pointer; - typedef void* void_pointer; - typedef const void* const_void_pointer; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef T& reference; - typedef const T& const_reference; - -private: - enum { - min_align = detail::max_size::value>::value - }; - -public: - template - struct rebind { - typedef aligned_allocator other; - }; - -#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) - aligned_allocator() = default; -#else - aligned_allocator() BOOST_NOEXCEPT { } -#endif - - template - aligned_allocator(const aligned_allocator&) - BOOST_NOEXCEPT { } - - pointer address(reference value) const BOOST_NOEXCEPT { - return detail::addressof(value); - } - - const_pointer address(const_reference value) const BOOST_NOEXCEPT { - return detail::addressof(value); - } - - pointer allocate(size_type size, const_void_pointer = 0) { - if (size == 0) { - return 0; - } - void* p = aligned_alloc(min_align, sizeof(T) * size); - if (!p) { - boost::throw_exception(std::bad_alloc()); - } - return static_cast(p); - } - - void deallocate(pointer ptr, size_type) { - boost::alignment::aligned_free(ptr); - } - - BOOST_CONSTEXPR size_type max_size() const BOOST_NOEXCEPT { - return detail::max_objects::value; - } - -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - template - void construct(U* ptr, Args&&... args) { - ::new((void*)ptr) U(std::forward(args)...); - } -#else - template - void construct(U* ptr, V&& value) { - ::new((void*)ptr) U(std::forward(value)); - } -#endif -#else - template - void construct(U* ptr, const V& value) { - ::new((void*)ptr) U(value); - } -#endif - - template - void construct(U* ptr) { - ::new((void*)ptr) U(); - } - - template - void destroy(U* ptr) { - (void)ptr; - ptr->~U(); - } -}; - -template -class aligned_allocator { - BOOST_STATIC_ASSERT(detail::is_alignment_constant::value); - -public: - typedef void value_type; - typedef void* pointer; - typedef const void* const_pointer; - - template - struct rebind { - typedef aligned_allocator other; - }; -}; - -template -inline bool -operator==(const aligned_allocator&, - const aligned_allocator&) BOOST_NOEXCEPT -{ - return true; -} - -template -inline bool -operator!=(const aligned_allocator&, - const aligned_allocator&) BOOST_NOEXCEPT -{ - return false; -} - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/aligned_allocator_adaptor.hpp b/contrib/libboost/boost_1_65_0/boost/align/aligned_allocator_adaptor.hpp deleted file mode 100644 index c9fae1cf202..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/aligned_allocator_adaptor.hpp +++ /dev/null @@ -1,162 +0,0 @@ -/* -Copyright 2014-2016 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_ALIGN_ALIGNED_ALLOCATOR_ADAPTOR_HPP -#define BOOST_ALIGN_ALIGNED_ALLOCATOR_ADAPTOR_HPP - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if !defined(BOOST_NO_CXX11_ALLOCATOR) -#include -#endif - -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) -#include -#endif - -namespace boost { -namespace alignment { - -template -class aligned_allocator_adaptor - : public Allocator { - BOOST_STATIC_ASSERT(detail::is_alignment_constant::value); - -#if !defined(BOOST_NO_CXX11_ALLOCATOR) - typedef std::allocator_traits traits; - typedef typename traits::template rebind_alloc char_alloc; - typedef typename traits::template rebind_traits char_traits; - typedef typename char_traits::pointer char_ptr; -#else - typedef typename Allocator::template rebind::other char_alloc; - typedef typename char_alloc::pointer char_ptr; -#endif - -public: - typedef typename Allocator::value_type value_type; - typedef value_type* pointer; - typedef const value_type* const_pointer; - typedef void* void_pointer; - typedef const void* const_void_pointer; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - -private: - enum { - min_align = detail::max_size::value>::value - }; - -public: - template - struct rebind { -#if !defined(BOOST_NO_CXX11_ALLOCATOR) - typedef aligned_allocator_adaptor, Alignment> other; -#else - typedef aligned_allocator_adaptor::other, Alignment> other; -#endif - }; - -#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) - aligned_allocator_adaptor() = default; -#else - aligned_allocator_adaptor() - : Allocator() { } -#endif - -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) - template - explicit aligned_allocator_adaptor(A&& alloc) BOOST_NOEXCEPT - : Allocator(std::forward(alloc)) { } -#else - template - explicit aligned_allocator_adaptor(const A& alloc) BOOST_NOEXCEPT - : Allocator(alloc) { } -#endif - - template - aligned_allocator_adaptor(const aligned_allocator_adaptor& other) BOOST_NOEXCEPT - : Allocator(other.base()) { } - - Allocator& base() BOOST_NOEXCEPT { - return static_cast(*this); - } - - const Allocator& base() const BOOST_NOEXCEPT { - return static_cast(*this); - } - - pointer allocate(size_type size) { - std::size_t s = size * sizeof(value_type); - std::size_t n = s + min_align - 1; - char_alloc a(base()); - char_ptr p = a.allocate(sizeof p + n); - void* r = boost::pointer_traits::to_address(p) + sizeof p; - (void)align(min_align, s, r, n); - ::new(static_cast(static_cast(r) - 1)) char_ptr(p); - return static_cast(r); - } - - pointer allocate(size_type size, const_void_pointer hint) { - std::size_t s = size * sizeof(value_type); - std::size_t n = s + min_align - 1; - char_ptr h = char_ptr(); - if (hint) { - h = *(static_cast(hint) - 1); - } - char_alloc a(base()); -#if !defined(BOOST_NO_CXX11_ALLOCATOR) - char_ptr p = char_traits::allocate(a, sizeof p + n, h); -#else - char_ptr p = a.allocate(sizeof p + n, h); -#endif - void* r = boost::pointer_traits::to_address(p) + sizeof p; - (void)align(min_align, s, r, n); - ::new(static_cast(static_cast(r) - 1)) char_ptr(p); - return static_cast(r); - } - - void deallocate(pointer ptr, size_type size) { - char_ptr* p = reinterpret_cast(ptr) - 1; - char_ptr r = *p; - p->~char_ptr(); - char_alloc a(base()); - a.deallocate(r, sizeof r + size * sizeof(value_type) + min_align - 1); - } -}; - -template -inline bool -operator==(const aligned_allocator_adaptor& a, - const aligned_allocator_adaptor& b) BOOST_NOEXCEPT -{ - return a.base() == b.base(); -} - -template -inline bool -operator!=(const aligned_allocator_adaptor& a, - const aligned_allocator_adaptor& b) BOOST_NOEXCEPT -{ - return !(a == b); -} - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/aligned_allocator_adaptor_forward.hpp b/contrib/libboost/boost_1_65_0/boost/align/aligned_allocator_adaptor_forward.hpp deleted file mode 100644 index f762cd1c3ab..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/aligned_allocator_adaptor_forward.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2014 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_ALIGN_ALIGNED_ALLOCATOR_ADAPTOR_FORWARD_HPP -#define BOOST_ALIGN_ALIGNED_ALLOCATOR_ADAPTOR_FORWARD_HPP - -#include - -namespace boost { -namespace alignment { - -template -class aligned_allocator_adaptor; - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/aligned_allocator_forward.hpp b/contrib/libboost/boost_1_65_0/boost/align/aligned_allocator_forward.hpp deleted file mode 100644 index 23add71aaac..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/aligned_allocator_forward.hpp +++ /dev/null @@ -1,22 +0,0 @@ -/* -Copyright 2014 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_ALIGN_ALIGNED_ALLOCATOR_FORWARD_HPP -#define BOOST_ALIGN_ALIGNED_ALLOCATOR_FORWARD_HPP - -#include - -namespace boost { -namespace alignment { - -template -class aligned_allocator; - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/aligned_delete.hpp b/contrib/libboost/boost_1_65_0/boost/align/aligned_delete.hpp deleted file mode 100644 index 385bd557af9..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/aligned_delete.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright 2014-2015 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_ALIGN_ALIGNED_DELETE_HPP -#define BOOST_ALIGN_ALIGNED_DELETE_HPP - -#include -#include - -namespace boost { -namespace alignment { - -struct aligned_delete { - template - void operator()(T* ptr) const - BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT_EXPR(ptr->~T())) { - if (ptr) { - ptr->~T(); - boost::alignment::aligned_free(ptr); - } - } -}; - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/aligned_delete_forward.hpp b/contrib/libboost/boost_1_65_0/boost/align/aligned_delete_forward.hpp deleted file mode 100644 index d5b766d7f0a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/aligned_delete_forward.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 2014-2015 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_ALIGN_ALIGNED_DELETE_FORWARD_HPP -#define BOOST_ALIGN_ALIGNED_DELETE_FORWARD_HPP - -namespace boost { -namespace alignment { - -struct aligned_delete; - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/alignment_of.hpp b/contrib/libboost/boost_1_65_0/boost/align/alignment_of.hpp deleted file mode 100644 index 488df0b9e0e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/alignment_of.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2014-2016 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_ALIGN_ALIGNMENT_OF_HPP -#define BOOST_ALIGN_ALIGNMENT_OF_HPP - -#include -#include - -#if defined(BOOST_MSVC) -#include -#elif defined(__GNUC__) && defined(__unix__) && !defined(__LP64__) -#include -#elif defined(BOOST_CLANG) && !defined(__x86_64__) -#include -#elif !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) -#include -#elif defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600) -#include -#elif defined(__CODEGEARC__) -#include -#elif defined(BOOST_CLANG) -#include -#elif __GNUC__ > 4 -#include -#elif (__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) -#include -#else -#include -#endif - -namespace boost { -namespace alignment { - -template -struct alignment_of - : detail::alignment_of::type>::type { }; - -#if !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES) -template -constexpr std::size_t alignment_of_v = alignment_of::value; -#endif - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/alignment_of_forward.hpp b/contrib/libboost/boost_1_65_0/boost/align/alignment_of_forward.hpp deleted file mode 100644 index 31db15f23c6..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/alignment_of_forward.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2014 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_ALIGN_ALIGNMENT_OF_FORWARD_HPP -#define BOOST_ALIGN_ALIGNMENT_OF_FORWARD_HPP - -namespace boost { -namespace alignment { - -template -struct alignment_of; - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/assume_aligned.hpp b/contrib/libboost/boost_1_65_0/boost/align/assume_aligned.hpp deleted file mode 100644 index 22e5103654e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/assume_aligned.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2015 NumScale SAS -Copyright 2015 LRI UMR 8623 CNRS/University Paris Sud XI - -Copyright 2015 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_ALIGN_ASSUME_ALIGNED_HPP -#define BOOST_ALIGN_ASSUME_ALIGNED_HPP - -#include - -#if defined(BOOST_MSVC) -#include -#elif defined(BOOST_CLANG) && defined(__has_builtin) -#include -#elif BOOST_GCC_VERSION >= 40700 -#include -#elif defined(__INTEL_COMPILER) -#include -#else -#include -#endif - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/addressof.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/addressof.hpp deleted file mode 100644 index a314830bed7..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/addressof.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2014 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_ALIGN_DETAIL_ADDRESSOF_HPP -#define BOOST_ALIGN_DETAIL_ADDRESSOF_HPP - -#include - -#if !defined(BOOST_NO_CXX11_ADDRESSOF) -#include -#else -#include -#endif - -namespace boost { -namespace alignment { -namespace detail { - -#if !defined(BOOST_NO_CXX11_ADDRESSOF) -using std::addressof; -#else -using boost::addressof; -#endif - -} /* detail */ -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/align.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/align.hpp deleted file mode 100644 index 905940ad77a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/align.hpp +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2014-2016 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_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(~(alignment - 1) & - (reinterpret_cast(ptr) + alignment - 1)); - std::size_t n = space - (p - static_cast(ptr)); - if (size <= n) { - ptr = p; - space = n; - return p; - } - } - return 0; -} - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/align_cxx11.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/align_cxx11.hpp deleted file mode 100644 index 637541ab408..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/align_cxx11.hpp +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright 2014 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_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/contrib/libboost/boost_1_65_0/boost/align/detail/align_down.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/align_down.hpp deleted file mode 100644 index de3c80d06d3..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/align_down.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2015 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_ALIGN_DETAIL_ALIGN_DOWN_HPP -#define BOOST_ALIGN_DETAIL_ALIGN_DOWN_HPP - -#include -#include - -namespace boost { -namespace alignment { - -inline void* -align_down(void* ptr, std::size_t alignment) BOOST_NOEXCEPT -{ - BOOST_ASSERT(detail::is_alignment(alignment)); - return reinterpret_cast(~(alignment - 1) & - reinterpret_cast(ptr)); -} - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/align_up.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/align_up.hpp deleted file mode 100644 index ac11f8964fb..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/align_up.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2015 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_ALIGN_DETAIL_ALIGN_UP_HPP -#define BOOST_ALIGN_DETAIL_ALIGN_UP_HPP - -#include -#include - -namespace boost { -namespace alignment { - -inline void* -align_up(void* ptr, std::size_t alignment) BOOST_NOEXCEPT -{ - BOOST_ASSERT(detail::is_alignment(alignment)); - return reinterpret_cast(~(alignment - 1) & - (reinterpret_cast(ptr) + alignment - 1)); -} - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc.hpp deleted file mode 100644 index 69da19659a6..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc.hpp +++ /dev/null @@ -1,52 +0,0 @@ -/* -Copyright 2014-2015 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_ALIGN_DETAIL_ALIGNED_ALLOC_HPP -#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_HPP - -#include -#include -#include -#include -#include - -namespace boost { -namespace alignment { - -inline void* -aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT -{ - BOOST_ASSERT(detail::is_alignment(alignment)); - enum { - N = alignment_of::value - }; - if (alignment < N) { - alignment = N; - } - std::size_t n = size + alignment - N; - void* p = std::malloc(sizeof(void*) + n); - if (p) { - void* r = static_cast(p) + sizeof(void*); - (void)align(alignment, size, r, n); - *(static_cast(r) - 1) = p; - p = r; - } - return p; -} - -inline void -aligned_free(void* ptr) BOOST_NOEXCEPT -{ - if (ptr) { - std::free(*(static_cast(ptr) - 1)); - } -} - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc_android.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc_android.hpp deleted file mode 100644 index 4119fbd9bce..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc_android.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2014 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_ALIGN_DETAIL_ALIGNED_ALLOC_ANDROID_HPP -#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_ANDROID_HPP - -#include -#include -#include - -namespace boost { -namespace alignment { - -inline void* -aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT -{ - BOOST_ASSERT(detail::is_alignment(alignment)); - return ::memalign(alignment, size); -} - -inline void -aligned_free(void* ptr) BOOST_NOEXCEPT -{ - ::free(ptr); -} - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc_macos.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc_macos.hpp deleted file mode 100644 index 76366fa5c10..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc_macos.hpp +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2014 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_ALIGN_DETAIL_ALIGNED_ALLOC_MACOS_HPP -#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MACOS_HPP - -#include -#include -#include - -namespace boost { -namespace alignment { - -inline void* -aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT -{ - BOOST_ASSERT(detail::is_alignment(alignment)); - if (size == 0) { - return 0; - } - if (alignment < sizeof(void*)) { - alignment = sizeof(void*); - } - void* p; - if (::posix_memalign(&p, alignment, size) != 0) { - p = 0; - } - return p; -} - -inline void -aligned_free(void* ptr) BOOST_NOEXCEPT -{ - ::free(ptr); -} - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc_msvc.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc_msvc.hpp deleted file mode 100644 index 45c57c99151..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc_msvc.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2014 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_ALIGN_DETAIL_ALIGNED_ALLOC_MSVC_HPP -#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_MSVC_HPP - -#include -#include -#include - -namespace boost { -namespace alignment { - -inline void* -aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT -{ - BOOST_ASSERT(detail::is_alignment(alignment)); - return ::_aligned_malloc(size, alignment); -} - -inline void -aligned_free(void* ptr) BOOST_NOEXCEPT -{ - ::_aligned_free(ptr); -} - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc_posix.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc_posix.hpp deleted file mode 100644 index 78fc842d205..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc_posix.hpp +++ /dev/null @@ -1,41 +0,0 @@ -/* -Copyright 2014 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_ALIGN_DETAIL_ALIGNED_ALLOC_POSIX_HPP -#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_POSIX_HPP - -#include -#include -#include - -namespace boost { -namespace alignment { - -inline void* -aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT -{ - BOOST_ASSERT(detail::is_alignment(alignment)); - if (alignment < sizeof(void*)) { - alignment = sizeof(void*); - } - void* p; - if (::posix_memalign(&p, alignment, size) != 0) { - p = 0; - } - return p; -} - -inline void -aligned_free(void* ptr) BOOST_NOEXCEPT -{ - ::free(ptr); -} - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc_sunos.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc_sunos.hpp deleted file mode 100644 index 0948b40e392..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/aligned_alloc_sunos.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2014 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_ALIGN_DETAIL_ALIGNED_ALLOC_SUNOS_HPP -#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_SUNOS_HPP - -#include -#include -#include - -namespace boost { -namespace alignment { - -inline void* -aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT -{ - BOOST_ASSERT(detail::is_alignment(alignment)); - return ::memalign(alignment, size); -} - -inline void -aligned_free(void* ptr) BOOST_NOEXCEPT -{ - ::free(ptr); -} - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of.hpp deleted file mode 100644 index b6fc3dcdcf7..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/* -Copyright 2014-2015 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_ALIGN_DETAIL_ALIGNMENT_OF_HPP -#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_HPP - -#include - -namespace boost { -namespace alignment { -namespace detail { - -template -struct offset_value { - char value; - T object; -}; - -template -struct alignment_of - : min_size) - sizeof(T)> { }; - -} /* detail */ -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of_clang.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of_clang.hpp deleted file mode 100644 index 95773e5ea31..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of_clang.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2014 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_ALIGN_DETAIL_ALIGNMENT_OF_CLANG_HPP -#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CLANG_HPP - -#include -#include - -namespace boost { -namespace alignment { -namespace detail { - -template -struct alignment_of - : integral_constant { }; - -} /* detail */ -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of_codegear.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of_codegear.hpp deleted file mode 100644 index ea6f9042423..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of_codegear.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2014 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_ALIGN_DETAIL_ALIGNMENT_OF_CODEGEAR_HPP -#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CODEGEAR_HPP - -#include -#include - -namespace boost { -namespace alignment { -namespace detail { - -template -struct alignment_of - : integral_constant { }; - -} /* detail */ -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of_cxx11.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of_cxx11.hpp deleted file mode 100644 index 05c7429385c..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of_cxx11.hpp +++ /dev/null @@ -1,23 +0,0 @@ -/* -Copyright 2014 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_ALIGN_DETAIL_ALIGNMENT_OF_CXX11_HPP -#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_CXX11_HPP - -#include - -namespace boost { -namespace alignment { -namespace detail { - -using std::alignment_of; - -} /* detail */ -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of_gcc.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of_gcc.hpp deleted file mode 100644 index 66a63a50b12..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of_gcc.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2014 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_ALIGN_DETAIL_ALIGNMENT_OF_GCC_HPP -#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_GCC_HPP - -#include -#include - -namespace boost { -namespace alignment { -namespace detail { - -template -struct alignment_of - : integral_constant { }; - -} /* detail */ -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of_msvc.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of_msvc.hpp deleted file mode 100644 index 440b840db45..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/alignment_of_msvc.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/* -Copyright 2014-2015 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_ALIGN_DETAIL_ALIGNMENT_OF_MSVC_HPP -#define BOOST_ALIGN_DETAIL_ALIGNMENT_OF_MSVC_HPP - -#include - -namespace boost { -namespace alignment { -namespace detail { - -template -struct offset_value { - T first; - char value; - T second; -}; - -template -struct alignment_of - : min_size) - (sizeof(T) << 1)> { }; - -} /* detail */ -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/assume_aligned.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/assume_aligned.hpp deleted file mode 100644 index d218d8c64ed..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/assume_aligned.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/* -Copyright 2015 NumScale SAS -Copyright 2015 LRI UMR 8623 CNRS/University Paris Sud XI - -Copyright 2015 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_ALIGN_DETAIL_ASSUME_ALIGNED_HPP -#define BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_HPP - -#define BOOST_ALIGN_ASSUME_ALIGNED(ptr, alignment) - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/assume_aligned_clang.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/assume_aligned_clang.hpp deleted file mode 100644 index 4c7159fa28e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/assume_aligned_clang.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright 2015 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_ALIGN_DETAIL_ASSUME_ALIGNED_CLANG_HPP -#define BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_CLANG_HPP - -#if __has_builtin(__builtin_assume_aligned) -#define BOOST_ALIGN_ASSUME_ALIGNED(p, n) \ -(p) = static_cast<__typeof__(p)>(__builtin_assume_aligned((p), (n))) -#else -#define BOOST_ALIGN_ASSUME_ALIGNED(p, n) -#endif - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/assume_aligned_gcc.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/assume_aligned_gcc.hpp deleted file mode 100644 index 117344447ae..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/assume_aligned_gcc.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/* -Copyright 2015 NumScale SAS -Copyright 2015 LRI UMR 8623 CNRS/University Paris Sud XI - -Copyright 2015 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_ALIGN_DETAIL_ASSUME_ALIGNED_GCC_HPP -#define BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_GCC_HPP - -#define BOOST_ALIGN_ASSUME_ALIGNED(p, n) \ -(p) = static_cast<__typeof__(p)>(__builtin_assume_aligned((p), (n))) - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/assume_aligned_intel.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/assume_aligned_intel.hpp deleted file mode 100644 index 6792ce005ce..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/assume_aligned_intel.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/* -Copyright 2015 NumScale SAS -Copyright 2015 LRI UMR 8623 CNRS/University Paris Sud XI - -Copyright 2015 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_ALIGN_DETAIL_ASSUME_ALIGNED_INTEL_HPP -#define BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_INTEL_HPP - -#define BOOST_ALIGN_ASSUME_ALIGNED(ptr, alignment) \ -__assume_aligned((ptr), (alignment)) - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/assume_aligned_msvc.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/assume_aligned_msvc.hpp deleted file mode 100644 index 75ac7e12429..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/assume_aligned_msvc.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/* -Copyright 2015 NumScale SAS -Copyright 2015 LRI UMR 8623 CNRS/University Paris Sud XI - -Copyright 2015 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_ALIGN_DETAIL_ASSUME_ALIGNED_MSVC_HPP -#define BOOST_ALIGN_DETAIL_ASSUME_ALIGNED_MSVC_HPP - -#include - -#define BOOST_ALIGN_ASSUME_ALIGNED(ptr, alignment) \ -__assume((reinterpret_cast(ptr) & ((alignment) - 1)) == 0) - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/element_type.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/element_type.hpp deleted file mode 100644 index 5b2b732da0a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/element_type.hpp +++ /dev/null @@ -1,91 +0,0 @@ -/* -Copyright 2015 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_ALIGN_DETAIL_ELEMENT_TYPE_HPP -#define BOOST_ALIGN_DETAIL_ELEMENT_TYPE_HPP - -#include - -#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) -#include -#else -#include -#endif - -namespace boost { -namespace alignment { -namespace detail { - -#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) -using std::remove_reference; -using std::remove_all_extents; -using std::remove_cv; -#else -template -struct remove_reference { - typedef T type; -}; - -template -struct remove_reference { - typedef T type; -}; - -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) -template -struct remove_reference { - typedef T type; -}; -#endif - -template -struct remove_all_extents { - typedef T type; -}; - -template -struct remove_all_extents { - typedef typename remove_all_extents::type type; -}; - -template -struct remove_all_extents { - typedef typename remove_all_extents::type type; -}; - -template -struct remove_cv { - typedef T type; -}; - -template -struct remove_cv { - typedef T type; -}; - -template -struct remove_cv { - typedef T type; -}; - -template -struct remove_cv { - typedef T type; -}; -#endif - -template -struct element_type { - typedef typename remove_cv::type>::type>::type type; -}; - -} /* detail */ -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/integral_constant.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/integral_constant.hpp deleted file mode 100644 index 860096783e9..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/integral_constant.hpp +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2014-2016 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_ALIGN_DETAIL_INTEGRAL_CONSTANT_HPP -#define BOOST_ALIGN_DETAIL_INTEGRAL_CONSTANT_HPP - -#include - -#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) -#include -#endif - -namespace boost { -namespace alignment { -namespace detail { - -#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) -using std::integral_constant; -#else -template -struct integral_constant { - typedef T value_type; - typedef integral_constant type; - - BOOST_CONSTEXPR operator value_type() const BOOST_NOEXCEPT { - return Value; - } - - BOOST_CONSTEXPR value_type operator()() const BOOST_NOEXCEPT { - return Value; - } - - BOOST_STATIC_CONSTEXPR T value = Value; -}; - -template -BOOST_CONSTEXPR_OR_CONST T integral_constant::value; -#endif - -} /* detail */ -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/is_aligned.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/is_aligned.hpp deleted file mode 100644 index 61982c46856..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/is_aligned.hpp +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2014 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_ALIGN_DETAIL_IS_ALIGNED_HPP -#define BOOST_ALIGN_DETAIL_IS_ALIGNED_HPP - -#include -#include - -namespace boost { -namespace alignment { - -inline bool -is_aligned(const void* ptr, std::size_t alignment) BOOST_NOEXCEPT -{ - BOOST_ASSERT(detail::is_alignment(alignment)); - return (reinterpret_cast(ptr) & (alignment - 1)) == 0; -} - -inline bool -is_aligned(std::size_t alignment, const void* ptr) BOOST_NOEXCEPT -{ - BOOST_ASSERT(detail::is_alignment(alignment)); - return (reinterpret_cast(ptr) & (alignment - 1)) == 0; -} - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/is_alignment.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/is_alignment.hpp deleted file mode 100644 index 542fbe46942..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/is_alignment.hpp +++ /dev/null @@ -1,28 +0,0 @@ -/* -Copyright 2014 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_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/contrib/libboost/boost_1_65_0/boost/align/detail/is_alignment_constant.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/is_alignment_constant.hpp deleted file mode 100644 index 0ded62857ee..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/is_alignment_constant.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2014 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_ALIGN_DETAIL_IS_ALIGNMENT_CONSTANT_HPP -#define BOOST_ALIGN_DETAIL_IS_ALIGNMENT_CONSTANT_HPP - -#include -#include - -namespace boost { -namespace alignment { -namespace detail { - -template -struct is_alignment_constant - : integral_constant 0) && ((N & (N - 1)) == 0)> { }; - -} /* detail */ -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/max_align.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/max_align.hpp deleted file mode 100644 index 9c09fec9c96..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/max_align.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2014-2015 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_ALIGN_DETAIL_MAX_ALIGN_HPP -#define BOOST_ALIGN_DETAIL_MAX_ALIGN_HPP - -#include -#include - -namespace boost { -namespace alignment { -namespace detail { - -template -struct max_align - : max_size::value, alignment_of::value> { }; - -} /* detail */ -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/max_objects.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/max_objects.hpp deleted file mode 100644 index 9fdd30e1187..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/max_objects.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/* -Copyright 2014 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_ALIGN_DETAIL_MAX_OBJECTS_HPP -#define BOOST_ALIGN_DETAIL_MAX_OBJECTS_HPP - -#include -#include - -namespace boost { -namespace alignment { -namespace detail { - -template -struct max_objects - : integral_constant(0) / sizeof(T)> { }; - -} /* detail */ -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/max_size.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/max_size.hpp deleted file mode 100644 index 22cefdbec55..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/max_size.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2014-2015 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_ALIGN_DETAIL_MAX_SIZE_HPP -#define BOOST_ALIGN_DETAIL_MAX_SIZE_HPP - -#include -#include - -namespace boost { -namespace alignment { -namespace detail { - -template -struct max_size - : integral_constant B) ? A : B> { }; - -} /* detail */ -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/detail/min_size.hpp b/contrib/libboost/boost_1_65_0/boost/align/detail/min_size.hpp deleted file mode 100644 index 5b478fdaf06..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/detail/min_size.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2014 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_ALIGN_DETAIL_MIN_SIZE_HPP -#define BOOST_ALIGN_DETAIL_MIN_SIZE_HPP - -#include -#include - -namespace boost { -namespace alignment { -namespace detail { - -template -struct min_size - : integral_constant { }; - -} /* detail */ -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/align/is_aligned.hpp b/contrib/libboost/boost_1_65_0/boost/align/is_aligned.hpp deleted file mode 100644 index c8266d0eae5..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/align/is_aligned.hpp +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2014 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_ALIGN_IS_ALIGNED_HPP -#define BOOST_ALIGN_IS_ALIGNED_HPP - -#include - -namespace boost { -namespace alignment { - -BOOST_CONSTEXPR inline bool -is_aligned(std::size_t value, std::size_t alignment) BOOST_NOEXCEPT -{ - return (value & (alignment - 1)) == 0; -} - -} /* alignment */ -} /* boost */ - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/aligned_storage.hpp b/contrib/libboost/boost_1_65_0/boost/aligned_storage.hpp deleted file mode 100644 index f400fa9e753..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/aligned_storage.hpp +++ /dev/null @@ -1,18 +0,0 @@ -//----------------------------------------------------------------------------- -// boost aligned_storage.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002-2003 -// Eric Friedman, Itay Maman -// -// 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_ALIGNED_STORAGE_HPP -#define BOOST_ALIGNED_STORAGE_HPP - -#include - -#endif // BOOST_ALIGNED_STORAGE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/any.hpp b/contrib/libboost/boost_1_65_0/boost/any.hpp deleted file mode 100644 index 9f6b3132744..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/any.hpp +++ /dev/null @@ -1,337 +0,0 @@ -// See http://www.boost.org/libs/any for Documentation. - -#ifndef BOOST_ANY_INCLUDED -#define BOOST_ANY_INCLUDED - -#if defined(_MSC_VER) -# pragma once -#endif - -// what: variant type boost::any -// who: contributed by Kevlin Henney, -// with features contributed and bugs found by -// Antony Polukhin, Ed Brey, Mark Rodgers, -// Peter Dimov, and James Curran -// when: July 2001, April 2013 - May 2013 - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace boost -{ - class any - { - public: // structors - - any() BOOST_NOEXCEPT - : content(0) - { - } - - template - any(const ValueType & value) - : content(new holder< - BOOST_DEDUCED_TYPENAME remove_cv::type>::type - >(value)) - { - } - - any(const any & other) - : content(other.content ? other.content->clone() : 0) - { - } - -#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES - // Move constructor - any(any&& other) BOOST_NOEXCEPT - : content(other.content) - { - other.content = 0; - } - - // Perfect forwarding of ValueType - template - any(ValueType&& value - , typename boost::disable_if >::type* = 0 // disable if value has type `any&` - , typename boost::disable_if >::type* = 0) // disable if value has type `const ValueType&&` - : content(new holder< typename decay::type >(static_cast(value))) - { - } -#endif - - ~any() BOOST_NOEXCEPT - { - delete content; - } - - public: // modifiers - - any & swap(any & rhs) BOOST_NOEXCEPT - { - std::swap(content, rhs.content); - return *this; - } - - -#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES - template - any & operator=(const ValueType & rhs) - { - any(rhs).swap(*this); - return *this; - } - - any & operator=(any rhs) - { - any(rhs).swap(*this); - return *this; - } - -#else - any & operator=(const any& rhs) - { - any(rhs).swap(*this); - return *this; - } - - // move assignement - any & operator=(any&& rhs) BOOST_NOEXCEPT - { - rhs.swap(*this); - any().swap(rhs); - return *this; - } - - // Perfect forwarding of ValueType - template - any & operator=(ValueType&& rhs) - { - any(static_cast(rhs)).swap(*this); - return *this; - } -#endif - - public: // queries - - bool empty() const BOOST_NOEXCEPT - { - return !content; - } - - void clear() BOOST_NOEXCEPT - { - any().swap(*this); - } - - const boost::typeindex::type_info& type() const BOOST_NOEXCEPT - { - return content ? content->type() : boost::typeindex::type_id().type_info(); - } - -#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS - private: // types -#else - public: // types (public so any_cast can be non-friend) -#endif - - class placeholder - { - public: // structors - - virtual ~placeholder() - { - } - - public: // queries - - virtual const boost::typeindex::type_info& type() const BOOST_NOEXCEPT = 0; - - virtual placeholder * clone() const = 0; - - }; - - template - class holder : public placeholder - { - public: // structors - - holder(const ValueType & value) - : held(value) - { - } - -#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES - holder(ValueType&& value) - : held(static_cast< ValueType&& >(value)) - { - } -#endif - public: // queries - - virtual const boost::typeindex::type_info& type() const BOOST_NOEXCEPT - { - return boost::typeindex::type_id().type_info(); - } - - virtual placeholder * clone() const - { - return new holder(held); - } - - public: // representation - - ValueType held; - - private: // intentionally left unimplemented - holder & operator=(const holder &); - }; - -#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS - - private: // representation - - template - friend ValueType * any_cast(any *) BOOST_NOEXCEPT; - - template - friend ValueType * unsafe_any_cast(any *) BOOST_NOEXCEPT; - -#else - - public: // representation (public so any_cast can be non-friend) - -#endif - - placeholder * content; - - }; - - inline void swap(any & lhs, any & rhs) BOOST_NOEXCEPT - { - lhs.swap(rhs); - } - - class BOOST_SYMBOL_VISIBLE bad_any_cast : -#ifndef BOOST_NO_RTTI - public std::bad_cast -#else - public std::exception -#endif - { - public: - virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW - { - return "boost::bad_any_cast: " - "failed conversion using boost::any_cast"; - } - }; - - template - ValueType * any_cast(any * operand) BOOST_NOEXCEPT - { - return operand && operand->type() == boost::typeindex::type_id() - ? boost::addressof( - static_cast::type> *>(operand->content)->held - ) - : 0; - } - - template - inline const ValueType * any_cast(const any * operand) BOOST_NOEXCEPT - { - return any_cast(const_cast(operand)); - } - - template - ValueType any_cast(any & operand) - { - typedef BOOST_DEDUCED_TYPENAME remove_reference::type nonref; - - - nonref * result = any_cast(boost::addressof(operand)); - if(!result) - boost::throw_exception(bad_any_cast()); - - // Attempt to avoid construction of a temporary object in cases when - // `ValueType` is not a reference. Example: - // `static_cast(*result);` - // which is equal to `std::string(*result);` - typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_< - boost::is_reference, - ValueType, - BOOST_DEDUCED_TYPENAME boost::add_reference::type - >::type ref_type; - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable: 4172) // "returning address of local variable or temporary" but *result is not local! -#endif - return static_cast(*result); -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif - } - - template - inline ValueType any_cast(const any & operand) - { - typedef BOOST_DEDUCED_TYPENAME remove_reference::type nonref; - return any_cast(const_cast(operand)); - } - -#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES - template - inline ValueType any_cast(any&& operand) - { - BOOST_STATIC_ASSERT_MSG( - boost::is_rvalue_reference::value /*true if ValueType is rvalue or just a value*/ - || boost::is_const< typename boost::remove_reference::type >::value, - "boost::any_cast shall not be used for getting nonconst references to temporary objects" - ); - return any_cast(operand); - } -#endif - - - // Note: The "unsafe" versions of any_cast are not part of the - // public interface and may be removed at any time. They are - // required where we know what type is stored in the any and can't - // use typeid() comparison, e.g., when our types may travel across - // different shared libraries. - template - inline ValueType * unsafe_any_cast(any * operand) BOOST_NOEXCEPT - { - return boost::addressof( - static_cast *>(operand->content)->held - ); - } - - template - inline const ValueType * unsafe_any_cast(const any * operand) BOOST_NOEXCEPT - { - return unsafe_any_cast(const_cast(operand)); - } -} - -// Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved. -// -// 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) - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/archive/archive_exception.hpp b/contrib/libboost/boost_1_65_0/boost/archive/archive_exception.hpp deleted file mode 100644 index fabcdb5fa71..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/archive_exception.hpp +++ /dev/null @@ -1,100 +0,0 @@ -#ifndef BOOST_ARCHIVE_ARCHIVE_EXCEPTION_HPP -#define BOOST_ARCHIVE_ARCHIVE_EXCEPTION_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// archive/archive_exception.hpp: - -// (C) Copyright 2002 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 - -#include -#include - -// note: the only reason this is in here is that windows header -// includes #define exception_code _exception_code (arrrgghhhh!). -// the most expedient way to address this is be sure that this -// header is always included whenever this header file is included. -#if defined(BOOST_WINDOWS) -#include -#endif - -#include // must be the last header - -namespace boost { -namespace archive { - -////////////////////////////////////////////////////////////////////// -// exceptions thrown by archives -// -class BOOST_SYMBOL_VISIBLE archive_exception : - public virtual std::exception -{ -private: - char m_buffer[128]; -protected: - BOOST_ARCHIVE_DECL unsigned int - append(unsigned int l, const char * a); - BOOST_ARCHIVE_DECL - archive_exception() BOOST_NOEXCEPT; -public: - typedef enum { - no_exception, // initialized without code - other_exception, // any excepton not listed below - unregistered_class, // attempt to serialize a pointer of - // an unregistered class - invalid_signature, // first line of archive does not contain - // expected string - unsupported_version,// archive created with library version - // subsequent to this one - pointer_conflict, // an attempt has been made to directly - // serialize an object which has - // already been serialized through a pointer. - // Were this permitted, the archive load would result - // in the creation of an extra copy of the obect. - incompatible_native_format, // attempt to read native binary format - // on incompatible platform - array_size_too_short,// array being loaded doesn't fit in array allocated - input_stream_error, // error on input stream - invalid_class_name, // class name greater than the maximum permitted. - // most likely a corrupted archive or an attempt - // to insert virus via buffer overrun method. - unregistered_cast, // base - derived relationship not registered with - // void_cast_register - unsupported_class_version, // type saved with a version # greater than the - // one used by the program. This indicates that the program - // needs to be rebuilt. - multiple_code_instantiation, // code for implementing serialization for some - // type has been instantiated in more than one module. - output_stream_error // error on input stream - } exception_code; - exception_code code; - - BOOST_ARCHIVE_DECL archive_exception( - exception_code c, - const char * e1 = NULL, - const char * e2 = NULL - ) BOOST_NOEXCEPT; - BOOST_ARCHIVE_DECL archive_exception(archive_exception const &) BOOST_NOEXCEPT ; - virtual BOOST_ARCHIVE_DECL ~archive_exception() BOOST_NOEXCEPT_OR_NOTHROW ; - virtual BOOST_ARCHIVE_DECL const char * what() const BOOST_NOEXCEPT_OR_NOTHROW ; -}; - -}// namespace archive -}// namespace boost - -#include // pops abi_suffix.hpp pragmas - -#endif //BOOST_ARCHIVE_ARCHIVE_EXCEPTION_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/basic_archive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/basic_archive.hpp deleted file mode 100644 index ce7ac99a6dd..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/basic_archive.hpp +++ /dev/null @@ -1,304 +0,0 @@ -#ifndef BOOST_ARCHIVE_BASIC_ARCHIVE_HPP -#define BOOST_ARCHIVE_BASIC_ARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_archive.hpp: - -// (C) Copyright 2002 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 // count -#include -#include -#include // size_t -#include -#include - -#include -#include // must be the last header - -namespace boost { -namespace archive { - -#if defined(_MSC_VER) -#pragma warning( push ) -#pragma warning( disable : 4244 4267 ) -#endif - -/* NOTE : Warning : Warning : Warning : Warning : Warning - * Don't ever changes this. If you do, they previously created - * binary archives won't be readable !!! - */ -class library_version_type { -private: - typedef uint_least16_t base_type; - base_type t; -public: - library_version_type(): t(0) {}; - explicit library_version_type(const unsigned int & t_) : t(t_){ - BOOST_ASSERT(t_ <= boost::integer_traits::const_max); - } - library_version_type(const library_version_type & t_) : - t(t_.t) - {} - library_version_type & operator=(const library_version_type & rhs){ - t = rhs.t; - return *this; - } - // used for text output - operator base_type () const { - return t; - } - // used for text input - operator base_type & (){ - return t; - } - bool operator==(const library_version_type & rhs) const { - return t == rhs.t; - } - bool operator<(const library_version_type & rhs) const { - return t < rhs.t; - } -}; - -BOOST_ARCHIVE_DECL library_version_type -BOOST_ARCHIVE_VERSION(); - -class version_type { -private: - typedef uint_least32_t base_type; - base_type t; -public: - // should be private - but MPI fails if it's not!!! - version_type(): t(0) {}; - explicit version_type(const unsigned int & t_) : t(t_){ - BOOST_ASSERT(t_ <= boost::integer_traits::const_max); - } - version_type(const version_type & t_) : - t(t_.t) - {} - version_type & operator=(const version_type & rhs){ - t = rhs.t; - return *this; - } - // used for text output - operator base_type () const { - return t; - } - // used for text intput - operator base_type & (){ - return t; - } - bool operator==(const version_type & rhs) const { - return t == rhs.t; - } - bool operator<(const version_type & rhs) const { - return t < rhs.t; - } -}; - -class class_id_type { -private: - typedef int_least16_t base_type; - base_type t; -public: - // should be private - but then can't use BOOST_STRONG_TYPE below - class_id_type() : t(0) {}; - explicit class_id_type(const int t_) : t(t_){ - BOOST_ASSERT(t_ <= boost::integer_traits::const_max); - } - explicit class_id_type(const std::size_t t_) : t(t_){ - // BOOST_ASSERT(t_ <= boost::integer_traits::const_max); - } - class_id_type(const class_id_type & t_) : - t(t_.t) - {} - class_id_type & operator=(const class_id_type & rhs){ - t = rhs.t; - return *this; - } - - // used for text output - operator int () const { - return t; - } - // used for text input - operator int_least16_t &() { - return t; - } - bool operator==(const class_id_type & rhs) const { - return t == rhs.t; - } - bool operator<(const class_id_type & rhs) const { - return t < rhs.t; - } -}; - -#define NULL_POINTER_TAG boost::archive::class_id_type(-1) - -class object_id_type { -private: - typedef uint_least32_t base_type; - base_type t; -public: - object_id_type(): t(0) {}; - // note: presumes that size_t >= unsigned int. - explicit object_id_type(const std::size_t & t_) : t(t_){ - BOOST_ASSERT(t_ <= boost::integer_traits::const_max); - } - object_id_type(const object_id_type & t_) : - t(t_.t) - {} - object_id_type & operator=(const object_id_type & rhs){ - t = rhs.t; - return *this; - } - // used for text output - operator uint_least32_t () const { - return t; - } - // used for text input - operator uint_least32_t & () { - return t; - } - bool operator==(const object_id_type & rhs) const { - return t == rhs.t; - } - bool operator<(const object_id_type & rhs) const { - return t < rhs.t; - } -}; - -#if defined(_MSC_VER) -#pragma warning( pop ) -#endif - -struct tracking_type { - bool t; - explicit tracking_type(const bool t_ = false) - : t(t_) - {}; - tracking_type(const tracking_type & t_) - : t(t_.t) - {} - operator bool () const { - return t; - }; - operator bool & () { - return t; - }; - tracking_type & operator=(const bool t_){ - t = t_; - return *this; - } - bool operator==(const tracking_type & rhs) const { - return t == rhs.t; - } - bool operator==(const bool & rhs) const { - return t == rhs; - } - tracking_type & operator=(const tracking_type & rhs){ - t = rhs.t; - return *this; - } -}; - -struct class_name_type : - private boost::noncopyable -{ - char *t; - operator const char * & () const { - return const_cast(t); - } - operator char * () { - return t; - } - std::size_t size() const { - return std::strlen(t); - } - explicit class_name_type(const char *key_) - : t(const_cast(key_)){} - explicit class_name_type(char *key_) - : t(key_){} - class_name_type & operator=(const class_name_type & rhs){ - t = rhs.t; - return *this; - } -}; - -enum archive_flags { - no_header = 1, // suppress archive header info - no_codecvt = 2, // suppress alteration of codecvt facet - no_xml_tag_checking = 4, // suppress checking of xml tags - no_tracking = 8, // suppress ALL tracking - flags_last = 8 -}; - -BOOST_ARCHIVE_DECL const char * -BOOST_ARCHIVE_SIGNATURE(); - -/* NOTE : Warning : Warning : Warning : Warning : Warning - * If any of these are changed to different sized types, - * binary_iarchive won't be able to read older archives - * unless you rev the library version and include conditional - * code based on the library version. There is nothing - * inherently wrong in doing this - but you have to be super - * careful because it's easy to get wrong and start breaking - * old archives !!! - */ - -#define BOOST_ARCHIVE_STRONG_TYPEDEF(T, D) \ - class D : public T { \ - public: \ - explicit D(const T tt) : T(tt){} \ - }; \ -/**/ - -BOOST_ARCHIVE_STRONG_TYPEDEF(class_id_type, class_id_reference_type) -BOOST_ARCHIVE_STRONG_TYPEDEF(class_id_type, class_id_optional_type) -BOOST_ARCHIVE_STRONG_TYPEDEF(object_id_type, object_reference_type) - -}// namespace archive -}// namespace boost - -#include // pops abi_suffix.hpp pragmas - -#include - -// set implementation level to primitive for all types -// used internally by the serialization library - -BOOST_CLASS_IMPLEMENTATION(boost::archive::library_version_type, primitive_type) -BOOST_CLASS_IMPLEMENTATION(boost::archive::version_type, primitive_type) -BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_type, primitive_type) -BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_reference_type, primitive_type) -BOOST_CLASS_IMPLEMENTATION(boost::archive::class_id_optional_type, primitive_type) -BOOST_CLASS_IMPLEMENTATION(boost::archive::class_name_type, primitive_type) -BOOST_CLASS_IMPLEMENTATION(boost::archive::object_id_type, primitive_type) -BOOST_CLASS_IMPLEMENTATION(boost::archive::object_reference_type, primitive_type) -BOOST_CLASS_IMPLEMENTATION(boost::archive::tracking_type, primitive_type) - -#include - -// set types used internally by the serialization library -// to be bitwise serializable - -BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::library_version_type) -BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::version_type) -BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_type) -BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_reference_type) -BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_id_optional_type) -BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::class_name_type) -BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::object_id_type) -BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::object_reference_type) -BOOST_IS_BITWISE_SERIALIZABLE(boost::archive::tracking_type) - -#endif //BOOST_ARCHIVE_BASIC_ARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/basic_binary_iarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/basic_binary_iarchive.hpp deleted file mode 100644 index c0cc655c997..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/basic_binary_iarchive.hpp +++ /dev/null @@ -1,204 +0,0 @@ -#ifndef BOOST_ARCHIVE_BASIC_BINARY_IARCHIVE_HPP -#define BOOST_ARCHIVE_BASIC_BINARY_IARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_binary_iarchive.hpp -// -// archives stored as native binary - this should be the fastest way -// to archive the state of a group of obects. It makes no attempt to -// convert to any canonical form. - -// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE -// ON PLATFORM APART FROM THE ONE THEY ARE CREATED ON - -// (C) Copyright 2002 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 -#include -#include -#include -#include -#include - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -#include // must be the last header - -namespace boost { -namespace archive { - -namespace detail { - template class interface_iarchive; -} // namespace detail - -///////////////////////////////////////////////////////////////////////// -// class basic_binary_iarchive - read serialized objects from a input binary stream -template -class BOOST_SYMBOL_VISIBLE basic_binary_iarchive : - public detail::common_iarchive -{ -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else -protected: - #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) - // for some inexplicable reason insertion of "class" generates compile erro - // on msvc 7.1 - friend detail::interface_iarchive; - #else - friend class detail::interface_iarchive; - #endif -#endif - // intermediate level to support override of operators - // fot templates in the absence of partial function - // template ordering. If we get here pass to base class - // note extra nonsense to sneak it pass the borland compiers - typedef detail::common_iarchive detail_common_iarchive; - template - void load_override(T & t){ - this->detail_common_iarchive::load_override(t); - } - - // include these to trap a change in binary format which - // isn't specifically handled - // upto 32K classes - BOOST_STATIC_ASSERT(sizeof(class_id_type) == sizeof(int_least16_t)); - BOOST_STATIC_ASSERT(sizeof(class_id_reference_type) == sizeof(int_least16_t)); - // upto 2G objects - BOOST_STATIC_ASSERT(sizeof(object_id_type) == sizeof(uint_least32_t)); - BOOST_STATIC_ASSERT(sizeof(object_reference_type) == sizeof(uint_least32_t)); - - // binary files don't include the optional information - void load_override(class_id_optional_type & /* t */){} - - void load_override(tracking_type & t, int /*version*/){ - library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(6) < lvt){ - int_least8_t x=0; - * this->This() >> x; - t = boost::archive::tracking_type(x); - } - else{ - bool x=0; - * this->This() >> x; - t = boost::archive::tracking_type(x); - } - } - void load_override(class_id_type & t){ - library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(7) < lvt){ - this->detail_common_iarchive::load_override(t); - } - else - if(boost::archive::library_version_type(6) < lvt){ - int_least16_t x=0; - * this->This() >> x; - t = boost::archive::class_id_type(x); - } - else{ - int x=0; - * this->This() >> x; - t = boost::archive::class_id_type(x); - } - } - void load_override(class_id_reference_type & t){ - load_override(static_cast(t)); - } - - void load_override(version_type & t){ - library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(7) < lvt){ - this->detail_common_iarchive::load_override(t); - } - else - if(boost::archive::library_version_type(6) < lvt){ - uint_least8_t x=0; - * this->This() >> x; - t = boost::archive::version_type(x); - } - else - if(boost::archive::library_version_type(5) < lvt){ - uint_least16_t x=0; - * this->This() >> x; - t = boost::archive::version_type(x); - } - else - if(boost::archive::library_version_type(2) < lvt){ - // upto 255 versions - unsigned char x=0; - * this->This() >> x; - t = version_type(x); - } - else{ - unsigned int x=0; - * this->This() >> x; - t = boost::archive::version_type(x); - } - } - - void load_override(boost::serialization::item_version_type & t){ - library_version_type lvt = this->get_library_version(); -// if(boost::archive::library_version_type(7) < lvt){ - if(boost::archive::library_version_type(6) < lvt){ - this->detail_common_iarchive::load_override(t); - } - else - if(boost::archive::library_version_type(6) < lvt){ - uint_least16_t x=0; - * this->This() >> x; - t = boost::serialization::item_version_type(x); - } - else{ - unsigned int x=0; - * this->This() >> x; - t = boost::serialization::item_version_type(x); - } - } - - void load_override(serialization::collection_size_type & t){ - if(boost::archive::library_version_type(5) < this->get_library_version()){ - this->detail_common_iarchive::load_override(t); - } - else{ - unsigned int x=0; - * this->This() >> x; - t = serialization::collection_size_type(x); - } - } - - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - load_override(class_name_type & t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - init(); - - basic_binary_iarchive(unsigned int flags) : - detail::common_iarchive(flags) - {} -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_BASIC_BINARY_IARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/basic_binary_iprimitive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/basic_binary_iprimitive.hpp deleted file mode 100644 index 665d3e81e1f..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/basic_binary_iprimitive.hpp +++ /dev/null @@ -1,198 +0,0 @@ -#ifndef BOOST_ARCHIVE_BINARY_IPRIMITIVE_HPP -#define BOOST_ARCHIVE_BINARY_IPRIMITIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -#if defined(_MSC_VER) -#pragma warning( disable : 4800 ) -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_binary_iprimitive.hpp -// -// archives stored as native binary - this should be the fastest way -// to archive the state of a group of obects. It makes no attempt to -// convert to any canonical form. - -// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE -// ON PLATFORM APART FROM THE ONE THEY ARE CREATED ON - -// (C) Copyright 2002 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 -#include // std::memcpy -#include // std::size_t -#include // basic_streambuf -#include - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::memcpy; - using ::size_t; -} // namespace std -#endif - -#include -#include -#include -#include - -//#include -#include -#include - -#include -#include -#include -#include -#include // must be the last header - -namespace boost { -namespace archive { - -///////////////////////////////////////////////////////////////////////////// -// class binary_iarchive - read serialized objects from a input binary stream -template -class BOOST_SYMBOL_VISIBLE basic_binary_iprimitive { -#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS - friend class load_access; -protected: -#else -public: -#endif - std::basic_streambuf & m_sb; - // return a pointer to the most derived class - Archive * This(){ - return static_cast(this); - } - - #ifndef BOOST_NO_STD_LOCALE - // note order! - if you change this, libstd++ will fail! - // a) create new locale with new codecvt facet - // b) save current locale - // c) change locale to new one - // d) use stream buffer - // e) change locale back to original - // f) destroy new codecvt facet - boost::archive::codecvt_null codecvt_null_facet; - basic_streambuf_locale_saver locale_saver; - std::locale archive_locale; - #endif - - // main template for serilization of primitive types - template - void load(T & t){ - load_binary(& t, sizeof(T)); - } - - ///////////////////////////////////////////////////////// - // fundamental types that need special treatment - - // trap usage of invalid uninitialized boolean - void load(bool & t){ - load_binary(& t, sizeof(t)); - int i = t; - BOOST_ASSERT(0 == i || 1 == i); - (void)i; // warning suppression for release builds. - } - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - load(std::string &s); - #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - load(std::wstring &ws); - #endif - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - load(char * t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - load(wchar_t * t); - - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - init(); - BOOST_ARCHIVE_OR_WARCHIVE_DECL - basic_binary_iprimitive( - std::basic_streambuf & sb, - bool no_codecvt - ); - BOOST_ARCHIVE_OR_WARCHIVE_DECL - ~basic_binary_iprimitive(); -public: - // we provide an optimized load for all fundamental types - // typedef serialization::is_bitwise_serializable - // use_array_optimization; - struct use_array_optimization { - template - #if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS) - struct apply { - typedef typename boost::serialization::is_bitwise_serializable< T >::type type; - }; - #else - struct apply : public boost::serialization::is_bitwise_serializable< T > {}; - #endif - }; - - // the optimized load_array dispatches to load_binary - template - void load_array(serialization::array_wrapper& a, unsigned int) - { - load_binary(a.address(),a.count()*sizeof(ValueType)); - } - - void - load_binary(void *address, std::size_t count); -}; - -template -inline void -basic_binary_iprimitive::load_binary( - void *address, - std::size_t count -){ - // note: an optimizer should eliminate the following for char files - BOOST_ASSERT( - static_cast(count / sizeof(Elem)) - <= boost::integer_traits::const_max - ); - std::streamsize s = static_cast(count / sizeof(Elem)); - std::streamsize scount = m_sb.sgetn( - static_cast(address), - s - ); - if(scount != s) - boost::serialization::throw_exception( - archive_exception(archive_exception::input_stream_error) - ); - // note: an optimizer should eliminate the following for char files - BOOST_ASSERT(count % sizeof(Elem) <= boost::integer_traits::const_max); - s = static_cast(count % sizeof(Elem)); - if(0 < s){ -// if(is.fail()) -// boost::serialization::throw_exception( -// archive_exception(archive_exception::stream_error) -// ); - Elem t; - scount = m_sb.sgetn(& t, 1); - if(scount != 1) - boost::serialization::throw_exception( - archive_exception(archive_exception::input_stream_error) - ); - std::memcpy(static_cast(address) + (count - s), &t, static_cast(s)); - } -} - -} // namespace archive -} // namespace boost - -#include // pop pragmas - -#endif // BOOST_ARCHIVE_BINARY_IPRIMITIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/basic_binary_oarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/basic_binary_oarchive.hpp deleted file mode 100644 index f05f2f86d55..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/basic_binary_oarchive.hpp +++ /dev/null @@ -1,185 +0,0 @@ -#ifndef BOOST_ARCHIVE_BASIC_BINARY_OARCHIVE_HPP -#define BOOST_ARCHIVE_BASIC_BINARY_OARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_binary_oarchive.hpp - -// (C) Copyright 2002 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. - -// archives stored as native binary - this should be the fastest way -// to archive the state of a group of obects. It makes no attempt to -// convert to any canonical form. - -// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE -// ON PLATFORM APART FROM THE ONE THEY ARE CREATE ON - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include // must be the last header - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -namespace detail { - template class interface_oarchive; -} // namespace detail - -////////////////////////////////////////////////////////////////////// -// class basic_binary_oarchive - write serialized objects to a binary output stream -// note: this archive has no pretensions to portability. Archive format -// may vary across machine architectures and compilers. About the only -// guarentee is that an archive created with this code will be readable -// by a program built with the same tools for the same machne. This class -// does have the virtue of buiding the smalles archive in the minimum amount -// of time. So under some circumstances it may be he right choice. -template -class BOOST_SYMBOL_VISIBLE basic_binary_oarchive : - public detail::common_oarchive -{ -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else -protected: - #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) - // for some inexplicable reason insertion of "class" generates compile erro - // on msvc 7.1 - friend detail::interface_oarchive; - #else - friend class detail::interface_oarchive; - #endif -#endif - // any datatype not specifed below will be handled by base class - typedef detail::common_oarchive detail_common_oarchive; - template - void save_override(const T & t){ - this->detail_common_oarchive::save_override(t); - } - - // include these to trap a change in binary format which - // isn't specifically handled - BOOST_STATIC_ASSERT(sizeof(tracking_type) == sizeof(bool)); - // upto 32K classes - BOOST_STATIC_ASSERT(sizeof(class_id_type) == sizeof(int_least16_t)); - BOOST_STATIC_ASSERT(sizeof(class_id_reference_type) == sizeof(int_least16_t)); - // upto 2G objects - BOOST_STATIC_ASSERT(sizeof(object_id_type) == sizeof(uint_least32_t)); - BOOST_STATIC_ASSERT(sizeof(object_reference_type) == sizeof(uint_least32_t)); - - // binary files don't include the optional information - void save_override(const class_id_optional_type & /* t */){} - - // enable this if we decide to support generation of previous versions - #if 0 - void save_override(const boost::archive::version_type & t){ - library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(7) < lvt){ - this->detail_common_oarchive::save_override(t); - } - else - if(boost::archive::library_version_type(6) < lvt){ - const boost::uint_least16_t x = t; - * this->This() << x; - } - else{ - const unsigned int x = t; - * this->This() << x; - } - } - void save_override(const boost::serialization::item_version_type & t){ - library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(7) < lvt){ - this->detail_common_oarchive::save_override(t); - } - else - if(boost::archive::library_version_type(6) < lvt){ - const boost::uint_least16_t x = t; - * this->This() << x; - } - else{ - const unsigned int x = t; - * this->This() << x; - } - } - - void save_override(class_id_type & t){ - library_version_type lvt = this->get_library_version(); - if(boost::archive::library_version_type(7) < lvt){ - this->detail_common_oarchive::save_override(t); - } - else - if(boost::archive::library_version_type(6) < lvt){ - const boost::int_least16_t x = t; - * this->This() << x; - } - else{ - const int x = t; - * this->This() << x; - } - } - void save_override(class_id_reference_type & t){ - save_override(static_cast(t)); - } - - #endif - - // explicitly convert to char * to avoid compile ambiguities - void save_override(const class_name_type & t){ - const std::string s(t); - * this->This() << s; - } - - #if 0 - void save_override(const serialization::collection_size_type & t){ - if (get_library_version() < boost::archive::library_version_type(6)){ - unsigned int x=0; - * this->This() >> x; - t = serialization::collection_size_type(x); - } - else{ - * this->This() >> t; - } - } - #endif - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - init(); - - basic_binary_oarchive(unsigned int flags) : - detail::common_oarchive(flags) - {} -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_BASIC_BINARY_OARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/basic_binary_oprimitive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/basic_binary_oprimitive.hpp deleted file mode 100644 index 6dc770c60e8..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/basic_binary_oprimitive.hpp +++ /dev/null @@ -1,188 +0,0 @@ -#ifndef BOOST_ARCHIVE_BASIC_BINARY_OPRIMITIVE_HPP -#define BOOST_ARCHIVE_BASIC_BINARY_OPRIMITIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_binary_oprimitive.hpp - -// (C) Copyright 2002 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. - -// archives stored as native binary - this should be the fastest way -// to archive the state of a group of obects. It makes no attempt to -// convert to any canonical form. - -// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE -// ON PLATFORM APART FROM THE ONE THEY ARE CREATE ON - -#include -#include -#include -#include // basic_streambuf -#include -#include // size_t - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#include -#include -#include -#include -#include - -//#include -#include -#include - -#include -#include -#include -#include -#include // must be the last header - -namespace boost { -namespace archive { - -///////////////////////////////////////////////////////////////////////// -// class basic_binary_oprimitive - binary output of prmitives - -template -class BOOST_SYMBOL_VISIBLE basic_binary_oprimitive { -#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS - friend class save_access; -protected: -#else -public: -#endif - std::basic_streambuf & m_sb; - // return a pointer to the most derived class - Archive * This(){ - return static_cast(this); - } - #ifndef BOOST_NO_STD_LOCALE - // note order! - if you change this, libstd++ will fail! - // a) create new locale with new codecvt facet - // b) save current locale - // c) change locale to new one - // d) use stream buffer - // e) change locale back to original - // f) destroy new codecvt facet - boost::archive::codecvt_null codecvt_null_facet; - basic_streambuf_locale_saver locale_saver; - std::locale archive_locale; - #endif - // default saving of primitives. - template - void save(const T & t) - { - save_binary(& t, sizeof(T)); - } - - ///////////////////////////////////////////////////////// - // fundamental types that need special treatment - - // trap usage of invalid uninitialized boolean which would - // otherwise crash on load. - void save(const bool t){ - BOOST_ASSERT(0 == static_cast(t) || 1 == static_cast(t)); - save_binary(& t, sizeof(t)); - } - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - save(const std::string &s); - #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - save(const std::wstring &ws); - #endif - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - save(const char * t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - save(const wchar_t * t); - - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - init(); - - BOOST_ARCHIVE_OR_WARCHIVE_DECL - basic_binary_oprimitive( - std::basic_streambuf & sb, - bool no_codecvt - ); - BOOST_ARCHIVE_OR_WARCHIVE_DECL - ~basic_binary_oprimitive(); -public: - - // we provide an optimized save for all fundamental types - // typedef serialization::is_bitwise_serializable - // use_array_optimization; - // workaround without using mpl lambdas - struct use_array_optimization { - template - #if defined(BOOST_NO_DEPENDENT_NESTED_DERIVATIONS) - struct apply { - typedef typename boost::serialization::is_bitwise_serializable< T >::type type; - }; - #else - struct apply : public boost::serialization::is_bitwise_serializable< T > {}; - #endif - }; - - // the optimized save_array dispatches to save_binary - template - void save_array(boost::serialization::array_wrapper const& a, unsigned int) - { - save_binary(a.address(),a.count()*sizeof(ValueType)); - } - - void save_binary(const void *address, std::size_t count); -}; - -template -inline void -basic_binary_oprimitive::save_binary( - const void *address, - std::size_t count -){ - // BOOST_ASSERT(count <= std::size_t(boost::integer_traits::const_max)); - // note: if the following assertions fail - // a likely cause is that the output stream is set to "text" - // mode where by cr characters recieve special treatment. - // be sure that the output stream is opened with ios::binary - //if(os.fail()) - // boost::serialization::throw_exception( - // archive_exception(archive_exception::output_stream_error) - // ); - // figure number of elements to output - round up - count = ( count + sizeof(Elem) - 1) / sizeof(Elem); - std::streamsize scount = m_sb.sputn( - static_cast(address), - static_cast(count) - ); - if(count != static_cast(scount)) - boost::serialization::throw_exception( - archive_exception(archive_exception::output_stream_error) - ); - //os.write( - // static_cast(address), - // count - //); - //BOOST_ASSERT(os.good()); -} - -} //namespace boost -} //namespace archive - -#include // pop pragmas - -#endif // BOOST_ARCHIVE_BASIC_BINARY_OPRIMITIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/basic_streambuf_locale_saver.hpp b/contrib/libboost/boost_1_65_0/boost/archive/basic_streambuf_locale_saver.hpp deleted file mode 100644 index 5cd4b36f081..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/basic_streambuf_locale_saver.hpp +++ /dev/null @@ -1,108 +0,0 @@ -#ifndef BOOST_ARCHIVE_BASIC_STREAMBUF_LOCALE_SAVER_HPP -#define BOOST_ARCHIVE_BASIC_STREAMBUF_LOCALE_SAVER_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_streambuf_locale_saver.hpp - -// (C) Copyright 2005 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. - -// note derived from boost/io/ios_state.hpp -// Copyright 2002, 2005 Daryle Walker. Use, modification, and distribution -// are subject to the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or a copy at .) - -// See for the library's home page. - -#ifndef BOOST_NO_STD_LOCALE - -#include // for std::locale -#include -#include // for std::basic_streambuf - -#include -#include - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost{ -namespace archive{ - -template < typename Ch, class Tr > -class basic_streambuf_locale_saver : - private boost::noncopyable -{ -public: - explicit basic_streambuf_locale_saver(std::basic_streambuf &s) : - m_streambuf(s), - m_locale(s.getloc()) - {} - ~basic_streambuf_locale_saver(){ - m_streambuf.pubsync(); - m_streambuf.pubimbue(m_locale); - } -private: - std::basic_streambuf & m_streambuf; - std::locale const m_locale; -}; - -template < typename Ch, class Tr > -class basic_istream_locale_saver : - private boost::noncopyable -{ -public: - explicit basic_istream_locale_saver(std::basic_istream &s) : - m_istream(s), - m_locale(s.getloc()) - {} - ~basic_istream_locale_saver(){ - // libstdc++ crashes without this - m_istream.sync(); - m_istream.imbue(m_locale); - } -private: - std::basic_istream & m_istream; - std::locale const m_locale; -}; - -template < typename Ch, class Tr > -class basic_ostream_locale_saver : - private boost::noncopyable -{ -public: - explicit basic_ostream_locale_saver(std::basic_ostream &s) : - m_ostream(s), - m_locale(s.getloc()) - {} - ~basic_ostream_locale_saver(){ - m_ostream.flush(); - m_ostream.imbue(m_locale); - } -private: - std::basic_ostream & m_ostream; - std::locale const m_locale; -}; - - -} // archive -} // boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#endif // BOOST_NO_STD_LOCALE -#endif // BOOST_ARCHIVE_BASIC_STREAMBUF_LOCALE_SAVER_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/basic_text_iarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/basic_text_iarchive.hpp deleted file mode 100644 index 48a646cc1f7..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/basic_text_iarchive.hpp +++ /dev/null @@ -1,96 +0,0 @@ -#ifndef BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP -#define BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_text_iarchive.hpp - -// (C) Copyright 2002 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. - -// archives stored as text - note these ar templated on the basic -// stream templates to accommodate wide (and other?) kind of characters -// -// 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_istream but rather -// use two template parameters - -#include -#include - -#include - -#include // must be the last header - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -namespace detail { - template class interface_iarchive; -} // namespace detail - -///////////////////////////////////////////////////////////////////////// -// class basic_text_iarchive - read serialized objects from a input text stream -template -class BOOST_SYMBOL_VISIBLE basic_text_iarchive : - public detail::common_iarchive -{ -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else -protected: - #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) - // for some inexplicable reason insertion of "class" generates compile erro - // on msvc 7.1 - friend detail::interface_iarchive; - #else - friend class detail::interface_iarchive; - #endif -#endif - // intermediate level to support override of operators - // fot templates in the absence of partial function - // template ordering - typedef detail::common_iarchive detail_common_iarchive; - template - void load_override(T & t){ - this->detail_common_iarchive::load_override(t); - } - // text file don't include the optional information - void load_override(class_id_optional_type & /*t*/){} - - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - load_override(class_name_type & t); - - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - init(void); - - basic_text_iarchive(unsigned int flags) : - detail::common_iarchive(flags) - {} - ~basic_text_iarchive(){} -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/basic_text_iprimitive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/basic_text_iprimitive.hpp deleted file mode 100644 index bf936b55546..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/basic_text_iprimitive.hpp +++ /dev/null @@ -1,142 +0,0 @@ -#ifndef BOOST_ARCHIVE_BASIC_TEXT_IPRIMITIVE_HPP -#define BOOST_ARCHIVE_BASIC_TEXT_IPRIMITIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_text_iprimitive.hpp - -// (C) Copyright 2002 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. - -// archives stored as text - note these are templated on the basic -// stream templates to accommodate wide (and other?) kind of characters -// -// Note the fact that on libraries without wide characters, ostream 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 -// use two template parameters - -#include -#include // size_t - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; - #if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT) - using ::locale; - #endif -} // namespace std -#endif - -#include -#include - -#include -#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) -#include -#endif -#include -#include -#include -#include -#include // must be the last header - -namespace boost { -namespace archive { - -///////////////////////////////////////////////////////////////////////// -// class basic_text_iarchive - load serialized objects from a input text stream -#if defined(_MSC_VER) -#pragma warning( push ) -#pragma warning( disable : 4244 4267 ) -#endif - -template -class BOOST_SYMBOL_VISIBLE basic_text_iprimitive { -protected: - IStream &is; - io::ios_flags_saver flags_saver; - io::ios_precision_saver precision_saver; - - #ifndef BOOST_NO_STD_LOCALE - // note order! - if you change this, libstd++ will fail! - // a) create new locale with new codecvt facet - // b) save current locale - // c) change locale to new one - // d) use stream buffer - // e) change locale back to original - // f) destroy new codecvt facet - boost::archive::codecvt_null codecvt_null_facet; - std::locale archive_locale; - basic_istream_locale_saver< - typename IStream::char_type, - typename IStream::traits_type - > locale_saver; - #endif - - template - void load(T & t) - { - if(is >> t) - return; - boost::serialization::throw_exception( - archive_exception(archive_exception::input_stream_error) - ); - } - - void load(char & t) - { - short int i; - load(i); - t = i; - } - void load(signed char & t) - { - short int i; - load(i); - t = i; - } - void load(unsigned char & t) - { - unsigned short int i; - load(i); - t = i; - } - - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void load(wchar_t & t) - { - BOOST_STATIC_ASSERT(sizeof(wchar_t) <= sizeof(int)); - int i; - load(i); - t = i; - } - #endif - BOOST_ARCHIVE_OR_WARCHIVE_DECL - basic_text_iprimitive(IStream &is, bool no_codecvt); - BOOST_ARCHIVE_OR_WARCHIVE_DECL - ~basic_text_iprimitive(); -public: - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - load_binary(void *address, std::size_t count); -}; - -#if defined(_MSC_VER) -#pragma warning( pop ) -#endif - -} // namespace archive -} // namespace boost - -#include // pop pragmas - -#endif // BOOST_ARCHIVE_BASIC_TEXT_IPRIMITIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/basic_text_oarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/basic_text_oarchive.hpp deleted file mode 100644 index 6f7f8fb167d..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/basic_text_oarchive.hpp +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef BOOST_ARCHIVE_BASIC_TEXT_OARCHIVE_HPP -#define BOOST_ARCHIVE_BASIC_TEXT_OARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_text_oarchive.hpp - -// (C) Copyright 2002 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. - -// archives stored as text - note these ar templated on the basic -// stream templates to accommodate wide (and other?) kind of characters -// -// 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 -// use two template parameters - -#include -#include -#include -#include - -#include // must be the last header - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -namespace detail { - template class interface_oarchive; -} // namespace detail - -///////////////////////////////////////////////////////////////////////// -// class basic_text_oarchive -template -class BOOST_SYMBOL_VISIBLE basic_text_oarchive : - public detail::common_oarchive -{ -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else -protected: - #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) - // for some inexplicable reason insertion of "class" generates compile erro - // on msvc 7.1 - friend detail::interface_oarchive; - #else - friend class detail::interface_oarchive; - #endif -#endif - - enum { - none, - eol, - space - } delimiter; - - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - newtoken(); - - void newline(){ - delimiter = eol; - } - - // default processing - kick back to base class. Note the - // extra stuff to get it passed borland compilers - typedef detail::common_oarchive detail_common_oarchive; - template - void save_override(T & t){ - this->detail_common_oarchive::save_override(t); - } - - // start new objects on a new line - void save_override(const object_id_type & t){ - this->This()->newline(); - this->detail_common_oarchive::save_override(t); - } - - // text file don't include the optional information - void save_override(const class_id_optional_type & /* t */){} - - void save_override(const class_name_type & t){ - const std::string s(t); - * this->This() << s; - } - - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - init(); - - basic_text_oarchive(unsigned int flags) : - detail::common_oarchive(flags), - delimiter(none) - {} - ~basic_text_oarchive(){} -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_BASIC_TEXT_OARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/basic_text_oprimitive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/basic_text_oprimitive.hpp deleted file mode 100644 index 45f09358ece..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/basic_text_oprimitive.hpp +++ /dev/null @@ -1,209 +0,0 @@ -#ifndef BOOST_ARCHIVE_BASIC_TEXT_OPRIMITIVE_HPP -#define BOOST_ARCHIVE_BASIC_TEXT_OPRIMITIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_text_oprimitive.hpp - -// (C) Copyright 2002 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. - -// archives stored as text - note these ar templated on the basic -// stream templates to accommodate wide (and other?) kind of characters -// -// 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 -// use two template parameters - -#include -#include -#include // size_t - -#include -#include -#include - -#include -#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) -#include -#endif - -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; - #if ! defined(BOOST_DINKUMWARE_STDLIB) && ! defined(__SGI_STL_PORT) - using ::locale; - #endif -} // namespace std -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // must be the last header - -namespace boost { -namespace archive { - -///////////////////////////////////////////////////////////////////////// -// class basic_text_oprimitive - output of prmitives to stream -template -class BOOST_SYMBOL_VISIBLE basic_text_oprimitive -{ -protected: - OStream &os; - io::ios_flags_saver flags_saver; - io::ios_precision_saver precision_saver; - - #ifndef BOOST_NO_STD_LOCALE - // note order! - if you change this, libstd++ will fail! - // a) create new locale with new codecvt facet - // b) save current locale - // c) change locale to new one - // d) use stream buffer - // e) change locale back to original - // f) destroy new codecvt facet - boost::archive::codecvt_null codecvt_null_facet; - std::locale archive_locale; - basic_ostream_locale_saver< - typename OStream::char_type, - typename OStream::traits_type - > locale_saver; - #endif - - ///////////////////////////////////////////////////////// - // fundamental types that need special treatment - void save(const bool t){ - // trap usage of invalid uninitialized boolean which would - // otherwise crash on load. - BOOST_ASSERT(0 == static_cast(t) || 1 == static_cast(t)); - if(os.fail()) - boost::serialization::throw_exception( - archive_exception(archive_exception::output_stream_error) - ); - os << t; - } - void save(const signed char t) - { - save(static_cast(t)); - } - void save(const unsigned char t) - { - save(static_cast(t)); - } - void save(const char t) - { - save(static_cast(t)); - } - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - void save(const wchar_t t) - { - BOOST_STATIC_ASSERT(sizeof(wchar_t) <= sizeof(int)); - save(static_cast(t)); - } - #endif - - ///////////////////////////////////////////////////////// - // saving of any types not listed above - - template - void save_impl(const T &t, boost::mpl::bool_ &){ - if(os.fail()) - boost::serialization::throw_exception( - archive_exception(archive_exception::output_stream_error) - ); - os << t; - } - - ///////////////////////////////////////////////////////// - // floating point types need even more special treatment - // the following determines whether the type T is some sort - // of floating point type. Note that we then assume that - // the stream << operator is defined on that type - if not - // we'll get a compile time error. This is meant to automatically - // support synthesized types which support floating point - // operations. Also it should handle compiler dependent types - // such long double. Due to John Maddock. - - template - struct is_float { - typedef typename mpl::bool_< - boost::is_floating_point::value - || (std::numeric_limits::is_specialized - && !std::numeric_limits::is_integer - && !std::numeric_limits::is_exact - && std::numeric_limits::max_exponent) - >::type type; - }; - - template - void save_impl(const T &t, boost::mpl::bool_ &){ - // must be a user mistake - can't serialize un-initialized data - if(os.fail()) - boost::serialization::throw_exception( - archive_exception(archive_exception::output_stream_error) - ); - // The formulae for the number of decimla digits required is given in - // http://www2.open-std.org/JTC1/SC22/WG21/docs/papers/2005/n1822.pdf - // which is derived from Kahan's paper: - // www.eecs.berkeley.edu/~wkahan/ieee754status/ieee754.ps - // const unsigned int digits = (std::numeric_limits::digits * 3010) / 10000; - // note: I've commented out the above because I didn't get good results. e.g. - // in one case I got a difference of 19 units. - #ifndef BOOST_NO_CXX11_NUMERIC_LIMITS - const unsigned int digits = std::numeric_limits::max_digits10; - #else - const unsigned int digits = std::numeric_limits::digits10 + 2; - #endif - os << std::setprecision(digits) << std::scientific << t; - } - - template - void save(const T & t){ - typename is_float::type tf; - save_impl(t, tf); - } - - BOOST_ARCHIVE_OR_WARCHIVE_DECL - basic_text_oprimitive(OStream & os, bool no_codecvt); - BOOST_ARCHIVE_OR_WARCHIVE_DECL - ~basic_text_oprimitive(); -public: - // unformatted append of one character - void put(typename OStream::char_type c){ - if(os.fail()) - boost::serialization::throw_exception( - archive_exception(archive_exception::output_stream_error) - ); - os.put(c); - } - // unformatted append of null terminated string - void put(const char * s){ - while('\0' != *s) - os.put(*s++); - } - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - save_binary(const void *address, std::size_t count); -}; - -} //namespace boost -} //namespace archive - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_BASIC_TEXT_OPRIMITIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/basic_xml_archive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/basic_xml_archive.hpp deleted file mode 100644 index bef368b973b..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/basic_xml_archive.hpp +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef BOOST_ARCHIVE_BASIC_XML_TEXT_ARCHIVE_HPP -#define BOOST_ARCHIVE_BASIC_XML_TEXT_ARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_xml_archive.hpp: - -// (C) Copyright 2002 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 // must be the last header - -namespace boost { -namespace archive { - -// constant strings used in xml i/o - -extern -BOOST_ARCHIVE_DECL const char * -BOOST_ARCHIVE_XML_OBJECT_ID(); - -extern -BOOST_ARCHIVE_DECL const char * -BOOST_ARCHIVE_XML_OBJECT_REFERENCE(); - -extern -BOOST_ARCHIVE_DECL const char * -BOOST_ARCHIVE_XML_CLASS_ID(); - -extern -BOOST_ARCHIVE_DECL const char * -BOOST_ARCHIVE_XML_CLASS_ID_REFERENCE(); - -extern -BOOST_ARCHIVE_DECL const char * -BOOST_ARCHIVE_XML_CLASS_NAME(); - -extern -BOOST_ARCHIVE_DECL const char * -BOOST_ARCHIVE_XML_TRACKING(); - -extern -BOOST_ARCHIVE_DECL const char * -BOOST_ARCHIVE_XML_VERSION(); - -extern -BOOST_ARCHIVE_DECL const char * -BOOST_ARCHIVE_XML_SIGNATURE(); - -}// namespace archive -}// namespace boost - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_BASIC_XML_TEXT_ARCHIVE_HPP - diff --git a/contrib/libboost/boost_1_65_0/boost/archive/basic_xml_iarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/basic_xml_iarchive.hpp deleted file mode 100644 index e9f7482f744..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/basic_xml_iarchive.hpp +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef BOOST_ARCHIVE_BASIC_XML_IARCHIVE_HPP -#define BOOST_ARCHIVE_BASIC_XML_IARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_xml_iarchive.hpp - -// (C) Copyright 2002 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 -#include -#include - -#include // must be the last header - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -namespace detail { - template class interface_iarchive; -} // namespace detail - -///////////////////////////////////////////////////////////////////////// -// class basic_xml_iarchive - read serialized objects from a input text stream -template -class BOOST_SYMBOL_VISIBLE basic_xml_iarchive : - public detail::common_iarchive -{ - unsigned int depth; -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else -protected: - friend class detail::interface_iarchive; -#endif - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - load_start(const char *name); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - load_end(const char *name); - - // Anything not an attribute and not a name-value pair is an - // should be trapped here. - template - void load_override(T & t) - { - // If your program fails to compile here, its most likely due to - // not specifying an nvp wrapper around the variable to - // be serialized. - BOOST_MPL_ASSERT((serialization::is_wrapper< T >)); - this->detail_common_iarchive::load_override(t); - } - - // Anything not an attribute - see below - should be a name value - // pair and be processed here - typedef detail::common_iarchive detail_common_iarchive; - template - void load_override( - const boost::serialization::nvp< T > & t - ){ - this->This()->load_start(t.name()); - this->detail_common_iarchive::load_override(t.value()); - this->This()->load_end(t.name()); - } - - // specific overrides for attributes - handle as - // primitives. These are not name-value pairs - // so they have to be intercepted here and passed on to load. - // although the class_id is included in the xml text file in order - // to make the file self describing, it isn't used when loading - // an xml archive. So we can skip it here. Note: we MUST override - // it otherwise it will be loaded as a normal primitive w/o tag and - // leaving the archive in an undetermined state - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - load_override(class_id_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 - load_override(version_type & t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - load_override(tracking_type & t); - // class_name_type can't be handled here as it depends upon the - // char type used by the stream. So require the derived implementation - // handle this. - // void load_override(class_name_type & t); - - BOOST_ARCHIVE_OR_WARCHIVE_DECL - basic_xml_iarchive(unsigned int flags); - BOOST_ARCHIVE_OR_WARCHIVE_DECL - ~basic_xml_iarchive(); -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_BASIC_XML_IARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/basic_xml_oarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/basic_xml_oarchive.hpp deleted file mode 100644 index 107fca4ec65..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/basic_xml_oarchive.hpp +++ /dev/null @@ -1,138 +0,0 @@ -#ifndef BOOST_ARCHIVE_BASIC_XML_OARCHIVE_HPP -#define BOOST_ARCHIVE_BASIC_XML_OARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_xml_oarchive.hpp - -// (C) Copyright 2002 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 -#include -#include - -#include // must be the last header - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -namespace detail { - template class interface_oarchive; -} // namespace detail - -////////////////////////////////////////////////////////////////////// -// class basic_xml_oarchive - write serialized objects to a xml output stream -template -class BOOST_SYMBOL_VISIBLE basic_xml_oarchive : - public detail::common_oarchive -{ - // special stuff for xml output - unsigned int depth; - bool pending_preamble; -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else -protected: - friend class detail::interface_oarchive; -#endif - bool indent_next; - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - indent(); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - init(); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - windup(); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - write_attribute( - const char *attribute_name, - int t, - const char *conjunction = "=\"" - ); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - write_attribute( - const char *attribute_name, - const char *key - ); - // helpers used below - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - save_start(const char *name); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - save_end(const char *name); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - end_preamble(); - - // Anything not an attribute and not a name-value pair is an - // error and should be trapped here. - template - void save_override(T & t) - { - // If your program fails to compile here, its most likely due to - // not specifying an nvp wrapper around the variable to - // be serialized. - BOOST_MPL_ASSERT((serialization::is_wrapper< T >)); - this->detail_common_oarchive::save_override(t); - } - - // special treatment for name-value pairs. - typedef detail::common_oarchive detail_common_oarchive; - template - void save_override( - const ::boost::serialization::nvp< T > & t - ){ - this->This()->save_start(t.name()); - this->detail_common_oarchive::save_override(t.const_value()); - this->This()->save_end(t.name()); - } - - // specific overrides for attributes - not name value pairs so we - // want to trap them before the above "fall through" - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - save_override(const class_id_type & t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - save_override(const class_id_optional_type & t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - save_override(const class_id_reference_type & t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - save_override(const object_id_type & t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - save_override(const object_reference_type & t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - save_override(const version_type & t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - save_override(const class_name_type & t); - BOOST_ARCHIVE_OR_WARCHIVE_DECL void - save_override(const tracking_type & t); - - BOOST_ARCHIVE_OR_WARCHIVE_DECL - basic_xml_oarchive(unsigned int flags); - BOOST_ARCHIVE_OR_WARCHIVE_DECL - ~basic_xml_oarchive(); -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_BASIC_XML_OARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/binary_iarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/binary_iarchive.hpp deleted file mode 100644 index 785ce7610b1..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/binary_iarchive.hpp +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef BOOST_ARCHIVE_BINARY_IARCHIVE_HPP -#define BOOST_ARCHIVE_BINARY_IARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// binary_iarchive.hpp - -// (C) Copyright 2002 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 - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -// do not derive from this class. If you want to extend this functionality -// via inhertance, derived from binary_iarchive_impl instead. This will -// preserve correct static polymorphism. -class BOOST_SYMBOL_VISIBLE binary_iarchive : - public binary_iarchive_impl< - boost::archive::binary_iarchive, - std::istream::char_type, - std::istream::traits_type - >{ -public: - binary_iarchive(std::istream & is, unsigned int flags = 0) : - binary_iarchive_impl< - binary_iarchive, std::istream::char_type, std::istream::traits_type - >(is, flags) - {} - binary_iarchive(std::streambuf & bsb, unsigned int flags = 0) : - binary_iarchive_impl< - binary_iarchive, std::istream::char_type, std::istream::traits_type - >(bsb, flags) - {} -}; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::binary_iarchive) -BOOST_SERIALIZATION_USE_ARRAY_OPTIMIZATION(boost::archive::binary_iarchive) - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#endif // BOOST_ARCHIVE_BINARY_IARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/binary_iarchive_impl.hpp b/contrib/libboost/boost_1_65_0/boost/archive/binary_iarchive_impl.hpp deleted file mode 100644 index b4747c98ece..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/binary_iarchive_impl.hpp +++ /dev/null @@ -1,105 +0,0 @@ -#ifndef BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP -#define BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// binary_iarchive_impl.hpp - -// (C) Copyright 2002 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 - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -namespace detail { - template class interface_iarchive; -} // namespace detail - -template -class BOOST_SYMBOL_VISIBLE binary_iarchive_impl : - public basic_binary_iprimitive, - public basic_binary_iarchive -{ -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else -protected: - #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) - // for some inexplicable reason insertion of "class" generates compile erro - // on msvc 7.1 - friend detail::interface_iarchive; - friend basic_binary_iarchive; - friend load_access; - #else - friend class detail::interface_iarchive; - friend class basic_binary_iarchive; - friend class load_access; - #endif -#endif - template - void load_override(T & t){ - this->basic_binary_iarchive::load_override(t); - } - void init(unsigned int flags){ - if(0 != (flags & no_header)){ - return; - } - #if ! defined(__MWERKS__) - this->basic_binary_iarchive::init(); - this->basic_binary_iprimitive::init(); - #else - basic_binary_iarchive::init(); - basic_binary_iprimitive::init(); - #endif - } - binary_iarchive_impl( - std::basic_streambuf & bsb, - unsigned int flags - ) : - basic_binary_iprimitive( - bsb, - 0 != (flags & no_codecvt) - ), - basic_binary_iarchive(flags) - { - init(flags); - } - binary_iarchive_impl( - std::basic_istream & is, - unsigned int flags - ) : - basic_binary_iprimitive( - * is.rdbuf(), - 0 != (flags & no_codecvt) - ), - basic_binary_iarchive(flags) - { - init(flags); - } -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#endif // BOOST_ARCHIVE_BINARY_IARCHIVE_IMPL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/binary_oarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/binary_oarchive.hpp deleted file mode 100644 index e8313fd7c95..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/binary_oarchive.hpp +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef BOOST_ARCHIVE_BINARY_OARCHIVE_HPP -#define BOOST_ARCHIVE_BINARY_OARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// binary_oarchive.hpp - -// (C) Copyright 2002 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 -#include - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -// do not derive from this class. If you want to extend this functionality -// via inhertance, derived from binary_oarchive_impl instead. This will -// preserve correct static polymorphism. -class BOOST_SYMBOL_VISIBLE binary_oarchive : - public binary_oarchive_impl< - binary_oarchive, std::ostream::char_type, std::ostream::traits_type - > -{ -public: - binary_oarchive(std::ostream & os, unsigned int flags = 0) : - binary_oarchive_impl< - binary_oarchive, std::ostream::char_type, std::ostream::traits_type - >(os, flags) - {} - binary_oarchive(std::streambuf & bsb, unsigned int flags = 0) : - binary_oarchive_impl< - binary_oarchive, std::ostream::char_type, std::ostream::traits_type - >(bsb, flags) - {} -}; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::binary_oarchive) -BOOST_SERIALIZATION_USE_ARRAY_OPTIMIZATION(boost::archive::binary_oarchive) - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#endif // BOOST_ARCHIVE_BINARY_OARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/binary_oarchive_impl.hpp b/contrib/libboost/boost_1_65_0/boost/archive/binary_oarchive_impl.hpp deleted file mode 100644 index 6b4d018a564..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/binary_oarchive_impl.hpp +++ /dev/null @@ -1,106 +0,0 @@ -#ifndef BOOST_ARCHIVE_BINARY_OARCHIVE_IMPL_HPP -#define BOOST_ARCHIVE_BINARY_OARCHIVE_IMPL_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// binary_oarchive_impl.hpp - -// (C) Copyright 2002 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 -#include - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -namespace detail { - template class interface_oarchive; -} // namespace detail - -template -class BOOST_SYMBOL_VISIBLE binary_oarchive_impl : - public basic_binary_oprimitive, - public basic_binary_oarchive -{ -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else -protected: - #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) - // for some inexplicable reason insertion of "class" generates compile erro - // on msvc 7.1 - friend detail::interface_oarchive; - friend basic_binary_oarchive; - friend save_access; - #else - friend class detail::interface_oarchive; - friend class basic_binary_oarchive; - friend class save_access; - #endif -#endif - template - void save_override(T & t){ - this->basic_binary_oarchive::save_override(t); - } - void init(unsigned int flags) { - if(0 != (flags & no_header)){ - return; - } - #if ! defined(__MWERKS__) - this->basic_binary_oarchive::init(); - this->basic_binary_oprimitive::init(); - #else - basic_binary_oarchive::init(); - basic_binary_oprimitive::init(); - #endif - } - binary_oarchive_impl( - std::basic_streambuf & bsb, - unsigned int flags - ) : - basic_binary_oprimitive( - bsb, - 0 != (flags & no_codecvt) - ), - basic_binary_oarchive(flags) - { - init(flags); - } - binary_oarchive_impl( - std::basic_ostream & os, - unsigned int flags - ) : - basic_binary_oprimitive( - * os.rdbuf(), - 0 != (flags & no_codecvt) - ), - basic_binary_oarchive(flags) - { - init(flags); - } -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#endif // BOOST_ARCHIVE_BINARY_OARCHIVE_IMPL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/binary_wiarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/binary_wiarchive.hpp deleted file mode 100644 index 775d8f82726..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/binary_wiarchive.hpp +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef BOOST_ARCHIVE_BINARY_WIARCHIVE_HPP -#define BOOST_ARCHIVE_BINARY_WIARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// binary_wiarchive.hpp - -// (C) Copyright 2002 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 -#ifdef BOOST_NO_STD_WSTREAMBUF -#error "wide char i/o not supported on this platform" -#else - -#include // wistream -#include -#include - -namespace boost { -namespace archive { - -class binary_wiarchive : - public binary_iarchive_impl< - binary_wiarchive, std::wistream::char_type, std::wistream::traits_type - > -{ -public: - binary_wiarchive(std::wistream & is, unsigned int flags = 0) : - binary_iarchive_impl< - binary_wiarchive, std::wistream::char_type, std::wistream::traits_type - >(is, flags) - {} - binary_wiarchive(std::wstreambuf & bsb, unsigned int flags = 0) : - binary_iarchive_impl< - binary_wiarchive, std::wistream::char_type, std::wistream::traits_type - >(bsb, flags) - {} -}; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::binary_wiarchive) - -#endif // BOOST_NO_STD_WSTREAMBUF -#endif // BOOST_ARCHIVE_BINARY_WIARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/binary_woarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/binary_woarchive.hpp deleted file mode 100644 index a8817d6f8b4..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/binary_woarchive.hpp +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef BOOST_ARCHIVE_BINARY_WOARCHIVE_HPP -#define BOOST_ARCHIVE_BINARY_WOARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// binary_woarchive.hpp - -// (C) Copyright 2002 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 -#ifdef BOOST_NO_STD_WSTREAMBUF -#error "wide char i/o not supported on this platform" -#else - -#include -#include -#include - -namespace boost { -namespace archive { - -// do not derive from this class. If you want to extend this functionality -// via inhertance, derived from binary_oarchive_impl instead. This will -// preserve correct static polymorphism. -class binary_woarchive : - public binary_oarchive_impl< - binary_woarchive, std::wostream::char_type, std::wostream::traits_type - > -{ -public: - binary_woarchive(std::wostream & os, unsigned int flags = 0) : - binary_oarchive_impl< - binary_woarchive, std::wostream::char_type, std::wostream::traits_type - >(os, flags) - {} - binary_woarchive(std::wstreambuf & bsb, unsigned int flags = 0) : - binary_oarchive_impl< - binary_woarchive, std::wostream::char_type, std::wostream::traits_type - >(bsb, flags) - {} -}; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::binary_woarchive) - -#endif // BOOST_NO_STD_WSTREAMBUF -#endif // BOOST_ARCHIVE_BINARY_WOARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/codecvt_null.hpp b/contrib/libboost/boost_1_65_0/boost/archive/codecvt_null.hpp deleted file mode 100644 index 7bce2b9b329..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/codecvt_null.hpp +++ /dev/null @@ -1,109 +0,0 @@ -#ifndef BOOST_ARCHIVE_CODECVT_NULL_HPP -#define BOOST_ARCHIVE_CODECVT_NULL_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// codecvt_null.hpp: - -// (C) Copyright 2004 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 // NULL, size_t -#ifndef BOOST_NO_CWCHAR -#include // for mbstate_t -#endif -#include -#include -#include -#include // must be the last header - -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std { -// For STLport on WinCE, BOOST_NO_STDC_NAMESPACE can get defined if STLport is putting symbols in its own namespace. -// In the case of codecvt, however, this does not mean that codecvt is in the global namespace (it will be in STLport's namespace) -# if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) - using ::codecvt; -# endif - using ::mbstate_t; - using ::size_t; -} // namespace -#endif - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -template -class codecvt_null; - -template<> -class codecvt_null : public std::codecvt -{ - virtual bool do_always_noconv() const throw() { - return true; - } -public: - explicit codecvt_null(std::size_t no_locale_manage = 0) : - std::codecvt(no_locale_manage) - {} - virtual ~codecvt_null(){}; -}; - -template<> -class BOOST_SYMBOL_VISIBLE codecvt_null : public std::codecvt -{ - virtual BOOST_WARCHIVE_DECL BOOST_DLLEXPORT std::codecvt_base::result - do_out( - std::mbstate_t & state, - const wchar_t * first1, - const wchar_t * last1, - const wchar_t * & next1, - char * first2, - char * last2, - char * & next2 - ) const BOOST_USED; - virtual BOOST_WARCHIVE_DECL BOOST_DLLEXPORT std::codecvt_base::result - do_in( - std::mbstate_t & state, - const char * first1, - const char * last1, - const char * & next1, - wchar_t * first2, - wchar_t * last2, - wchar_t * & next2 - ) const BOOST_USED; - virtual int do_encoding( ) const throw( ){ - return sizeof(wchar_t) / sizeof(char); - } - virtual int do_max_length( ) const throw( ){ - return do_encoding(); - } -public: - BOOST_DLLEXPORT explicit codecvt_null(std::size_t no_locale_manage = 0) : - std::codecvt(no_locale_manage) - {} - virtual ~codecvt_null(){}; -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif -#include // pop pragmas - -#endif //BOOST_ARCHIVE_CODECVT_NULL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/abi_prefix.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/abi_prefix.hpp deleted file mode 100644 index debf79e9f0b..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/abi_prefix.hpp +++ /dev/null @@ -1,16 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// abi_prefix.hpp - -// (C) Copyright 2002 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 // must be the last header -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4251 4231 4660 4275) -#endif - diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/abi_suffix.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/abi_suffix.hpp deleted file mode 100644 index 4e054d66214..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/abi_suffix.hpp +++ /dev/null @@ -1,15 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// abi_suffix.hpp - -// (C) Copyright 2002 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. - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif -#include // pops abi_suffix.hpp pragmas - diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/archive_serializer_map.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/archive_serializer_map.hpp deleted file mode 100644 index 5432bfc73e7..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/archive_serializer_map.hpp +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef BOOST_ARCHIVE_SERIALIZER_MAP_HPP -#define BOOST_ARCHIVE_SERIALIZER_MAP_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// archive_serializer_map.hpp: extenstion of type_info required for -// serialization. - -// (C) Copyright 2009 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. - -// note: this is nothing more than the thinest of wrappers around -// basic_serializer_map so we can have a one map / archive type. - -#include -#include -#include // must be the last header - -namespace boost { - -namespace serialization { - class extended_type_info; -} // namespace serialization - -namespace archive { -namespace detail { - -class basic_serializer; - -template -class BOOST_SYMBOL_VISIBLE archive_serializer_map { -public: - static BOOST_ARCHIVE_OR_WARCHIVE_DECL bool insert(const basic_serializer * bs); - static BOOST_ARCHIVE_OR_WARCHIVE_DECL void erase(const basic_serializer * bs); - static BOOST_ARCHIVE_OR_WARCHIVE_DECL const basic_serializer * find( - const boost::serialization::extended_type_info & type_ - ); -}; - -} // namespace detail -} // namespace archive -} // namespace boost - -#include // must be the last header - -#endif //BOOST_ARCHIVE_SERIALIZER_MAP_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/auto_link_archive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/auto_link_archive.hpp deleted file mode 100644 index 79b0e490d65..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/auto_link_archive.hpp +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef BOOST_ARCHIVE_DETAIL_AUTO_LINK_ARCHIVE_HPP -#define BOOST_ARCHIVE_DETAIL_AUTO_LINK_ARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// auto_link_archive.hpp -// -// (c) Copyright Robert Ramey 2004 -// 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 library home page at http://www.boost.org/libs/serialization - -//----------------------------------------------------------------------------// - -// This header implements separate compilation features as described in -// http://www.boost.org/more/separate_compilation.html - -// enable automatic library variant selection ------------------------------// - -#include - -#if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SERIALIZATION_NO_LIB) \ -&& !defined(BOOST_ARCHIVE_SOURCE) && !defined(BOOST_WARCHIVE_SOURCE) \ -&& !defined(BOOST_SERIALIZATION_SOURCE) - - // Set the name of our library, this will get undef'ed by auto_link.hpp - // once it's done with it: - // - #define BOOST_LIB_NAME boost_serialization - // - // If we're importing code from a dll, then tell auto_link.hpp about it: - // - #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK) - # define BOOST_DYN_LINK - #endif - // - // And include the header that does the work: - // - #include -#endif // auto-linking disabled - -#endif // BOOST_ARCHIVE_DETAIL_AUTO_LINK_ARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/auto_link_warchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/auto_link_warchive.hpp deleted file mode 100644 index 683d191c20d..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/auto_link_warchive.hpp +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef BOOST_ARCHIVE_DETAIL_AUTO_LINK_WARCHIVE_HPP -#define BOOST_ARCHIVE_DETAIL_AUTO_LINK_WARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// auto_link_warchive.hpp -// -// (c) Copyright Robert Ramey 2004 -// 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 library home page at http://www.boost.org/libs/serialization - -//----------------------------------------------------------------------------// - -// This header implements separate compilation features as described in -// http://www.boost.org/more/separate_compilation.html - -// enable automatic library variant selection ------------------------------// - -#include - -#if !defined(BOOST_WARCHIVE_SOURCE) \ -&& !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SERIALIZATION_NO_LIB) - -// Set the name of our library, this will get undef'ed by auto_link.hpp -// once it's done with it: -// -#define BOOST_LIB_NAME boost_wserialization -// -// If we're importing code from a dll, then tell auto_link.hpp about it: -// -#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK) -# define BOOST_DYN_LINK -#endif -// -// And include the header that does the work: -// -#include -#endif // auto-linking disabled - -#endif // ARCHIVE_DETAIL_AUTO_LINK_ARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_iarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_iarchive.hpp deleted file mode 100644 index 1f5a8bf63bf..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_iarchive.hpp +++ /dev/null @@ -1,105 +0,0 @@ -#ifndef BOOST_ARCHIVE_DETAIL_BASIC_IARCHIVE_HPP -#define BOOST_ARCHIVE_DETAIL_BASIC_IARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_iarchive.hpp: - -// (C) Copyright 2002 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. - -// can't use this - much as I'd like to as borland doesn't support it - -#include -#include -#include - -#include -#include -#include -#include -#include // must be the last header - -namespace boost { -namespace serialization { - class extended_type_info; -} // namespace serialization - -namespace archive { -namespace detail { - -class basic_iarchive_impl; -class basic_iserializer; -class basic_pointer_iserializer; - -////////////////////////////////////////////////////////////////////// -// class basic_iarchive - read serialized objects from a input stream -class BOOST_SYMBOL_VISIBLE basic_iarchive : - private boost::noncopyable, - public boost::archive::detail::helper_collection -{ - friend class basic_iarchive_impl; - // hide implementation of this class to minimize header conclusion - boost::scoped_ptr pimpl; - - virtual void vload(version_type &t) = 0; - virtual void vload(object_id_type &t) = 0; - virtual void vload(class_id_type &t) = 0; - virtual void vload(class_id_optional_type &t) = 0; - virtual void vload(class_name_type &t) = 0; - virtual void vload(tracking_type &t) = 0; -protected: - BOOST_ARCHIVE_DECL basic_iarchive(unsigned int flags); - boost::archive::detail::helper_collection & - get_helper_collection(){ - return *this; - } -public: - // some msvc versions require that the following function be public - // otherwise it should really protected. - virtual BOOST_ARCHIVE_DECL ~basic_iarchive(); - // note: NOT part of the public API. - BOOST_ARCHIVE_DECL void next_object_pointer(void *t); - BOOST_ARCHIVE_DECL void register_basic_serializer( - const basic_iserializer & bis - ); - BOOST_ARCHIVE_DECL void load_object( - void *t, - const basic_iserializer & bis - ); - BOOST_ARCHIVE_DECL const basic_pointer_iserializer * - load_pointer( - void * & t, - const basic_pointer_iserializer * bpis_ptr, - const basic_pointer_iserializer * (*finder)( - const boost::serialization::extended_type_info & eti - ) - ); - // real public API starts here - BOOST_ARCHIVE_DECL void - set_library_version(library_version_type archive_library_version); - BOOST_ARCHIVE_DECL library_version_type - get_library_version() const; - BOOST_ARCHIVE_DECL unsigned int - get_flags() const; - BOOST_ARCHIVE_DECL void - reset_object_address(const void * new_address, const void * old_address); - BOOST_ARCHIVE_DECL void - delete_created_pointers(); -}; - -} // namespace detail -} // namespace archive -} // namespace boost - -#include // pops abi_suffix.hpp pragmas - -#endif //BOOST_ARCHIVE_DETAIL_BASIC_IARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_iserializer.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_iserializer.hpp deleted file mode 100644 index 0d66674c349..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_iserializer.hpp +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP -#define BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_iserializer.hpp: extenstion of type_info required for serialization. - -// (C) Copyright 2002 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 // NULL -#include - -#include -#include -#include -#include -#include // must be the last header - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace serialization { - class extended_type_info; -} // namespace serialization - -// forward declarations -namespace archive { -namespace detail { - -class basic_iarchive; -class basic_pointer_iserializer; - -class BOOST_SYMBOL_VISIBLE basic_iserializer : - public basic_serializer -{ -private: - basic_pointer_iserializer *m_bpis; -protected: - explicit BOOST_ARCHIVE_DECL basic_iserializer( - const boost::serialization::extended_type_info & type - ); - virtual BOOST_ARCHIVE_DECL ~basic_iserializer(); -public: - bool serialized_as_pointer() const { - return m_bpis != NULL; - } - void set_bpis(basic_pointer_iserializer *bpis){ - m_bpis = bpis; - } - const basic_pointer_iserializer * get_bpis_ptr() const { - return m_bpis; - } - virtual void load_object_data( - basic_iarchive & ar, - void *x, - const unsigned int file_version - ) const = 0; - // returns true if class_info should be saved - virtual bool class_info() const = 0 ; - // returns true if objects should be tracked - virtual bool tracking(const unsigned int) const = 0 ; - // returns class version - virtual version_type version() const = 0 ; - // returns true if this class is polymorphic - virtual bool is_polymorphic() const = 0; - virtual void destroy(/*const*/ void *address) const = 0 ; -}; - -} // namespae detail -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_oarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_oarchive.hpp deleted file mode 100644 index c379108d584..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_oarchive.hpp +++ /dev/null @@ -1,94 +0,0 @@ -#ifndef BOOST_ARCHIVE_BASIC_OARCHIVE_HPP -#define BOOST_ARCHIVE_BASIC_OARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_oarchive.hpp: - -// (C) Copyright 2002 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 // NULL -#include -#include -#include - -#include -#include -#include -#include // must be the last header - -namespace boost { -namespace serialization { - class extended_type_info; -} // namespace serialization - -namespace archive { -namespace detail { - -class basic_oarchive_impl; -class basic_oserializer; -class basic_pointer_oserializer; - -////////////////////////////////////////////////////////////////////// -// class basic_oarchive - write serialized objects to an output stream -class BOOST_SYMBOL_VISIBLE basic_oarchive : - private boost::noncopyable, - public boost::archive::detail::helper_collection -{ - friend class basic_oarchive_impl; - // hide implementation of this class to minimize header conclusion - boost::scoped_ptr pimpl; - - // overload these to bracket object attributes. Used to implement - // xml archives - virtual void vsave(const version_type t) = 0; - virtual void vsave(const object_id_type t) = 0; - virtual void vsave(const object_reference_type t) = 0; - virtual void vsave(const class_id_type t) = 0; - virtual void vsave(const class_id_optional_type t) = 0; - virtual void vsave(const class_id_reference_type t) = 0; - virtual void vsave(const class_name_type & t) = 0; - virtual void vsave(const tracking_type t) = 0; -protected: - BOOST_ARCHIVE_DECL basic_oarchive(unsigned int flags = 0); - BOOST_ARCHIVE_DECL boost::archive::detail::helper_collection & - get_helper_collection(); - virtual BOOST_ARCHIVE_DECL ~basic_oarchive(); -public: - // note: NOT part of the public interface - BOOST_ARCHIVE_DECL void register_basic_serializer( - const basic_oserializer & bos - ); - BOOST_ARCHIVE_DECL void save_object( - const void *x, - const basic_oserializer & bos - ); - BOOST_ARCHIVE_DECL void save_pointer( - const void * t, - const basic_pointer_oserializer * bpos_ptr - ); - void save_null_pointer(){ - vsave(NULL_POINTER_TAG); - } - // real public interface starts here - BOOST_ARCHIVE_DECL void end_preamble(); // default implementation does nothing - BOOST_ARCHIVE_DECL library_version_type get_library_version() const; - BOOST_ARCHIVE_DECL unsigned int get_flags() const; -}; - -} // namespace detail -} // namespace archive -} // namespace boost - -#include // pops abi_suffix.hpp pragmas - -#endif //BOOST_ARCHIVE_BASIC_OARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_oserializer.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_oserializer.hpp deleted file mode 100644 index 94247e90056..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_oserializer.hpp +++ /dev/null @@ -1,89 +0,0 @@ -#ifndef BOOST_SERIALIZATION_BASIC_OSERIALIZER_HPP -#define BOOST_SERIALIZATION_BASIC_OSERIALIZER_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_oserializer.hpp: extenstion of type_info required for serialization. - -// (C) Copyright 2002 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 // NULL -#include -#include - -#include -#include -#include - -#include // must be the last header - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace serialization { - class extended_type_info; -} // namespace serialization - -// forward declarations -namespace archive { -namespace detail { - -class basic_oarchive; -class basic_pointer_oserializer; - -class BOOST_SYMBOL_VISIBLE basic_oserializer : - public basic_serializer -{ -private: - basic_pointer_oserializer *m_bpos; -protected: - explicit BOOST_ARCHIVE_DECL basic_oserializer( - const boost::serialization::extended_type_info & type_ - ); - virtual BOOST_ARCHIVE_DECL ~basic_oserializer(); -public: - bool serialized_as_pointer() const { - return m_bpos != NULL; - } - void set_bpos(basic_pointer_oserializer *bpos){ - m_bpos = bpos; - } - const basic_pointer_oserializer * get_bpos() const { - return m_bpos; - } - virtual void save_object_data( - basic_oarchive & ar, const void * x - ) const = 0; - // returns true if class_info should be saved - virtual bool class_info() const = 0; - // returns true if objects should be tracked - virtual bool tracking(const unsigned int flags) const = 0; - // returns class version - virtual version_type version() const = 0; - // returns true if this class is polymorphic - virtual bool is_polymorphic() const = 0; -}; - -} // namespace detail -} // namespace serialization -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_SERIALIZATION_BASIC_OSERIALIZER_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_pointer_iserializer.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_pointer_iserializer.hpp deleted file mode 100644 index 1fc4b14d6e9..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_pointer_iserializer.hpp +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef BOOST_ARCHIVE_BASIC_POINTER_ISERIALIZER_HPP -#define BOOST_ARCHIVE_BASIC_POINTER_ISERIALIZER_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_pointer_oserializer.hpp: extenstion of type_info required for -// serialization. - -// (C) Copyright 2002 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 -#include - -#include // must be the last header - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace serialization { - class extended_type_info; -} // namespace serialization - -// forward declarations -namespace archive { -namespace detail { - -class basic_iarchive; -class basic_iserializer; - -class BOOST_SYMBOL_VISIBLE basic_pointer_iserializer - : public basic_serializer { -protected: - explicit BOOST_ARCHIVE_DECL basic_pointer_iserializer( - const boost::serialization::extended_type_info & type_ - ); - virtual BOOST_ARCHIVE_DECL ~basic_pointer_iserializer(); -public: - virtual void * heap_allocation() const = 0; - virtual const basic_iserializer & get_basic_serializer() const = 0; - virtual void load_object_ptr( - basic_iarchive & ar, - void * x, - const unsigned int file_version - ) const = 0; -}; - -} // namespace detail -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_BASIC_POINTER_ISERIALIZER_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_pointer_oserializer.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_pointer_oserializer.hpp deleted file mode 100644 index 1a5d9549eab..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_pointer_oserializer.hpp +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef BOOST_ARCHIVE_BASIC_POINTER_OSERIALIZER_HPP -#define BOOST_ARCHIVE_BASIC_POINTER_OSERIALIZER_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_pointer_oserializer.hpp: extenstion of type_info required for -// serialization. - -// (C) Copyright 2002 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 -#include - -#include // must be the last header - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace serialization { - class extended_type_info; -} // namespace serialization - -namespace archive { -namespace detail { - -class basic_oarchive; -class basic_oserializer; - -class BOOST_SYMBOL_VISIBLE basic_pointer_oserializer : - public basic_serializer -{ -protected: - explicit BOOST_ARCHIVE_DECL basic_pointer_oserializer( - const boost::serialization::extended_type_info & type_ - ); -public: - virtual BOOST_ARCHIVE_DECL ~basic_pointer_oserializer(); - virtual const basic_oserializer & get_basic_serializer() const = 0; - virtual void save_object_ptr( - basic_oarchive & ar, - const void * x - ) const = 0; -}; - -} // namespace detail -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_BASIC_POINTER_OSERIALIZER_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_serializer.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_serializer.hpp deleted file mode 100644 index f9c4203f862..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_serializer.hpp +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef BOOST_ARCHIVE_BASIC_SERIALIZER_HPP -#define BOOST_ARCHIVE_BASIC_SERIALIZER_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_serializer.hpp: extenstion of type_info required for serialization. - -// (C) Copyright 2002 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 // NULL - -#include -#include -#include - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { -namespace detail { - -class basic_serializer : - private boost::noncopyable -{ - const boost::serialization::extended_type_info * m_eti; -protected: - explicit basic_serializer( - const boost::serialization::extended_type_info & eti - ) : - m_eti(& eti) - {} -public: - inline bool - operator<(const basic_serializer & rhs) const { - // can't compare address since there can be multiple eti records - // for the same type in different execution modules (that is, DLLS) - // leave this here as a reminder not to do this! - // return & lhs.get_eti() < & rhs.get_eti(); - return get_eti() < rhs.get_eti(); - } - const char * get_debug_info() const { - return m_eti->get_debug_info(); - } - const boost::serialization::extended_type_info & get_eti() const { - return * m_eti; - } -}; - -class basic_serializer_arg : public basic_serializer { -public: - basic_serializer_arg(const serialization::extended_type_info & eti) : - basic_serializer(eti) - {} -}; - -} // namespace detail -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#endif // BOOST_ARCHIVE_BASIC_SERIALIZER_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_serializer_map.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_serializer_map.hpp deleted file mode 100644 index 79341803367..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/basic_serializer_map.hpp +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef BOOST_SERIALIZER_MAP_HPP -#define BOOST_SERIALIZER_MAP_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_serializer_map.hpp: extenstion of type_info required for serialization. - -// (C) Copyright 2002 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 -#include - -#include // must be the last header - -namespace boost { -namespace serialization { - class extended_type_info; -} - -namespace archive { -namespace detail { - -class basic_serializer; - -class BOOST_SYMBOL_VISIBLE -basic_serializer_map : public - boost::noncopyable -{ - struct type_info_pointer_compare - { - bool operator()( - const basic_serializer * lhs, const basic_serializer * rhs - ) const ; - }; - typedef std::set< - const basic_serializer *, - type_info_pointer_compare - > map_type; - map_type m_map; -public: - BOOST_ARCHIVE_DECL bool insert(const basic_serializer * bs); - BOOST_ARCHIVE_DECL void erase(const basic_serializer * bs); - BOOST_ARCHIVE_DECL const basic_serializer * find( - const boost::serialization::extended_type_info & type_ - ) const; -private: - // cw 8.3 requires this - basic_serializer_map& operator=(basic_serializer_map const&); -}; - -} // namespace detail -} // namespace archive -} // namespace boost - -#include // must be the last header - -#endif // BOOST_SERIALIZER_MAP_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/check.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/check.hpp deleted file mode 100644 index 10034e7d101..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/check.hpp +++ /dev/null @@ -1,169 +0,0 @@ -#ifndef BOOST_ARCHIVE_DETAIL_CHECK_HPP -#define BOOST_ARCHIVE_DETAIL_CHECK_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#pragma inline_depth(511) -#pragma inline_recursion(on) -#endif - -#if defined(__MWERKS__) -#pragma inline_depth(511) -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// check.hpp: interface for serialization system. - -// (C) Copyright 2009 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 - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace boost { -namespace archive { -namespace detail { - -// checks for objects - -template -inline void check_object_level(){ - typedef - typename mpl::greater_equal< - serialization::implementation_level< T >, - mpl::int_ - >::type typex; - - // trap attempts to serialize objects marked - // not_serializable - BOOST_STATIC_ASSERT(typex::value); -} - -template -inline void check_object_versioning(){ - typedef - typename mpl::or_< - typename mpl::greater< - serialization::implementation_level< T >, - mpl::int_ - >, - typename mpl::equal_to< - serialization::version< T >, - mpl::int_<0> - > - > typex; - // trap attempts to serialize with objects that don't - // save class information in the archive with versioning. - BOOST_STATIC_ASSERT(typex::value); -} - -template -inline void check_object_tracking(){ - // presume it has already been determined that - // T is not a const - BOOST_STATIC_ASSERT(! boost::is_const< T >::value); - typedef typename mpl::equal_to< - serialization::tracking_level< T >, - mpl::int_ - >::type typex; - // saving an non-const object of a type not marked "track_never) - - // may be an indicator of an error usage of the - // serialization library and should be double checked. - // See documentation on object tracking. Also, see the - // "rationale" section of the documenation - // for motivation for this checking. - - BOOST_STATIC_WARNING(typex::value); -} - -// checks for pointers - -template -inline void check_pointer_level(){ - // we should only invoke this once we KNOW that T - // has been used as a pointer!! - typedef - typename mpl::or_< - typename mpl::greater< - serialization::implementation_level< T >, - mpl::int_ - >, - typename mpl::not_< - typename mpl::equal_to< - serialization::tracking_level< T >, - mpl::int_ - > - > - > typex; - // Address the following when serializing to a pointer: - - // a) This type doesn't save class information in the - // archive. That is, the serialization trait implementation - // level <= object_serializable. - // b) Tracking for this type is set to "track selectively" - - // in this case, indication that an object is tracked is - // not stored in the archive itself - see level == object_serializable - // but rather the existence of the operation ar >> T * is used to - // infer that an object of this type should be tracked. So, if - // you save via a pointer but don't load via a pointer the operation - // will fail on load without given any valid reason for the failure. - - // So if your program traps here, consider changing the - // tracking or implementation level traits - or not - // serializing via a pointer. - BOOST_STATIC_WARNING(typex::value); -} - -template -void inline check_pointer_tracking(){ - typedef typename mpl::greater< - serialization::tracking_level< T >, - mpl::int_ - >::type typex; - // serializing an object of a type marked "track_never" through a pointer - // could result in creating more objects than were saved! - BOOST_STATIC_WARNING(typex::value); -} - -template -inline void check_const_loading(){ - typedef - typename mpl::or_< - typename boost::serialization::is_wrapper< T >, - typename mpl::not_< - typename boost::is_const< T > - > - >::type typex; - // cannot load data into a "const" object unless it's a - // wrapper around some other non-const object. - BOOST_STATIC_ASSERT(typex::value); -} - -} // detail -} // archive -} // boost - -#endif // BOOST_ARCHIVE_DETAIL_CHECK_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/common_iarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/common_iarchive.hpp deleted file mode 100644 index 82304f1e5ac..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/common_iarchive.hpp +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef BOOST_ARCHIVE_DETAIL_COMMON_IARCHIVE_HPP -#define BOOST_ARCHIVE_DETAIL_COMMON_IARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// common_iarchive.hpp - -// (C) Copyright 2002 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 -#include - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { -namespace detail { - -class extended_type_info; - -// note: referred to as Curiously Recurring Template Patter (CRTP) -template -class BOOST_SYMBOL_VISIBLE common_iarchive : - public basic_iarchive, - public interface_iarchive -{ - friend class interface_iarchive; -private: - virtual void vload(version_type & t){ - * this->This() >> t; - } - virtual void vload(object_id_type & t){ - * this->This() >> t; - } - virtual void vload(class_id_type & t){ - * this->This() >> t; - } - virtual void vload(class_id_optional_type & t){ - * this->This() >> t; - } - virtual void vload(tracking_type & t){ - * this->This() >> t; - } - virtual void vload(class_name_type &s){ - * this->This() >> s; - } -protected: - // default processing - invoke serialization library - template - void load_override(T & t){ - archive::load(* this->This(), t); - } - // default implementations of functions which emit start/end tags for - // archive types that require them. - void load_start(const char * /*name*/){} - void load_end(const char * /*name*/){} - // default archive initialization - common_iarchive(unsigned int flags = 0) : - basic_iarchive(flags), - interface_iarchive() - {} -}; - -} // namespace detail -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#endif // BOOST_ARCHIVE_DETAIL_COMMON_IARCHIVE_HPP - diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/common_oarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/common_oarchive.hpp deleted file mode 100644 index ee42bbe5976..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/common_oarchive.hpp +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef BOOST_ARCHIVE_DETAIL_COMMON_OARCHIVE_HPP -#define BOOST_ARCHIVE_DETAIL_COMMON_OARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// common_oarchive.hpp - -// (C) Copyright 2002 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 - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { -namespace detail { - -// note: referred to as Curiously Recurring Template Patter (CRTP) -template - -class BOOST_SYMBOL_VISIBLE common_oarchive : - public basic_oarchive, - public interface_oarchive -{ - friend class interface_oarchive; -private: - virtual void vsave(const version_type t){ - * this->This() << t; - } - virtual void vsave(const object_id_type t){ - * this->This() << t; - } - virtual void vsave(const object_reference_type t){ - * this->This() << t; - } - virtual void vsave(const class_id_type t){ - * this->This() << t; - } - virtual void vsave(const class_id_reference_type t){ - * this->This() << t; - } - virtual void vsave(const class_id_optional_type t){ - * this->This() << t; - } - virtual void vsave(const class_name_type & t){ - * this->This() << t; - } - virtual void vsave(const tracking_type t){ - * this->This() << t; - } -protected: - // default processing - invoke serialization library - template - void save_override(T & t){ - archive::save(* this->This(), t); - } - void save_start(const char * /*name*/){} - void save_end(const char * /*name*/){} - common_oarchive(unsigned int flags = 0) : - basic_oarchive(flags), - interface_oarchive() - {} -}; - -} // namespace detail -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#endif // BOOST_ARCHIVE_DETAIL_COMMON_OARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/decl.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/decl.hpp deleted file mode 100644 index 4f731cded37..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/decl.hpp +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef BOOST_ARCHIVE_DETAIL_DECL_HPP -#define BOOST_ARCHIVE_DETAIL_DECL_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2///////// 3/////////4/////////5/////////6/////////7/////////8 -// decl.hpp -// -// (c) Copyright Robert Ramey 2004 -// 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 library home page at http://www.boost.org/libs/serialization - -//----------------------------------------------------------------------------// - -// This header implements separate compilation features as described in -// http://www.boost.org/more/separate_compilation.html - -#include - -#if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SERIALIZATION_DYN_LINK)) - #if defined(BOOST_ARCHIVE_SOURCE) - #define BOOST_ARCHIVE_DECL BOOST_SYMBOL_EXPORT - #else - #define BOOST_ARCHIVE_DECL BOOST_SYMBOL_IMPORT - #endif - - #if defined(BOOST_WARCHIVE_SOURCE) - #define BOOST_WARCHIVE_DECL BOOST_SYMBOL_EXPORT - #else - #define BOOST_WARCHIVE_DECL BOOST_SYMBOL_IMPORT - #endif - - #if defined(BOOST_WARCHIVE_SOURCE) || defined(BOOST_ARCHIVE_SOURCE) - #define BOOST_ARCHIVE_OR_WARCHIVE_DECL BOOST_SYMBOL_EXPORT - #else - #define BOOST_ARCHIVE_OR_WARCHIVE_DECL BOOST_SYMBOL_IMPORT - #endif - -#endif - -#if ! defined(BOOST_ARCHIVE_DECL) - #define BOOST_ARCHIVE_DECL -#endif -#if ! defined(BOOST_WARCHIVE_DECL) - #define BOOST_WARCHIVE_DECL -#endif -#if ! defined(BOOST_ARCHIVE_OR_WARCHIVE_DECL) - #define BOOST_ARCHIVE_OR_WARCHIVE_DECL -#endif - -#endif // BOOST_ARCHIVE_DETAIL_DECL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/helper_collection.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/helper_collection.hpp deleted file mode 100644 index edb4125e308..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/helper_collection.hpp +++ /dev/null @@ -1,99 +0,0 @@ -#ifndef BOOST_ARCHIVE_DETAIL_HELPER_COLLECTION_HPP -#define BOOST_ARCHIVE_DETAIL_HELPER_COLLECTION_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 -// helper_collection.hpp: archive support for run-time helpers - -// (C) Copyright 2002-2008 Robert Ramey and Joaquin M Lopez Munoz -// 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 // NULL -#include -#include -#include -#include - -#include - -#include -#include - -namespace boost { - -namespace archive { -namespace detail { - -class helper_collection -{ - helper_collection(const helper_collection&); // non-copyable - helper_collection& operator = (const helper_collection&); // non-copyable - - // note: we dont' actually "share" the function object pointer - // we only use shared_ptr to make sure that it get's deleted - - typedef std::pair< - const void *, - boost::shared_ptr - > helper_value_type; - template - boost::shared_ptr make_helper_ptr(){ - // use boost::shared_ptr rather than std::shared_ptr to maintain - // c++03 compatibility - return boost::make_shared(); - } - - typedef std::vector collection; - collection m_collection; - - struct predicate { - BOOST_DELETED_FUNCTION(predicate & operator=(const predicate & rhs)) - public: - const void * const m_ti; - bool operator()(helper_value_type const &rhs) const { - return m_ti == rhs.first; - } - predicate(const void * ti) : - m_ti(ti) - {} - }; -protected: - helper_collection(){} - ~helper_collection(){} -public: - template - Helper& find_helper(void * const id = 0) { - collection::const_iterator it = - std::find_if( - m_collection.begin(), - m_collection.end(), - predicate(id) - ); - - void * rval = 0; - if(it == m_collection.end()){ - m_collection.push_back( - std::make_pair(id, make_helper_ptr()) - ); - rval = m_collection.back().second.get(); - } - else{ - rval = it->second.get(); - } - return *static_cast(rval); - } -}; - -} // namespace detail -} // namespace serialization -} // namespace boost - -#endif // BOOST_ARCHIVE_DETAIL_HELPER_COLLECTION_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/interface_iarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/interface_iarchive.hpp deleted file mode 100644 index 4a99e28b59f..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/interface_iarchive.hpp +++ /dev/null @@ -1,85 +0,0 @@ -#ifndef BOOST_ARCHIVE_DETAIL_INTERFACE_IARCHIVE_HPP -#define BOOST_ARCHIVE_DETAIL_INTERFACE_IARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// interface_iarchive.hpp - -// (C) Copyright 2002 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 // NULL -#include -#include -#include -#include -#include -#include -#include // must be the last header - -namespace boost { -namespace archive { -namespace detail { - -class basic_pointer_iserializer; - -template -class interface_iarchive -{ -protected: - interface_iarchive(){}; -public: - ///////////////////////////////////////////////////////// - // archive public interface - typedef mpl::bool_ is_loading; - typedef mpl::bool_ is_saving; - - // return a pointer to the most derived class - Archive * This(){ - return static_cast(this); - } - - template - const basic_pointer_iserializer * - register_type(T * = NULL){ - const basic_pointer_iserializer & bpis = - boost::serialization::singleton< - pointer_iserializer - >::get_const_instance(); - this->This()->register_basic_serializer(bpis.get_basic_serializer()); - return & bpis; - } - template - Helper & - get_helper(void * const id = 0){ - helper_collection & hc = this->This()->get_helper_collection(); - return hc.template find_helper(id); - } - - template - Archive & operator>>(T & t){ - this->This()->load_override(t); - return * this->This(); - } - - // the & operator - template - Archive & operator&(T & t){ - return *(this->This()) >> t; - } -}; - -} // namespace detail -} // namespace archive -} // namespace boost - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_DETAIL_INTERFACE_IARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/interface_oarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/interface_oarchive.hpp deleted file mode 100644 index 359463ed9d8..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/interface_oarchive.hpp +++ /dev/null @@ -1,87 +0,0 @@ -#ifndef BOOST_ARCHIVE_DETAIL_INTERFACE_OARCHIVE_HPP -#define BOOST_ARCHIVE_DETAIL_INTERFACE_OARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// interface_oarchive.hpp - -// (C) Copyright 2002 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 // NULL -#include -#include - -#include -#include -#include // must be the last header - -#include - -namespace boost { -namespace archive { -namespace detail { - -class basic_pointer_oserializer; - -template -class interface_oarchive -{ -protected: - interface_oarchive(){}; -public: - ///////////////////////////////////////////////////////// - // archive public interface - typedef mpl::bool_ is_loading; - typedef mpl::bool_ is_saving; - - // return a pointer to the most derived class - Archive * This(){ - return static_cast(this); - } - - template - const basic_pointer_oserializer * - register_type(const T * = NULL){ - const basic_pointer_oserializer & bpos = - boost::serialization::singleton< - pointer_oserializer - >::get_const_instance(); - this->This()->register_basic_serializer(bpos.get_basic_serializer()); - return & bpos; - } - - template - Helper & - get_helper(void * const id = 0){ - helper_collection & hc = this->This()->get_helper_collection(); - return hc.template find_helper(id); - } - - template - Archive & operator<<(const T & t){ - this->This()->save_override(t); - return * this->This(); - } - - // the & operator - template - Archive & operator&(const T & t){ - return * this ->This() << t; - } -}; - -} // namespace detail -} // namespace archive -} // namespace boost - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_DETAIL_INTERFACE_IARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/iserializer.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/iserializer.hpp deleted file mode 100644 index 193e98a82e4..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/iserializer.hpp +++ /dev/null @@ -1,631 +0,0 @@ -#ifndef BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP -#define BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#pragma inline_depth(511) -#pragma inline_recursion(on) -#endif - -#if defined(__MWERKS__) -#pragma inline_depth(511) -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// iserializer.hpp: interface for serialization system. - -// (C) Copyright 2002 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 // for placement new -#include // size_t, NULL - -#include -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#include - -#include -#include -#include -#include -#include - -#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO - #include -#endif -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include - -#ifndef BOOST_MSVC - #define DONT_USE_HAS_NEW_OPERATOR ( \ - BOOST_WORKAROUND(__IBMCPP__, < 1210) \ - || defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590) \ - ) -#else - #define DONT_USE_HAS_NEW_OPERATOR 0 -#endif - -#if ! DONT_USE_HAS_NEW_OPERATOR -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// the following is need only for dynamic cast of polymorphic pointers -#include -#include -#include -#include -#include -#include - -namespace boost { - -namespace serialization { - class extended_type_info; -} // namespace serialization - -namespace archive { - -// an accessor to permit friend access to archives. Needed because -// some compilers don't handle friend templates completely -class load_access { -public: - template - static void load_primitive(Archive &ar, T &t){ - ar.load(t); - } -}; - -namespace detail { - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -template -class iserializer : public basic_iserializer -{ -private: - virtual void destroy(/*const*/ void *address) const { - boost::serialization::access::destroy(static_cast(address)); - } -protected: - // protected constructor since it's always created by singleton - explicit iserializer() : - basic_iserializer( - boost::serialization::singleton< - typename - boost::serialization::type_info_implementation< T >::type - >::get_const_instance() - ) - {} -public: - virtual BOOST_DLLEXPORT void load_object_data( - basic_iarchive & ar, - void *x, - const unsigned int file_version - ) const BOOST_USED; - virtual bool class_info() const { - return boost::serialization::implementation_level< T >::value - >= boost::serialization::object_class_info; - } - virtual bool tracking(const unsigned int /* flags */) const { - return boost::serialization::tracking_level< T >::value - == boost::serialization::track_always - || ( boost::serialization::tracking_level< T >::value - == boost::serialization::track_selectively - && serialized_as_pointer()); - } - virtual version_type version() const { - return version_type(::boost::serialization::version< T >::value); - } - virtual bool is_polymorphic() const { - return boost::is_polymorphic< T >::value; - } - virtual ~iserializer(){}; -}; - -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif - -template -BOOST_DLLEXPORT void iserializer::load_object_data( - basic_iarchive & ar, - void *x, - const unsigned int file_version -) const { - // note: we now comment this out. Before we permited archive - // version # to be very large. Now we don't. To permit - // readers of these old archives, we have to suppress this - // code. Perhaps in the future we might re-enable it but - // permit its suppression with a runtime switch. - #if 0 - // trap case where the program cannot handle the current version - if(file_version > static_cast(version())) - boost::serialization::throw_exception( - archive::archive_exception( - boost::archive::archive_exception::unsupported_class_version, - get_debug_info() - ) - ); - #endif - // make sure call is routed through the higest interface that might - // be specialized by the user. - boost::serialization::serialize_adl( - boost::serialization::smart_cast_reference(ar), - * static_cast(x), - file_version - ); -} - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -// the purpose of this code is to allocate memory for an object -// without requiring the constructor to be called. Presumably -// the allocated object will be subsequently initialized with -// "placement new". -// note: we have the boost type trait has_new_operator but we -// have no corresponding has_delete_operator. So we presume -// that the former being true would imply that the a delete -// operator is also defined for the class T. - -template -struct heap_allocation { - // boost::has_new_operator< T > doesn't work on these compilers - #if DONT_USE_HAS_NEW_OPERATOR - // This doesn't handle operator new overload for class T - static T * invoke_new(){ - return static_cast(operator new(sizeof(T))); - } - static void invoke_delete(T *t){ - (operator delete(t)); - } - #else - // note: we presume that a true value for has_new_operator - // implies the existence of a class specific delete operator as well - // as a class specific new operator. - struct has_new_operator { - static T * invoke_new() { - return static_cast((T::operator new)(sizeof(T))); - } - static void invoke_delete(T * t) { - // if compilation fails here, the likely cause that the class - // T has a class specific new operator but no class specific - // delete operator which matches the following signature. - // note that this solution addresses the issue that two - // possible signatures. But it doesn't address the possibility - // that the class might have class specific new with NO - // class specific delete at all. Patches (compatible with - // C++03) welcome! - delete t; - } - }; - struct doesnt_have_new_operator { - static T* invoke_new() { - return static_cast(operator new(sizeof(T))); - } - static void invoke_delete(T * t) { - // Note: I'm reliance upon automatic conversion from T * to void * here - delete t; - } - }; - static T * invoke_new() { - typedef typename - mpl::eval_if< - boost::has_new_operator< T >, - mpl::identity, - mpl::identity - >::type typex; - return typex::invoke_new(); - } - static void invoke_delete(T *t) { - typedef typename - mpl::eval_if< - boost::has_new_operator< T >, - mpl::identity, - mpl::identity - >::type typex; - typex::invoke_delete(t); - } - #endif - explicit heap_allocation(){ - m_p = invoke_new(); - } - ~heap_allocation(){ - if (0 != m_p) - invoke_delete(m_p); - } - T* get() const { - return m_p; - } - - T* release() { - T* p = m_p; - m_p = 0; - return p; - } -private: - T* m_p; -}; - -template -class pointer_iserializer : - public basic_pointer_iserializer -{ -private: - virtual void * heap_allocation() const { - detail::heap_allocation h; - T * t = h.get(); - h.release(); - return t; - } - virtual const basic_iserializer & get_basic_serializer() const { - return boost::serialization::singleton< - iserializer - >::get_const_instance(); - } - BOOST_DLLEXPORT virtual void load_object_ptr( - basic_iarchive & ar, - void * x, - const unsigned int file_version - ) const BOOST_USED; -protected: - // this should alway be a singleton so make the constructor protected - pointer_iserializer(); - ~pointer_iserializer(); -}; - -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif - -// note: BOOST_DLLEXPORT is so that code for polymorphic class -// serialized only through base class won't get optimized out -template -BOOST_DLLEXPORT void pointer_iserializer::load_object_ptr( - basic_iarchive & ar, - void * t, - const unsigned int file_version -) const -{ - Archive & ar_impl = - boost::serialization::smart_cast_reference(ar); - - // note that the above will throw std::bad_alloc if the allocation - // fails so we don't have to address this contingency here. - - // catch exception during load_construct_data so that we don't - // automatically delete the t which is most likely not fully - // constructed - BOOST_TRY { - // this addresses an obscure situation that occurs when - // load_constructor de-serializes something through a pointer. - ar.next_object_pointer(t); - boost::serialization::load_construct_data_adl( - ar_impl, - static_cast(t), - file_version - ); - } - BOOST_CATCH(...){ - // if we get here the load_construct failed. The heap_allocation - // will be automatically deleted so we don't have to do anything - // special here. - BOOST_RETHROW; - } - BOOST_CATCH_END - - ar_impl >> boost::serialization::make_nvp(NULL, * static_cast(t)); -} - -template -pointer_iserializer::pointer_iserializer() : - basic_pointer_iserializer( - boost::serialization::singleton< - typename - boost::serialization::type_info_implementation< T >::type - >::get_const_instance() - ) -{ - boost::serialization::singleton< - iserializer - >::get_mutable_instance().set_bpis(this); - archive_serializer_map::insert(this); -} - -template -pointer_iserializer::~pointer_iserializer(){ - archive_serializer_map::erase(this); -} - -template -struct load_non_pointer_type { - // note this bounces the call right back to the archive - // with no runtime overhead - struct load_primitive { - template - static void invoke(Archive & ar, T & t){ - load_access::load_primitive(ar, t); - } - }; - // note this bounces the call right back to the archive - // with no runtime overhead - struct load_only { - template - static void invoke(Archive & ar, const T & t){ - // short cut to user's serializer - // make sure call is routed through the higest interface that might - // be specialized by the user. - boost::serialization::serialize_adl( - ar, - const_cast(t), - boost::serialization::version< T >::value - ); - } - }; - - // note this save class information including version - // and serialization level to the archive - struct load_standard { - template - static void invoke(Archive &ar, const T & t){ - void * x = & const_cast(t); - ar.load_object( - x, - boost::serialization::singleton< - iserializer - >::get_const_instance() - ); - } - }; - - struct load_conditional { - template - static void invoke(Archive &ar, T &t){ - //if(0 == (ar.get_flags() & no_tracking)) - load_standard::invoke(ar, t); - //else - // load_only::invoke(ar, t); - } - }; - - template - static void invoke(Archive & ar, T &t){ - typedef typename mpl::eval_if< - // if its primitive - mpl::equal_to< - boost::serialization::implementation_level< T >, - mpl::int_ - >, - mpl::identity, - // else - typename mpl::eval_if< - // class info / version - mpl::greater_equal< - boost::serialization::implementation_level< T >, - mpl::int_ - >, - // do standard load - mpl::identity, - // else - typename mpl::eval_if< - // no tracking - mpl::equal_to< - boost::serialization::tracking_level< T >, - mpl::int_ - >, - // do a fast load - mpl::identity, - // else - // do a fast load only tracking is turned off - mpl::identity - > > >::type typex; - check_object_versioning< T >(); - check_object_level< T >(); - typex::invoke(ar, t); - } -}; - -template -struct load_pointer_type { - struct abstract - { - template - static const basic_pointer_iserializer * register_type(Archive & /* ar */){ - // it has? to be polymorphic - BOOST_STATIC_ASSERT(boost::is_polymorphic< T >::value); - return static_cast(NULL); - } - }; - - struct non_abstract - { - template - static const basic_pointer_iserializer * register_type(Archive & ar){ - return ar.register_type(static_cast(NULL)); - } - }; - - template - static const basic_pointer_iserializer * register_type(Archive &ar, const T & /*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 - // virtual serialize functions used for plug-ins - typedef typename - mpl::eval_if< - boost::serialization::is_abstract, - boost::mpl::identity, - boost::mpl::identity - >::type typex; - return typex::template register_type< T >(ar); - } - - template - static T * pointer_tweak( - const boost::serialization::extended_type_info & eti, - void const * const t, - const T & - ) { - // tweak the pointer back to the base class - void * upcast = const_cast( - boost::serialization::void_upcast( - eti, - boost::serialization::singleton< - typename - boost::serialization::type_info_implementation< T >::type - >::get_const_instance(), - t - ) - ); - if(NULL == upcast) - boost::serialization::throw_exception( - archive_exception(archive_exception::unregistered_class) - ); - return static_cast(upcast); - } - - template - static void check_load(T & /* t */){ - check_pointer_level< T >(); - check_pointer_tracking< T >(); - } - - static const basic_pointer_iserializer * - find(const boost::serialization::extended_type_info & type){ - return static_cast( - archive_serializer_map::find(type) - ); - } - - template - static void invoke(Archive & ar, Tptr & 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 - // include const) to void * &. This is the only way - // I could make it work. RR - (void * & )t, - bpis_ptr, - find - ); - // if the pointer isn't that of the base class - if(newbpis_ptr != bpis_ptr){ - t = pointer_tweak(newbpis_ptr->get_eti(), t, *t); - } - } -}; - -template -struct load_enum_type { - template - static void invoke(Archive &ar, T &t){ - // convert integers to correct enum to load - int i; - ar >> boost::serialization::make_nvp(NULL, i); - t = static_cast< T >(i); - } -}; - -template -struct load_array_type { - template - static void invoke(Archive &ar, T &t){ - typedef typename remove_extent< T >::type value_type; - - // convert integers to correct enum to load - // determine number of elements in the array. Consider the - // fact that some machines will align elements on boundries - // other than characters. - std::size_t current_count = sizeof(t) / ( - static_cast(static_cast(&t[1])) - - static_cast(static_cast(&t[0])) - ); - boost::serialization::collection_size_type count; - ar >> BOOST_SERIALIZATION_NVP(count); - if(static_cast(count) > current_count) - boost::serialization::throw_exception( - archive::archive_exception( - boost::archive::archive_exception::array_size_too_short - ) - ); - // explict template arguments to pass intel C++ compiler - ar >> serialization::make_array< - value_type, - boost::serialization::collection_size_type - >( - static_cast(&t[0]), - count - ); - } -}; - -} // detail - -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 - // function template ordering. On other compilers, this is - // handled below. - detail::check_const_loading< T >(); - typedef - typename mpl::eval_if, - mpl::identity > - ,//else - typename mpl::eval_if, - mpl::identity > - ,//else - typename mpl::eval_if, - mpl::identity > - ,//else - mpl::identity > - > - > - >::type typex; - typex::invoke(ar, t); -} - -} // namespace archive -} // namespace boost - -#endif // BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/oserializer.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/oserializer.hpp deleted file mode 100644 index c120ec55073..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/oserializer.hpp +++ /dev/null @@ -1,540 +0,0 @@ -#ifndef BOOST_ARCHIVE_OSERIALIZER_HPP -#define BOOST_ARCHIVE_OSERIALIZER_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#pragma inline_depth(511) -#pragma inline_recursion(on) -#endif - -#if defined(__MWERKS__) -#pragma inline_depth(511) -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// oserializer.hpp: interface for serialization system. - -// (C) Copyright 2002 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 // NULL - -#include -#include -#include - -#include -#include -#include -#include -#include - -#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO - #include -#endif -#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 - -namespace boost { - -namespace serialization { - class extended_type_info; -} // namespace serialization - -namespace archive { - -// an accessor to permit friend access to archives. Needed because -// some compilers don't handle friend templates completely -class save_access { -public: - template - static void end_preamble(Archive & ar){ - ar.end_preamble(); - } - template - static void save_primitive(Archive & ar, const T & t){ - ar.end_preamble(); - ar.save(t); - } -}; - -namespace detail { - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -template -class oserializer : public basic_oserializer -{ -private: - // private constructor to inhibit any existence other than the - // static one -public: - explicit BOOST_DLLEXPORT oserializer() : - basic_oserializer( - boost::serialization::singleton< - typename - boost::serialization::type_info_implementation< T >::type - >::get_const_instance() - ) - {} - virtual BOOST_DLLEXPORT void save_object_data( - basic_oarchive & ar, - const void *x - ) const BOOST_USED; - virtual bool class_info() const { - return boost::serialization::implementation_level< T >::value - >= boost::serialization::object_class_info; - } - virtual bool tracking(const unsigned int /* flags */) const { - return boost::serialization::tracking_level< T >::value == boost::serialization::track_always - || (boost::serialization::tracking_level< T >::value == boost::serialization::track_selectively - && serialized_as_pointer()); - } - virtual version_type version() const { - return version_type(::boost::serialization::version< T >::value); - } - virtual bool is_polymorphic() const { - return boost::is_polymorphic< T >::value; - } - virtual ~oserializer(){} -}; - -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif - -template -BOOST_DLLEXPORT void oserializer::save_object_data( - basic_oarchive & ar, - const void *x -) const { - // make sure call is routed through the highest interface that might - // be specialized by the user. - BOOST_STATIC_ASSERT(boost::is_const< T >::value == false); - boost::serialization::serialize_adl( - boost::serialization::smart_cast_reference(ar), - * static_cast(const_cast(x)), - version() - ); -} - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -template -class pointer_oserializer : - public basic_pointer_oserializer -{ -private: - const basic_oserializer & - get_basic_serializer() const { - return boost::serialization::singleton< - oserializer - >::get_const_instance(); - } - virtual BOOST_DLLEXPORT void save_object_ptr( - basic_oarchive & ar, - const void * x - ) const BOOST_USED; -public: - pointer_oserializer(); - ~pointer_oserializer(); -}; - -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif - -template -BOOST_DLLEXPORT void pointer_oserializer::save_object_ptr( - basic_oarchive & ar, - const void * x -) const { - BOOST_ASSERT(NULL != x); - // make sure call is routed through the highest interface that might - // be specialized by the user. - T * t = static_cast(const_cast(x)); - const unsigned int file_version = boost::serialization::version< T >::value; - Archive & ar_impl - = boost::serialization::smart_cast_reference(ar); - boost::serialization::save_construct_data_adl( - ar_impl, - t, - file_version - ); - ar_impl << boost::serialization::make_nvp(NULL, * t); -} - -template -pointer_oserializer::pointer_oserializer() : - basic_pointer_oserializer( - boost::serialization::singleton< - typename - boost::serialization::type_info_implementation< T >::type - >::get_const_instance() - ) -{ - // make sure appropriate member function is instantiated - boost::serialization::singleton< - oserializer - >::get_mutable_instance().set_bpos(this); - archive_serializer_map::insert(this); -} - -template -pointer_oserializer::~pointer_oserializer(){ - archive_serializer_map::erase(this); -} - -template -struct save_non_pointer_type { - // note this bounces the call right back to the archive - // with no runtime overhead - struct save_primitive { - template - static void invoke(Archive & ar, const T & t){ - save_access::save_primitive(ar, t); - } - }; - // same as above but passes through serialization - struct save_only { - template - static void invoke(Archive & ar, const T & t){ - // make sure call is routed through the highest interface that might - // be specialized by the user. - boost::serialization::serialize_adl( - ar, - const_cast(t), - ::boost::serialization::version< T >::value - ); - } - }; - // adds class information to the archive. This includes - // serialization level and class version - struct save_standard { - template - static void invoke(Archive &ar, const T & t){ - ar.save_object( - & t, - boost::serialization::singleton< - oserializer - >::get_const_instance() - ); - } - }; - - // adds class information to the archive. This includes - // serialization level and class version - struct save_conditional { - template - static void invoke(Archive &ar, const T &t){ - //if(0 == (ar.get_flags() & no_tracking)) - save_standard::invoke(ar, t); - //else - // save_only::invoke(ar, t); - } - }; - - - template - static void invoke(Archive & ar, const T & t){ - typedef - typename mpl::eval_if< - // if its primitive - mpl::equal_to< - boost::serialization::implementation_level< T >, - mpl::int_ - >, - mpl::identity, - // else - typename mpl::eval_if< - // class info / version - mpl::greater_equal< - boost::serialization::implementation_level< T >, - mpl::int_ - >, - // do standard save - mpl::identity, - // else - typename mpl::eval_if< - // no tracking - mpl::equal_to< - boost::serialization::tracking_level< T >, - mpl::int_ - >, - // do a fast save - mpl::identity, - // else - // do a fast save only tracking is turned off - mpl::identity - > > >::type typex; - check_object_versioning< T >(); - typex::invoke(ar, t); - } - template - static void invoke(Archive & ar, T & t){ - check_object_level< T >(); - check_object_tracking< T >(); - invoke(ar, const_cast(t)); - } -}; - -template -struct save_pointer_type { - struct abstract - { - template - static const basic_pointer_oserializer * register_type(Archive & /* ar */){ - // it has? to be polymorphic - BOOST_STATIC_ASSERT(boost::is_polymorphic< T >::value); - return NULL; - } - }; - - struct non_abstract - { - template - static const basic_pointer_oserializer * register_type(Archive & ar){ - return ar.register_type(static_cast(NULL)); - } - }; - - template - static const basic_pointer_oserializer * register_type(Archive &ar, T & /*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 - // virtual serialize functions used for plug-ins - typedef - typename mpl::eval_if< - boost::serialization::is_abstract< T >, - mpl::identity, - mpl::identity - >::type typex; - return typex::template register_type< T >(ar); - } - - struct non_polymorphic - { - template - static void save( - Archive &ar, - T & t - ){ - const basic_pointer_oserializer & bpos = - boost::serialization::singleton< - pointer_oserializer - >::get_const_instance(); - // save the requested pointer type - ar.save_pointer(& t, & bpos); - } - }; - - struct polymorphic - { - template - static void save( - Archive &ar, - T & t - ){ - typename - boost::serialization::type_info_implementation< T >::type const - & i = boost::serialization::singleton< - typename - boost::serialization::type_info_implementation< T >::type - >::get_const_instance(); - - boost::serialization::extended_type_info const * const this_type = & i; - - // retrieve the true type of the object pointed to - // if this assertion fails its an error in this library - BOOST_ASSERT(NULL != this_type); - - const boost::serialization::extended_type_info * true_type = - i.get_derived_extended_type_info(t); - - // note:if this exception is thrown, be sure that derived pointer - // is either registered or exported. - if(NULL == true_type){ - boost::serialization::throw_exception( - archive_exception( - archive_exception::unregistered_class, - "derived class not registered or exported" - ) - ); - } - - // 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); - ar.save_pointer(vp, bpos); - return; - } - // convert pointer to more derived type. if this is thrown - // it means that the base/derived relationship hasn't be registered - vp = serialization::void_downcast( - *true_type, - *this_type, - static_cast(&t) - ); - if(NULL == vp){ - boost::serialization::throw_exception( - archive_exception( - archive_exception::unregistered_cast, - true_type->get_debug_info(), - this_type->get_debug_info() - ) - ); - } - - // since true_type is valid, and this only gets made if the - // pointer oserializer object has been created, this should never - // fail - const basic_pointer_oserializer * bpos - = static_cast( - boost::serialization::singleton< - archive_serializer_map - >::get_const_instance().find(*true_type) - ); - BOOST_ASSERT(NULL != bpos); - if(NULL == bpos) - boost::serialization::throw_exception( - archive_exception( - archive_exception::unregistered_class, - "derived class not registered or exported" - ) - ); - ar.save_pointer(vp, bpos); - } - }; - - template - static void save( - Archive & ar, - const T & t - ){ - check_pointer_level< T >(); - check_pointer_tracking< T >(); - typedef typename mpl::eval_if< - is_polymorphic< T >, - mpl::identity, - mpl::identity - >::type type; - type::save(ar, const_cast(t)); - } - - template - static void invoke(Archive &ar, const TPtr t){ - register_type(ar, * t); - if(NULL == t){ - basic_oarchive & boa - = boost::serialization::smart_cast_reference(ar); - boa.save_null_pointer(); - save_access::end_preamble(ar); - return; - } - save(ar, * t); - } -}; - -template -struct save_enum_type -{ - template - static void invoke(Archive &ar, const T &t){ - // convert enum to integers on save - const int i = static_cast(t); - ar << boost::serialization::make_nvp(NULL, i); - } -}; - -template -struct save_array_type -{ - template - static void invoke(Archive &ar, const T &t){ - typedef typename boost::remove_extent< T >::type value_type; - - save_access::end_preamble(ar); - // consider alignment - std::size_t c = sizeof(t) / ( - static_cast(static_cast(&t[1])) - - static_cast(static_cast(&t[0])) - ); - boost::serialization::collection_size_type count(c); - ar << BOOST_SERIALIZATION_NVP(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 - ); - } -}; - -} // detail - -template -inline void save(Archive & ar, /*const*/ T &t){ - typedef - typename mpl::eval_if, - mpl::identity >, - //else - typename mpl::eval_if, - mpl::identity >, - //else - typename mpl::eval_if, - mpl::identity >, - //else - mpl::identity > - > - > - >::type typex; - typex::invoke(ar, t); -} - -} // namespace archive -} // namespace boost - -#endif // BOOST_ARCHIVE_OSERIALIZER_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/polymorphic_iarchive_route.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/polymorphic_iarchive_route.hpp deleted file mode 100644 index 105685ebbd8..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/polymorphic_iarchive_route.hpp +++ /dev/null @@ -1,218 +0,0 @@ -#ifndef BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_ROUTE_HPP -#define BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_ROUTE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_iarchive_route.hpp - -// (C) Copyright 2002 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 - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#include -#include -#include -#include // must be the last header - -namespace boost { -namespace serialization { - class extended_type_info; -} // namespace serialization -namespace archive { -namespace detail{ - -class basic_iserializer; -class basic_pointer_iserializer; - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -template -class polymorphic_iarchive_route : - public polymorphic_iarchive, - // note: gcc dynamic cross cast fails if the the derivation below is - // not public. I think this is a mistake. - public /*protected*/ ArchiveImplementation -{ -private: - // these are used by the serialization library. - virtual void load_object( - void *t, - const basic_iserializer & bis - ){ - ArchiveImplementation::load_object(t, bis); - } - virtual const basic_pointer_iserializer * load_pointer( - void * & t, - const basic_pointer_iserializer * bpis_ptr, - const basic_pointer_iserializer * (*finder)( - const boost::serialization::extended_type_info & type - ) - ){ - return ArchiveImplementation::load_pointer(t, bpis_ptr, finder); - } - virtual void set_library_version(library_version_type archive_library_version){ - ArchiveImplementation::set_library_version(archive_library_version); - } - virtual library_version_type get_library_version() const{ - return ArchiveImplementation::get_library_version(); - } - virtual unsigned int get_flags() const { - return ArchiveImplementation::get_flags(); - } - virtual void delete_created_pointers(){ - ArchiveImplementation::delete_created_pointers(); - } - virtual void reset_object_address( - const void * new_address, - const void * old_address - ){ - ArchiveImplementation::reset_object_address(new_address, old_address); - } - virtual void load_binary(void * t, std::size_t size){ - ArchiveImplementation::load_binary(t, size); - } - // primitive types the only ones permitted by polymorphic archives - virtual void load(bool & t){ - ArchiveImplementation::load(t); - } - virtual void load(char & t){ - ArchiveImplementation::load(t); - } - virtual void load(signed char & t){ - ArchiveImplementation::load(t); - } - virtual void load(unsigned char & t){ - ArchiveImplementation::load(t); - } - #ifndef BOOST_NO_CWCHAR - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - virtual void load(wchar_t & t){ - ArchiveImplementation::load(t); - } - #endif - #endif - virtual void load(short & t){ - ArchiveImplementation::load(t); - } - virtual void load(unsigned short & t){ - ArchiveImplementation::load(t); - } - virtual void load(int & t){ - ArchiveImplementation::load(t); - } - virtual void load(unsigned int & t){ - ArchiveImplementation::load(t); - } - virtual void load(long & t){ - ArchiveImplementation::load(t); - } - virtual void load(unsigned long & t){ - ArchiveImplementation::load(t); - } - #if defined(BOOST_HAS_LONG_LONG) - virtual void load(boost::long_long_type & t){ - ArchiveImplementation::load(t); - } - virtual void load(boost::ulong_long_type & t){ - ArchiveImplementation::load(t); - } - #elif defined(BOOST_HAS_MS_INT64) - virtual void load(__int64 & t){ - ArchiveImplementation::load(t); - } - virtual void load(unsigned __int64 & t){ - ArchiveImplementation::load(t); - } - #endif - virtual void load(float & t){ - ArchiveImplementation::load(t); - } - virtual void load(double & t){ - ArchiveImplementation::load(t); - } - virtual void load(std::string & t){ - ArchiveImplementation::load(t); - } - #ifndef BOOST_NO_STD_WSTRING - virtual void load(std::wstring & t){ - ArchiveImplementation::load(t); - } - #endif - // used for xml and other tagged formats default does nothing - virtual void load_start(const char * name){ - ArchiveImplementation::load_start(name); - } - virtual void load_end(const char * name){ - ArchiveImplementation::load_end(name); - } - virtual void register_basic_serializer(const basic_iserializer & bis){ - ArchiveImplementation::register_basic_serializer(bis); - } - virtual helper_collection & - get_helper_collection(){ - return ArchiveImplementation::get_helper_collection(); - } -public: - // this can't be inheriteded because they appear in mulitple - // parents - typedef mpl::bool_ is_loading; - typedef mpl::bool_ is_saving; - // the >> operator - template - polymorphic_iarchive & operator>>(T & t){ - return polymorphic_iarchive::operator>>(t); - } - // the & operator - template - polymorphic_iarchive & operator&(T & t){ - return polymorphic_iarchive::operator&(t); - } - // register type function - template - const basic_pointer_iserializer * - register_type(T * t = NULL){ - return ArchiveImplementation::register_type(t); - } - // all current archives take a stream as constructor argument - template - polymorphic_iarchive_route( - std::basic_istream<_Elem, _Tr> & is, - unsigned int flags = 0 - ) : - ArchiveImplementation(is, flags) - {} - virtual ~polymorphic_iarchive_route(){}; -}; - -} // namespace detail -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_DISPATCH_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/polymorphic_oarchive_route.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/polymorphic_oarchive_route.hpp deleted file mode 100644 index b23fd6bf39d..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/polymorphic_oarchive_route.hpp +++ /dev/null @@ -1,209 +0,0 @@ -#ifndef BOOST_ARCHIVE_DETAIL_POLYMORPHIC_OARCHIVE_ROUTE_HPP -#define BOOST_ARCHIVE_DETAIL_POLYMORPHIC_OARCHIVE_ROUTE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_oarchive_route.hpp - -// (C) Copyright 2002 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 // size_t - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#include -#include -#include -#include // must be the last header - -namespace boost { -namespace serialization { - class extended_type_info; -} // namespace serialization -namespace archive { -namespace detail{ - -class basic_oserializer; -class basic_pointer_oserializer; - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -template -class polymorphic_oarchive_route : - public polymorphic_oarchive, - // note: gcc dynamic cross cast fails if the the derivation below is - // not public. I think this is a mistake. - public /*protected*/ ArchiveImplementation -{ -private: - // these are used by the serialization library. - virtual void save_object( - const void *x, - const detail::basic_oserializer & bos - ){ - ArchiveImplementation::save_object(x, bos); - } - virtual void save_pointer( - const void * t, - const detail::basic_pointer_oserializer * bpos_ptr - ){ - ArchiveImplementation::save_pointer(t, bpos_ptr); - } - virtual void save_null_pointer(){ - ArchiveImplementation::save_null_pointer(); - } - // primitive types the only ones permitted by polymorphic archives - virtual void save(const bool t){ - ArchiveImplementation::save(t); - } - virtual void save(const char t){ - ArchiveImplementation::save(t); - } - virtual void save(const signed char t){ - ArchiveImplementation::save(t); - } - virtual void save(const unsigned char t){ - ArchiveImplementation::save(t); - } - #ifndef BOOST_NO_CWCHAR - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - virtual void save(const wchar_t t){ - ArchiveImplementation::save(t); - } - #endif - #endif - virtual void save(const short t){ - ArchiveImplementation::save(t); - } - virtual void save(const unsigned short t){ - ArchiveImplementation::save(t); - } - virtual void save(const int t){ - ArchiveImplementation::save(t); - } - virtual void save(const unsigned int t){ - ArchiveImplementation::save(t); - } - virtual void save(const long t){ - ArchiveImplementation::save(t); - } - virtual void save(const unsigned long t){ - ArchiveImplementation::save(t); - } - #if defined(BOOST_HAS_LONG_LONG) - virtual void save(const boost::long_long_type t){ - ArchiveImplementation::save(t); - } - virtual void save(const boost::ulong_long_type t){ - ArchiveImplementation::save(t); - } - #elif defined(BOOST_HAS_MS_INT64) - virtual void save(const boost::int64_t t){ - ArchiveImplementation::save(t); - } - virtual void save(const boost::uint64_t t){ - ArchiveImplementation::save(t); - } - #endif - virtual void save(const float t){ - ArchiveImplementation::save(t); - } - virtual void save(const double t){ - ArchiveImplementation::save(t); - } - virtual void save(const std::string & t){ - ArchiveImplementation::save(t); - } - #ifndef BOOST_NO_STD_WSTRING - virtual void save(const std::wstring & t){ - ArchiveImplementation::save(t); - } - #endif - virtual library_version_type get_library_version() const{ - return ArchiveImplementation::get_library_version(); - } - virtual unsigned int get_flags() const { - return ArchiveImplementation::get_flags(); - } - virtual void save_binary(const void * t, std::size_t size){ - ArchiveImplementation::save_binary(t, size); - } - // used for xml and other tagged formats default does nothing - virtual void save_start(const char * name){ - ArchiveImplementation::save_start(name); - } - virtual void save_end(const char * name){ - ArchiveImplementation::save_end(name); - } - virtual void end_preamble(){ - ArchiveImplementation::end_preamble(); - } - virtual void register_basic_serializer(const detail::basic_oserializer & bos){ - ArchiveImplementation::register_basic_serializer(bos); - } - virtual helper_collection & - get_helper_collection(){ - return ArchiveImplementation::get_helper_collection(); - } -public: - // this can't be inheriteded because they appear in mulitple - // parents - typedef mpl::bool_ is_loading; - typedef mpl::bool_ is_saving; - // the << operator - template - polymorphic_oarchive & operator<<(T & t){ - return polymorphic_oarchive::operator<<(t); - } - // the & operator - template - polymorphic_oarchive & operator&(T & t){ - return polymorphic_oarchive::operator&(t); - } - // register type function - template - const basic_pointer_oserializer * - register_type(T * t = NULL){ - return ArchiveImplementation::register_type(t); - } - // all current archives take a stream as constructor argument - template - polymorphic_oarchive_route( - std::basic_ostream<_Elem, _Tr> & os, - unsigned int flags = 0 - ) : - ArchiveImplementation(os, flags) - {} - virtual ~polymorphic_oarchive_route(){}; -}; - -} // namespace detail -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_DETAIL_POLYMORPHIC_OARCHIVE_DISPATCH_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/register_archive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/register_archive.hpp deleted file mode 100644 index 5ffecc702ce..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/register_archive.hpp +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright David Abrahams 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) -#ifndef BOOST_ARCHIVE_DETAIL_REGISTER_ARCHIVE_DWA2006521_HPP -# define BOOST_ARCHIVE_DETAIL_REGISTER_ARCHIVE_DWA2006521_HPP - -namespace boost { namespace archive { namespace detail { - -// No instantiate_ptr_serialization overloads generated by -// BOOST_SERIALIZATION_REGISTER_ARCHIVE that lexically follow the call -// will be seen *unless* they are in an associated namespace of one of -// the arguments, so we pass one of these along to make sure this -// namespace is considered. See temp.dep.candidate (14.6.4.2) in the -// standard. -struct adl_tag {}; - -template -struct ptr_serialization_support; - -// We could've just used ptr_serialization_support, above, but using -// it with only a forward declaration causes vc6/7 to complain about a -// missing instantiate member, even if it has one. This is just a -// friendly layer of indirection. -template -struct _ptr_serialization_support - : ptr_serialization_support -{ - typedef int type; -}; - -#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5130) - -template -struct counter : counter {}; -template<> -struct counter<0> {}; - -template -void instantiate_ptr_serialization(Serializable* s, int, adl_tag) { - instantiate_ptr_serialization(s, counter<20>()); -} - -template -struct get_counter { - static const int value = sizeof(adjust_counter(counter<20>())); - typedef counter type; - typedef counter prior; - typedef char (&next)[value+1]; -}; - -char adjust_counter(counter<0>); -template -void instantiate_ptr_serialization(Serializable*, counter<0>) {} - -#define BOOST_SERIALIZATION_REGISTER_ARCHIVE(Archive) \ -namespace boost { namespace archive { namespace detail { \ - get_counter::next adjust_counter(get_counter::type);\ - template \ - void instantiate_ptr_serialization(Serializable* s, \ - get_counter::type) { \ - ptr_serialization_support x; \ - instantiate_ptr_serialization(s, get_counter::prior()); \ - }\ -}}} - - -#else - -// This function gets called, but its only purpose is to participate -// in overload resolution with the functions declared by -// BOOST_SERIALIZATION_REGISTER_ARCHIVE, below. -template -void instantiate_ptr_serialization(Serializable*, int, adl_tag ) {} - -// The function declaration generated by this macro never actually -// gets called, but its return type gets instantiated, and that's -// enough to cause registration of serialization functions between -// Archive and any exported Serializable type. See also: -// boost/serialization/export.hpp -# define BOOST_SERIALIZATION_REGISTER_ARCHIVE(Archive) \ -namespace boost { namespace archive { namespace detail { \ - \ -template \ -typename _ptr_serialization_support::type \ -instantiate_ptr_serialization( Serializable*, Archive*, adl_tag ); \ - \ -}}} -#endif -}}} // namespace boost::archive::detail - -#endif // BOOST_ARCHIVE_DETAIL_INSTANTIATE_SERIALIZE_DWA2006521_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/detail/utf8_codecvt_facet.hpp b/contrib/libboost/boost_1_65_0/boost/archive/detail/utf8_codecvt_facet.hpp deleted file mode 100644 index a40104abea6..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/detail/utf8_codecvt_facet.hpp +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu) -// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu). -// 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_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP -#define BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP - -#include - -#ifdef BOOST_NO_STD_WSTREAMBUF -#error "wide char i/o not supported on this platform" -#endif - -// std::codecvt_utf8 doesn't seem to work for any versions of msvc - -#if defined(_MSC_VER) || defined(BOOST_NO_CXX11_HDR_CODECVT) - // 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 - - #undef BOOST_UTF8_END_NAMESPACE - #undef BOOST_UTF8_DECL - #undef BOOST_UTF8_BEGIN_NAMESPACE -#else - // use the standard vendor supplied facet - #include - namespace boost { namespace archive { namespace detail { - typedef std::codecvt_utf8 utf8_codecvt_facet; - } } } -#endif - -#endif // BOOST_ARCHIVE_DETAIL_UTF8_CODECVT_FACET_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/dinkumware.hpp b/contrib/libboost/boost_1_65_0/boost/archive/dinkumware.hpp deleted file mode 100644 index 90ba6271cdd..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/dinkumware.hpp +++ /dev/null @@ -1,224 +0,0 @@ -#ifndef BOOST_ARCHIVE_DINKUMWARE_HPP -#define BOOST_ARCHIVE_DINKUMWARE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// dinkumware.hpp: - -// (C) Copyright 2002 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. - -// this file adds a couple of things that are missing from the dinkumware -// implementation of the standard library. - -#include -#include - -#include -#include - -namespace std { - -// define i/o operators for 64 bit integers -template -basic_ostream & -operator<<(basic_ostream & os, boost::uint64_t t){ - // octal rendering of 64 bit number would be 22 octets + eos - CharType d[23]; - unsigned int radix; - - if(os.flags() & (int)std::ios_base::hex) - radix = 16; - else - if(os.flags() & (int)std::ios_base::oct) - radix = 8; - else - //if(s.flags() & (int)std::ios_base::dec) - radix = 10; - unsigned int i = 0; - do{ - unsigned int j = t % radix; - d[i++] = j + ((j < 10) ? '0' : ('a' - 10)); - t /= radix; - } - while(t > 0); - d[i--] = '\0'; - - // reverse digits - unsigned int j = 0; - while(j < i){ - CharType k = d[i]; - d[i] = d[j]; - d[j] = k; - --i;++j; - } - os << d; - return os; - -} - -template -basic_ostream & -operator<<(basic_ostream &os, boost::int64_t t){ - if(0 <= t){ - os << static_cast(t); - } - else{ - os.put('-'); - os << -t; - } - return os; -} - -template -basic_istream & -operator>>(basic_istream &is, boost::int64_t & t){ - CharType d; - do{ - d = is.get(); - } - while(::isspace(d)); - bool negative = (d == '-'); - if(negative) - d = is.get(); - unsigned int radix; - if(is.flags() & (int)std::ios_base::hex) - radix = 16; - else - if(is.flags() & (int)std::ios_base::oct) - radix = 8; - else - //if(s.flags() & (int)std::ios_base::dec) - radix = 10; - t = 0; - do{ - if('0' <= d && d <= '9') - t = t * radix + (d - '0'); - else - if('a' <= d && d <= 'f') - t = t * radix + (d - 'a' + 10); - else - break; - d = is.get(); - } - while(!is.fail()); - // restore the delimiter - is.putback(d); - is.clear(); - if(negative) - t = -t; - return is; -} - -template -basic_istream & -operator>>(basic_istream &is, boost::uint64_t & t){ - boost::int64_t it; - is >> it; - t = it; - return is; -} - -//#endif - -template<> -class back_insert_iterator > : public - iterator -{ -public: - typedef basic_string container_type; - typedef container_type::reference reference; - - explicit back_insert_iterator(container_type & s) - : container(& s) - {} // construct with container - - back_insert_iterator & operator=( - container_type::const_reference Val_ - ){ // push value into container - //container->push_back(Val_); - *container += Val_; - return (*this); - } - - back_insert_iterator & operator*(){ - return (*this); - } - - back_insert_iterator & operator++(){ - // pretend to preincrement - return (*this); - } - - back_insert_iterator operator++(int){ - // pretend to postincrement - return (*this); - } - -protected: - container_type *container; // pointer to container -}; - -template -inline back_insert_iterator > back_inserter( - basic_string & s -){ - return (std::back_insert_iterator >(s)); -} - -template<> -class back_insert_iterator > : public - iterator -{ -public: - typedef basic_string container_type; - typedef container_type::reference reference; - - explicit back_insert_iterator(container_type & s) - : container(& s) - {} // construct with container - - back_insert_iterator & operator=( - container_type::const_reference Val_ - ){ // push value into container - //container->push_back(Val_); - *container += Val_; - return (*this); - } - - back_insert_iterator & operator*(){ - return (*this); - } - - back_insert_iterator & operator++(){ - // pretend to preincrement - return (*this); - } - - back_insert_iterator operator++(int){ - // pretend to postincrement - return (*this); - } - -protected: - container_type *container; // pointer to container -}; - -template -inline back_insert_iterator > back_inserter( - basic_string & s -){ - return (std::back_insert_iterator >(s)); -} - -} // namespace std - -#endif //BOOST_ARCHIVE_DINKUMWARE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/archive_serializer_map.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/archive_serializer_map.ipp deleted file mode 100644 index 7f163ec4076..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/archive_serializer_map.ipp +++ /dev/null @@ -1,75 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// archive_serializer_map.ipp: - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.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) - -// See http://www.boost.org for updates, documentation, and revision history. - -////////////////////////////////////////////////////////////////////// -// implementation of basic_text_iprimitive overrides for the combination -// of template parameters used to implement a text_iprimitive - -#include -#include -#include -#include - -namespace boost { -namespace archive { -namespace detail { - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace extra_detail { // anon - template - class map : public basic_serializer_map - {}; -} - -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL bool -archive_serializer_map::insert(const basic_serializer * bs){ - return boost::serialization::singleton< - extra_detail::map - >::get_mutable_instance().insert(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()) - return; - boost::serialization::singleton< - extra_detail::map - >::get_mutable_instance().erase(bs); -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL const basic_serializer * -archive_serializer_map::find( - const boost::serialization::extended_type_info & eti -) { - return boost::serialization::singleton< - extra_detail::map - >::get_const_instance().find(eti); -} - -} // namespace detail -} // namespace archive -} // namespace boost diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_binary_iarchive.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_binary_iarchive.ipp deleted file mode 100644 index d5619ab6cf3..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_binary_iarchive.ipp +++ /dev/null @@ -1,134 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_binary_iarchive.ipp: - -// (C) Copyright 2002 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 -#include - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::memcpy; - using ::strlen; - using ::size_t; -} -#endif - -#include -#include - -#include - -namespace boost { -namespace archive { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// implementation of binary_binary_archive -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_binary_iarchive::load_override(class_name_type & t){ - std::string cn; - cn.reserve(BOOST_SERIALIZATION_MAX_KEY_SIZE); - load_override(cn); - if(cn.size() > (BOOST_SERIALIZATION_MAX_KEY_SIZE - 1)) - boost::serialization::throw_exception( - archive_exception(archive_exception::invalid_class_name) - ); - std::memcpy(t, cn.data(), cn.size()); - // borland tweak - t.t[cn.size()] = '\0'; -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_binary_iarchive::init(void){ - // read signature in an archive version independent manner - std::string file_signature; - - #if 0 // commented out since it interfers with derivation - BOOST_TRY { - std::size_t l; - this->This()->load(l); - if(l == std::strlen(BOOST_ARCHIVE_SIGNATURE())) { - // borland de-allocator fixup - #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) - if(NULL != file_signature.data()) - #endif - file_signature.resize(l); - // note breaking a rule here - could be a problem on some platform - if(0 < l) - this->This()->load_binary(&(*file_signature.begin()), l); - } - } - BOOST_CATCH(archive_exception const &) { // catch stream_error archive exceptions - // will cause invalid_signature archive exception to be thrown below - file_signature = ""; - } - BOOST_CATCH_END - #else - // https://svn.boost.org/trac/boost/ticket/7301 - * this->This() >> file_signature; - #endif - - if(file_signature != BOOST_ARCHIVE_SIGNATURE()) - boost::serialization::throw_exception( - archive_exception(archive_exception::invalid_signature) - ); - - // make sure the version of the reading archive library can - // support the format of the archive being read - library_version_type input_library_version; - //* this->This() >> input_library_version; - { - int v = 0; - v = this->This()->m_sb.sbumpc(); - #if defined(BOOST_LITTLE_ENDIAN) - if(v < 6){ - ; - } - else - if(v < 7){ - // version 6 - next byte should be zero - this->This()->m_sb.sbumpc(); - } - else - if(v < 8){ - int x1; - // version 7 = might be followed by zero or some other byte - x1 = this->This()->m_sb.sgetc(); - // it's =a zero, push it back - if(0 == x1) - this->This()->m_sb.sbumpc(); - } - else{ - // version 8+ followed by a zero - this->This()->m_sb.sbumpc(); - } - #elif defined(BOOST_BIG_ENDIAN) - if(v == 0) - v = this->This()->m_sb.sbumpc(); - #endif - input_library_version = static_cast(v); - } - - #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) - this->set_library_version(input_library_version); - #else - detail::basic_iarchive::set_library_version(input_library_version); - #endif - - if(BOOST_ARCHIVE_VERSION() < input_library_version) - boost::serialization::throw_exception( - archive_exception(archive_exception::unsupported_version) - ); -} - -} // namespace archive -} // namespace boost diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_binary_iprimitive.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_binary_iprimitive.ipp deleted file mode 100644 index bbe933ccf63..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_binary_iprimitive.ipp +++ /dev/null @@ -1,171 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_binary_iprimitive.ipp: - -// (C) Copyright 2002 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 // size_t, NULL -#include // memcpy - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; - using ::memcpy; -} // namespace std -#endif - -#include -#include -#include -#include - -namespace boost { -namespace archive { - -////////////////////////////////////////////////////////////////////// -// implementation of basic_binary_iprimitive - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_binary_iprimitive::init() -{ - // Detect attempts to pass native binary archives across - // incompatible platforms. This is not fool proof but its - // better than nothing. - unsigned char size; - this->This()->load(size); - if(sizeof(int) != size) - boost::serialization::throw_exception( - archive_exception( - archive_exception::incompatible_native_format, - "size of int" - ) - ); - this->This()->load(size); - if(sizeof(long) != size) - boost::serialization::throw_exception( - archive_exception( - archive_exception::incompatible_native_format, - "size of long" - ) - ); - this->This()->load(size); - if(sizeof(float) != size) - boost::serialization::throw_exception( - archive_exception( - archive_exception::incompatible_native_format, - "size of float" - ) - ); - this->This()->load(size); - if(sizeof(double) != size) - boost::serialization::throw_exception( - archive_exception( - archive_exception::incompatible_native_format, - "size of double" - ) - ); - - // for checking endian - int i; - this->This()->load(i); - if(1 != i) - boost::serialization::throw_exception( - archive_exception( - archive_exception::incompatible_native_format, - "endian setting" - ) - ); -} - -#ifndef BOOST_NO_CWCHAR -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_binary_iprimitive::load(wchar_t * ws) -{ - std::size_t l; // number of wchar_t !!! - this->This()->load(l); - load_binary(ws, l * sizeof(wchar_t) / sizeof(char)); - ws[l] = L'\0'; -} -#endif - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_binary_iprimitive::load(std::string & s) -{ - std::size_t l; - this->This()->load(l); - // borland de-allocator fixup - #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) - if(NULL != s.data()) - #endif - s.resize(l); - // note breaking a rule here - could be a problem on some platform - if(0 < l) - load_binary(&(*s.begin()), l); -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_binary_iprimitive::load(char * s) -{ - std::size_t l; - this->This()->load(l); - load_binary(s, l); - s[l] = '\0'; -} - -#ifndef BOOST_NO_STD_WSTRING -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_binary_iprimitive::load(std::wstring & ws) -{ - std::size_t l; - this->This()->load(l); - // borland de-allocator fixup - #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) - if(NULL != ws.data()) - #endif - ws.resize(l); - // note breaking a rule here - is could be a problem on some platform - load_binary(const_cast(ws.data()), l * sizeof(wchar_t) / sizeof(char)); -} -#endif - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL -basic_binary_iprimitive::basic_binary_iprimitive( - std::basic_streambuf & sb, - bool no_codecvt -) : -#ifndef BOOST_NO_STD_LOCALE - m_sb(sb), - codecvt_null_facet(1), - locale_saver(m_sb), - archive_locale(sb.getloc(), & codecvt_null_facet) -{ - if(! no_codecvt){ - m_sb.pubsync(); - m_sb.pubimbue(archive_locale); - } -} -#else - m_sb(sb) -{} -#endif - -// scoped_ptr requires that g be a complete type at time of -// destruction so define destructor here rather than in the header -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL -basic_binary_iprimitive::~basic_binary_iprimitive(){} - -} // namespace archive -} // namespace boost diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_binary_oarchive.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_binary_oarchive.ipp deleted file mode 100644 index d5a019d32bc..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_binary_oarchive.ipp +++ /dev/null @@ -1,42 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_binary_oarchive.ipp: - -// (C) Copyright 2002 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 -#include - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::memcpy; -} -#endif - -#include - -namespace boost { -namespace archive { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// implementation of binary_binary_oarchive - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_binary_oarchive::init(){ - // write signature in an archive version independent manner - const std::string file_signature(BOOST_ARCHIVE_SIGNATURE()); - * this->This() << file_signature; - // write library version - const library_version_type v(BOOST_ARCHIVE_VERSION()); - * this->This() << v; -} - -} // namespace archive -} // namespace boost diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_binary_oprimitive.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_binary_oprimitive.ipp deleted file mode 100644 index 7b042173a48..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_binary_oprimitive.ipp +++ /dev/null @@ -1,126 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_binary_oprimitive.ipp: - -// (C) Copyright 2002 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 // NULL -#include - -#include - -#if defined(BOOST_NO_STDC_NAMESPACE) && ! defined(__LIBCOMO__) -namespace std{ - using ::strlen; -} // namespace std -#endif - -#ifndef BOOST_NO_CWCHAR -#include -#ifdef BOOST_NO_STDC_NAMESPACE -namespace std{ using ::wcslen; } -#endif -#endif - -#include -#include - -namespace boost { -namespace archive { - -////////////////////////////////////////////////////////////////////// -// implementation of basic_binary_oprimitive - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_binary_oprimitive::init() -{ - // record native sizes of fundamental types - // this is to permit detection of attempts to pass - // native binary archives accross incompatible machines. - // This is not foolproof but its better than nothing. - this->This()->save(static_cast(sizeof(int))); - this->This()->save(static_cast(sizeof(long))); - this->This()->save(static_cast(sizeof(float))); - this->This()->save(static_cast(sizeof(double))); - // for checking endianness - this->This()->save(int(1)); -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_binary_oprimitive::save(const char * s) -{ - std::size_t l = std::strlen(s); - this->This()->save(l); - save_binary(s, l); -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_binary_oprimitive::save(const std::string &s) -{ - std::size_t l = static_cast(s.size()); - this->This()->save(l); - save_binary(s.data(), l); -} - -#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) -{ - std::size_t l = std::wcslen(ws); - this->This()->save(l); - save_binary(ws, l * sizeof(wchar_t) / sizeof(char)); -} -#endif - -#ifndef BOOST_NO_STD_WSTRING -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_binary_oprimitive::save(const std::wstring &ws) -{ - std::size_t l = ws.size(); - this->This()->save(l); - save_binary(ws.data(), l * sizeof(wchar_t) / sizeof(char)); -} -#endif -#endif // BOOST_NO_CWCHAR - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL -basic_binary_oprimitive::basic_binary_oprimitive( - std::basic_streambuf & sb, - bool no_codecvt -) : -#ifndef BOOST_NO_STD_LOCALE - m_sb(sb), - codecvt_null_facet(1), - locale_saver(m_sb), - archive_locale(sb.getloc(), & codecvt_null_facet) -{ - if(! no_codecvt){ - m_sb.pubsync(); - m_sb.pubimbue(archive_locale); - } -} -#else - m_sb(sb) -{} -#endif - -// scoped_ptr requires that g be a complete type at time of -// destruction so define destructor here rather than in the header -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL -basic_binary_oprimitive::~basic_binary_oprimitive(){} - -} // namespace archive -} // namespace boost diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_text_iarchive.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_text_iarchive.ipp deleted file mode 100644 index 9ec8c6588c8..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_text_iarchive.ipp +++ /dev/null @@ -1,76 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_text_iarchive.ipp: - -// (C) Copyright 2002 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 - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::memcpy; -} -#endif - -#include -#include -#include - -namespace boost { -namespace archive { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// implementation of text_text_archive - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_text_iarchive::load_override(class_name_type & t){ - std::string cn; - cn.reserve(BOOST_SERIALIZATION_MAX_KEY_SIZE); - load_override(cn); - if(cn.size() > (BOOST_SERIALIZATION_MAX_KEY_SIZE - 1)) - boost::serialization::throw_exception( - archive_exception(archive_exception::invalid_class_name) - ); - std::memcpy(t, cn.data(), cn.size()); - // borland tweak - t.t[cn.size()] = '\0'; -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_text_iarchive::init(void){ - // read signature in an archive version independent manner - std::string file_signature; - * this->This() >> file_signature; - if(file_signature != BOOST_ARCHIVE_SIGNATURE()) - boost::serialization::throw_exception( - archive_exception(archive_exception::invalid_signature) - ); - - // make sure the version of the reading archive library can - // support the format of the archive being read - library_version_type input_library_version; - * this->This() >> input_library_version; - - #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) - this->set_library_version(input_library_version); - #else - detail::basic_iarchive::set_library_version(input_library_version); - #endif - - // extra little .t is to get around borland quirk - if(BOOST_ARCHIVE_VERSION() < input_library_version) - boost::serialization::throw_exception( - archive_exception(archive_exception::unsupported_version) - ); -} - -} // namespace archive -} // namespace boost diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_text_iprimitive.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_text_iprimitive.ipp deleted file mode 100644 index 4e44728068d..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_text_iprimitive.ipp +++ /dev/null @@ -1,137 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_text_iprimitive.ipp: - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.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) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include // size_t, NULL -#include // NULL - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#include - -#include - -#include -#include -#include -#include - -namespace boost { -namespace archive { - -namespace detail { - template - static inline bool is_whitespace(CharType c); - - template<> - inline bool is_whitespace(char t){ - return 0 != std::isspace(t); - } - - #ifndef BOOST_NO_CWCHAR - template<> - inline bool is_whitespace(wchar_t t){ - return 0 != std::iswspace(t); - } - #endif -} // detail - -// translate base64 text into binary and copy into buffer -// until buffer is full. -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_text_iprimitive::load_binary( - void *address, - std::size_t count -){ - typedef typename IStream::char_type CharType; - - if(0 == count) - return; - - BOOST_ASSERT( - static_cast((std::numeric_limits::max)()) - > (count + sizeof(CharType) - 1)/sizeof(CharType) - ); - - if(is.fail()) - boost::serialization::throw_exception( - archive_exception(archive_exception::input_stream_error) - ); - // convert from base64 to binary - typedef typename - iterators::transform_width< - iterators::binary_from_base64< - iterators::remove_whitespace< - iterators::istream_iterator - > - ,typename IStream::int_type - > - ,8 - ,6 - ,CharType - > - binary; - - binary i = binary(iterators::istream_iterator(is)); - - char * caddr = static_cast(address); - - // take care that we don't increment anymore than necessary - while(count-- > 0){ - *caddr++ = static_cast(*i++); - } - - // skip over any excess input - for(;;){ - typename IStream::int_type r; - r = is.get(); - if(is.eof()) - break; - if(detail::is_whitespace(static_cast(r))) - break; - } -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL -basic_text_iprimitive::basic_text_iprimitive( - IStream &is_, - bool no_codecvt -) : - is(is_), - flags_saver(is_), - precision_saver(is_), -#ifndef BOOST_NO_STD_LOCALE - codecvt_null_facet(1), - archive_locale(is.getloc(), & codecvt_null_facet), - locale_saver(is) -{ - if(! no_codecvt){ - is_.sync(); - is_.imbue(archive_locale); - } - is_ >> std::noboolalpha; -} -#else -{} -#endif - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL -basic_text_iprimitive::~basic_text_iprimitive(){ -} - -} // namespace archive -} // namespace boost diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_text_oarchive.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_text_oarchive.ipp deleted file mode 100644 index 44bc1401fd6..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_text_oarchive.ipp +++ /dev/null @@ -1,62 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_text_oarchive.ipp: - -// (C) Copyright 2002 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 - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::memcpy; -} -#endif - -#include - -namespace boost { -namespace archive { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// implementation of basic_text_oarchive - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_text_oarchive::newtoken() -{ - switch(delimiter){ - default: - BOOST_ASSERT(false); - break; - case eol: - this->This()->put('\n'); - delimiter = space; - break; - case space: - this->This()->put(' '); - break; - case none: - delimiter = space; - break; - } -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_text_oarchive::init(){ - // write signature in an archive version independent manner - const std::string file_signature(BOOST_ARCHIVE_SIGNATURE()); - * this->This() << file_signature; - // write library version - const library_version_type v(BOOST_ARCHIVE_VERSION()); - * this->This() << v; -} - -} // namespace archive -} // namespace boost diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_text_oprimitive.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_text_oprimitive.ipp deleted file mode 100644 index 6030fd44c57..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_text_oprimitive.ipp +++ /dev/null @@ -1,115 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_text_oprimitive.ipp: - -// (C) Copyright 2002 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 // NULL -#include // std::copy -#include // std::uncaught_exception -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#include - -#include -#include -#include -#include - -namespace boost { -namespace archive { - -// translate to base64 and copy in to buffer. -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_text_oprimitive::save_binary( - const void *address, - std::size_t count -){ - typedef typename OStream::char_type CharType; - - if(0 == count) - return; - - if(os.fail()) - boost::serialization::throw_exception( - archive_exception(archive_exception::output_stream_error) - ); - - os.put('\n'); - - typedef - boost::archive::iterators::insert_linebreaks< - boost::archive::iterators::base64_from_binary< - boost::archive::iterators::transform_width< - const char *, - 6, - 8 - > - > - ,76 - ,const char // cwpro8 needs this - > - base64_text; - - boost::archive::iterators::ostream_iterator oi(os); - std::copy( - base64_text(static_cast(address)), - base64_text( - static_cast(address) + count - ), - oi - ); - - std::size_t tail = count % 3; - if(tail > 0){ - *oi++ = '='; - if(tail < 2) - *oi = '='; - } -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL -basic_text_oprimitive::basic_text_oprimitive( - OStream & os_, - bool no_codecvt -) : - os(os_), - flags_saver(os_), - precision_saver(os_), -#ifndef BOOST_NO_STD_LOCALE - codecvt_null_facet(1), - archive_locale(os.getloc(), & codecvt_null_facet), - locale_saver(os) -{ - if(! no_codecvt){ - os_.flush(); - os_.imbue(archive_locale); - } - os_ << std::noboolalpha; -} -#else -{} -#endif - - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL -basic_text_oprimitive::~basic_text_oprimitive(){ - if(std::uncaught_exception()) - return; - os << std::endl; -} - -} //namespace boost -} //namespace archive diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_xml_grammar.hpp b/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_xml_grammar.hpp deleted file mode 100644 index 6d4e4683f6a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_xml_grammar.hpp +++ /dev/null @@ -1,173 +0,0 @@ -#ifndef BOOST_ARCHIVE_BASIC_XML_GRAMMAR_HPP -#define BOOST_ARCHIVE_BASIC_XML_GRAMMAR_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_xml_grammar.hpp - -// (C) Copyright 2002 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. - -// this module is derived from simplexml.cpp - an example shipped as part of -// the spirit parser. This example contains the following notice: -/*============================================================================= - simplexml.cpp - - Spirit V1.3 - URL: http://spirit.sourceforge.net/ - - Copyright (c) 2001, Daniel C. Nuffer - - This software is provided 'as-is', without any express or implied - warranty. In no event will the copyright holder be held liable for - any damages arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute - it freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product documentation - would be appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source - distribution. -=============================================================================*/ -#include - -#include -#include - -#include -#include - -#include -#include -#include - -namespace boost { -namespace archive { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// XML grammar parsing - -template -class basic_xml_grammar { -public: - // The following is not necessary according to DR45, but at least - // one compiler (Compaq C++ 6.5 in strict_ansi mode) chokes otherwise. - struct return_values; - friend struct return_values; - -private: - typedef typename std::basic_istream IStream; - typedef typename std::basic_string StringType; - typedef typename boost::spirit::classic::chset chset_t; - typedef typename boost::spirit::classic::chlit chlit_t; - typedef typename boost::spirit::classic::scanner< - typename std::basic_string::iterator - > scanner_t; - typedef typename boost::spirit::classic::rule rule_t; - // Start grammar definition - rule_t - Reference, - Eq, - STag, - ETag, - LetterOrUnderscoreOrColon, - AttValue, - CharRef1, - CharRef2, - CharRef, - AmpRef, - LTRef, - GTRef, - AposRef, - QuoteRef, - CharData, - CharDataChars, - content, - AmpName, - LTName, - GTName, - ClassNameChar, - ClassName, - Name, - XMLDecl, - XMLDeclChars, - DocTypeDecl, - DocTypeDeclChars, - ClassIDAttribute, - ObjectIDAttribute, - ClassNameAttribute, - TrackingAttribute, - VersionAttribute, - UnusedAttribute, - Attribute, - SignatureAttribute, - SerializationWrapper, - NameHead, - NameTail, - AttributeList, - S; - - // XML Character classes - chset_t - BaseChar, - Ideographic, - Char, - Letter, - Digit, - CombiningChar, - Extender, - Sch, - NameChar; - - void init_chset(); - - bool my_parse( - IStream & is, - const rule_t &rule_, - const CharType delimiter = L'>' - ) const ; -public: - struct return_values { - StringType object_name; - StringType contents; - //class_id_type class_id; - int_least16_t class_id; - //object_id_type object_id; - uint_least32_t object_id; - //version_type version; - unsigned int version; - tracking_type tracking_level; - StringType class_name; - return_values() : - version(0), - tracking_level(false) - {} - } rv; - bool parse_start_tag(IStream & is) /*const*/; - bool parse_end_tag(IStream & is) const; - bool parse_string(IStream & is, StringType & s) /*const*/; - void init(IStream & is); - bool windup(IStream & is); - basic_xml_grammar(); -}; - -} // namespace archive -} // namespace boost - -#endif // BOOST_ARCHIVE_BASIC_XML_GRAMMAR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_xml_iarchive.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_xml_iarchive.ipp deleted file mode 100644 index 625458b9eb5..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_xml_iarchive.ipp +++ /dev/null @@ -1,115 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_xml_iarchive.ipp: - -// (C) Copyright 2002 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 // NULL -#include - -#include -#include -#include -#include - -namespace boost { -namespace archive { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// implementation of xml_text_archive - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_iarchive::load_start(const char *name){ - // if there's no name - if(NULL == name) - return; - bool result = this->This()->gimpl->parse_start_tag(this->This()->get_is()); - if(true != result){ - boost::serialization::throw_exception( - archive_exception(archive_exception::input_stream_error) - ); - } - // don't check start tag at highest level - ++depth; - return; -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_iarchive::load_end(const char *name){ - // if there's no name - if(NULL == name) - return; - bool result = this->This()->gimpl->parse_end_tag(this->This()->get_is()); - if(true != result){ - boost::serialization::throw_exception( - archive_exception(archive_exception::input_stream_error) - ); - } - - // don't check start tag at highest level - if(0 == --depth) - return; - - if(0 == (this->get_flags() & no_xml_tag_checking)){ - // double check that the tag matches what is expected - useful for debug - if(0 != name[this->This()->gimpl->rv.object_name.size()] - || ! std::equal( - this->This()->gimpl->rv.object_name.begin(), - this->This()->gimpl->rv.object_name.end(), - name - ) - ){ - boost::serialization::throw_exception( - xml_archive_exception( - xml_archive_exception::xml_archive_tag_mismatch, - name - ) - ); - } - } -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_iarchive::load_override(object_id_type & t){ - t = object_id_type(this->This()->gimpl->rv.object_id); -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_iarchive::load_override(version_type & t){ - t = version_type(this->This()->gimpl->rv.version); -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_iarchive::load_override(class_id_type & t){ - t = class_id_type(this->This()->gimpl->rv.class_id); -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_iarchive::load_override(tracking_type & t){ - t = this->This()->gimpl->rv.tracking_level; -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL -basic_xml_iarchive::basic_xml_iarchive(unsigned int flags) : - detail::common_iarchive(flags), - depth(0) -{} -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL -basic_xml_iarchive::~basic_xml_iarchive(){ -} - -} // namespace archive -} // namespace boost diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_xml_oarchive.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_xml_oarchive.ipp deleted file mode 100644 index 3184413f382..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/basic_xml_oarchive.ipp +++ /dev/null @@ -1,272 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// basic_xml_oarchive.ipp: - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.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) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include -#include // NULL -#include -#if defined(BOOST_NO_STDC_NAMESPACE) && ! defined(__LIBCOMO__) -namespace std{ - using ::strlen; -} // namespace std -#endif - -#include -#include -#include -#include - -namespace boost { -namespace archive { - -namespace detail { -template -struct XML_name { - void operator()(CharType t) const{ - const unsigned char lookup_table[] = { - 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,1,0, // -. - 1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0, // 0-9 - 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // A- - 1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1, // -Z _ - 0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // a- - 1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0, // -z - 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 - }; - if((unsigned)t > 127) - return; - if(0 == lookup_table[(unsigned)t]) - boost::serialization::throw_exception( - xml_archive_exception( - xml_archive_exception::xml_archive_tag_name_error - ) - ); - } -}; - -} // namespace detail - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// implemenations of functions common to both types of xml output - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::write_attribute( - const char *attribute_name, - int t, - const char *conjunction -){ - this->This()->put(' '); - this->This()->put(attribute_name); - this->This()->put(conjunction); - this->This()->save(t); - this->This()->put('"'); -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::write_attribute( - const char *attribute_name, - const char *key -){ - this->This()->put(' '); - this->This()->put(attribute_name); - this->This()->put("=\""); - this->This()->save(key); - this->This()->put('"'); -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::indent(){ - int i; - for(i = depth; i-- > 0;) - this->This()->put('\t'); -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::save_start(const char *name) -{ - if(NULL == name) - return; - - // be sure name has no invalid characters - std::for_each(name, name + std::strlen(name), detail::XML_name()); - - end_preamble(); - if(depth > 0){ - this->This()->put('\n'); - indent(); - } - ++depth; - this->This()->put('<'); - this->This()->save(name); - pending_preamble = true; - indent_next = false; -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::save_end(const char *name) -{ - if(NULL == name) - return; - - // be sure name has no invalid characters - std::for_each(name, name + std::strlen(name), detail::XML_name()); - - end_preamble(); - --depth; - if(indent_next){ - this->This()->put('\n'); - indent(); - } - indent_next = true; - this->This()->put("This()->save(name); - this->This()->put('>'); - if(0 == depth) - this->This()->put('\n'); -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::end_preamble(){ - if(pending_preamble){ - this->This()->put('>'); - pending_preamble = false; - } -} -#if 0 -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::save_override(const object_id_type & t) -{ - int i = t.t; // extra .t is for borland - write_attribute(BOOST_ARCHIVE_XML_OBJECT_ID(), i, "=\"_"); -} -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::save_override( - const object_reference_type & t, - int -){ - int i = t.t; // extra .t is for borland - write_attribute(BOOST_ARCHIVE_XML_OBJECT_REFERENCE(), i, "=\"_"); -} -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::save_override(const version_type & t) -{ - int i = t.t; // extra .t is for borland - write_attribute(BOOST_ARCHIVE_XML_VERSION(), i); -} -#endif - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::save_override(const object_id_type & t) -{ - // borland doesn't do conversion of STRONG_TYPEDEFs very well - const unsigned int i = t; - write_attribute(BOOST_ARCHIVE_XML_OBJECT_ID(), i, "=\"_"); -} -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::save_override( - const object_reference_type & t -){ - const unsigned int i = t; - write_attribute(BOOST_ARCHIVE_XML_OBJECT_REFERENCE(), i, "=\"_"); -} -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::save_override(const version_type & t) -{ - const unsigned int i = t; - write_attribute(BOOST_ARCHIVE_XML_VERSION(), i); -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::save_override(const class_id_type & t) -{ - write_attribute(BOOST_ARCHIVE_XML_CLASS_ID(), t); -} -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::save_override( - const class_id_reference_type & t -){ - write_attribute(BOOST_ARCHIVE_XML_CLASS_ID_REFERENCE(), t); -} -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::save_override( - const class_id_optional_type & t -){ - write_attribute(BOOST_ARCHIVE_XML_CLASS_ID(), t); -} -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::save_override(const class_name_type & t) -{ - const char * key = t; - if(NULL == key) - return; - write_attribute(BOOST_ARCHIVE_XML_CLASS_NAME(), key); -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::save_override(const tracking_type & t) -{ - write_attribute(BOOST_ARCHIVE_XML_TRACKING(), t.t); -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::init(){ - // xml header - this->This()->put("\n"); - this->This()->put("\n"); - // xml document wrapper - outer root - this->This()->put("This()->put(">\n"); -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL void -basic_xml_oarchive::windup(){ - // xml_trailer - this->This()->put("\n"); -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL -basic_xml_oarchive::basic_xml_oarchive(unsigned int flags) : - detail::common_oarchive(flags), - depth(0), - pending_preamble(false), - indent_next(false) -{ -} - -template -BOOST_ARCHIVE_OR_WARCHIVE_DECL -basic_xml_oarchive::~basic_xml_oarchive(){ -} - -} // namespace archive -} // namespace boost diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/text_iarchive_impl.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/text_iarchive_impl.ipp deleted file mode 100644 index ae4e2750ce8..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/text_iarchive_impl.ipp +++ /dev/null @@ -1,128 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// text_iarchive_impl.ipp: - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.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) - -// See http://www.boost.org for updates, documentation, and revision history. - -////////////////////////////////////////////////////////////////////// -// implementation of basic_text_iprimitive overrides for the combination -// of template parameters used to implement a text_iprimitive - -#include // size_t, NULL -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#include // RogueWave - -#include - -namespace boost { -namespace archive { - -template -BOOST_ARCHIVE_DECL void -text_iarchive_impl::load(char *s) -{ - std::size_t size; - * this->This() >> size; - // skip separating space - is.get(); - // Works on all tested platforms - is.read(s, size); - s[size] = '\0'; -} - -template -BOOST_ARCHIVE_DECL void -text_iarchive_impl::load(std::string &s) -{ - std::size_t size; - * this->This() >> size; - // skip separating space - is.get(); - // borland de-allocator fixup - #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) - if(NULL != s.data()) - #endif - s.resize(size); - if(0 < size) - is.read(&(*s.begin()), size); -} - -#ifndef BOOST_NO_CWCHAR -#ifndef BOOST_NO_INTRINSIC_WCHAR_T -template -BOOST_ARCHIVE_DECL void -text_iarchive_impl::load(wchar_t *ws) -{ - std::size_t size; - * this->This() >> size; - // skip separating space - is.get(); - is.read((char *)ws, size * sizeof(wchar_t)/sizeof(char)); - ws[size] = L'\0'; -} -#endif // BOOST_NO_INTRINSIC_WCHAR_T - -#ifndef BOOST_NO_STD_WSTRING -template -BOOST_ARCHIVE_DECL void -text_iarchive_impl::load(std::wstring &ws) -{ - std::size_t size; - * this->This() >> size; - // borland de-allocator fixup - #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) - if(NULL != ws.data()) - #endif - ws.resize(size); - // skip separating space - is.get(); - is.read((char *)ws.data(), size * sizeof(wchar_t)/sizeof(char)); -} - -#endif // BOOST_NO_STD_WSTRING -#endif // BOOST_NO_CWCHAR - -template -BOOST_ARCHIVE_DECL void -text_iarchive_impl::load_override(class_name_type & t){ - basic_text_iarchive::load_override(t); -} - -template -BOOST_ARCHIVE_DECL void -text_iarchive_impl::init(){ - basic_text_iarchive::init(); -} - -template -BOOST_ARCHIVE_DECL -text_iarchive_impl::text_iarchive_impl( - std::istream & is, - unsigned int flags -) : - basic_text_iprimitive( - is, - 0 != (flags & no_codecvt) - ), - basic_text_iarchive(flags) -{ - if(0 == (flags & no_header)) - #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) - this->init(); - #else - this->basic_text_iarchive::init(); - #endif -} - -} // namespace archive -} // namespace boost diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/text_oarchive_impl.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/text_oarchive_impl.ipp deleted file mode 100644 index 37d8664a98c..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/text_oarchive_impl.ipp +++ /dev/null @@ -1,122 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// text_oarchive_impl.ipp: - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.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) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include -#include -#include // size_t - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#ifndef BOOST_NO_CWCHAR -#include -#ifdef BOOST_NO_STDC_NAMESPACE -namespace std{ using ::wcslen; } -#endif -#endif - -#include - -namespace boost { -namespace archive { - -////////////////////////////////////////////////////////////////////// -// implementation of basic_text_oprimitive overrides for the combination -// of template parameters used to create a text_oprimitive - -template -BOOST_ARCHIVE_DECL void -text_oarchive_impl::save(const char * s) -{ - const std::size_t len = std::ostream::traits_type::length(s); - *this->This() << len; - this->This()->newtoken(); - os << s; -} - -template -BOOST_ARCHIVE_DECL void -text_oarchive_impl::save(const std::string &s) -{ - const std::size_t size = s.size(); - *this->This() << size; - this->This()->newtoken(); - os << s; -} - -#ifndef BOOST_NO_CWCHAR -#ifndef BOOST_NO_INTRINSIC_WCHAR_T -template -BOOST_ARCHIVE_DECL void -text_oarchive_impl::save(const wchar_t * ws) -{ - const std::size_t l = std::wcslen(ws); - * this->This() << l; - this->This()->newtoken(); - os.write((const char *)ws, l * sizeof(wchar_t)/sizeof(char)); -} -#endif - -#ifndef BOOST_NO_STD_WSTRING -template -BOOST_ARCHIVE_DECL void -text_oarchive_impl::save(const std::wstring &ws) -{ - const std::size_t l = ws.size(); - * this->This() << l; - this->This()->newtoken(); - os.write((const char *)(ws.data()), l * sizeof(wchar_t)/sizeof(char)); -} -#endif -#endif // BOOST_NO_CWCHAR - -template -BOOST_ARCHIVE_DECL -text_oarchive_impl::text_oarchive_impl( - std::ostream & os, - unsigned int flags -) : - basic_text_oprimitive( - os, - 0 != (flags & no_codecvt) - ), - basic_text_oarchive(flags) -{ - if(0 == (flags & no_header)) - #if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) - this->init(); - #else - this->basic_text_oarchive::init(); - #endif -} - -template -BOOST_ARCHIVE_DECL void -text_oarchive_impl::save_binary(const void *address, std::size_t count){ - put('\n'); - this->end_preamble(); - #if ! defined(__MWERKS__) - this->basic_text_oprimitive::save_binary( - #else - this->basic_text_oprimitive::save_binary( - #endif - address, - count - ); - this->delimiter = this->eol; -} - -} // namespace archive -} // namespace boost - diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/text_wiarchive_impl.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/text_wiarchive_impl.ipp deleted file mode 100644 index e85625ac326..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/text_wiarchive_impl.ipp +++ /dev/null @@ -1,118 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// text_text_wiarchive_impl.ipp: - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.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) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include // size_t, NULL - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#include // fixup for RogueWave - -#ifndef BOOST_NO_STD_WSTREAMBUF -#include - -namespace boost { -namespace archive { - -////////////////////////////////////////////////////////////////////// -// implementation of wiprimtives functions -// -template -BOOST_WARCHIVE_DECL void -text_wiarchive_impl::load(char *s) -{ - std::size_t size; - * this->This() >> size; - // skip separating space - is.get(); - while(size-- > 0){ - *s++ = is.narrow(is.get(), '\0'); - } - *s = '\0'; -} - -template -BOOST_WARCHIVE_DECL void -text_wiarchive_impl::load(std::string &s) -{ - std::size_t size; - * this->This() >> size; - // skip separating space - is.get(); - #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) - if(NULL != s.data()) - #endif - s.resize(0); - s.reserve(size); - while(size-- > 0){ - char x = is.narrow(is.get(), '\0'); - s += x; - } -} - -#ifndef BOOST_NO_INTRINSIC_WCHAR_T -template -BOOST_WARCHIVE_DECL void -text_wiarchive_impl::load(wchar_t *s) -{ - std::size_t size; - * this->This() >> size; - // skip separating space - is.get(); - // Works on all tested platforms - is.read(s, size); - s[size] = L'\0'; -} -#endif - -#ifndef BOOST_NO_STD_WSTRING -template -BOOST_WARCHIVE_DECL void -text_wiarchive_impl::load(std::wstring &ws) -{ - std::size_t size; - * this->This() >> size; - // skip separating space - is.get(); - // borland complains about resize - // borland de-allocator fixup - #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) - if(NULL != ws.data()) - #endif - ws.resize(size); - // note breaking a rule here - is this a problem on some platform - is.read(const_cast(ws.data()), size); -} -#endif - -template -BOOST_WARCHIVE_DECL -text_wiarchive_impl::text_wiarchive_impl( - std::wistream & is, - unsigned int flags -) : - basic_text_iprimitive( - is, - 0 != (flags & no_codecvt) - ), - basic_text_iarchive(flags) -{ - if(0 == (flags & no_header)) - basic_text_iarchive::init(); -} - -} // archive -} // boost - -#endif // BOOST_NO_STD_WSTREAMBUF diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/text_woarchive_impl.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/text_woarchive_impl.ipp deleted file mode 100644 index 2b6d427cd3a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/text_woarchive_impl.ipp +++ /dev/null @@ -1,85 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// text_woarchive_impl.ipp: - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.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) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include -#ifndef BOOST_NO_STD_WSTREAMBUF - -#include -#include // size_t -#if defined(BOOST_NO_STDC_NAMESPACE) && ! defined(__LIBCOMO__) -namespace std{ - using ::strlen; - using ::size_t; -} // namespace std -#endif - -#include - -#include - -namespace boost { -namespace archive { - -////////////////////////////////////////////////////////////////////// -// implementation of woarchive functions -// -template -BOOST_WARCHIVE_DECL void -text_woarchive_impl::save(const char *s) -{ - // note: superfluous local variable fixes borland warning - const std::size_t size = std::strlen(s); - * this->This() << size; - this->This()->newtoken(); - while(*s != '\0') - os.put(os.widen(*s++)); -} - -template -BOOST_WARCHIVE_DECL void -text_woarchive_impl::save(const std::string &s) -{ - const std::size_t size = s.size(); - * this->This() << size; - this->This()->newtoken(); - const char * cptr = s.data(); - for(std::size_t i = size; i-- > 0;) - os.put(os.widen(*cptr++)); -} - -#ifndef BOOST_NO_INTRINSIC_WCHAR_T -template -BOOST_WARCHIVE_DECL void -text_woarchive_impl::save(const wchar_t *ws) -{ - const std::size_t size = std::wostream::traits_type::length(ws); - * this->This() << size; - this->This()->newtoken(); - os.write(ws, size); -} -#endif - -#ifndef BOOST_NO_STD_WSTRING -template -BOOST_WARCHIVE_DECL void -text_woarchive_impl::save(const std::wstring &ws) -{ - const std::size_t size = ws.length(); - * this->This() << size; - this->This()->newtoken(); - os.write(ws.data(), size); -} -#endif - -} // namespace archive -} // namespace boost - -#endif - diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/xml_iarchive_impl.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/xml_iarchive_impl.ipp deleted file mode 100644 index efc32e01632..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/xml_iarchive_impl.ipp +++ /dev/null @@ -1,199 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// xml_iarchive_impl.cpp: - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.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) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include -#include // memcpy -#include // NULL -#include - -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::memcpy; -} // namespace std -#endif - -#ifndef BOOST_NO_CWCHAR -#include // mbstate_t and mbrtowc -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::mbstate_t; - using ::mbrtowc; - } // namespace std -#endif -#endif // BOOST_NO_CWCHAR - -#include // RogueWave and Dinkumware -#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) -#include -#endif - -#include - -#include -#include -#include -#include - -#include "basic_xml_grammar.hpp" - -namespace boost { -namespace archive { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// implemenations of functions specific to char archives - -// wide char stuff used by char archives - -#ifndef BOOST_NO_CWCHAR -#ifndef BOOST_NO_STD_WSTRING -template -BOOST_ARCHIVE_DECL void -xml_iarchive_impl::load(std::wstring &ws){ - std::string s; - bool result = gimpl->parse_string(is, s); - if(! result) - boost::serialization::throw_exception( - xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) - ); - - #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) - if(NULL != ws.data()) - #endif - ws.resize(0); - std::mbstate_t mbs = std::mbstate_t(); - const char * start = s.data(); - const char * end = start + s.size(); - while(start < end){ - wchar_t wc; - std::size_t count = std::mbrtowc(&wc, start, end - start, &mbs); - if(count == static_cast(-1)) - boost::serialization::throw_exception( - iterators::dataflow_exception( - iterators::dataflow_exception::invalid_conversion - ) - ); - if(count == static_cast(-2)) - continue; - start += count; - ws += wc; - } -} -#endif // BOOST_NO_STD_WSTRING - -#ifndef BOOST_NO_INTRINSIC_WCHAR_T -template -BOOST_ARCHIVE_DECL void -xml_iarchive_impl::load(wchar_t * ws){ - std::string s; - bool result = gimpl->parse_string(is, s); - if(! result) - boost::serialization::throw_exception( - xml_archive_exception( - xml_archive_exception::xml_archive_parsing_error - ) - ); - - std::mbstate_t mbs = std::mbstate_t(); - const char * start = s.data(); - const char * end = start + s.size(); - while(start < end){ - wchar_t wc; - std::size_t length = std::mbrtowc(&wc, start, end - start, &mbs); - if(static_cast(-1) == length) - boost::serialization::throw_exception( - iterators::dataflow_exception( - iterators::dataflow_exception::invalid_conversion - ) - ); - if(static_cast(-2) == length) - continue; - - start += length; - *ws++ = wc; - } - *ws = L'\0'; -} -#endif // BOOST_NO_INTRINSIC_WCHAR_T - -#endif // BOOST_NO_CWCHAR - -template -BOOST_ARCHIVE_DECL void -xml_iarchive_impl::load(std::string &s){ - bool result = gimpl->parse_string(is, s); - if(! result) - boost::serialization::throw_exception( - xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) - ); -} - -template -BOOST_ARCHIVE_DECL void -xml_iarchive_impl::load(char * s){ - std::string tstring; - bool result = gimpl->parse_string(is, tstring); - if(! result) - boost::serialization::throw_exception( - xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) - ); - std::memcpy(s, tstring.data(), tstring.size()); - s[tstring.size()] = 0; -} - -template -BOOST_ARCHIVE_DECL void -xml_iarchive_impl::load_override(class_name_type & t){ - const std::string & s = gimpl->rv.class_name; - if(s.size() > BOOST_SERIALIZATION_MAX_KEY_SIZE - 1) - boost::serialization::throw_exception( - archive_exception(archive_exception::invalid_class_name) - ); - char * tptr = t; - std::memcpy(tptr, s.data(), s.size()); - tptr[s.size()] = '\0'; -} - -template -BOOST_ARCHIVE_DECL void -xml_iarchive_impl::init(){ - gimpl->init(is); - this->set_library_version( - library_version_type(gimpl->rv.version) - ); -} - -template -BOOST_ARCHIVE_DECL -xml_iarchive_impl::xml_iarchive_impl( - std::istream &is_, - unsigned int flags -) : - basic_text_iprimitive( - is_, - 0 != (flags & no_codecvt) - ), - basic_xml_iarchive(flags), - gimpl(new xml_grammar()) -{ - if(0 == (flags & no_header)) - init(); -} - -template -BOOST_ARCHIVE_DECL -xml_iarchive_impl::~xml_iarchive_impl(){ - if(std::uncaught_exception()) - return; - if(0 == (this->get_flags() & no_header)){ - gimpl->windup(is); - } -} -} // namespace archive -} // namespace boost diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/xml_oarchive_impl.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/xml_oarchive_impl.ipp deleted file mode 100644 index 5ebd454e722..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/xml_oarchive_impl.ipp +++ /dev/null @@ -1,142 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// xml_oarchive_impl.ipp: - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.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) - -#include -#include -#include // std::copy -#include -#include - -#include // strlen -#include // msvc 6.0 needs this to suppress warnings -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::strlen; -} // namespace std -#endif - -#include -#include - -#ifndef BOOST_NO_CWCHAR -#include -#include -#endif - -namespace boost { -namespace archive { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// implemenations of functions specific to char archives - -// wide char stuff used by char archives -#ifndef BOOST_NO_CWCHAR -// copy chars to output escaping to xml and translating wide chars to mb chars -template -void save_iterator(std::ostream &os, InputIterator begin, InputIterator end){ - typedef boost::archive::iterators::mb_from_wchar< - boost::archive::iterators::xml_escape - > translator; - std::copy( - translator(begin), - translator(end), - boost::archive::iterators::ostream_iterator(os) - ); -} - -#ifndef BOOST_NO_STD_WSTRING -template -BOOST_ARCHIVE_DECL void -xml_oarchive_impl::save(const std::wstring & ws){ -// at least one library doesn't typedef value_type for strings -// so rather than using string directly make a pointer iterator out of it -// save_iterator(os, ws.data(), ws.data() + std::wcslen(ws.data())); - save_iterator(os, ws.data(), ws.data() + ws.size()); -} -#endif - -#ifndef BOOST_NO_INTRINSIC_WCHAR_T -template -BOOST_ARCHIVE_DECL void -xml_oarchive_impl::save(const wchar_t * ws){ - save_iterator(os, ws, ws + std::wcslen(ws)); -} -#endif - -#endif // BOOST_NO_CWCHAR - -template -BOOST_ARCHIVE_DECL void -xml_oarchive_impl::save(const std::string & s){ -// at least one library doesn't typedef value_type for strings -// so rather than using string directly make a pointer iterator out of it - typedef boost::archive::iterators::xml_escape< - const char * - > xml_escape_translator; - std::copy( - xml_escape_translator(s.data()), - xml_escape_translator(s.data()+ s.size()), - boost::archive::iterators::ostream_iterator(os) - ); -} - -template -BOOST_ARCHIVE_DECL void -xml_oarchive_impl::save(const char * s){ - typedef boost::archive::iterators::xml_escape< - const char * - > xml_escape_translator; - std::copy( - xml_escape_translator(s), - xml_escape_translator(s + std::strlen(s)), - boost::archive::iterators::ostream_iterator(os) - ); -} - -template -BOOST_ARCHIVE_DECL -xml_oarchive_impl::xml_oarchive_impl( - std::ostream & os_, - unsigned int flags -) : - basic_text_oprimitive( - os_, - 0 != (flags & no_codecvt) - ), - basic_xml_oarchive(flags) -{ - if(0 == (flags & no_header)) - this->init(); -} - -template -BOOST_ARCHIVE_DECL void -xml_oarchive_impl::save_binary(const void *address, std::size_t count){ - this->end_preamble(); - #if ! defined(__MWERKS__) - this->basic_text_oprimitive::save_binary( - #else - this->basic_text_oprimitive::save_binary( - #endif - address, - count - ); - this->indent_next = true; -} - -template -BOOST_ARCHIVE_DECL -xml_oarchive_impl::~xml_oarchive_impl(){ - if(std::uncaught_exception()) - return; - if(0 == (this->get_flags() & no_header)) - this->windup(); -} - -} // namespace archive -} // namespace boost diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/xml_wiarchive_impl.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/xml_wiarchive_impl.ipp deleted file mode 100644 index ee66c1263e6..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/xml_wiarchive_impl.ipp +++ /dev/null @@ -1,189 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// xml_wiarchive_impl.ipp: - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.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) - -// See http://www.boost.org for updates, documentation, and revision history. - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::memcpy; -} //std -#endif - -#include // msvc 6.0 needs this to suppress warnings -#ifndef BOOST_NO_STD_WSTREAMBUF - -#include -#include // std::copy -#include // uncaught exception -#include // Dinkumware and RogueWave -#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) -#include -#endif - -#include -#include -#include - -#include -#include - -#include -#include - -#include - -#include "basic_xml_grammar.hpp" - -namespace boost { -namespace archive { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// implemenations of functions specific to wide char archives - -namespace { // anonymous - -void copy_to_ptr(char * s, const std::wstring & ws){ - std::copy( - iterators::mb_from_wchar( - ws.begin() - ), - iterators::mb_from_wchar( - ws.end() - ), - s - ); - s[ws.size()] = 0; -} - -} // anonymous - -template -BOOST_WARCHIVE_DECL void -xml_wiarchive_impl::load(std::string & s){ - std::wstring ws; - bool result = gimpl->parse_string(is, ws); - if(! result) - boost::serialization::throw_exception( - xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) - ); - #if BOOST_WORKAROUND(_RWSTD_VER, BOOST_TESTED_AT(20101)) - if(NULL != s.data()) - #endif - s.resize(0); - s.reserve(ws.size()); - std::copy( - iterators::mb_from_wchar( - ws.begin() - ), - iterators::mb_from_wchar( - ws.end() - ), - std::back_inserter(s) - ); -} - -#ifndef BOOST_NO_STD_WSTRING -template -BOOST_WARCHIVE_DECL void -xml_wiarchive_impl::load(std::wstring & ws){ - bool result = gimpl->parse_string(is, ws); - if(! result) - boost::serialization::throw_exception( - xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) - ); -} -#endif - -template -BOOST_WARCHIVE_DECL void -xml_wiarchive_impl::load(char * s){ - std::wstring ws; - bool result = gimpl->parse_string(is, ws); - if(! result) - boost::serialization::throw_exception( - xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) - ); - copy_to_ptr(s, ws); -} - -#ifndef BOOST_NO_INTRINSIC_WCHAR_T -template -BOOST_WARCHIVE_DECL void -xml_wiarchive_impl::load(wchar_t * ws){ - std::wstring twstring; - bool result = gimpl->parse_string(is, twstring); - if(! result) - boost::serialization::throw_exception( - xml_archive_exception(xml_archive_exception::xml_archive_parsing_error) - ); - std::memcpy(ws, twstring.c_str(), twstring.size()); - ws[twstring.size()] = L'\0'; -} -#endif - -template -BOOST_WARCHIVE_DECL void -xml_wiarchive_impl::load_override(class_name_type & t){ - const std::wstring & ws = gimpl->rv.class_name; - if(ws.size() > BOOST_SERIALIZATION_MAX_KEY_SIZE - 1) - boost::serialization::throw_exception( - archive_exception(archive_exception::invalid_class_name) - ); - copy_to_ptr(t, ws); -} - -template -BOOST_WARCHIVE_DECL void -xml_wiarchive_impl::init(){ - gimpl->init(is); - this->set_library_version( - library_version_type(gimpl->rv.version) - ); -} - -template -BOOST_WARCHIVE_DECL -xml_wiarchive_impl::xml_wiarchive_impl( - std::wistream &is_, - unsigned int flags -) : - basic_text_iprimitive( - is_, - true // don't change the codecvt - use the one below - ), - basic_xml_iarchive(flags), - gimpl(new xml_wgrammar()) -{ - if(0 == (flags & no_codecvt)){ - std::locale l = std::locale( - is_.getloc(), - new boost::archive::detail::utf8_codecvt_facet - ); - // libstdc++ crashes without this - is_.sync(); - is_.imbue(l); - } - if(0 == (flags & no_header)) - init(); -} - -template -BOOST_WARCHIVE_DECL -xml_wiarchive_impl::~xml_wiarchive_impl(){ - if(std::uncaught_exception()) - return; - if(0 == (this->get_flags() & no_header)){ - gimpl->windup(is); - } -} - -} // namespace archive -} // namespace boost - -#endif // BOOST_NO_STD_WSTREAMBUF diff --git a/contrib/libboost/boost_1_65_0/boost/archive/impl/xml_woarchive_impl.ipp b/contrib/libboost/boost_1_65_0/boost/archive/impl/xml_woarchive_impl.ipp deleted file mode 100644 index 01b1a052d51..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/impl/xml_woarchive_impl.ipp +++ /dev/null @@ -1,171 +0,0 @@ -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// xml_woarchive_impl.ipp: - -// (C) Copyright 2002 Robert Ramey - http://www.rrsd.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) - -#include -#ifndef BOOST_NO_STD_WSTREAMBUF - -#include -#include -#include // std::copy -#include -#include - -#include // strlen -#include // mbtowc -#ifndef BOOST_NO_CWCHAR -#include // wcslen -#endif - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::strlen; - #if ! defined(BOOST_NO_INTRINSIC_WCHAR_T) - using ::mbtowc; - using ::wcslen; - #endif -} // namespace std -#endif - -#include -#include - -#include - -#include -#include -#include -#include - -namespace boost { -namespace archive { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// implemenations of functions specific to wide char archives - -// copy chars to output escaping to xml and widening characters as we go -template -void save_iterator(std::wostream &os, InputIterator begin, InputIterator end){ - typedef iterators::wchar_from_mb< - iterators::xml_escape - > xmbtows; - std::copy( - xmbtows(begin), - xmbtows(end), - boost::archive::iterators::ostream_iterator(os) - ); -} - -template -BOOST_WARCHIVE_DECL void -xml_woarchive_impl::save(const std::string & s){ - // note: we don't use s.begin() and s.end() because dinkumware - // doesn't have string::value_type defined. So use a wrapper - // around these values to implement the definitions. - const char * begin = s.data(); - const char * end = begin + s.size(); - save_iterator(os, begin, end); -} - -#ifndef BOOST_NO_STD_WSTRING -template -BOOST_WARCHIVE_DECL void -xml_woarchive_impl::save(const std::wstring & ws){ -#if 0 - typedef iterators::xml_escape xmbtows; - std::copy( - xmbtows(ws.begin()), - xmbtows(ws.end()), - boost::archive::iterators::ostream_iterator(os) - ); -#endif - typedef iterators::xml_escape xmbtows; - std::copy( - xmbtows(ws.data()), - xmbtows(ws.data() + ws.size()), - boost::archive::iterators::ostream_iterator(os) - ); -} -#endif //BOOST_NO_STD_WSTRING - -template -BOOST_WARCHIVE_DECL void -xml_woarchive_impl::save(const char * s){ - save_iterator(os, s, s + std::strlen(s)); -} - -#ifndef BOOST_NO_INTRINSIC_WCHAR_T -template -BOOST_WARCHIVE_DECL void -xml_woarchive_impl::save(const wchar_t * ws){ - os << ws; - typedef iterators::xml_escape xmbtows; - std::copy( - xmbtows(ws), - xmbtows(ws + std::wcslen(ws)), - boost::archive::iterators::ostream_iterator(os) - ); -} -#endif - -template -BOOST_WARCHIVE_DECL -xml_woarchive_impl::xml_woarchive_impl( - std::wostream & os_, - unsigned int flags -) : - basic_text_oprimitive( - os_, - true // don't change the codecvt - use the one below - ), - basic_xml_oarchive(flags) -{ - if(0 == (flags & no_codecvt)){ - std::locale l = std::locale( - os_.getloc(), - new boost::archive::detail::utf8_codecvt_facet - ); - os_.flush(); - os_.imbue(l); - } - if(0 == (flags & no_header)) - this->init(); -} - -template -BOOST_WARCHIVE_DECL -xml_woarchive_impl::~xml_woarchive_impl(){ - if(std::uncaught_exception()) - return; - if(0 == (this->get_flags() & no_header)){ - save(L"\n"); - } -} - -template -BOOST_WARCHIVE_DECL void -xml_woarchive_impl::save_binary( - const void *address, - std::size_t count -){ - this->end_preamble(); - #if ! defined(__MWERKS__) - this->basic_text_oprimitive::save_binary( - #else - this->basic_text_oprimitive::save_binary( - #endif - address, - count - ); - this->indent_next = true; -} - -} // namespace archive -} // namespace boost - -#endif //BOOST_NO_STD_WSTREAMBUF diff --git a/contrib/libboost/boost_1_65_0/boost/archive/iterators/base64_exception.hpp b/contrib/libboost/boost_1_65_0/boost/archive/iterators/base64_exception.hpp deleted file mode 100644 index 8f9208b60ea..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/iterators/base64_exception.hpp +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef BOOST_ARCHIVE_ITERATORS_BASE64_EXCEPTION_HPP -#define BOOST_ARCHIVE_ITERATORS_BASE64_EXCEPTION_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// base64_exception.hpp: - -// (C) Copyright 2002 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 -#ifndef BOOST_NO_EXCEPTIONS -#include - -#include - -namespace boost { -namespace archive { -namespace iterators { - -////////////////////////////////////////////////////////////////////// -// exceptions thrown by base64s -// -class base64_exception : public std::exception -{ -public: - typedef enum { - invalid_code, // attempt to encode a value > 6 bits - invalid_character, // decode a value not in base64 char set - other_exception - } exception_code; - exception_code code; - - base64_exception(exception_code c = other_exception) : code(c) - {} - - virtual const char *what( ) const throw( ) - { - const char *msg = "unknown exception code"; - switch(code){ - case invalid_code: - msg = "attempt to encode a value > 6 bits"; - break; - case invalid_character: - msg = "attempt to decode a value not in base64 char set"; - break; - default: - BOOST_ASSERT(false); - break; - } - return msg; - } -}; - -} // namespace iterators -} // namespace archive -} // namespace boost - -#endif //BOOST_NO_EXCEPTIONS -#endif //BOOST_ARCHIVE_ITERATORS_ARCHIVE_EXCEPTION_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/iterators/base64_from_binary.hpp b/contrib/libboost/boost_1_65_0/boost/archive/iterators/base64_from_binary.hpp deleted file mode 100644 index ee849944397..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/iterators/base64_from_binary.hpp +++ /dev/null @@ -1,109 +0,0 @@ -#ifndef BOOST_ARCHIVE_ITERATORS_BASE64_FROM_BINARY_HPP -#define BOOST_ARCHIVE_ITERATORS_BASE64_FROM_BINARY_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// base64_from_binary.hpp - -// (C) Copyright 2002 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 // size_t -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#include -#include - -namespace boost { -namespace archive { -namespace iterators { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// convert binary integers to base64 characters - -namespace detail { - -template -struct from_6_bit { - typedef CharType result_type; - CharType operator()(CharType t) const{ - static const char * lookup_table = - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" - "0123456789" - "+/"; - BOOST_ASSERT(t < 64); - return lookup_table[static_cast(t)]; - } -}; - -} // namespace detail - -// note: what we would like to do is -// template -// typedef transform_iterator< -// from_6_bit, -// transform_width -// > base64_from_binary; -// but C++ won't accept this. Rather than using a "type generator" and -// using a different syntax, make a derivation which should be equivalent. -// -// Another issue addressed here is that the transform_iterator doesn't have -// a templated constructor. This makes it incompatible with the dataflow -// ideal. This is also addressed here. - -//template -template< - class Base, - class CharType = typename boost::iterator_value::type -> -class base64_from_binary : - public transform_iterator< - detail::from_6_bit, - Base - > -{ - friend class boost::iterator_core_access; - typedef transform_iterator< - typename detail::from_6_bit, - Base - > super_t; - -public: - // make composible buy using templated constructor - template - base64_from_binary(T start) : - super_t( - Base(static_cast< T >(start)), - detail::from_6_bit() - ) - {} - // intel 7.1 doesn't like default copy constructor - base64_from_binary(const base64_from_binary & rhs) : - super_t( - Base(rhs.base_reference()), - detail::from_6_bit() - ) - {} -// base64_from_binary(){}; -}; - -} // namespace iterators -} // namespace archive -} // namespace boost - -#endif // BOOST_ARCHIVE_ITERATORS_BASE64_FROM_BINARY_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/iterators/binary_from_base64.hpp b/contrib/libboost/boost_1_65_0/boost/archive/iterators/binary_from_base64.hpp deleted file mode 100644 index 89b8f889da3..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/iterators/binary_from_base64.hpp +++ /dev/null @@ -1,118 +0,0 @@ -#ifndef BOOST_ARCHIVE_ITERATORS_BINARY_FROM_BASE64_HPP -#define BOOST_ARCHIVE_ITERATORS_BINARY_FROM_BASE64_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// binary_from_base64.hpp - -// (C) Copyright 2002 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 - -#include -#include - -namespace boost { -namespace archive { -namespace iterators { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// convert base64 characters to binary data - -namespace detail { - -template -struct to_6_bit { - typedef CharType result_type; - CharType operator()(CharType t) const{ - 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, - 52,53,54,55,56,57,58,59,60,61,-1,-1,-1, 0,-1,-1, // render '=' as 0 - -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14, - 15,16,17,18,19,20,21,22,23,24,25,-1,-1,-1,-1,-1, - -1,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, - 41,42,43,44,45,46,47,48,49,50,51,-1,-1,-1,-1,-1 - }; - // metrowerks trips this assertion - how come? - #if ! defined(__MWERKS__) - BOOST_STATIC_ASSERT(128 == sizeof(lookup_table)); - #endif - signed char value = -1; - if((unsigned)t <= 127) - value = lookup_table[(unsigned)t]; - if(-1 == value) - boost::serialization::throw_exception( - dataflow_exception(dataflow_exception::invalid_base64_character) - ); - return value; - } -}; - -} // namespace detail - -// note: what we would like to do is -// template -// typedef transform_iterator< -// from_6_bit, -// transform_width -// > base64_from_binary; -// but C++ won't accept this. Rather than using a "type generator" and -// using a different syntax, make a derivation which should be equivalent. -// -// Another issue addressed here is that the transform_iterator doesn't have -// a templated constructor. This makes it incompatible with the dataflow -// ideal. This is also addressed here. - -template< - class Base, - class CharType = typename boost::iterator_value::type -> -class binary_from_base64 : public - transform_iterator< - detail::to_6_bit, - Base - > -{ - friend class boost::iterator_core_access; - typedef transform_iterator< - detail::to_6_bit, - Base - > super_t; -public: - // make composible buy using templated constructor - template - binary_from_base64(T start) : - super_t( - Base(static_cast< T >(start)), - detail::to_6_bit() - ) - {} - // intel 7.1 doesn't like default copy constructor - binary_from_base64(const binary_from_base64 & rhs) : - super_t( - Base(rhs.base_reference()), - detail::to_6_bit() - ) - {} -// binary_from_base64(){}; -}; - -} // namespace iterators -} // namespace archive -} // namespace boost - -#endif // BOOST_ARCHIVE_ITERATORS_BINARY_FROM_BASE64_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/iterators/dataflow.hpp b/contrib/libboost/boost_1_65_0/boost/archive/iterators/dataflow.hpp deleted file mode 100644 index 07733d5fd62..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/iterators/dataflow.hpp +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef BOOST_ARCHIVE_ITERATORS_DATAFLOW_HPP -#define BOOST_ARCHIVE_ITERATORS_DATAFLOW_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// dataflow.hpp - -// (C) Copyright 2002 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 -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -namespace boost { -namespace archive { -namespace iterators { - -// poor man's tri-state -struct tri_state { - enum state_enum { - is_false = false, - is_true = true, - is_indeterminant - } m_state; - // convert to bool - operator bool (){ - BOOST_ASSERT(is_indeterminant != m_state); - return is_true == m_state ? true : false; - } - // assign from bool - tri_state & operator=(bool rhs) { - m_state = rhs ? is_true : is_false; - return *this; - } - tri_state(bool rhs) : - m_state(rhs ? is_true : is_false) - {} - tri_state(state_enum state) : - m_state(state) - {} - bool operator==(const tri_state & rhs) const { - return m_state == rhs.m_state; - } - bool operator!=(const tri_state & rhs) const { - return m_state != rhs.m_state; - } -}; - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// implement functions common to dataflow iterators -template -class dataflow { - bool m_eoi; -protected: - // test for iterator equality - tri_state equal(const Derived & rhs) const { - if(m_eoi && rhs.m_eoi) - return true; - if(m_eoi || rhs.m_eoi) - return false; - return tri_state(tri_state::is_indeterminant); - } - void eoi(bool tf){ - m_eoi = tf; - } - bool eoi() const { - return m_eoi; - } -public: - dataflow(bool tf) : - m_eoi(tf) - {} - dataflow() : // used for iterator end - m_eoi(true) - {} -}; - -} // namespace iterators -} // namespace archive -} // namespace boost - -#endif // BOOST_ARCHIVE_ITERATORS_DATAFLOW_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/iterators/dataflow_exception.hpp b/contrib/libboost/boost_1_65_0/boost/archive/iterators/dataflow_exception.hpp deleted file mode 100644 index e3e18605b38..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/iterators/dataflow_exception.hpp +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef BOOST_ARCHIVE_ITERATORS_DATAFLOW_EXCEPTION_HPP -#define BOOST_ARCHIVE_ITERATORS_DATAFLOW_EXCEPTION_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// dataflow_exception.hpp: - -// (C) Copyright 2002 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 -#ifndef BOOST_NO_EXCEPTIONS -#include -#endif //BOOST_NO_EXCEPTIONS - -#include - -namespace boost { -namespace archive { -namespace iterators { - -////////////////////////////////////////////////////////////////////// -// exceptions thrown by dataflows -// -class dataflow_exception : public std::exception -{ -public: - typedef enum { - invalid_6_bitcode, - invalid_base64_character, - invalid_xml_escape_sequence, - comparison_not_permitted, - invalid_conversion, - other_exception - } exception_code; - exception_code code; - - dataflow_exception(exception_code c = other_exception) : code(c) - {} - - virtual const char *what( ) const throw( ) - { - const char *msg = "unknown exception code"; - switch(code){ - case invalid_6_bitcode: - msg = "attempt to encode a value > 6 bits"; - break; - case invalid_base64_character: - msg = "attempt to decode a value not in base64 char set"; - break; - case invalid_xml_escape_sequence: - msg = "invalid xml escape_sequence"; - break; - case comparison_not_permitted: - msg = "cannot invoke iterator comparison now"; - break; - case invalid_conversion: - msg = "invalid multbyte/wide char conversion"; - break; - default: - BOOST_ASSERT(false); - break; - } - return msg; - } -}; - -} // namespace iterators -} // namespace archive -} // namespace boost - -#endif //BOOST_ARCHIVE_ITERATORS_DATAFLOW_EXCEPTION_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/iterators/escape.hpp b/contrib/libboost/boost_1_65_0/boost/archive/iterators/escape.hpp deleted file mode 100644 index 103b31e0fef..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/iterators/escape.hpp +++ /dev/null @@ -1,115 +0,0 @@ -#ifndef BOOST_ARCHIVE_ITERATORS_ESCAPE_HPP -#define BOOST_ARCHIVE_ITERATORS_ESCAPE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// escape.hpp - -// (C) Copyright 2002 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 // NULL - -#include -#include - -namespace boost { -namespace archive { -namespace iterators { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// insert escapes into text - -template -class escape : - public boost::iterator_adaptor< - Derived, - Base, - typename boost::iterator_value::type, - single_pass_traversal_tag, - typename boost::iterator_value::type - > -{ - typedef typename boost::iterator_value::type base_value_type; - typedef typename boost::iterator_reference::type reference_type; - friend class boost::iterator_core_access; - - typedef typename boost::iterator_adaptor< - Derived, - Base, - base_value_type, - single_pass_traversal_tag, - base_value_type - > super_t; - - typedef escape this_t; - - void dereference_impl() { - m_current_value = static_cast(this)->fill(m_bnext, m_bend); - m_full = true; - } - - //Access the value referred to - reference_type dereference() const { - if(!m_full) - const_cast(this)->dereference_impl(); - return m_current_value; - } - - bool equal(const this_t & rhs) const { - if(m_full){ - if(! rhs.m_full) - const_cast(& rhs)->dereference_impl(); - } - else{ - if(rhs.m_full) - const_cast(this)->dereference_impl(); - } - if(m_bnext != rhs.m_bnext) - return false; - if(this->base_reference() != rhs.base_reference()) - return false; - return true; - } - - void increment(){ - if(++m_bnext < m_bend){ - m_current_value = *m_bnext; - return; - } - ++(this->base_reference()); - m_bnext = NULL; - m_bend = NULL; - m_full = false; - } - - // buffer to handle pending characters - const base_value_type *m_bnext; - const base_value_type *m_bend; - bool m_full; - base_value_type m_current_value; -public: - escape(Base base) : - super_t(base), - m_bnext(NULL), - m_bend(NULL), - m_full(false), - m_current_value(0) - { - } -}; - -} // namespace iterators -} // namespace archive -} // namespace boost - -#endif // BOOST_ARCHIVE_ITERATORS_ESCAPE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/iterators/insert_linebreaks.hpp b/contrib/libboost/boost_1_65_0/boost/archive/iterators/insert_linebreaks.hpp deleted file mode 100644 index 2504b030db1..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/iterators/insert_linebreaks.hpp +++ /dev/null @@ -1,99 +0,0 @@ -#ifndef BOOST_ARCHIVE_ITERATORS_INSERT_LINEBREAKS_HPP -#define BOOST_ARCHIVE_ITERATORS_INSERT_LINEBREAKS_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// insert_linebreaks.hpp - -// (C) Copyright 2002 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 -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ using ::memcpy; } -#endif - -#include -#include - -namespace boost { -namespace archive { -namespace iterators { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// insert line break every N characters -template< - class Base, - int N, - class CharType = typename boost::iterator_value::type -> -class insert_linebreaks : - public iterator_adaptor< - insert_linebreaks, - Base, - CharType, - single_pass_traversal_tag, - CharType - > -{ -private: - friend class boost::iterator_core_access; - typedef iterator_adaptor< - insert_linebreaks, - Base, - CharType, - single_pass_traversal_tag, - CharType - > super_t; - - bool equal(const insert_linebreaks & rhs) const { - return -// m_count == rhs.m_count -// && base_reference() == rhs.base_reference() - this->base_reference() == rhs.base_reference() - ; - } - - void increment() { - if(m_count == N){ - m_count = 0; - return; - } - ++m_count; - ++(this->base_reference()); - } - CharType dereference() const { - if(m_count == N) - return '\n'; - return * (this->base_reference()); - } - unsigned int m_count; -public: - // make composible buy using templated constructor - template - insert_linebreaks(T start) : - super_t(Base(static_cast< T >(start))), - m_count(0) - {} - // intel 7.1 doesn't like default copy constructor - insert_linebreaks(const insert_linebreaks & rhs) : - super_t(rhs.base_reference()), - m_count(rhs.m_count) - {} -}; - -} // namespace iterators -} // namespace archive -} // namespace boost - -#endif // BOOST_ARCHIVE_ITERATORS_INSERT_LINEBREAKS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/iterators/istream_iterator.hpp b/contrib/libboost/boost_1_65_0/boost/archive/iterators/istream_iterator.hpp deleted file mode 100644 index a187f605e69..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/iterators/istream_iterator.hpp +++ /dev/null @@ -1,92 +0,0 @@ -#ifndef BOOST_ARCHIVE_ITERATORS_ISTREAM_ITERATOR_HPP -#define BOOST_ARCHIVE_ITERATORS_ISTREAM_ITERATOR_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// istream_iterator.hpp - -// (C) Copyright 2002 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. - -// note: this is a custom version of the standard istream_iterator. -// This is necessary as the standard version doesn't work as expected -// for wchar_t based streams on systems for which wchar_t not a true -// type but rather a synonym for some integer type. - -#include // NULL -#include -#include - -namespace boost { -namespace archive { -namespace iterators { - -// given a type, make an input iterator based on a pointer to that type -template -class istream_iterator : - public boost::iterator_facade< - istream_iterator, - Elem, - std::input_iterator_tag, - Elem - > -{ - friend class boost::iterator_core_access; - typedef istream_iterator this_t ; - typedef typename boost::iterator_facade< - istream_iterator, - Elem, - std::input_iterator_tag, - Elem - > super_t; - typedef typename std::basic_istream istream_type; - - bool equal(const this_t & rhs) const { - // note: only works for comparison against end of stream - return m_istream == rhs.m_istream; - } - - //Access the value referred to - Elem dereference() const { - return static_cast(m_istream->peek()); - } - - void increment(){ - if(NULL != m_istream){ - m_istream->ignore(1); - } - } - - istream_type *m_istream; - Elem m_current_value; -public: - istream_iterator(istream_type & is) : - m_istream(& is) - { - //increment(); - } - - istream_iterator() : - 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 -} // namespace archive -} // namespace boost - -#endif // BOOST_ARCHIVE_ITERATORS_ISTREAM_ITERATOR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/iterators/mb_from_wchar.hpp b/contrib/libboost/boost_1_65_0/boost/archive/iterators/mb_from_wchar.hpp deleted file mode 100644 index 05df71c258e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/iterators/mb_from_wchar.hpp +++ /dev/null @@ -1,139 +0,0 @@ -#ifndef BOOST_ARCHIVE_ITERATORS_MB_FROM_WCHAR_HPP -#define BOOST_ARCHIVE_ITERATORS_MB_FROM_WCHAR_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// mb_from_wchar.hpp - -// (C) Copyright 2002 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 // 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 - -namespace boost { -namespace archive { -namespace iterators { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// class used by text archives to translate wide strings and to char -// strings of the currently selected locale -template // the input iterator -class mb_from_wchar - : public boost::iterator_adaptor< - mb_from_wchar, - Base, - wchar_t, - single_pass_traversal_tag, - char - > -{ - friend class boost::iterator_core_access; - - typedef typename boost::iterator_adaptor< - mb_from_wchar, - Base, - wchar_t, - single_pass_traversal_tag, - char - > super_t; - - typedef mb_from_wchar this_t; - - char dereference_impl() { - if(! m_full){ - fill(); - m_full = true; - } - return m_buffer[m_bnext]; - } - - char dereference() const { - return (const_cast(this))->dereference_impl(); - } - // test for iterator equality - bool equal(const mb_from_wchar & rhs) const { - // once the value is filled, the base_reference has been incremented - // so don't permit comparison anymore. - return - 0 == m_bend - && 0 == m_bnext - && this->base_reference() == rhs.base_reference() - ; - } - - void fill(){ - 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_ASSERT(std::codecvt_base::ok == r); - m_bnext = 0; - m_bend = bend - m_buffer; - } - - void increment(){ - if(++m_bnext < m_bend) - return; - m_bend = - m_bnext = 0; - ++(this->base_reference()); - m_full = false; - } - - boost::archive::detail::utf8_codecvt_facet m_codecvt_facet; - std::mbstate_t m_mbs; - // buffer to handle pending characters - char m_buffer[9 /* MB_CUR_MAX */]; - std::size_t m_bend; - std::size_t m_bnext; - bool m_full; - -public: - // make composible buy using templated constructor - template - mb_from_wchar(T start) : - super_t(Base(static_cast< T >(start))), - m_mbs(std::mbstate_t()), - m_bend(0), - m_bnext(0), - m_full(false) - {} - // intel 7.1 doesn't like default copy constructor - mb_from_wchar(const mb_from_wchar & rhs) : - super_t(rhs.base_reference()), - m_bend(rhs.m_bend), - m_bnext(rhs.m_bnext), - m_full(rhs.m_full) - {} -}; - -} // namespace iterators -} // namespace archive -} // namespace boost - -#endif // BOOST_ARCHIVE_ITERATORS_MB_FROM_WCHAR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/iterators/ostream_iterator.hpp b/contrib/libboost/boost_1_65_0/boost/archive/iterators/ostream_iterator.hpp deleted file mode 100644 index 49a9b99034b..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/iterators/ostream_iterator.hpp +++ /dev/null @@ -1,83 +0,0 @@ -#ifndef BOOST_ARCHIVE_ITERATORS_OSTREAM_ITERATOR_HPP -#define BOOST_ARCHIVE_ITERATORS_OSTREAM_ITERATOR_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// ostream_iterator.hpp - -// (C) Copyright 2002 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. - -// note: this is a custom version of the standard ostream_iterator. -// This is necessary as the standard version doesn't work as expected -// for wchar_t based streams on systems for which wchar_t not a true -// type but rather a synonym for some integer type. - -#include -#include - -namespace boost { -namespace archive { -namespace iterators { - -// given a type, make an input iterator based on a pointer to that type -template -class ostream_iterator : - public boost::iterator_facade< - ostream_iterator, - Elem, - std::output_iterator_tag, - ostream_iterator & - > -{ - friend class boost::iterator_core_access; - typedef ostream_iterator this_t ; - typedef Elem char_type; - typedef std::basic_ostream ostream_type; - - //emulate the behavior of std::ostream - ostream_iterator & dereference() const { - return const_cast(*this); - } - bool equal(const this_t & rhs) const { - return m_ostream == rhs.m_ostream; - } - void increment(){} -protected: - ostream_type *m_ostream; - void put_val(char_type e){ - if(NULL != m_ostream){ - m_ostream->put(e); - if(! m_ostream->good()) - m_ostream = NULL; - } - } -public: - this_t & operator=(char_type c){ - put_val(c); - return *this; - } - ostream_iterator(ostream_type & os) : - m_ostream (& os) - {} - ostream_iterator() : - m_ostream (NULL) - {} - ostream_iterator(const ostream_iterator & rhs) : - m_ostream (rhs.m_ostream) - {} -}; - -} // namespace iterators -} // namespace archive -} // namespace boost - -#endif // BOOST_ARCHIVE_ITERATORS_OSTREAM_ITERATOR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/iterators/remove_whitespace.hpp b/contrib/libboost/boost_1_65_0/boost/archive/iterators/remove_whitespace.hpp deleted file mode 100644 index c3580ab258a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/iterators/remove_whitespace.hpp +++ /dev/null @@ -1,167 +0,0 @@ -#ifndef BOOST_ARCHIVE_ITERATORS_REMOVE_WHITESPACE_HPP -#define BOOST_ARCHIVE_ITERATORS_REMOVE_WHITESPACE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// remove_whitespace.hpp - -// (C) Copyright 2002 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 -#include - -// here is the default standard implementation of the functor used -// by the filter iterator to remove spaces. Unfortunately usage -// of this implementation in combination with spirit trips a bug -// VC 6.5. The only way I can find to work around it is to -// implement a special non-standard version for this platform - -#ifndef BOOST_NO_CWCTYPE -#include // iswspace -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ using ::iswspace; } -#endif -#endif - -#include // isspace -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ using ::isspace; } -#endif - -#if defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) -// this is required for the RW STL on Linux and Tru64. -#undef isspace -#undef iswspace -#endif - -namespace { // anonymous - -template -struct remove_whitespace_predicate; - -template<> -struct remove_whitespace_predicate -{ - bool operator()(unsigned char t){ - return ! std::isspace(t); - } -}; - -#ifndef BOOST_NO_CWCHAR -template<> -struct remove_whitespace_predicate -{ - bool operator()(wchar_t t){ - return ! std::iswspace(t); - } -}; -#endif - -} // namespace anonymous - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// convert base64 file data (including whitespace and padding) to binary - -namespace boost { -namespace archive { -namespace iterators { - -// custom version of filter iterator which doesn't look ahead further than -// necessary - -template -class filter_iterator - : public boost::iterator_adaptor< - filter_iterator, - Base, - use_default, - single_pass_traversal_tag - > -{ - friend class boost::iterator_core_access; - typedef typename boost::iterator_adaptor< - filter_iterator, - Base, - use_default, - single_pass_traversal_tag - > super_t; - typedef filter_iterator this_t; - typedef typename super_t::reference reference_type; - - reference_type dereference_impl(){ - if(! m_full){ - while(! m_predicate(* this->base_reference())) - ++(this->base_reference()); - m_full = true; - } - return * this->base_reference(); - } - - reference_type dereference() const { - return const_cast(this)->dereference_impl(); - } - - Predicate m_predicate; - bool m_full; -public: - // note: this function is public only because comeau compiler complained - // I don't know if this is because the compiler is wrong or what - void increment(){ - m_full = false; - ++(this->base_reference()); - } - filter_iterator(Base start) : - super_t(start), - m_full(false) - {} - filter_iterator(){} -}; - -template -class remove_whitespace : - public filter_iterator< - remove_whitespace_predicate< - typename boost::iterator_value::type - //typename Base::value_type - >, - Base - > -{ - friend class boost::iterator_core_access; - typedef filter_iterator< - remove_whitespace_predicate< - typename boost::iterator_value::type - //typename Base::value_type - >, - Base - > super_t; -public: -// remove_whitespace(){} // why is this needed? - // make composible buy using templated constructor - template - remove_whitespace(T start) : - super_t(Base(static_cast< T >(start))) - {} - // intel 7.1 doesn't like default copy constructor - remove_whitespace(const remove_whitespace & rhs) : - super_t(rhs.base_reference()) - {} -}; - -} // namespace iterators -} // namespace archive -} // namespace boost - -#endif // BOOST_ARCHIVE_ITERATORS_REMOVE_WHITESPACE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/iterators/transform_width.hpp b/contrib/libboost/boost_1_65_0/boost/archive/iterators/transform_width.hpp deleted file mode 100644 index 09c050a9274..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/iterators/transform_width.hpp +++ /dev/null @@ -1,177 +0,0 @@ -#ifndef BOOST_ARCHIVE_ITERATORS_TRANSFORM_WIDTH_HPP -#define BOOST_ARCHIVE_ITERATORS_TRANSFORM_WIDTH_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// transform_width.hpp - -// (C) Copyright 2002 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. - -// iterator which takes elements of x bits and returns elements of y bits. -// used to change streams of 8 bit characters into streams of 6 bit characters. -// and vice-versa for implementing base64 encodeing/decoding. Be very careful -// when using and end iterator. end is only reliable detected when the input -// stream length is some common multiple of x and y. E.G. Base64 6 bit -// character and 8 bit bytes. Lowest common multiple is 24 => 4 6 bit characters -// or 3 8 bit characters - -#include -#include - -#include // std::min - -namespace boost { -namespace archive { -namespace iterators { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// class used by text archives to translate char strings to wchar_t -// strings of the currently selected locale -template< - class Base, - int BitsOut, - int BitsIn, - class CharType = typename boost::iterator_value::type // output character -> -class transform_width : - public boost::iterator_adaptor< - transform_width, - Base, - CharType, - single_pass_traversal_tag, - CharType - > -{ - friend class boost::iterator_core_access; - typedef typename boost::iterator_adaptor< - transform_width, - Base, - CharType, - single_pass_traversal_tag, - CharType - > super_t; - - typedef transform_width this_t; - typedef typename iterator_value::type base_value_type; - - void fill(); - - CharType dereference() const { - if(!m_buffer_out_full) - const_cast(this)->fill(); - return m_buffer_out; - } - - bool equal_impl(const this_t & rhs){ - if(BitsIn < BitsOut) // discard any left over bits - return this->base_reference() == rhs.base_reference(); - else{ - // BitsIn > BitsOut // zero fill - if(this->base_reference() == rhs.base_reference()){ - m_end_of_sequence = true; - return 0 == m_remaining_bits; - } - return false; - } - } - - // standard iterator interface - bool equal(const this_t & rhs) const { - return const_cast(this)->equal_impl(rhs); - } - - void increment(){ - m_buffer_out_full = false; - } - - bool m_buffer_out_full; - CharType m_buffer_out; - - // last read element from input - base_value_type m_buffer_in; - - // number of bits to left in the input buffer. - unsigned int m_remaining_bits; - - // flag to indicate we've reached end of data. - bool m_end_of_sequence; - -public: - // make composible buy using templated constructor - template - 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) - m_buffer_in(0), - m_remaining_bits(0), - m_end_of_sequence(false) - {} - // intel 7.1 doesn't like default copy constructor - transform_width(const transform_width & rhs) : - super_t(rhs.base_reference()), - m_buffer_out_full(rhs.m_buffer_out_full), - m_buffer_out(rhs.m_buffer_out), - m_buffer_in(rhs.m_buffer_in), - m_remaining_bits(rhs.m_remaining_bits), - m_end_of_sequence(false) - {} -}; - -template< - class Base, - int BitsOut, - int BitsIn, - class CharType -> -void transform_width::fill() { - unsigned int missing_bits = BitsOut; - m_buffer_out = 0; - do{ - if(0 == m_remaining_bits){ - if(m_end_of_sequence){ - m_buffer_in = 0; - m_remaining_bits = missing_bits; - } - else{ - m_buffer_in = * this->base_reference()++; - m_remaining_bits = BitsIn; - } - } - - // append these bits to the next output - // up to the size of the output - unsigned int i = (std::min)(missing_bits, m_remaining_bits); - // shift interesting bits to least significant position - base_value_type j = m_buffer_in >> (m_remaining_bits - i); - // and mask off the un interesting higher bits - // note presumption of twos complement notation - j &= (1 << i) - 1; - // append then interesting bits to the output value - m_buffer_out <<= i; - m_buffer_out |= j; - - // and update counters - missing_bits -= i; - m_remaining_bits -= i; - }while(0 < missing_bits); - m_buffer_out_full = true; -} - -} // namespace iterators -} // namespace archive -} // namespace boost - -#endif // BOOST_ARCHIVE_ITERATORS_TRANSFORM_WIDTH_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/iterators/unescape.hpp b/contrib/libboost/boost_1_65_0/boost/archive/iterators/unescape.hpp deleted file mode 100644 index abf62406088..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/iterators/unescape.hpp +++ /dev/null @@ -1,89 +0,0 @@ -#ifndef BOOST_ARCHIVE_ITERATORS_UNESCAPE_HPP -#define BOOST_ARCHIVE_ITERATORS_UNESCAPE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// unescape.hpp - -// (C) Copyright 2002 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 - -namespace boost { -namespace archive { -namespace iterators { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// class used by text archives to translate char strings to wchar_t -// strings of the currently selected locale -template -class unescape - : public boost::iterator_adaptor< - unescape, - Base, - typename pointee::type, - single_pass_traversal_tag, - typename pointee::type - > -{ - friend class boost::iterator_core_access; - typedef typename boost::iterator_adaptor< - unescape, - Base, - typename pointee::type, - single_pass_traversal_tag, - typename pointee::type - > super_t; - - typedef unescape this_t; -public: - typedef typename this_t::value_type value_type; - typedef typename this_t::reference reference; -private: - value_type dereference_impl() { - if(! m_full){ - m_current_value = static_cast(this)->drain(); - m_full = true; - } - return m_current_value; - } - - reference dereference() const { - return const_cast(this)->dereference_impl(); - } - - value_type m_current_value; - bool m_full; - - void increment(){ - ++(this->base_reference()); - dereference_impl(); - m_full = false; - }; - -public: - - unescape(Base base) : - super_t(base), - m_full(false) - {} - -}; - -} // namespace iterators -} // namespace archive -} // namespace boost - -#endif // BOOST_ARCHIVE_ITERATORS_UNESCAPE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/iterators/wchar_from_mb.hpp b/contrib/libboost/boost_1_65_0/boost/archive/iterators/wchar_from_mb.hpp deleted file mode 100644 index 2af8f6401f2..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/iterators/wchar_from_mb.hpp +++ /dev/null @@ -1,194 +0,0 @@ -#ifndef BOOST_ARCHIVE_ITERATORS_WCHAR_FROM_MB_HPP -#define BOOST_ARCHIVE_ITERATORS_WCHAR_FROM_MB_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// wchar_from_mb.hpp - -// (C) Copyright 2002 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 // size_t -#ifndef BOOST_NO_CWCHAR -#include // mbstate_t -#endif -#include // copy - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::mbstate_t; -} // namespace std -#endif -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace archive { -namespace iterators { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// class used by text archives to translate char strings to wchar_t -// strings of the currently selected locale -template -class wchar_from_mb - : public boost::iterator_adaptor< - wchar_from_mb, - Base, - wchar_t, - single_pass_traversal_tag, - wchar_t - > -{ - friend class boost::iterator_core_access; - typedef typename boost::iterator_adaptor< - wchar_from_mb, - Base, - wchar_t, - single_pass_traversal_tag, - wchar_t - > super_t; - - typedef wchar_from_mb this_t; - - void drain(); - - wchar_t dereference() const { - if(m_output.m_next == m_output.m_next_available) - return static_cast(0); - return * m_output.m_next; - } - - void increment(){ - if(m_output.m_next == m_output.m_next_available) - return; - if(++m_output.m_next == m_output.m_next_available){ - if(m_input.m_done) - return; - drain(); - } - } - - bool equal(this_t const & rhs) const { - return dereference() == rhs.dereference(); - } - - boost::archive::detail::utf8_codecvt_facet m_codecvt_facet; - std::mbstate_t m_mbs; - - template - struct sliding_buffer { - boost::array m_buffer; - typename boost::array::const_iterator m_next_available; - typename boost::array::iterator m_next; - bool m_done; - // default ctor - sliding_buffer() : - m_next_available(m_buffer.begin()), - m_next(m_buffer.begin()), - m_done(false) - {} - // copy ctor - sliding_buffer(const sliding_buffer & rhs) : - m_next_available( - std::copy( - rhs.m_buffer.begin(), - rhs.m_next_available, - m_buffer.begin() - ) - ), - m_next( - m_buffer.begin() + (rhs.m_next - rhs.m_buffer.begin()) - ), - m_done(rhs.m_done) - {} - }; - - sliding_buffer::type> m_input; - sliding_buffer::type> m_output; - -public: - // make composible buy using templated constructor - template - wchar_from_mb(T start) : - super_t(Base(static_cast< T >(start))), - m_mbs(std::mbstate_t()) - { - BOOST_ASSERT(std::mbsinit(&m_mbs)); - drain(); - } - // default constructor used as an end iterator - wchar_from_mb(){} - - // copy ctor - wchar_from_mb(const wchar_from_mb & rhs) : - super_t(rhs.base_reference()), - m_mbs(rhs.m_mbs), - m_input(rhs.m_input), - m_output(rhs.m_output) - {} -}; - -template -void wchar_from_mb::drain(){ - BOOST_ASSERT(! m_input.m_done); - for(;;){ - typename boost::iterators::iterator_reference::type c = *(this->base_reference()); - // a null character in a multibyte stream is takes as end of string - if(0 == c){ - m_input.m_done = true; - break; - } - ++(this->base_reference()); - * const_cast::type *>( - (m_input.m_next_available++) - ) = c; - // if input buffer is full - we're done for now - if(m_input.m_buffer.end() == m_input.m_next_available) - break; - } - const typename boost::iterators::iterator_value::type * input_new_start; - typename iterator_value::type * next_available; - - std::codecvt_base::result r = m_codecvt_facet.in( - m_mbs, - m_input.m_buffer.begin(), - m_input.m_next_available, - input_new_start, - m_output.m_buffer.begin(), - m_output.m_buffer.end(), - next_available - ); - BOOST_ASSERT(std::codecvt_base::ok == r); - m_output.m_next_available = next_available; - m_output.m_next = m_output.m_buffer.begin(); - - // we're done with some of the input so shift left. - m_input.m_next_available = std::copy( - input_new_start, - m_input.m_next_available, - m_input.m_buffer.begin() - ); - m_input.m_next = m_input.m_buffer.begin(); -} - -} // namespace iterators -} // namespace archive -} // namespace boost - -#endif // BOOST_ARCHIVE_ITERATORS_WCHAR_FROM_MB_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/iterators/xml_escape.hpp b/contrib/libboost/boost_1_65_0/boost/archive/iterators/xml_escape.hpp deleted file mode 100644 index c838a73b864..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/iterators/xml_escape.hpp +++ /dev/null @@ -1,121 +0,0 @@ -#ifndef BOOST_ARCHIVE_ITERATORS_XML_ESCAPE_HPP -#define BOOST_ARCHIVE_ITERATORS_XML_ESCAPE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// xml_escape.hpp - -// (C) Copyright 2002 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 - -namespace boost { -namespace archive { -namespace iterators { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// insert escapes into xml text - -template -class xml_escape - : public escape, Base> -{ - friend class boost::iterator_core_access; - - typedef escape, Base> super_t; - -public: - char fill(const char * & bstart, const char * & bend); - wchar_t fill(const wchar_t * & bstart, const wchar_t * & bend); - - template - xml_escape(T start) : - super_t(Base(static_cast< T >(start))) - {} - // intel 7.1 doesn't like default copy constructor - xml_escape(const xml_escape & rhs) : - super_t(rhs.base_reference()) - {} -}; - -template -char xml_escape::fill( - const char * & bstart, - const char * & bend -){ - char current_value = * this->base_reference(); - switch(current_value){ - case '<': - bstart = "<"; - bend = bstart + 4; - break; - case '>': - bstart = ">"; - bend = bstart + 4; - break; - case '&': - bstart = "&"; - bend = bstart + 5; - break; - case '"': - bstart = """; - bend = bstart + 6; - break; - case '\'': - bstart = "'"; - bend = bstart + 6; - break; - default: - return current_value; - } - return *bstart; -} - -template -wchar_t xml_escape::fill( - const wchar_t * & bstart, - const wchar_t * & bend -){ - wchar_t current_value = * this->base_reference(); - switch(current_value){ - case '<': - bstart = L"<"; - bend = bstart + 4; - break; - case '>': - bstart = L">"; - bend = bstart + 4; - break; - case '&': - bstart = L"&"; - bend = bstart + 5; - break; - case '"': - bstart = L"""; - bend = bstart + 6; - break; - case '\'': - bstart = L"'"; - bend = bstart + 6; - break; - default: - return current_value; - } - return *bstart; -} - -} // namespace iterators -} // namespace archive -} // namespace boost - -#endif // BOOST_ARCHIVE_ITERATORS_XML_ESCAPE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/iterators/xml_unescape.hpp b/contrib/libboost/boost_1_65_0/boost/archive/iterators/xml_unescape.hpp deleted file mode 100644 index 69977404567..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/iterators/xml_unescape.hpp +++ /dev/null @@ -1,125 +0,0 @@ -#ifndef BOOST_ARCHIVE_ITERATORS_XML_UNESCAPE_HPP -#define BOOST_ARCHIVE_ITERATORS_XML_UNESCAPE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// xml_unescape.hpp - -// (C) Copyright 2002 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 -#include - -namespace boost { -namespace archive { -namespace iterators { - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// replace &??? xml escape sequences with the corresponding characters -template -class xml_unescape - : public unescape, Base> -{ - friend class boost::iterator_core_access; - typedef xml_unescape this_t; - typedef unescape super_t; - typedef typename boost::iterator_reference reference_type; - - reference_type dereference() const { - return unescape, Base>::dereference(); - } -public: - // workaround msvc 7.1 ICU crash - #if defined(BOOST_MSVC) - typedef int value_type; - #else - typedef typename this_t::value_type value_type; - #endif - - void drain_residue(const char *literal); - value_type drain(); - - template - xml_unescape(T start) : - super_t(Base(static_cast< T >(start))) - {} - // intel 7.1 doesn't like default copy constructor - xml_unescape(const xml_unescape & rhs) : - super_t(rhs.base_reference()) - {} -}; - -template -void xml_unescape::drain_residue(const char * literal){ - do{ - if(* literal != * ++(this->base_reference())) - boost::serialization::throw_exception( - dataflow_exception( - dataflow_exception::invalid_xml_escape_sequence - ) - ); - } - while('\0' != * ++literal); -} - -// note key constraint on this function is that can't "look ahead" any -// more than necessary into base iterator. Doing so would alter the base -// iterator refenence which would make subsequent iterator comparisons -// incorrect and thereby break the composiblity of iterators. -template -typename xml_unescape::value_type -//int -xml_unescape::drain(){ - value_type retval = * this->base_reference(); - if('&' != retval){ - return retval; - } - retval = * ++(this->base_reference()); - switch(retval){ - case 'l': // < - drain_residue("t;"); - retval = '<'; - break; - case 'g': // > - drain_residue("t;"); - retval = '>'; - break; - case 'a': - retval = * ++(this->base_reference()); - switch(retval){ - case 'p': // ' - drain_residue("os;"); - retval = '\''; - break; - case 'm': // & - drain_residue("p;"); - retval = '&'; - break; - } - break; - case 'q': - drain_residue("uot;"); - retval = '"'; - break; - } - return retval; -} - -} // namespace iterators -} // namespace archive -} // namespace boost - -#endif // BOOST_ARCHIVE_ITERATORS_XML_UNESCAPE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/iterators/xml_unescape_exception.hpp b/contrib/libboost/boost_1_65_0/boost/archive/iterators/xml_unescape_exception.hpp deleted file mode 100644 index 71a64378c20..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/iterators/xml_unescape_exception.hpp +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef BOOST_ARCHIVE_ITERATORS_XML_UNESCAPE_EXCEPTION_HPP -#define BOOST_ARCHIVE_ITERATORS_XML_UNESCAPE_EXCEPTION_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// xml_unescape_exception.hpp: - -// (C) Copyright 2002 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 -#ifndef BOOST_NO_EXCEPTIONS -#include - -#include - -namespace boost { -namespace archive { -namespace iterators { - -////////////////////////////////////////////////////////////////////// -// exceptions thrown by xml_unescapes -// -class xml_unescape_exception : public std::exception -{ -public: - xml_unescape_exception() - {} - - virtual const char *what( ) const throw( ) - { - return "xml contained un-recognized escape code"; - } -}; - -} // namespace iterators -} // namespace archive -} // namespace boost - -#endif //BOOST_NO_EXCEPTIONS -#endif //BOOST_ARCHIVE_ITERATORS_XML_UNESCAPE_EXCEPTION_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_binary_iarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_binary_iarchive.hpp deleted file mode 100644 index 4a898a8ad16..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_binary_iarchive.hpp +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef BOOST_ARCHIVE_POLYMORPHIC_BINARY_IARCHIVE_HPP -#define BOOST_ARCHIVE_POLYMORPHIC_BINARY_IARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_binary_iarchive.hpp - -// (C) Copyright 2002 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 - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -class polymorphic_binary_iarchive : - public detail::polymorphic_iarchive_route -{ -public: - polymorphic_binary_iarchive(std::istream & is, unsigned int flags = 0) : - detail::polymorphic_iarchive_route(is, flags) - {} - ~polymorphic_binary_iarchive(){} -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE( - boost::archive::polymorphic_binary_iarchive -) - -#endif // BOOST_ARCHIVE_POLYMORPHIC_BINARY_IARCHIVE_HPP - diff --git a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_binary_oarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_binary_oarchive.hpp deleted file mode 100644 index 931b243feb8..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_binary_oarchive.hpp +++ /dev/null @@ -1,43 +0,0 @@ -#ifndef BOOST_ARCHIVE_POLYMORPHIC_BINARY_OARCHIVE_HPP -#define BOOST_ARCHIVE_POLYMORPHIC_BINARY_OARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_binary_oarchive.hpp - -// (C) Copyright 2002 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 - -namespace boost { -namespace archive { - -typedef detail::polymorphic_oarchive_route< - binary_oarchive_impl< - binary_oarchive, - std::ostream::char_type, - std::ostream::traits_type - > - > polymorphic_binary_oarchive; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE( - boost::archive::polymorphic_binary_oarchive -) - -#endif // BOOST_ARCHIVE_POLYMORPHIC_BINARY_OARCHIVE_HPP - diff --git a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_iarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_iarchive.hpp deleted file mode 100644 index d3c59a9f0f4..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_iarchive.hpp +++ /dev/null @@ -1,168 +0,0 @@ -#ifndef BOOST_ARCHIVE_POLYMORPHIC_IARCHIVE_HPP -#define BOOST_ARCHIVE_POLYMORPHIC_IARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_iarchive.hpp - -// (C) Copyright 2002 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 // std::size_t -#include // ULONG_MAX -#include - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#include - -#include -#include -#include -#include - -#include -#include // must be the last header - -namespace boost { -namespace serialization { - class extended_type_info; -} // namespace serialization -namespace archive { -namespace detail { - class basic_iarchive; - class basic_iserializer; -} - -class polymorphic_iarchive; - -class BOOST_SYMBOL_VISIBLE polymorphic_iarchive_impl : - public detail::interface_iarchive -{ -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else - friend class detail::interface_iarchive; - friend class load_access; -#endif - // primitive types the only ones permitted by polymorphic archives - virtual void load(bool & t) = 0; - - virtual void load(char & t) = 0; - virtual void load(signed char & t) = 0; - virtual void load(unsigned char & t) = 0; - #ifndef BOOST_NO_CWCHAR - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - virtual void load(wchar_t & t) = 0; - #endif - #endif - virtual void load(short & t) = 0; - virtual void load(unsigned short & t) = 0; - virtual void load(int & t) = 0; - virtual void load(unsigned int & t) = 0; - virtual void load(long & t) = 0; - virtual void load(unsigned long & t) = 0; - - #if defined(BOOST_HAS_LONG_LONG) - virtual void load(boost::long_long_type & t) = 0; - virtual void load(boost::ulong_long_type & t) = 0; - #elif defined(BOOST_HAS_MS_INT64) - virtual void load(__int64 & t) = 0; - virtual void load(unsigned __int64 & t) = 0; - #endif - - virtual void load(float & t) = 0; - virtual void load(double & t) = 0; - - // string types are treated as primitives - virtual void load(std::string & t) = 0; - #ifndef BOOST_NO_STD_WSTRING - virtual void load(std::wstring & t) = 0; - #endif - - // used for xml and other tagged formats - virtual void load_start(const char * name) = 0; - virtual void load_end(const char * name) = 0; - virtual void register_basic_serializer(const detail::basic_iserializer & bis) = 0; - virtual detail::helper_collection & get_helper_collection() = 0; - - // msvc and borland won't automatically pass these to the base class so - // make it explicit here - template - void load_override(T & t) - { - archive::load(* this->This(), t); - } - // special treatment for name-value pairs. - template - void load_override( - const boost::serialization::nvp< T > & t - ){ - load_start(t.name()); - archive::load(* this->This(), t.value()); - load_end(t.name()); - } -protected: - virtual ~polymorphic_iarchive_impl(){}; -public: - // utility function implemented by all legal archives - virtual void set_library_version(library_version_type archive_library_version) = 0; - virtual library_version_type get_library_version() const = 0; - virtual unsigned int get_flags() const = 0; - virtual void delete_created_pointers() = 0; - virtual void reset_object_address( - const void * new_address, - const void * old_address - ) = 0; - - virtual void load_binary(void * t, std::size_t size) = 0; - - // these are used by the serialization library implementation. - virtual void load_object( - void *t, - const detail::basic_iserializer & bis - ) = 0; - virtual const detail::basic_pointer_iserializer * load_pointer( - void * & t, - const detail::basic_pointer_iserializer * bpis_ptr, - const detail::basic_pointer_iserializer * (*finder)( - const boost::serialization::extended_type_info & type - ) - ) = 0; -}; - -} // namespace archive -} // namespace boost - -#include // pops abi_suffix.hpp pragmas - -namespace boost { -namespace archive { - -class BOOST_SYMBOL_VISIBLE polymorphic_iarchive : - public polymorphic_iarchive_impl -{ -public: - virtual ~polymorphic_iarchive(){}; -}; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::polymorphic_iarchive) - -#endif // BOOST_ARCHIVE_POLYMORPHIC_IARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_oarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_oarchive.hpp deleted file mode 100644 index edac4edb1e8..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_oarchive.hpp +++ /dev/null @@ -1,154 +0,0 @@ -#ifndef BOOST_ARCHIVE_POLYMORPHIC_OARCHIVE_HPP -#define BOOST_ARCHIVE_POLYMORPHIC_OARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_oarchive.hpp - -// (C) Copyright 2002 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 // size_t -#include // ULONG_MAX -#include - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#include -#include -#include -#include -#include - -#include -#include // must be the last header - -namespace boost { -namespace serialization { - class extended_type_info; -} // namespace serialization -namespace archive { -namespace detail { - class basic_oarchive; - class basic_oserializer; -} - -class polymorphic_oarchive; - -class BOOST_SYMBOL_VISIBLE polymorphic_oarchive_impl : - public detail::interface_oarchive -{ -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else - friend class detail::interface_oarchive; - friend class save_access; -#endif - // primitive types the only ones permitted by polymorphic archives - virtual void save(const bool t) = 0; - - virtual void save(const char t) = 0; - virtual void save(const signed char t) = 0; - virtual void save(const unsigned char t) = 0; - #ifndef BOOST_NO_CWCHAR - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - virtual void save(const wchar_t t) = 0; - #endif - #endif - virtual void save(const short t) = 0; - virtual void save(const unsigned short t) = 0; - virtual void save(const int t) = 0; - virtual void save(const unsigned int t) = 0; - virtual void save(const long t) = 0; - virtual void save(const unsigned long t) = 0; - - #if defined(BOOST_HAS_LONG_LONG) - virtual void save(const boost::long_long_type t) = 0; - virtual void save(const boost::ulong_long_type t) = 0; - #elif defined(BOOST_HAS_MS_INT64) - virtual void save(const __int64 t) = 0; - virtual void save(const unsigned __int64 t) = 0; - #endif - - virtual void save(const float t) = 0; - virtual void save(const double t) = 0; - - // string types are treated as primitives - virtual void save(const std::string & t) = 0; - #ifndef BOOST_NO_STD_WSTRING - virtual void save(const std::wstring & t) = 0; - #endif - - virtual void save_null_pointer() = 0; - // used for xml and other tagged formats - virtual void save_start(const char * name) = 0; - virtual void save_end(const char * name) = 0; - virtual void register_basic_serializer(const detail::basic_oserializer & bos) = 0; - virtual detail::helper_collection & get_helper_collection() = 0; - - virtual void end_preamble() = 0; - - // msvc and borland won't automatically pass these to the base class so - // make it explicit here - template - void save_override(T & t) - { - archive::save(* this->This(), t); - } - // special treatment for name-value pairs. - template - void save_override( - const ::boost::serialization::nvp< T > & t - ){ - save_start(t.name()); - archive::save(* this->This(), t.const_value()); - save_end(t.name()); - } -protected: - virtual ~polymorphic_oarchive_impl(){}; -public: - // utility functions implemented by all legal archives - virtual unsigned int get_flags() const = 0; - virtual library_version_type get_library_version() const = 0; - virtual void save_binary(const void * t, std::size_t size) = 0; - - virtual void save_object( - const void *x, - const detail::basic_oserializer & bos - ) = 0; - virtual void save_pointer( - const void * t, - const detail::basic_pointer_oserializer * bpos_ptr - ) = 0; -}; - -// note: preserve naming symmetry -class BOOST_SYMBOL_VISIBLE polymorphic_oarchive : - public polymorphic_oarchive_impl -{ -public: - virtual ~polymorphic_oarchive(){}; -}; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::polymorphic_oarchive) - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_POLYMORPHIC_OARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_text_iarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_text_iarchive.hpp deleted file mode 100644 index 7bef2927865..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_text_iarchive.hpp +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef BOOST_ARCHIVE_POLYMORPHIC_TEXT_IARCHIVE_HPP -#define BOOST_ARCHIVE_POLYMORPHIC_TEXT_IARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_text_iarchive.hpp - -// (C) Copyright 2002 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 - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -class polymorphic_text_iarchive : - public detail::polymorphic_iarchive_route -{ -public: - polymorphic_text_iarchive(std::istream & is, unsigned int flags = 0) : - detail::polymorphic_iarchive_route(is, flags) - {} - ~polymorphic_text_iarchive(){} -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE( - boost::archive::polymorphic_text_iarchive -) - -#endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_IARCHIVE_HPP - diff --git a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_text_oarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_text_oarchive.hpp deleted file mode 100644 index 457aad9fd75..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_text_oarchive.hpp +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef BOOST_ARCHIVE_POLYMORPHIC_TEXT_OARCHIVE_HPP -#define BOOST_ARCHIVE_POLYMORPHIC_TEXT_OARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_text_oarchive.hpp - -// (C) Copyright 2002 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 - -namespace boost { -namespace archive { - -typedef detail::polymorphic_oarchive_route< - text_oarchive_impl -> polymorphic_text_oarchive; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE( - boost::archive::polymorphic_text_oarchive -) - -#endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_OARCHIVE_HPP - diff --git a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_text_wiarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_text_wiarchive.hpp deleted file mode 100644 index 8466f05d6a6..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_text_wiarchive.hpp +++ /dev/null @@ -1,59 +0,0 @@ -#ifndef BOOST_ARCHIVE_POLYMORPHIC_TEXT_WIARCHIVE_HPP -#define BOOST_ARCHIVE_POLYMORPHIC_TEXT_WIARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_text_wiarchive.hpp - -// (C) Copyright 2002 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 -#ifdef BOOST_NO_STD_WSTREAMBUF -#error "wide char i/o not supported on this platform" -#else - -#include -#include - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -class polymorphic_text_wiarchive : - public detail::polymorphic_iarchive_route -{ -public: - polymorphic_text_wiarchive(std::wistream & is, unsigned int flags = 0) : - detail::polymorphic_iarchive_route(is, flags) - {} - ~polymorphic_text_wiarchive(){} -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE( - boost::archive::polymorphic_text_wiarchive -) - -#endif // BOOST_NO_STD_WSTREAMBUF -#endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_WIARCHIVE_HPP - diff --git a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_text_woarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_text_woarchive.hpp deleted file mode 100644 index 295625d1bcf..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_text_woarchive.hpp +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef BOOST_ARCHIVE_POLYMORPHIC_TEXT_WOARCHIVE_HPP -#define BOOST_ARCHIVE_POLYMORPHIC_TEXT_WOARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_text_oarchive.hpp - -// (C) Copyright 2002 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 -#ifdef BOOST_NO_STD_WSTREAMBUF -#error "wide char i/o not supported on this platform" -#else - -#include -#include - -namespace boost { -namespace archive { - -typedef detail::polymorphic_oarchive_route< - text_woarchive_impl -> polymorphic_text_woarchive; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE( - boost::archive::polymorphic_text_woarchive -) - -#endif // BOOST_NO_STD_WSTREAMBUF -#endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_WOARCHIVE_HPP - diff --git a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_xml_iarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_xml_iarchive.hpp deleted file mode 100644 index 4dc3f894b38..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_xml_iarchive.hpp +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef BOOST_ARCHIVE_POLYMORPHIC_XML_IARCHIVE_HPP -#define BOOST_ARCHIVE_POLYMORPHIC_XML_IARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_xml_iarchive.hpp - -// (C) Copyright 2002 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 - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -class polymorphic_xml_iarchive : - public detail::polymorphic_iarchive_route -{ -public: - polymorphic_xml_iarchive(std::istream & is, unsigned int flags = 0) : - detail::polymorphic_iarchive_route(is, flags) - {} - ~polymorphic_xml_iarchive(){} -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE( - boost::archive::polymorphic_xml_iarchive -) - -#endif // BOOST_ARCHIVE_POLYMORPHIC_XML_IARCHIVE_HPP - diff --git a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_xml_oarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_xml_oarchive.hpp deleted file mode 100644 index 514f9e530a8..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_xml_oarchive.hpp +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef BOOST_ARCHIVE_POLYMORPHIC_XML_OARCHIVE_HPP -#define BOOST_ARCHIVE_POLYMORPHIC_XML_OARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_xml_oarchive.hpp - -// (C) Copyright 2002 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 - -namespace boost { -namespace archive { - -typedef detail::polymorphic_oarchive_route< - xml_oarchive_impl -> polymorphic_xml_oarchive; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE( - boost::archive::polymorphic_xml_oarchive -) - -#endif // BOOST_ARCHIVE_POLYMORPHIC_XML_OARCHIVE_HPP - diff --git a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_xml_wiarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_xml_wiarchive.hpp deleted file mode 100644 index d4ab731267f..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_xml_wiarchive.hpp +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef BOOST_ARCHIVE_POLYMORPHIC_XML_WIARCHIVE_HPP -#define BOOST_ARCHIVE_POLYMORPHIC_XML_WIARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_xml_wiarchive.hpp - -// (C) Copyright 2002 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 -#ifdef BOOST_NO_STD_WSTREAMBUF -#error "wide char i/o not supported on this platform" -#else - -#include -#include - -namespace boost { -namespace archive { - -class polymorphic_xml_wiarchive : - public detail::polymorphic_iarchive_route -{ -public: - polymorphic_xml_wiarchive(std::wistream & is, unsigned int flags = 0) : - detail::polymorphic_iarchive_route(is, flags) - {} - ~polymorphic_xml_wiarchive(){} -}; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE( - boost::archive::polymorphic_xml_wiarchive -) - -#endif // BOOST_NO_STD_WSTREAMBUF -#endif // BOOST_ARCHIVE_POLYMORPHIC_XML_WIARCHIVE_HPP - diff --git a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_xml_woarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_xml_woarchive.hpp deleted file mode 100644 index dd8963fbb14..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/polymorphic_xml_woarchive.hpp +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef BOOST_ARCHIVE_POLYMORPHIC_XML_WOARCHIVE_HPP -#define BOOST_ARCHIVE_POLYMORPHIC_XML_WOARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// polymorphic_xml_oarchive.hpp - -// (C) Copyright 2002 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 -#ifdef BOOST_NO_STD_WSTREAMBUF -#error "wide char i/o not supported on this platform" -#else - -#include -#include - -namespace boost { -namespace archive { - -typedef detail::polymorphic_oarchive_route< - xml_woarchive_impl -> polymorphic_xml_woarchive; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE( - boost::archive::polymorphic_xml_woarchive -) - -#endif // BOOST_NO_STD_WSTREAMBUF -#endif // BOOST_ARCHIVE_POLYMORPHIC_XML_WOARCHIVE_HPP - diff --git a/contrib/libboost/boost_1_65_0/boost/archive/text_iarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/text_iarchive.hpp deleted file mode 100644 index d9d60adf0b8..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/text_iarchive.hpp +++ /dev/null @@ -1,132 +0,0 @@ -#ifndef BOOST_ARCHIVE_TEXT_IARCHIVE_HPP -#define BOOST_ARCHIVE_TEXT_IARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// text_iarchive.hpp - -// (C) Copyright 2002 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 -#include -#include -#include -#include - -#include // must be the last header - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -namespace detail { - template class interface_iarchive; -} // namespace detail - -template -class BOOST_SYMBOL_VISIBLE text_iarchive_impl : - public basic_text_iprimitive, - public basic_text_iarchive -{ -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else -protected: - friend class detail::interface_iarchive; - friend class load_access; -#endif - template - void load(T & t){ - basic_text_iprimitive::load(t); - } - void load(version_type & t){ - unsigned int v; - load(v); - t = version_type(v); - } - void load(boost::serialization::item_version_type & t){ - unsigned int v; - load(v); - t = boost::serialization::item_version_type(v); - } - BOOST_ARCHIVE_DECL void - load(char * t); - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_ARCHIVE_DECL void - load(wchar_t * t); - #endif - BOOST_ARCHIVE_DECL void - load(std::string &s); - #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_DECL void - load(std::wstring &ws); - #endif - template - void load_override(T & t){ - basic_text_iarchive::load_override(t); - } - BOOST_ARCHIVE_DECL void - load_override(class_name_type & t); - BOOST_ARCHIVE_DECL void - init(); - BOOST_ARCHIVE_DECL - text_iarchive_impl(std::istream & is, unsigned int flags); - // don't import inline definitions! leave this as a reminder. - //BOOST_ARCHIVE_DECL - ~text_iarchive_impl(){}; -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -class BOOST_SYMBOL_VISIBLE text_iarchive : - public text_iarchive_impl{ -public: - text_iarchive(std::istream & is_, unsigned int flags = 0) : - // note: added _ to suppress useless gcc warning - text_iarchive_impl(is_, flags) - {} - ~text_iarchive(){} -}; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::text_iarchive) - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#endif // BOOST_ARCHIVE_TEXT_IARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/text_oarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/text_oarchive.hpp deleted file mode 100644 index 9ba0dafffb4..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/text_oarchive.hpp +++ /dev/null @@ -1,121 +0,0 @@ -#ifndef BOOST_ARCHIVE_TEXT_OARCHIVE_HPP -#define BOOST_ARCHIVE_TEXT_OARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// text_oarchive.hpp - -// (C) Copyright 2002 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 // std::size_t - -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#include -#include -#include -#include -#include - -#include // must be the last header - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -namespace detail { - template class interface_oarchive; -} // namespace detail - -template -class BOOST_SYMBOL_VISIBLE text_oarchive_impl : - /* protected ? */ public basic_text_oprimitive, - public basic_text_oarchive -{ -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else -protected: - friend class detail::interface_oarchive; - friend class basic_text_oarchive; - friend class save_access; -#endif - template - void save(const T & t){ - this->newtoken(); - basic_text_oprimitive::save(t); - } - void save(const version_type & t){ - save(static_cast(t)); - } - void save(const boost::serialization::item_version_type & t){ - save(static_cast(t)); - } - BOOST_ARCHIVE_DECL void - save(const char * t); - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_ARCHIVE_DECL void - save(const wchar_t * t); - #endif - BOOST_ARCHIVE_DECL void - save(const std::string &s); - #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_DECL void - save(const std::wstring &ws); - #endif - BOOST_ARCHIVE_DECL - text_oarchive_impl(std::ostream & os, unsigned int flags); - // don't import inline definitions! leave this as a reminder. - //BOOST_ARCHIVE_DECL - ~text_oarchive_impl(){}; -public: - BOOST_ARCHIVE_DECL void - save_binary(const void *address, std::size_t count); -}; - -// do not derive from this class. If you want to extend this functionality -// via inhertance, derived from text_oarchive_impl instead. This will -// preserve correct static polymorphism. -class BOOST_SYMBOL_VISIBLE text_oarchive : - public text_oarchive_impl -{ -public: - text_oarchive(std::ostream & os_, unsigned int flags = 0) : - // note: added _ to suppress useless gcc warning - text_oarchive_impl(os_, flags) - {} - ~text_oarchive(){} -}; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::text_oarchive) - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_ARCHIVE_TEXT_OARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/text_wiarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/text_wiarchive.hpp deleted file mode 100644 index 3adf068a51a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/text_wiarchive.hpp +++ /dev/null @@ -1,137 +0,0 @@ -#ifndef BOOST_ARCHIVE_TEXT_WIARCHIVE_HPP -#define BOOST_ARCHIVE_TEXT_WIARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// text_wiarchive.hpp - -// (C) Copyright 2002 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 -#ifdef BOOST_NO_STD_WSTREAMBUF -#error "wide char i/o not supported on this platform" -#else - -#include - -#include -#include -#include -#include -#include - -#include // must be the last header - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -namespace detail { - template class interface_iarchive; -} // namespace detail - -template -class BOOST_SYMBOL_VISIBLE text_wiarchive_impl : - public basic_text_iprimitive, - public basic_text_iarchive -{ -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else -protected: - #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) - // for some inexplicable reason insertion of "class" generates compile erro - // on msvc 7.1 - friend detail::interface_iarchive; - friend load_access; - #else - friend class detail::interface_iarchive; - friend class load_access; - #endif -#endif - template - void load(T & t){ - basic_text_iprimitive::load(t); - } - void load(version_type & t){ - unsigned int v; - load(v); - t = version_type(v); - } - void load(boost::serialization::item_version_type & t){ - unsigned int v; - load(v); - t = boost::serialization::item_version_type(v); - } - BOOST_WARCHIVE_DECL void - load(char * t); - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_WARCHIVE_DECL void - load(wchar_t * t); - #endif - BOOST_WARCHIVE_DECL void - load(std::string &s); - #ifndef BOOST_NO_STD_WSTRING - BOOST_WARCHIVE_DECL void - load(std::wstring &ws); - #endif - template - void load_override(T & t){ - basic_text_iarchive::load_override(t); - } - BOOST_WARCHIVE_DECL - text_wiarchive_impl(std::wistream & is, unsigned int flags); - ~text_wiarchive_impl(){}; -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -class BOOST_SYMBOL_VISIBLE text_wiarchive : - public text_wiarchive_impl{ -public: - text_wiarchive(std::wistream & is, unsigned int flags = 0) : - text_wiarchive_impl(is, flags) - {} - ~text_wiarchive(){} -}; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::text_wiarchive) - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#endif // BOOST_NO_STD_WSTREAMBUF -#endif // BOOST_ARCHIVE_TEXT_WIARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/text_woarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/text_woarchive.hpp deleted file mode 100644 index b6b4f8ed59a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/text_woarchive.hpp +++ /dev/null @@ -1,155 +0,0 @@ -#ifndef BOOST_ARCHIVE_TEXT_WOARCHIVE_HPP -#define BOOST_ARCHIVE_TEXT_WOARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// text_woarchive.hpp - -// (C) Copyright 2002 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 - -#ifdef BOOST_NO_STD_WSTREAMBUF -#error "wide char i/o not supported on this platform" -#else - -#include -#include // size_t - -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#include -#include -#include -#include -#include - -#include // must be the last header - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -namespace detail { - template class interface_oarchive; -} // namespace detail - -template -class BOOST_SYMBOL_VISIBLE text_woarchive_impl : - public basic_text_oprimitive, - public basic_text_oarchive -{ -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else -protected: - #if BOOST_WORKAROUND(BOOST_MSVC, < 1500) - // for some inexplicable reason insertion of "class" generates compile erro - // on msvc 7.1 - friend detail::interface_oarchive; - friend basic_text_oarchive; - friend save_access; - #else - friend class detail::interface_oarchive; - friend class basic_text_oarchive; - friend class save_access; - #endif -#endif - template - void save(const T & t){ - this->newtoken(); - basic_text_oprimitive::save(t); - } - void save(const version_type & t){ - save(static_cast(t)); - } - void save(const boost::serialization::item_version_type & t){ - save(static_cast(t)); - } - BOOST_WARCHIVE_DECL void - save(const char * t); - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_WARCHIVE_DECL void - save(const wchar_t * t); - #endif - BOOST_WARCHIVE_DECL void - save(const std::string &s); - #ifndef BOOST_NO_STD_WSTRING - BOOST_WARCHIVE_DECL void - save(const std::wstring &ws); - #endif - text_woarchive_impl(std::wostream & os, unsigned int flags) : - basic_text_oprimitive( - os, - 0 != (flags & no_codecvt) - ), - basic_text_oarchive(flags) - { - if(0 == (flags & no_header)) - basic_text_oarchive::init(); - } -public: - void save_binary(const void *address, std::size_t count){ - put(static_cast('\n')); - this->end_preamble(); - #if ! defined(__MWERKS__) - this->basic_text_oprimitive::save_binary( - #else - this->basic_text_oprimitive::save_binary( - #endif - address, - count - ); - put(static_cast('\n')); - this->delimiter = this->none; - } - -}; - -// we use the following because we can't use -// typedef text_oarchive_impl > text_oarchive; - -// do not derive from this class. If you want to extend this functionality -// via inhertance, derived from text_oarchive_impl instead. This will -// preserve correct static polymorphism. -class BOOST_SYMBOL_VISIBLE text_woarchive : - public text_woarchive_impl -{ -public: - text_woarchive(std::wostream & os, unsigned int flags = 0) : - text_woarchive_impl(os, flags) - {} - ~text_woarchive(){} -}; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::text_woarchive) - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_NO_STD_WSTREAMBUF -#endif // BOOST_ARCHIVE_TEXT_WOARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/tmpdir.hpp b/contrib/libboost/boost_1_65_0/boost/archive/tmpdir.hpp deleted file mode 100644 index 400d23b9f68..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/tmpdir.hpp +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef BOOST_ARCHIVE_TMPDIR_HPP -#define BOOST_ARCHIVE_TMPDIR_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// tmpdir.hpp: - -// (C) Copyright 2002 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 // getenv -#include // NULL -//#include - -#include -#ifdef BOOST_NO_STDC_NAMESPACE -namespace std { - using ::getenv; -} -#endif - -namespace boost { -namespace archive { - -inline const char * tmpdir(){ - const char *dirname; - dirname = std::getenv("TMP"); - if(NULL == dirname) - dirname = std::getenv("TMPDIR"); - if(NULL == dirname) - dirname = std::getenv("TEMP"); - if(NULL == dirname){ - //BOOST_ASSERT(false); // no temp directory found - dirname = "."; - } - return dirname; -} - -} // archive -} // boost - -#endif // BOOST_ARCHIVE_TMPDIR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/wcslen.hpp b/contrib/libboost/boost_1_65_0/boost/archive/wcslen.hpp deleted file mode 100644 index 0b60004f095..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/wcslen.hpp +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef BOOST_ARCHIVE_WCSLEN_HPP -#define BOOST_ARCHIVE_WCSLEN_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// wcslen.hpp: - -// (C) Copyright 2002 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 // size_t -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#ifndef BOOST_NO_CWCHAR - -// a couple of libraries which include wchar_t don't include -// wcslen - -#if defined(BOOST_DINKUMWARE_STDLIB) && BOOST_DINKUMWARE_STDLIB < 306 \ -|| defined(__LIBCOMO__) - -namespace std { -inline std::size_t wcslen(const wchar_t * ws) -{ - const wchar_t * eows = ws; - while(* eows != 0) - ++eows; - return eows - ws; -} -} // namespace std - -#else - -#ifndef BOOST_NO_CWCHAR -#include -#endif -#ifdef BOOST_NO_STDC_NAMESPACE -namespace std{ using ::wcslen; } -#endif - -#endif // wcslen - -#endif //BOOST_NO_CWCHAR - -#endif //BOOST_ARCHIVE_WCSLEN_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/xml_archive_exception.hpp b/contrib/libboost/boost_1_65_0/boost/archive/xml_archive_exception.hpp deleted file mode 100644 index 82c53ef5d3e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/xml_archive_exception.hpp +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef BOOST_ARCHIVE_XML_ARCHIVE_EXCEPTION_HPP -#define BOOST_ARCHIVE_XML_ARCHIVE_EXCEPTION_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// xml_archive_exception.hpp: - -// (C) Copyright 2007 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 -#include -#include - -#include // must be the last header - -namespace boost { -namespace archive { - -////////////////////////////////////////////////////////////////////// -// exceptions thrown by xml archives -// -class BOOST_SYMBOL_VISIBLE xml_archive_exception : - public virtual boost::archive::archive_exception -{ -public: - typedef enum { - xml_archive_parsing_error, // see save_register - xml_archive_tag_mismatch, - xml_archive_tag_name_error - } exception_code; - BOOST_ARCHIVE_DECL xml_archive_exception( - exception_code c, - const char * e1 = NULL, - const char * e2 = NULL - ); - BOOST_ARCHIVE_DECL xml_archive_exception(xml_archive_exception const &) ; - virtual BOOST_ARCHIVE_DECL ~xml_archive_exception() BOOST_NOEXCEPT_OR_NOTHROW ; -}; - -}// namespace archive -}// namespace boost - -#include // pops abi_suffix.hpp pragmas - -#endif //BOOST_XML_ARCHIVE_ARCHIVE_EXCEPTION_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/xml_iarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/xml_iarchive.hpp deleted file mode 100644 index abd2f9fc4e3..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/xml_iarchive.hpp +++ /dev/null @@ -1,142 +0,0 @@ -#ifndef BOOST_ARCHIVE_XML_IARCHIVE_HPP -#define BOOST_ARCHIVE_XML_IARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// xml_iarchive.hpp - -// (C) Copyright 2002 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 -#include -#include -#include -#include - -#include // must be the last header - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -namespace detail { - template class interface_iarchive; -} // namespace detail - -template -class basic_xml_grammar; -typedef basic_xml_grammar xml_grammar; - -template -class BOOST_SYMBOL_VISIBLE xml_iarchive_impl : - public basic_text_iprimitive, - public basic_xml_iarchive -{ -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else -protected: - friend class detail::interface_iarchive; - friend class basic_xml_iarchive; - friend class load_access; -#endif - // use boost:scoped_ptr to implement automatic deletion; - boost::scoped_ptr gimpl; - - std::istream & get_is(){ - return is; - } - template - void load(T & t){ - basic_text_iprimitive::load(t); - } - void - load(version_type & t){ - unsigned int v; - load(v); - t = version_type(v); - } - void - load(boost::serialization::item_version_type & t){ - unsigned int v; - load(v); - t = boost::serialization::item_version_type(v); - } - BOOST_ARCHIVE_DECL void - load(char * t); - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_ARCHIVE_DECL void - load(wchar_t * t); - #endif - BOOST_ARCHIVE_DECL void - load(std::string &s); - #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_DECL void - load(std::wstring &ws); - #endif - template - void load_override(T & t){ - basic_xml_iarchive::load_override(t); - } - BOOST_ARCHIVE_DECL void - load_override(class_name_type & t); - BOOST_ARCHIVE_DECL void - init(); - BOOST_ARCHIVE_DECL - xml_iarchive_impl(std::istream & is, unsigned int flags); - BOOST_ARCHIVE_DECL - ~xml_iarchive_impl(); -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -class BOOST_SYMBOL_VISIBLE xml_iarchive : - public xml_iarchive_impl{ -public: - xml_iarchive(std::istream & is, unsigned int flags = 0) : - xml_iarchive_impl(is, flags) - {} - ~xml_iarchive(){}; -}; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::xml_iarchive) - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#endif // BOOST_ARCHIVE_XML_IARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/xml_oarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/xml_oarchive.hpp deleted file mode 100644 index eea12680372..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/xml_oarchive.hpp +++ /dev/null @@ -1,137 +0,0 @@ -#ifndef BOOST_ARCHIVE_XML_OARCHIVE_HPP -#define BOOST_ARCHIVE_XML_OARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// xml_oarchive.hpp - -// (C) Copyright 2002 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 // size_t -#include -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#include -#include -#include -#include -#include - -#include // must be the last header - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -namespace detail { - template class interface_oarchive; -} // namespace detail - -template -class BOOST_SYMBOL_VISIBLE xml_oarchive_impl : - public basic_text_oprimitive, - public basic_xml_oarchive -{ -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else -protected: - friend class detail::interface_oarchive; - friend class basic_xml_oarchive; - friend class save_access; -#endif - template - void save(const T & t){ - basic_text_oprimitive::save(t); - } - void - save(const version_type & t){ - save(static_cast(t)); - } - void - save(const boost::serialization::item_version_type & t){ - save(static_cast(t)); - } - BOOST_ARCHIVE_DECL void - save(const char * t); - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_ARCHIVE_DECL void - save(const wchar_t * t); - #endif - BOOST_ARCHIVE_DECL void - save(const std::string &s); - #ifndef BOOST_NO_STD_WSTRING - BOOST_ARCHIVE_DECL void - save(const std::wstring &ws); - #endif - BOOST_ARCHIVE_DECL - xml_oarchive_impl(std::ostream & os, unsigned int flags); - BOOST_ARCHIVE_DECL - ~xml_oarchive_impl(); -public: - BOOST_ARCHIVE_DECL - void save_binary(const void *address, std::size_t count); -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -// we use the following because we can't use -// typedef xml_oarchive_impl > xml_oarchive; - -// do not derive from this class. If you want to extend this functionality -// via inhertance, derived from xml_oarchive_impl instead. This will -// preserve correct static polymorphism. -class BOOST_SYMBOL_VISIBLE xml_oarchive : - public xml_oarchive_impl -{ -public: - xml_oarchive(std::ostream & os, unsigned int flags = 0) : - xml_oarchive_impl(os, flags) - {} - ~xml_oarchive(){} -}; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::xml_oarchive) - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#endif // BOOST_ARCHIVE_XML_OARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/xml_wiarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/xml_wiarchive.hpp deleted file mode 100644 index ac24289ac11..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/xml_wiarchive.hpp +++ /dev/null @@ -1,149 +0,0 @@ -#ifndef BOOST_ARCHIVE_XML_WIARCHIVE_HPP -#define BOOST_ARCHIVE_XML_WIARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// xml_wiarchive.hpp - -// (C) Copyright 2002 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 -#ifdef BOOST_NO_STD_WSTREAMBUF -#error "wide char i/o not supported on this platform" -#else - -#include - -#include -#include -#include -#include -#include -#include -// #include - -#include // must be the last header - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -namespace detail { - template class interface_iarchive; -} // namespace detail - -template -class basic_xml_grammar; -typedef basic_xml_grammar xml_wgrammar; - -template -class BOOST_SYMBOL_VISIBLE xml_wiarchive_impl : - public basic_text_iprimitive, - public basic_xml_iarchive -{ -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else -protected: - friend class detail::interface_iarchive; - friend class basic_xml_iarchive; - friend class load_access; -#endif - boost::scoped_ptr gimpl; - std::wistream & get_is(){ - return is; - } - template - void - load(T & t){ - basic_text_iprimitive::load(t); - } - void - load(version_type & t){ - unsigned int v; - load(v); - t = version_type(v); - } - void - load(boost::serialization::item_version_type & t){ - unsigned int v; - load(v); - t = boost::serialization::item_version_type(v); - } - BOOST_WARCHIVE_DECL void - load(char * t); - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_WARCHIVE_DECL void - load(wchar_t * t); - #endif - BOOST_WARCHIVE_DECL void - load(std::string &s); - #ifndef BOOST_NO_STD_WSTRING - BOOST_WARCHIVE_DECL void - load(std::wstring &ws); - #endif - template - void load_override(T & t){ - basic_xml_iarchive::load_override(t); - } - BOOST_WARCHIVE_DECL void - load_override(class_name_type & t); - BOOST_WARCHIVE_DECL void - init(); - BOOST_WARCHIVE_DECL - xml_wiarchive_impl(std::wistream & is, unsigned int flags) ; - BOOST_WARCHIVE_DECL - ~xml_wiarchive_impl(); -}; - -} // namespace archive -} // namespace boost - -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -class BOOST_SYMBOL_VISIBLE xml_wiarchive : - public xml_wiarchive_impl{ -public: - xml_wiarchive(std::wistream & is, unsigned int flags = 0) : - xml_wiarchive_impl(is, flags) - {} - ~xml_wiarchive(){} -}; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::xml_wiarchive) - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#endif // BOOST_NO_STD_WSTREAMBUF -#endif // BOOST_ARCHIVE_XML_WIARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/archive/xml_woarchive.hpp b/contrib/libboost/boost_1_65_0/boost/archive/xml_woarchive.hpp deleted file mode 100644 index cb7ce68cb6f..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/archive/xml_woarchive.hpp +++ /dev/null @@ -1,134 +0,0 @@ -#ifndef BOOST_ARCHIVE_XML_WOARCHIVE_HPP -#define BOOST_ARCHIVE_XML_WOARCHIVE_HPP - -// MS compatible compilers support #pragma once -#if defined(_MSC_VER) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// xml_woarchive.hpp - -// (C) Copyright 2002 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 -#ifdef BOOST_NO_STD_WSTREAMBUF -#error "wide char i/o not supported on this platform" -#else -#include // size_t -#if defined(BOOST_NO_STDC_NAMESPACE) -namespace std{ - using ::size_t; -} // namespace std -#endif - -#include - -//#include -#include -#include -#include -#include -#include -//#include - -#include // must be the last header - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable : 4511 4512) -#endif - -namespace boost { -namespace archive { - -namespace detail { - template class interface_oarchive; -} // namespace detail - -template -class BOOST_SYMBOL_VISIBLE xml_woarchive_impl : - public basic_text_oprimitive, - public basic_xml_oarchive -{ -#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS -public: -#else -protected: - friend class detail::interface_oarchive; - friend class basic_xml_oarchive; - friend class save_access; -#endif - //void end_preamble(){ - // basic_xml_oarchive::end_preamble(); - //} - template - void - save(const T & t){ - basic_text_oprimitive::save(t); - } - void - save(const version_type & t){ - save(static_cast(t)); - } - void - save(const boost::serialization::item_version_type & t){ - save(static_cast(t)); - } - BOOST_WARCHIVE_DECL void - save(const char * t); - #ifndef BOOST_NO_INTRINSIC_WCHAR_T - BOOST_WARCHIVE_DECL void - save(const wchar_t * t); - #endif - BOOST_WARCHIVE_DECL void - save(const std::string &s); - #ifndef BOOST_NO_STD_WSTRING - BOOST_WARCHIVE_DECL void - save(const std::wstring &ws); - #endif - BOOST_WARCHIVE_DECL - xml_woarchive_impl(std::wostream & os, unsigned int flags); - BOOST_WARCHIVE_DECL - ~xml_woarchive_impl(); -public: - BOOST_WARCHIVE_DECL void - save_binary(const void *address, std::size_t count); - -}; - -// we use the following because we can't use -// typedef xml_woarchive_impl > xml_woarchive; - -// do not derive from this class. If you want to extend this functionality -// via inhertance, derived from xml_woarchive_impl instead. This will -// preserve correct static polymorphism. -class BOOST_SYMBOL_VISIBLE xml_woarchive : - public xml_woarchive_impl -{ -public: - xml_woarchive(std::wostream & os, unsigned int flags = 0) : - xml_woarchive_impl(os, flags) - {} - ~xml_woarchive(){} -}; - -} // namespace archive -} // namespace boost - -// required by export -BOOST_SERIALIZATION_REGISTER_ARCHIVE(boost::archive::xml_woarchive) - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include // pops abi_suffix.hpp pragmas - -#endif // BOOST_NO_STD_WSTREAMBUF -#endif // BOOST_ARCHIVE_XML_OARCHIVE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/array.hpp b/contrib/libboost/boost_1_65_0/boost/array.hpp deleted file mode 100644 index 210c0721254..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/array.hpp +++ /dev/null @@ -1,457 +0,0 @@ -/* The following code declares class array, - * an STL container (as wrapper) for arrays of constant size. - * - * See - * http://www.boost.org/libs/array/ - * for documentation. - * - * The original author site is at: http://www.josuttis.com/ - * - * (C) Copyright Nicolai M. Josuttis 2001. - * - * 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) - * - * 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. - * See or Trac issue #3168 - * Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow) - * 10 Mar 2010 - added workaround for SUNCC and !STLPort [trac #3893] (Marshall Clow) - * 29 Jan 2004 - c_array() added, BOOST_NO_PRIVATE_IN_AGGREGATE removed (Nico Josuttis) - * 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries. - * 05 Aug 2001 - minor update (Nico Josuttis) - * 20 Jan 2001 - STLport fix (Beman Dawes) - * 29 Sep 2000 - Initial Revision (Nico Josuttis) - * - * Jan 29, 2004 - */ -#ifndef BOOST_ARRAY_HPP -#define BOOST_ARRAY_HPP - -#include - -#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) -# pragma warning(push) -# pragma warning(disable:4996) // 'std::equal': Function call with parameters that may be unsafe -# pragma warning(disable:4510) // boost::array' : default constructor could not be generated -# pragma warning(disable:4610) // warning C4610: class 'boost::array' can never be instantiated - user defined constructor required -#endif - -#include -#include -#include -#include -#include - -// Handles broken standard libraries better than -#include -#include -#include - -// FIXES for broken compilers -#include - - -namespace boost { - - template - class array { - public: - T elems[N]; // fixed-size array of elements of type T - - public: - // type definitions - typedef T value_type; - typedef T* iterator; - typedef const T* const_iterator; - typedef T& reference; - typedef const T& const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - - // iterator support - iterator begin() { return elems; } - const_iterator begin() const { return elems; } - const_iterator cbegin() const { return elems; } - - iterator end() { return elems+N; } - const_iterator end() const { return elems+N; } - const_iterator cend() const { return elems+N; } - - // reverse iterator support -#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(_RWSTD_NO_CLASS_PARTIAL_SPEC) - typedef std::reverse_iterator reverse_iterator; - typedef std::reverse_iterator const_reverse_iterator; -#else - // workaround for broken reverse_iterator implementations - typedef std::reverse_iterator reverse_iterator; - typedef std::reverse_iterator const_reverse_iterator; -#endif - - reverse_iterator rbegin() { return reverse_iterator(end()); } - const_reverse_iterator rbegin() const { - return const_reverse_iterator(end()); - } - const_reverse_iterator crbegin() const { - return const_reverse_iterator(end()); - } - - reverse_iterator rend() { return reverse_iterator(begin()); } - const_reverse_iterator rend() const { - return const_reverse_iterator(begin()); - } - const_reverse_iterator crend() const { - return const_reverse_iterator(begin()); - } - - // operator[] - reference operator[](size_type i) - { - return BOOST_ASSERT_MSG( i < N, "out of range" ), elems[i]; - } - - /*BOOST_CONSTEXPR*/ const_reference operator[](size_type i) const - { - return BOOST_ASSERT_MSG( i < N, "out of range" ), elems[i]; - } - - // at() with range check - 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() - { - return elems[0]; - } - - BOOST_CONSTEXPR const_reference front() const - { - return elems[0]; - } - - reference back() - { - return elems[N-1]; - } - - BOOST_CONSTEXPR const_reference back() const - { - return elems[N-1]; - } - - // size is constant - 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) - void swap (array& y) { - for (size_type i = 0; i < N; ++i) - boost::swap(elems[i],y.elems[i]); - } - - // direct access to data (read-only) - const T* data() const { return elems; } - T* data() { return elems; } - - // use array as C array (direct read/write access to data) - T* c_array() { return elems; } - - // assignment with type conversion - template - array& operator= (const array& rhs) { - std::copy(rhs.begin(),rhs.end(), begin()); - return *this; - } - - // assign one value to all elements - void assign (const T& value) { fill ( value ); } // A synonym for fill - void fill (const T& value) - { - std::fill_n(begin(),size(),value); - } - - // check range (may be private because it is static) - 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; - } - - }; - - template< class T > - class array< T, 0 > { - - public: - // type definitions - typedef T value_type; - typedef T* iterator; - typedef const T* const_iterator; - typedef T& reference; - typedef const T& const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - - // iterator support - iterator begin() { return iterator( reinterpret_cast< T * >( this ) ); } - const_iterator begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } - const_iterator cbegin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); } - - iterator end() { return begin(); } - const_iterator end() const { return begin(); } - const_iterator cend() const { return cbegin(); } - - // reverse iterator support -#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(_RWSTD_NO_CLASS_PARTIAL_SPEC) - typedef std::reverse_iterator reverse_iterator; - typedef std::reverse_iterator const_reverse_iterator; -#else - // workaround for broken reverse_iterator implementations - typedef std::reverse_iterator reverse_iterator; - typedef std::reverse_iterator const_reverse_iterator; -#endif - - reverse_iterator rbegin() { return reverse_iterator(end()); } - const_reverse_iterator rbegin() const { - return const_reverse_iterator(end()); - } - const_reverse_iterator crbegin() const { - return const_reverse_iterator(end()); - } - - reverse_iterator rend() { return reverse_iterator(begin()); } - const_reverse_iterator rend() const { - return const_reverse_iterator(begin()); - } - const_reverse_iterator crend() const { - return const_reverse_iterator(begin()); - } - - // operator[] - reference operator[](size_type /*i*/) - { - return failed_rangecheck(); - } - - /*BOOST_CONSTEXPR*/ const_reference operator[](size_type /*i*/) const - { - return failed_rangecheck(); - } - - // at() with range check - reference at(size_type /*i*/) { return failed_rangecheck(); } - /*BOOST_CONSTEXPR*/ const_reference at(size_type /*i*/) const { return failed_rangecheck(); } - - // front() and back() - reference front() - { - return failed_rangecheck(); - } - - BOOST_CONSTEXPR const_reference front() const - { - return failed_rangecheck(); - } - - reference back() - { - return failed_rangecheck(); - } - - BOOST_CONSTEXPR const_reference back() const - { - return failed_rangecheck(); - } - - // size is constant - 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*/) { - } - - // direct access to data (read-only) - const T* data() const { return 0; } - T* data() { return 0; } - - // use array as C array (direct read/write access to data) - T* c_array() { return 0; } - - // assignment with type conversion - template - array& operator= (const array& ) { - return *this; - } - - // assign one value to all elements - void assign (const T& value) { fill ( value ); } - void fill (const T& ) {} - - // check range (may be private because it is static) - static reference failed_rangecheck () { - std::out_of_range e("attempt to access element of an empty array"); - boost::throw_exception(e); -#if defined(BOOST_NO_EXCEPTIONS) || (!defined(BOOST_MSVC) && !defined(__PATHSCALE__)) - // - // We need to return something here to keep - // some compilers happy: however we will never - // actually get here.... - // - static T placeholder; - return placeholder; -#endif - } - }; - - // comparisons - template - bool operator== (const array& x, const array& y) { - return std::equal(x.begin(), x.end(), y.begin()); - } - template - bool operator< (const array& x, const array& y) { - return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end()); - } - template - bool operator!= (const array& x, const array& y) { - return !(x==y); - } - template - bool operator> (const array& x, const array& y) { - return y - bool operator<= (const array& x, const array& y) { - return !(y - bool operator>= (const array& x, const array& y) { - return !(x - inline void swap (array& x, array& y) { - x.swap(y); - } - -#if defined(__SUNPRO_CC) -// Trac ticket #4757; the Sun Solaris compiler can't handle -// syntax like 'T(&get_c_array(boost::array& arg))[N]' -// -// We can't just use this for all compilers, because the -// borland compilers can't handle this form. - namespace detail { - template struct c_array - { - typedef T type[N]; - }; - } - - // Specific for boost::array: simply returns its elems data member. - template - typename detail::c_array::type& get_c_array(boost::array& arg) - { - return arg.elems; - } - - // Specific for boost::array: simply returns its elems data member. - template - typename detail::c_array::type const& get_c_array(const boost::array& arg) - { - return arg.elems; - } -#else -// Specific for boost::array: simply returns its elems data member. - template - T(&get_c_array(boost::array& arg))[N] - { - return arg.elems; - } - - // Const version. - template - const T(&get_c_array(const boost::array& arg))[N] - { - return arg.elems; - } -#endif - -#if 0 - // Overload for std::array, assuming that std::array will have - // explicit conversion functions as discussed at the WG21 meeting - // in Summit, March 2009. - template - T(&get_c_array(std::array& arg))[N] - { - return static_cast(arg); - } - - // Const version. - template - const T(&get_c_array(const std::array& arg))[N] - { - return static_cast(arg); - } -#endif - - template std::size_t hash_range(It, It); - - template - std::size_t hash_value(const array& arr) - { - 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) -#endif - -#endif /*BOOST_ARRAY_HPP*/ diff --git a/contrib/libboost/boost_1_65_0/boost/assert.hpp b/contrib/libboost/boost_1_65_0/boost/assert.hpp deleted file mode 100644 index 9650d7a2908..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/assert.hpp +++ /dev/null @@ -1,85 +0,0 @@ -// -// boost/assert.hpp - BOOST_ASSERT(expr) -// BOOST_ASSERT_MSG(expr, msg) -// BOOST_VERIFY(expr) -// BOOST_VERIFY_MSG(expr, msg) -// BOOST_ASSERT_IS_VOID -// -// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. -// Copyright (c) 2007, 2014 Peter Dimov -// Copyright (c) Beman Dawes 2011 -// Copyright (c) 2015 Ion Gaztanaga -// -// 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 -// -// Note: There are no include guards. This is intentional. -// -// See http://www.boost.org/libs/assert/assert.html for documentation. -// - -// -// Stop inspect complaining about use of 'assert': -// -// boostinspect:naassert_macro -// - -// -// BOOST_ASSERT, BOOST_ASSERT_MSG, BOOST_ASSERT_IS_VOID -// - -#undef BOOST_ASSERT -#undef BOOST_ASSERT_MSG -#undef BOOST_ASSERT_IS_VOID - -#if defined(BOOST_DISABLE_ASSERTS) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && defined(NDEBUG) ) - -# define BOOST_ASSERT(expr) ((void)0) -# define BOOST_ASSERT_MSG(expr, msg) ((void)0) -# define BOOST_ASSERT_IS_VOID - -#elif defined(BOOST_ENABLE_ASSERT_HANDLER) || ( defined(BOOST_ENABLE_ASSERT_DEBUG_HANDLER) && !defined(NDEBUG) ) - -#include // for BOOST_LIKELY -#include - -namespace boost -{ - void assertion_failed(char const * expr, char const * function, char const * file, long line); // user defined - void assertion_failed_msg(char const * expr, char const * msg, char const * function, char const * file, long line); // user defined -} // namespace boost - -#define BOOST_ASSERT(expr) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::assertion_failed(#expr, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) -#define BOOST_ASSERT_MSG(expr, msg) (BOOST_LIKELY(!!(expr))? ((void)0): ::boost::assertion_failed_msg(#expr, msg, BOOST_CURRENT_FUNCTION, __FILE__, __LINE__)) - -#else - -# include // .h to support old libraries w/o - effect is the same - -# define BOOST_ASSERT(expr) assert(expr) -# define BOOST_ASSERT_MSG(expr, msg) assert((expr)&&(msg)) -#if defined(NDEBUG) -# define BOOST_ASSERT_IS_VOID -#endif - -#endif - -// -// BOOST_VERIFY, BOOST_VERIFY_MSG -// - -#undef BOOST_VERIFY -#undef BOOST_VERIFY_MSG - -#if defined(BOOST_DISABLE_ASSERTS) || ( !defined(BOOST_ENABLE_ASSERT_HANDLER) && defined(NDEBUG) ) - -# define BOOST_VERIFY(expr) ((void)(expr)) -# define BOOST_VERIFY_MSG(expr, msg) ((void)(expr)) - -#else - -# define BOOST_VERIFY(expr) BOOST_ASSERT(expr) -# define BOOST_VERIFY_MSG(expr, msg) BOOST_ASSERT_MSG(expr,msg) - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/bind.hpp b/contrib/libboost/boost_1_65_0/boost/bind.hpp deleted file mode 100644 index 450120c7a7a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/bind.hpp +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef BOOST_BIND_HPP_INCLUDED -#define BOOST_BIND_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// bind.hpp - binds function objects to arguments -// -// Copyright (c) 2009, 2015 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 -// -// See http://www.boost.org/libs/bind/bind.html for documentation. -// - -#include - -#ifndef BOOST_BIND_NO_PLACEHOLDERS - -#if defined(BOOST_CLANG) -# pragma clang diagnostic push -# if __has_warning("-Wheader-hygiene") -# pragma clang diagnostic ignored "-Wheader-hygiene" -# endif -#endif - -using namespace boost::placeholders; - -#if defined(BOOST_CLANG) -# pragma clang diagnostic pop -#endif - -#endif // #ifndef BOOST_BIND_NO_PLACEHOLDERS - -#endif // #ifndef BOOST_BIND_HPP_INCLUDED diff --git a/contrib/libboost/boost_1_65_0/boost/bind/apply.hpp b/contrib/libboost/boost_1_65_0/boost/bind/apply.hpp deleted file mode 100644 index 6a43a89ac85..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/bind/apply.hpp +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef BOOST_BIND_APPLY_HPP_INCLUDED -#define BOOST_BIND_APPLY_HPP_INCLUDED - -// -// apply.hpp -// -// Copyright (c) 2002, 2003 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) -// - -namespace boost -{ - -template struct apply -{ - typedef R result_type; - - template result_type operator()(F & f) const - { - return f(); - } - - template result_type operator()(F & f, A1 & a1) const - { - return f(a1); - } - - template result_type operator()(F & f, A1 & a1, A2 & a2) const - { - return f(a1, a2); - } - - template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3) const - { - return f(a1, a2, a3); - } - - template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4) const - { - return f(a1, a2, a3, a4); - } - - template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const - { - return f(a1, a2, a3, a4, a5); - } - - template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const - { - return f(a1, a2, a3, a4, a5, a6); - } - - template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const - { - return f(a1, a2, a3, a4, a5, a6, a7); - } - - template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const - { - return f(a1, a2, a3, a4, a5, a6, a7, a8); - } - - template result_type operator()(F & f, A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const - { - return f(a1, a2, a3, a4, a5, a6, a7, a8, a9); - } -}; - -} // namespace boost - -#endif // #ifndef BOOST_BIND_APPLY_HPP_INCLUDED diff --git a/contrib/libboost/boost_1_65_0/boost/bind/arg.hpp b/contrib/libboost/boost_1_65_0/boost/bind/arg.hpp deleted file mode 100644 index cb52e6689f7..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/bind/arg.hpp +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef BOOST_BIND_ARG_HPP_INCLUDED -#define BOOST_BIND_ARG_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// bind/arg.hpp -// -// Copyright (c) 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) -// -// See http://www.boost.org/libs/bind/bind.html for documentation. -// - -#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 */, typename _arg_eq< I == is_placeholder::value >::type * = 0 ) - { - } -}; - -template< int I > BOOST_CONSTEXPR bool operator==( arg const &, arg const & ) -{ - return true; -} - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template< int I > struct is_placeholder< arg > -{ - enum _vt { value = I }; -}; - -template< int I > struct is_placeholder< arg (*) () > -{ - enum _vt { value = I }; -}; - -#endif - -} // namespace boost - -#endif // #ifndef BOOST_BIND_ARG_HPP_INCLUDED diff --git a/contrib/libboost/boost_1_65_0/boost/bind/bind.hpp b/contrib/libboost/boost_1_65_0/boost/bind/bind.hpp deleted file mode 100644 index 85d675a0e33..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/bind/bind.hpp +++ /dev/null @@ -1,2328 +0,0 @@ -#ifndef BOOST_BIND_BIND_HPP_INCLUDED -#define BOOST_BIND_BIND_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// bind.hpp - binds function objects to arguments -// -// Copyright (c) 2001-2004 Peter Dimov and Multi Media Ltd. -// Copyright (c) 2001 David Abrahams -// Copyright (c) 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) -// -// See http://www.boost.org/libs/bind/bind.html for documentation. -// - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) -#include // std::forward -#endif - -// Borland-specific bug, visit_each() silently fails to produce code - -#if defined(__BORLANDC__) -# define BOOST_BIND_VISIT_EACH boost::visit_each -#else -# define BOOST_BIND_VISIT_EACH visit_each -#endif - -#include - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable: 4512) // assignment operator could not be generated -#endif - -namespace boost -{ - -template class weak_ptr; - -namespace _bi // implementation details -{ - -// result_traits - -template struct result_traits -{ - typedef R type; -}; - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) - -struct unspecified {}; - -template struct result_traits -{ - typedef typename F::result_type type; -}; - -template struct result_traits< unspecified, reference_wrapper > -{ - typedef typename F::result_type type; -}; - -#endif - -// ref_compare - -template bool ref_compare( T const & a, T const & b, long ) -{ - return a == b; -} - -template bool ref_compare( arg const &, arg const &, int ) -{ - return true; -} - -template bool ref_compare( arg (*) (), arg (*) (), int ) -{ - return true; -} - -template bool ref_compare( reference_wrapper const & a, reference_wrapper const & b, int ) -{ - return a.get_pointer() == b.get_pointer(); -} - -// bind_t forward declaration for listN - -template class bind_t; - -template bool ref_compare( bind_t const & a, bind_t const & b, int ) -{ - return a.compare( b ); -} - -// value - -template class value -{ -public: - - value(T const & t): t_(t) {} - - T & get() { return t_; } - T const & get() const { return t_; } - - bool operator==(value const & rhs) const - { - return t_ == rhs.t_; - } - -private: - - T t_; -}; - -// ref_compare for weak_ptr - -template bool ref_compare( value< weak_ptr > const & a, value< weak_ptr > const & b, int ) -{ - return !(a.get() < b.get()) && !(b.get() < a.get()); -} - -// type - -template class type {}; - -// unwrap - -template struct unwrapper -{ - static inline F & unwrap( F & f, long ) - { - return f; - } - - template static inline F2 & unwrap( reference_wrapper rf, int ) - { - return rf.get(); - } - - template static inline _mfi::dm unwrap( R T::* pm, int ) - { - return _mfi::dm( pm ); - } -}; - -// listN - -class list0 -{ -public: - - list0() {} - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - 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 const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A &, long) - { - return unwrapper::unwrap(f, 0)(); - } - - template R operator()(type, F const & f, A &, long) const - { - return unwrapper::unwrap(f, 0)(); - } - - template void operator()(type, F & f, A &, int) - { - unwrapper::unwrap(f, 0)(); - } - - template void operator()(type, F const & f, A &, int) const - { - unwrapper::unwrap(f, 0)(); - } - - template void accept(V &) const - { - } - - bool operator==(list0 const &) const - { - return true; - } -}; - -#ifdef BOOST_MSVC -// MSVC is bright enough to realise that the parameter rhs -// in operator==may be unused for some template argument types: -#pragma warning(push) -#pragma warning(disable:4100) -#endif - -template< class A1 > class list1: private storage1< A1 > -{ -private: - - typedef storage1< A1 > base_type; - -public: - - explicit list1( A1 a1 ): base_type( a1 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - 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 const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list1 const & rhs) const - { - return ref_compare(base_type::a1_, rhs.a1_, 0); - } -}; - -struct logical_and; -struct logical_or; - -template< class A1, class A2 > class list2: private storage2< A1, A2 > -{ -private: - - typedef storage2< A1, A2 > base_type; - -public: - - list2( A1 a1, A2 a2 ): base_type( a1, a2 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - 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 const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_]); - } - - template bool operator()( type, logical_and & /*f*/, A & a, int ) - { - return a[ base_type::a1_ ] && a[ base_type::a2_ ]; - } - - template bool operator()( type, logical_and const & /*f*/, A & a, int ) const - { - return a[ base_type::a1_ ] && a[ base_type::a2_ ]; - } - - template bool operator()( type, logical_or & /*f*/, A & a, int ) - { - return a[ base_type::a1_ ] || a[ base_type::a2_ ]; - } - - template bool operator()( type, logical_or const & /*f*/, A & a, int ) const - { - return a[ base_type::a1_ ] || a[ base_type::a2_ ]; - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list2 const & rhs) const - { - return ref_compare(base_type::a1_, rhs.a1_, 0) && ref_compare(base_type::a2_, rhs.a2_, 0); - } -}; - -template< class A1, class A2, class A3 > class list3: private storage3< A1, A2, A3 > -{ -private: - - typedef storage3< A1, A2, A3 > base_type; - -public: - - list3( A1 a1, A2 a2, A3 a3 ): base_type( a1, a2, a3 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - 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 const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list3 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ); - } -}; - -template< class A1, class A2, class A3, class A4 > class list4: private storage4< A1, A2, A3, A4 > -{ -private: - - typedef storage4< A1, A2, A3, A4 > base_type; - -public: - - list4( A1 a1, A2 a2, A3 a3, A4 a4 ): base_type( a1, a2, a3, a4 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - 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 const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list4 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ); - } -}; - -template< class A1, class A2, class A3, class A4, class A5 > class list5: private storage5< A1, A2, A3, A4, A5 > -{ -private: - - typedef storage5< A1, A2, A3, A4, A5 > base_type; - -public: - - list5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): base_type( a1, a2, a3, a4, a5 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - A5 operator[] (boost::arg<5>) const { return base_type::a5_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - 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 const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list5 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ) && - ref_compare( base_type::a5_, rhs.a5_, 0 ); - } -}; - -template class list6: private storage6< A1, A2, A3, A4, A5, A6 > -{ -private: - - typedef storage6< A1, A2, A3, A4, A5, A6 > base_type; - -public: - - list6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): base_type( a1, a2, a3, a4, a5, a6 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - A5 operator[] (boost::arg<5>) const { return base_type::a5_; } - A6 operator[] (boost::arg<6>) const { return base_type::a6_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } - A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - 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 const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list6 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ) && - ref_compare( base_type::a5_, rhs.a5_, 0 ) && - ref_compare( base_type::a6_, rhs.a6_, 0 ); - } -}; - -template class list7: private storage7< A1, A2, A3, A4, A5, A6, A7 > -{ -private: - - typedef storage7< A1, A2, A3, A4, A5, A6, A7 > base_type; - -public: - - list7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): base_type( a1, a2, a3, a4, a5, a6, a7 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - A5 operator[] (boost::arg<5>) const { return base_type::a5_; } - A6 operator[] (boost::arg<6>) const { return base_type::a6_; } - A7 operator[] (boost::arg<7>) const { return base_type::a7_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } - A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } - A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - 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 const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list7 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ) && - ref_compare( base_type::a5_, rhs.a5_, 0 ) && - ref_compare( base_type::a6_, rhs.a6_, 0 ) && - ref_compare( base_type::a7_, rhs.a7_, 0 ); - } -}; - -template< class A1, class A2, class A3, class A4, class A5, class A6, class A7, class A8 > class list8: private storage8< A1, A2, A3, A4, A5, A6, A7, A8 > -{ -private: - - typedef storage8< A1, A2, A3, A4, A5, A6, A7, A8 > base_type; - -public: - - list8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - A5 operator[] (boost::arg<5>) const { return base_type::a5_; } - A6 operator[] (boost::arg<6>) const { return base_type::a6_; } - A7 operator[] (boost::arg<7>) const { return base_type::a7_; } - A8 operator[] (boost::arg<8>) const { return base_type::a8_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } - A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } - A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } - A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - 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 const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list8 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ) && - ref_compare( base_type::a5_, rhs.a5_, 0 ) && - ref_compare( base_type::a6_, rhs.a6_, 0 ) && - ref_compare( base_type::a7_, rhs.a7_, 0 ) && - ref_compare( base_type::a8_, rhs.a8_, 0 ); - } -}; - -template class list9: private storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > -{ -private: - - typedef storage9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > base_type; - -public: - - list9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): base_type( a1, a2, a3, a4, a5, a6, a7, a8, a9 ) {} - - A1 operator[] (boost::arg<1>) const { return base_type::a1_; } - A2 operator[] (boost::arg<2>) const { return base_type::a2_; } - A3 operator[] (boost::arg<3>) const { return base_type::a3_; } - A4 operator[] (boost::arg<4>) const { return base_type::a4_; } - A5 operator[] (boost::arg<5>) const { return base_type::a5_; } - A6 operator[] (boost::arg<6>) const { return base_type::a6_; } - A7 operator[] (boost::arg<7>) const { return base_type::a7_; } - A8 operator[] (boost::arg<8>) const { return base_type::a8_; } - A9 operator[] (boost::arg<9>) const { return base_type::a9_; } - - A1 operator[] (boost::arg<1> (*) ()) const { return base_type::a1_; } - A2 operator[] (boost::arg<2> (*) ()) const { return base_type::a2_; } - A3 operator[] (boost::arg<3> (*) ()) const { return base_type::a3_; } - A4 operator[] (boost::arg<4> (*) ()) const { return base_type::a4_; } - A5 operator[] (boost::arg<5> (*) ()) const { return base_type::a5_; } - A6 operator[] (boost::arg<6> (*) ()) const { return base_type::a6_; } - A7 operator[] (boost::arg<7> (*) ()) const { return base_type::a7_; } - A8 operator[] (boost::arg<8> (*) ()) const { return base_type::a8_; } - A9 operator[] (boost::arg<9> (*) ()) const { return base_type::a9_; } - - template T & operator[] (_bi::value & v) const { return v.get(); } - - template T const & operator[] (_bi::value const & v) const { return v.get(); } - - 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 const & b) const { return b.eval(*this); } - - template R operator()(type, F & f, A & a, long) - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); - } - - template R operator()(type, F const & f, A & a, long) const - { - return unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); - } - - template void operator()(type, F & f, A & a, int) - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); - } - - template void operator()(type, F const & f, A & a, int) const - { - unwrapper::unwrap(f, 0)(a[base_type::a1_], a[base_type::a2_], a[base_type::a3_], a[base_type::a4_], a[base_type::a5_], a[base_type::a6_], a[base_type::a7_], a[base_type::a8_], a[base_type::a9_]); - } - - template void accept(V & v) const - { - base_type::accept(v); - } - - bool operator==(list9 const & rhs) const - { - return - - ref_compare( base_type::a1_, rhs.a1_, 0 ) && - ref_compare( base_type::a2_, rhs.a2_, 0 ) && - ref_compare( base_type::a3_, rhs.a3_, 0 ) && - ref_compare( base_type::a4_, rhs.a4_, 0 ) && - ref_compare( base_type::a5_, rhs.a5_, 0 ) && - ref_compare( base_type::a6_, rhs.a6_, 0 ) && - ref_compare( base_type::a7_, rhs.a7_, 0 ) && - ref_compare( base_type::a8_, rhs.a8_, 0 ) && - ref_compare( base_type::a9_, rhs.a9_, 0 ); - } -}; - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -// bind_t - -#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES ) - -template< class A1 > class rrlist1 -{ -private: - - A1 & a1_; // not A1&& because of msvc-10.0 - -public: - - explicit rrlist1( A1 & a1 ): a1_( a1 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } // not static_cast because of g++ 4.9 - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - 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 - { - rrlist1 a( a1_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2 > class rrlist2 -{ -private: - - A1 & a1_; - A2 & a2_; - -public: - - rrlist2( A1 & a1, A2 & a2 ): a1_( a1 ), a2_( a2 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - 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 - { - rrlist2 a( a1_, a2_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2, class A3 > class rrlist3 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - -public: - - rrlist3( A1 & a1, A2 & a2, A3 & a3 ): a1_( a1 ), a2_( a2 ), a3_( a3 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - 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 - { - rrlist3 a( a1_, a2_, a3_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2, class A3, class A4 > class rrlist4 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - -public: - - rrlist4( A1 & a1, A2 & a2, A3 & a3, A4 & a4 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - 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 - { - rrlist4 a( a1_, a2_, a3_, a4_ ); - return b.eval( a ); - } -}; - -template< class A1, class A2, class A3, class A4, class A5 > class rrlist5 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - A5 & a5_; - -public: - - rrlist5( A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ), a5_( a5 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5>) const { return std::forward( a5_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward( a5_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - 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 - { - 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 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - A5 & a5_; - A6 & a6_; - -public: - - rrlist6( A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ), a5_( a5 ), a6_( a6 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5>) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6>) const { return std::forward( a6_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6> (*) ()) const { return std::forward( a6_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - 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 - { - 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 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - A5 & a5_; - A6 & a6_; - A7 & a7_; - -public: - - rrlist7( A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ), a5_( a5 ), a6_( a6 ), a7_( a7 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5>) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6>) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7>) const { return std::forward( a7_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6> (*) ()) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7> (*) ()) const { return std::forward( a7_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - 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 - { - 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 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - A5 & a5_; - A6 & a6_; - A7 & a7_; - A8 & a8_; - -public: - - rrlist8( A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ), a5_( a5 ), a6_( a6 ), a7_( a7 ), a8_( a8 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5>) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6>) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7>) const { return std::forward( a7_ ); } - A8 && operator[] (boost::arg<8>) const { return std::forward( a8_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6> (*) ()) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7> (*) ()) const { return std::forward( a7_ ); } - A8 && operator[] (boost::arg<8> (*) ()) const { return std::forward( a8_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - 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 - { - 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 -{ -private: - - A1 & a1_; - A2 & a2_; - A3 & a3_; - A4 & a4_; - A5 & a5_; - A6 & a6_; - A7 & a7_; - A8 & a8_; - A9 & a9_; - -public: - - rrlist9( A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9 ): a1_( a1 ), a2_( a2 ), a3_( a3 ), a4_( a4 ), a5_( a5 ), a6_( a6 ), a7_( a7 ), a8_( a8 ), a9_( a9 ) {} - - A1 && operator[] (boost::arg<1>) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2>) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3>) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4>) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5>) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6>) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7>) const { return std::forward( a7_ ); } - A8 && operator[] (boost::arg<8>) const { return std::forward( a8_ ); } - A9 && operator[] (boost::arg<9>) const { return std::forward( a9_ ); } - - A1 && operator[] (boost::arg<1> (*) ()) const { return std::forward( a1_ ); } - A2 && operator[] (boost::arg<2> (*) ()) const { return std::forward( a2_ ); } - A3 && operator[] (boost::arg<3> (*) ()) const { return std::forward( a3_ ); } - A4 && operator[] (boost::arg<4> (*) ()) const { return std::forward( a4_ ); } - A5 && operator[] (boost::arg<5> (*) ()) const { return std::forward( a5_ ); } - A6 && operator[] (boost::arg<6> (*) ()) const { return std::forward( a6_ ); } - A7 && operator[] (boost::arg<7> (*) ()) const { return std::forward( a7_ ); } - A8 && operator[] (boost::arg<8> (*) ()) const { return std::forward( a8_ ); } - A9 && operator[] (boost::arg<9> (*) ()) const { return std::forward( a9_ ); } - - template T & operator[] ( _bi::value & v ) const { return v.get(); } - - template T const & operator[] ( _bi::value const & v ) const { return v.get(); } - - template T & operator[] (reference_wrapper const & v) const { return v.get(); } - - 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 - { - rrlist9 a( a1_, a2_, a3_, a4_, a5_, a6_, a7_, a8_, a9_ ); - return b.eval( a ); - } -}; - -template class bind_t -{ -private: - - F f_; - L l_; - -public: - - typedef typename result_traits::type result_type; - typedef bind_t this_type; - - bind_t( F f, L const & l ): f_( f ), l_( l ) {} - - // - - result_type operator()() - { - list0 a; - return l_( type(), f_, a, 0 ); - } - - result_type operator()() const - { - list0 a; - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1 ) - { - rrlist1< A1 > a( a1 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1 ) const - { - rrlist1< A1 > a( a1 ); - return l_(type(), f_, a, 0); - } - - template result_type operator()( A1 && a1, A2 && a2 ) - { - rrlist2< A1, A2 > a( a1, a2 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2 ) const - { - rrlist2< A1, A2 > a( a1, a2 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3 ) - { - rrlist3< A1, A2, A3 > a( a1, a2, a3 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3 ) const - { - rrlist3< A1, A2, A3 > a( a1, a2, a3 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) - { - rrlist4< A1, A2, A3, A4 > a( a1, a2, a3, a4 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4 ) const - { - rrlist4< A1, A2, A3, A4 > a( a1, a2, a3, a4 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) - { - rrlist5< A1, A2, A3, A4, A5 > a( a1, a2, a3, a4, a5 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5 ) const - { - rrlist5< A1, A2, A3, A4, A5 > a( a1, a2, a3, a4, a5 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) - { - rrlist6< A1, A2, A3, A4, A5, A6 > a( a1, a2, a3, a4, a5, a6 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6 ) const - { - rrlist6< A1, A2, A3, A4, A5, A6 > a( a1, a2, a3, a4, a5, a6 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) - { - rrlist7< A1, A2, A3, A4, A5, A6, A7 > a( a1, a2, a3, a4, a5, a6, a7 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7 ) const - { - rrlist7< A1, A2, A3, A4, A5, A6, A7 > a( a1, a2, a3, a4, a5, a6, a7 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) - { - rrlist8< A1, A2, A3, A4, A5, A6, A7, A8 > a( a1, a2, a3, a4, a5, a6, a7, a8 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8 ) const - { - rrlist8< A1, A2, A3, A4, A5, A6, A7, A8 > a( a1, a2, a3, a4, a5, a6, a7, a8 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) - { - rrlist9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > a( a1, a2, a3, a4, a5, a6, a7, a8, a9 ); - return l_( type(), f_, a, 0 ); - } - - template result_type operator()( A1 && a1, A2 && a2, A3 && a3, A4 && a4, A5 && a5, A6 && a6, A7 && a7, A8 && a8, A9 && a9 ) const - { - rrlist9< A1, A2, A3, A4, A5, A6, A7, A8, A9 > a( a1, a2, a3, a4, a5, a6, a7, a8, a9 ); - return l_( type(), f_, a, 0 ); - } - - // - - template result_type eval( A & a ) - { - return l_( type(), f_, a, 0 ); - } - - template result_type eval( A & a ) const - { - return l_( type(), f_, a, 0 ); - } - - template void accept( V & v ) const - { -#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ ) - using boost::visit_each; -#endif - - BOOST_BIND_VISIT_EACH( v, f_, 0 ); - l_.accept( v ); - } - - bool compare( this_type const & rhs ) const - { - return ref_compare( f_, rhs.f_, 0 ) && l_ == rhs.l_; - } -}; - -#elif !defined( BOOST_NO_VOID_RETURNS ) - -template class bind_t -{ -public: - - typedef bind_t this_type; - - bind_t(F f, L const & l): f_(f), l_(l) {} - -#define BOOST_BIND_RETURN return -#include -#undef BOOST_BIND_RETURN - -}; - -#else // no void returns - -template struct bind_t_generator -{ - -template class implementation -{ -public: - - typedef implementation this_type; - - implementation(F f, L const & l): f_(f), l_(l) {} - -#define BOOST_BIND_RETURN return -#include -#undef BOOST_BIND_RETURN - -}; - -}; - -template<> struct bind_t_generator -{ - -template class implementation -{ -private: - - typedef void R; - -public: - - typedef implementation this_type; - - implementation(F f, L const & l): f_(f), l_(l) {} - -#define BOOST_BIND_RETURN -#include -#undef BOOST_BIND_RETURN - -}; - -}; - -template class bind_t: public bind_t_generator::BOOST_NESTED_TEMPLATE implementation -{ -public: - - bind_t(F f, L const & l): bind_t_generator::BOOST_NESTED_TEMPLATE implementation(f, l) {} - -}; - -#endif - -// function_equal - -#ifndef BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP - -// put overloads in _bi, rely on ADL - -# ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -template bool function_equal( bind_t const & a, bind_t const & b ) -{ - return a.compare(b); -} - -# else - -template bool function_equal_impl( bind_t const & a, bind_t const & b, int ) -{ - return a.compare(b); -} - -# endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -#else // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP - -// put overloads in boost - -} // namespace _bi - -# ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -template bool function_equal( _bi::bind_t const & a, _bi::bind_t const & b ) -{ - return a.compare(b); -} - -# else - -template bool function_equal_impl( _bi::bind_t const & a, _bi::bind_t const & b, int ) -{ - return a.compare(b); -} - -# endif // #ifndef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -namespace _bi -{ - -#endif // BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP - -// add_value - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || (__SUNPRO_CC >= 0x530) - -#if defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x582) ) - -template struct add_value -{ - typedef _bi::value type; -}; - -#else - -template< class T, int I > struct add_value_2 -{ - typedef boost::arg type; -}; - -template< class T > struct add_value_2< T, 0 > -{ - typedef _bi::value< T > type; -}; - -template struct add_value -{ - typedef typename add_value_2< T, boost::is_placeholder< T >::value >::type type; -}; - -#endif - -template struct add_value< value > -{ - typedef _bi::value type; -}; - -template struct add_value< reference_wrapper > -{ - typedef reference_wrapper type; -}; - -template struct add_value< arg > -{ - typedef boost::arg type; -}; - -template struct add_value< arg (*) () > -{ - typedef boost::arg (*type) (); -}; - -template struct add_value< bind_t > -{ - typedef bind_t type; -}; - -#else - -template struct _avt_0; - -template<> struct _avt_0<1> -{ - template struct inner - { - typedef T type; - }; -}; - -template<> struct _avt_0<2> -{ - template struct inner - { - typedef value type; - }; -}; - -typedef char (&_avt_r1) [1]; -typedef char (&_avt_r2) [2]; - -template _avt_r1 _avt_f(value); -template _avt_r1 _avt_f(reference_wrapper); -template _avt_r1 _avt_f(arg); -template _avt_r1 _avt_f(arg (*) ()); -template _avt_r1 _avt_f(bind_t); - -_avt_r2 _avt_f(...); - -template struct add_value -{ - static T t(); - typedef typename _avt_0::template inner::type type; -}; - -#endif - -// list_av_N - -template struct list_av_1 -{ - typedef typename add_value::type B1; - typedef list1 type; -}; - -template struct list_av_2 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef list2 type; -}; - -template struct list_av_3 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef list3 type; -}; - -template struct list_av_4 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef list4 type; -}; - -template struct list_av_5 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef typename add_value::type B5; - typedef list5 type; -}; - -template struct list_av_6 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef typename add_value::type B5; - typedef typename add_value::type B6; - typedef list6 type; -}; - -template struct list_av_7 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef typename add_value::type B5; - typedef typename add_value::type B6; - typedef typename add_value::type B7; - typedef list7 type; -}; - -template struct list_av_8 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef typename add_value::type B5; - typedef typename add_value::type B6; - typedef typename add_value::type B7; - typedef typename add_value::type B8; - typedef list8 type; -}; - -template struct list_av_9 -{ - typedef typename add_value::type B1; - typedef typename add_value::type B2; - typedef typename add_value::type B3; - typedef typename add_value::type B4; - typedef typename add_value::type B5; - typedef typename add_value::type B6; - typedef typename add_value::type B7; - typedef typename add_value::type B8; - typedef typename add_value::type B9; - typedef list9 type; -}; - -// operator! - -struct logical_not -{ - template bool operator()(V const & v) const { return !v; } -}; - -template - bind_t< bool, logical_not, list1< bind_t > > - operator! (bind_t const & f) -{ - typedef list1< bind_t > list_type; - return bind_t ( logical_not(), list_type(f) ); -} - -// relational operators - -#define BOOST_BIND_OPERATOR( op, name ) \ -\ -struct name \ -{ \ - template bool operator()(V const & v, W const & w) const { return v op w; } \ -}; \ - \ -template \ - bind_t< bool, name, list2< bind_t, typename add_value::type > > \ - operator op (bind_t const & f, A2 a2) \ -{ \ - typedef typename add_value::type B2; \ - typedef list2< bind_t, B2> list_type; \ - return bind_t ( name(), list_type(f, a2) ); \ -} - -BOOST_BIND_OPERATOR( ==, equal ) -BOOST_BIND_OPERATOR( !=, not_equal ) - -BOOST_BIND_OPERATOR( <, less ) -BOOST_BIND_OPERATOR( <=, less_equal ) - -BOOST_BIND_OPERATOR( >, greater ) -BOOST_BIND_OPERATOR( >=, greater_equal ) - -BOOST_BIND_OPERATOR( &&, logical_and ) -BOOST_BIND_OPERATOR( ||, logical_or ) - -#undef BOOST_BIND_OPERATOR - -#if defined(__GNUC__) && BOOST_WORKAROUND(__GNUC__, < 3) - -// resolve ambiguity with rel_ops - -#define BOOST_BIND_OPERATOR( op, name ) \ -\ -template \ - bind_t< bool, name, list2< bind_t, bind_t > > \ - operator op (bind_t const & f, bind_t const & g) \ -{ \ - typedef list2< bind_t, bind_t > list_type; \ - return bind_t ( name(), list_type(f, g) ); \ -} - -BOOST_BIND_OPERATOR( !=, not_equal ) -BOOST_BIND_OPERATOR( <=, less_equal ) -BOOST_BIND_OPERATOR( >, greater ) -BOOST_BIND_OPERATOR( >=, greater_equal ) - -#endif - -// visit_each, ADL - -#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ ) \ - && !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) - -template void visit_each( V & v, value const & t, int ) -{ - using boost::visit_each; - BOOST_BIND_VISIT_EACH( v, t.get(), 0 ); -} - -template void visit_each( V & v, bind_t const & t, int ) -{ - t.accept( v ); -} - -#endif - -} // namespace _bi - -// visit_each, no ADL - -#if defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) || defined( __BORLANDC__ ) \ - || (defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3) - -template void visit_each( V & v, _bi::value const & t, int ) -{ - BOOST_BIND_VISIT_EACH( v, t.get(), 0 ); -} - -template void visit_each( V & v, _bi::bind_t const & t, int ) -{ - t.accept( v ); -} - -#endif - -// is_bind_expression - -template< class T > struct is_bind_expression -{ - enum _vt { value = 0 }; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template< class R, class F, class L > struct is_bind_expression< _bi::bind_t< R, F, L > > -{ - enum _vt { value = 1 }; -}; - -#endif - -// bind - -#ifndef BOOST_BIND -#define BOOST_BIND bind -#endif - -// generic function objects - -template - _bi::bind_t - BOOST_BIND(F f) -{ - typedef _bi::list0 list_type; - return _bi::bind_t (f, list_type()); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1) -{ - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t (f, list_type(a1)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2) -{ - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t (f, list_type(a1, a2)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3) -{ - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - _bi::bind_t::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - 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)); -} - -// generic function objects, alternative syntax - -template - _bi::bind_t - BOOST_BIND(boost::type, F f) -{ - typedef _bi::list0 list_type; - return _bi::bind_t (f, list_type()); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1) -{ - 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::type, F f, A1 a1, A2 a2) -{ - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t (f, list_type(a1, a2)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3) -{ - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - _bi::bind_t::type> - BOOST_BIND(boost::type, F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - 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)); -} - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) - -// adaptable function objects - -template - _bi::bind_t<_bi::unspecified, F, _bi::list0> - BOOST_BIND(F f) -{ - typedef _bi::list0 list_type; - return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type()); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_1::type> - BOOST_BIND(F f, A1 a1) -{ - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_2::type> - BOOST_BIND(F f, A1 a1, A2 a2) -{ - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type> (f, list_type(a1, a2)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_3::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3) -{ - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_4::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4) -{ - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_5::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) -{ - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_6::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) -{ - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_7::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) -{ - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_8::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) -{ - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - _bi::bind_t<_bi::unspecified, F, typename _bi::list_av_9::type> - BOOST_BIND(F f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) -{ - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t<_bi::unspecified, F, list_type>(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -#endif // !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) - -// function pointers - -#define BOOST_BIND_CC -#define BOOST_BIND_ST - -#include - -#undef BOOST_BIND_CC -#undef BOOST_BIND_ST - -#ifdef BOOST_BIND_ENABLE_STDCALL - -#define BOOST_BIND_CC __stdcall -#define BOOST_BIND_ST - -#include - -#undef BOOST_BIND_CC -#undef BOOST_BIND_ST - -#endif - -#ifdef BOOST_BIND_ENABLE_FASTCALL - -#define BOOST_BIND_CC __fastcall -#define BOOST_BIND_ST - -#include - -#undef BOOST_BIND_CC -#undef BOOST_BIND_ST - -#endif - -#ifdef BOOST_BIND_ENABLE_PASCAL - -#define BOOST_BIND_ST pascal -#define BOOST_BIND_CC - -#include - -#undef BOOST_BIND_ST -#undef BOOST_BIND_CC - -#endif - -// member function pointers - -#define BOOST_BIND_MF_NAME(X) X -#define BOOST_BIND_MF_CC - -#include -#include - -#undef BOOST_BIND_MF_NAME -#undef BOOST_BIND_MF_CC - -#ifdef BOOST_MEM_FN_ENABLE_CDECL - -#define BOOST_BIND_MF_NAME(X) X##_cdecl -#define BOOST_BIND_MF_CC __cdecl - -#include -#include - -#undef BOOST_BIND_MF_NAME -#undef BOOST_BIND_MF_CC - -#endif - -#ifdef BOOST_MEM_FN_ENABLE_STDCALL - -#define BOOST_BIND_MF_NAME(X) X##_stdcall -#define BOOST_BIND_MF_CC __stdcall - -#include -#include - -#undef BOOST_BIND_MF_NAME -#undef BOOST_BIND_MF_CC - -#endif - -#ifdef BOOST_MEM_FN_ENABLE_FASTCALL - -#define BOOST_BIND_MF_NAME(X) X##_fastcall -#define BOOST_BIND_MF_CC __fastcall - -#include -#include - -#undef BOOST_BIND_MF_NAME -#undef BOOST_BIND_MF_CC - -#endif - -// data member pointers - -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) || defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - || ( defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x620 ) ) ) - -template -_bi::bind_t< R, _mfi::dm, typename _bi::list_av_1::type > - BOOST_BIND(R T::*f, A1 a1) -{ - typedef _mfi::dm F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t( F(f), list_type(a1) ); -} - -#else - -namespace _bi -{ - -template< class Pm, int I > struct add_cref; - -template< class M, class T > struct add_cref< M T::*, 0 > -{ - typedef M type; -}; - -template< class M, class T > struct add_cref< M T::*, 1 > -{ -#ifdef BOOST_MSVC -#pragma warning(push) -#pragma warning(disable:4180) -#endif - typedef M const & type; -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif -}; - -template< class R, class T > struct add_cref< R (T::*) (), 1 > -{ - typedef void type; -}; - -#if !defined(__IBMCPP__) || __IBMCPP_FUNC_CV_TMPL_ARG_DEDUCTION - -template< class R, class T > struct add_cref< R (T::*) () const, 1 > -{ - typedef void type; -}; - -#endif // __IBMCPP__ - -template struct isref -{ - enum value_type { value = 0 }; -}; - -template struct isref< R& > -{ - enum value_type { value = 1 }; -}; - -template struct isref< R* > -{ - enum value_type { value = 1 }; -}; - -template struct dm_result -{ - typedef typename add_cref< Pm, 1 >::type type; -}; - -template struct dm_result< Pm, bind_t > -{ - typedef typename bind_t::result_type result_type; - typedef typename add_cref< Pm, isref< result_type >::value >::type type; -}; - -} // namespace _bi - -template< class A1, class M, class T > - -_bi::bind_t< - typename _bi::dm_result< M T::*, A1 >::type, - _mfi::dm, - typename _bi::list_av_1::type -> - -BOOST_BIND( M T::*f, A1 a1 ) -{ - typedef typename _bi::dm_result< M T::*, A1 >::type result_type; - typedef _mfi::dm F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t< result_type, F, list_type >( F( f ), list_type( a1 ) ); -} - -#endif - -} // namespace boost - -#ifndef BOOST_BIND_NO_PLACEHOLDERS - -# include - -#endif - -#ifdef BOOST_MSVC -# pragma warning(default: 4512) // assignment operator could not be generated -# pragma warning(pop) -#endif - -#endif // #ifndef BOOST_BIND_BIND_HPP_INCLUDED diff --git a/contrib/libboost/boost_1_65_0/boost/bind/bind_cc.hpp b/contrib/libboost/boost_1_65_0/boost/bind/bind_cc.hpp deleted file mode 100644 index 35f8eceb9e5..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/bind/bind_cc.hpp +++ /dev/null @@ -1,117 +0,0 @@ -// -// bind/bind_cc.hpp - support for different calling conventions -// -// Do not include this header directly. -// -// Copyright (c) 2001 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) -// -// See http://www.boost.org/libs/bind/bind.html for documentation. -// - -template - _bi::bind_t - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) ()) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (); - 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) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1); - 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) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2); - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t (f, list_type(a1, a2)); -} - -template - _bi::bind_t::type> - BOOST_BIND(BOOST_BIND_ST R (BOOST_BIND_CC *f) (B1, B2, B3), A1 a1, A2 a2, A3 a3) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3); - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3)); -} - -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) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4); - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4)); -} - -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) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5); - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5)); -} - -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) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6); - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6)); -} - -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) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7); - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -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) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8); - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(f, list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -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) -{ - typedef BOOST_BIND_ST R (BOOST_BIND_CC *F) (B1, B2, B3, B4, B5, B6, B7, B8, B9); - 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/contrib/libboost/boost_1_65_0/boost/bind/bind_mf2_cc.hpp b/contrib/libboost/boost_1_65_0/boost/bind/bind_mf2_cc.hpp deleted file mode 100644 index 66476bc19d1..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/bind/bind_mf2_cc.hpp +++ /dev/null @@ -1,228 +0,0 @@ -// -// bind/bind_mf2_cc.hpp - member functions, type<> syntax -// -// Do not include this header directly. -// -// Copyright (c) 2001 Peter Dimov and Multi Media Ltd. -// Copyright (c) 2008 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 -// -// See http://www.boost.org/libs/bind/bind.html for documentation. -// - -// 0 - -template - _bi::bind_t, typename _bi::list_av_1::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (), A1 a1) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -template - _bi::bind_t, typename _bi::list_av_1::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) () const, A1 a1) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -// 1 - -template - _bi::bind_t, typename _bi::list_av_2::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -template - _bi::bind_t, typename _bi::list_av_2::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1) const, A1 a1, A2 a2) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -// 2 - -template - _bi::bind_t, typename _bi::list_av_3::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2), A1 a1, A2 a2, A3 a3) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -template - _bi::bind_t, typename _bi::list_av_3::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2) const, A1 a1, A2 a2, A3 a3) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -// 3 - -template - _bi::bind_t, typename _bi::list_av_4::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3), 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; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -template - _bi::bind_t, typename _bi::list_av_4::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3) const, 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; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -// 4 - -template - _bi::bind_t, typename _bi::list_av_5::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4), 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; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -template - _bi::bind_t, typename _bi::list_av_5::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4) const, 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; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -// 5 - -template - _bi::bind_t, typename _bi::list_av_6::type> - BOOST_BIND(boost::type, R (BOOST_BIND_MF_CC T::*f) (B1, B2, B3, B4, B5), 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; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -template - _bi::bind_t, typename _bi::list_av_6::type> - BOOST_BIND(boost::type, 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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -// 6 - -template - _bi::bind_t, typename _bi::list_av_7::type> - BOOST_BIND(boost::type, 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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -template - _bi::bind_t, typename _bi::list_av_7::type> - BOOST_BIND(boost::type, 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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -// 7 - -template - _bi::bind_t, typename _bi::list_av_8::type> - BOOST_BIND(boost::type, 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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -template - _bi::bind_t, typename _bi::list_av_8::type> - BOOST_BIND(boost::type, 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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -// 8 - -template - _bi::bind_t, typename _bi::list_av_9::type> - BOOST_BIND(boost::type, 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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -template - _bi::bind_t, typename _bi::list_av_9::type> - BOOST_BIND(boost::type, 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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} diff --git a/contrib/libboost/boost_1_65_0/boost/bind/bind_mf_cc.hpp b/contrib/libboost/boost_1_65_0/boost/bind/bind_mf_cc.hpp deleted file mode 100644 index e149384ff5e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/bind/bind_mf_cc.hpp +++ /dev/null @@ -1,441 +0,0 @@ -// -// bind/bind_mf_cc.hpp - support for different calling conventions -// -// Do not include this header directly. -// -// Copyright (c) 2001 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) -// -// See http://www.boost.org/libs/bind/bind.html for documentation. -// - -// 0 - -template - _bi::bind_t, typename _bi::list_av_1::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (), A1 a1) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -template - _bi::bind_t, typename _bi::list_av_1::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) () const, A1 a1) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf0) F; - typedef typename _bi::list_av_1::type list_type; - return _bi::bind_t(F(f), list_type(a1)); -} - -// 1 - -template - _bi::bind_t, typename _bi::list_av_2::type> - BOOST_BIND(R (BOOST_BIND_MF_CC T::*f) (B1), A1 a1, A2 a2) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf1) F; - typedef typename _bi::list_av_2::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2)); -} - -// 2 - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf2) F; - typedef typename _bi::list_av_3::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3)); -} - -// 3 - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf3) F; - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf3) F; - typedef typename _bi::list_av_4::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4)); -} - -// 4 - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf4) F; - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf4) F; - typedef typename _bi::list_av_5::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5)); -} - -// 5 - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf5) F; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf5) F; - typedef typename _bi::list_av_6::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6)); -} - -// 6 - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf6) F; - typedef typename _bi::list_av_7::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7)); -} - -// 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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf7) F; - typedef typename _bi::list_av_8::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8)); -} - -// 8 - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(mf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} - -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) -{ - typedef _mfi::BOOST_BIND_MF_NAME(cmf8) F; - typedef typename _bi::list_av_9::type list_type; - return _bi::bind_t(F(f), list_type(a1, a2, a3, a4, a5, a6, a7, a8, a9)); -} diff --git a/contrib/libboost/boost_1_65_0/boost/bind/bind_template.hpp b/contrib/libboost/boost_1_65_0/boost/bind/bind_template.hpp deleted file mode 100644 index 411d20c74e9..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/bind/bind_template.hpp +++ /dev/null @@ -1,345 +0,0 @@ -// -// bind/bind_template.hpp -// -// Do not include this header directly. -// -// Copyright (c) 2001-2004 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) -// -// See http://www.boost.org/libs/bind/bind.html for documentation. -// - - typedef typename result_traits::type result_type; - - result_type operator()() - { - list0 a; - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - result_type operator()() const - { - list0 a; - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1) - { - list1 a(a1); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1) const - { - list1 a(a1); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1) - { - list1 a(a1); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1) const - { - list1 a(a1); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2) - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2) const - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 & a2) - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 & a2) const - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - - template result_type operator()(A1 & a1, A2 const & a2) - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 const & a2) const - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - - template result_type operator()(A1 const & a1, A2 const & a2) - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2) const - { - list2 a(a1, a2); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3) - { - list3 a(a1, a2, a3); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3) const - { - list3 a(a1, a2, a3); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) - { - list3 a(a1, a2, a3); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const - { - list3 a(a1, a2, a3); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) - { - list4 a(a1, a2, a3, a4); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const - { - list4 a(a1, a2, a3, a4); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) - { - list4 a(a1, a2, a3, a4); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const - { - list4 a(a1, a2, a3, a4); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) - { - list5 a(a1, a2, a3, a4, a5); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const - { - list5 a(a1, a2, a3, a4, a5); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) - { - list5 a(a1, a2, a3, a4, a5); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const - { - list5 a(a1, a2, a3, a4, a5); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) - { - list6 a(a1, a2, a3, a4, a5, a6); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const - { - list6 a(a1, a2, a3, a4, a5, a6); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) - { - list6 a(a1, a2, a3, a4, a5, a6); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const - { - list6 a(a1, a2, a3, a4, a5, a6); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) - { - list7 a(a1, a2, a3, a4, a5, a6, a7); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const - { - list7 a(a1, a2, a3, a4, a5, a6, a7); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) - { - list7 a(a1, a2, a3, a4, a5, a6, a7); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const - { - list7 a(a1, a2, a3, a4, a5, a6, a7); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) - { - list8 a(a1, a2, a3, a4, a5, a6, a7, a8); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const - { - list8 a(a1, a2, a3, a4, a5, a6, a7, a8); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) - { - list8 a(a1, a2, a3, a4, a5, a6, a7, a8); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) const - { - list8 a(a1, a2, a3, a4, a5, a6, a7, a8); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) - { - list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const - { - list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) - { - list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) const - { - list9 a(a1, a2, a3, a4, a5, a6, a7, a8, a9); - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - -#endif - - template result_type eval(A & a) - { - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template result_type eval(A & a) const - { - BOOST_BIND_RETURN l_(type(), f_, a, 0); - } - - template void accept(V & v) const - { -#if !defined( BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP ) && !defined( __BORLANDC__ ) - - using boost::visit_each; - -#endif - BOOST_BIND_VISIT_EACH(v, f_, 0); - l_.accept(v); - } - - bool compare(this_type const & rhs) const - { - return ref_compare(f_, rhs.f_, 0) && l_ == rhs.l_; - } - -private: - - F f_; - L l_; diff --git a/contrib/libboost/boost_1_65_0/boost/bind/make_adaptable.hpp b/contrib/libboost/boost_1_65_0/boost/bind/make_adaptable.hpp deleted file mode 100644 index b9f083e307d..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/bind/make_adaptable.hpp +++ /dev/null @@ -1,187 +0,0 @@ -#ifndef BOOST_BIND_MAKE_ADAPTABLE_HPP_INCLUDED -#define BOOST_BIND_MAKE_ADAPTABLE_HPP_INCLUDED - -// -// make_adaptable.hpp -// -// Copyright (c) 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) -// - -namespace boost -{ - -namespace _bi -{ - -template class af0 -{ -public: - - typedef R result_type; - - explicit af0(F f): f_(f) - { - } - - result_type operator()() - { - return f_(); - } - - result_type operator()() const - { - return f_(); - } - -private: - - F f_; -}; - -template class af1 -{ -public: - - typedef R result_type; - typedef A1 argument_type; - typedef A1 arg1_type; - - explicit af1(F f): f_(f) - { - } - - result_type operator()(A1 a1) - { - return f_(a1); - } - - result_type operator()(A1 a1) const - { - return f_(a1); - } - -private: - - F f_; -}; - -template class af2 -{ -public: - - typedef R result_type; - typedef A1 first_argument_type; - typedef A2 second_argument_type; - typedef A1 arg1_type; - typedef A2 arg2_type; - - explicit af2(F f): f_(f) - { - } - - result_type operator()(A1 a1, A2 a2) - { - return f_(a1, a2); - } - - result_type operator()(A1 a1, A2 a2) const - { - return f_(a1, a2); - } - -private: - - F f_; -}; - -template class af3 -{ -public: - - typedef R result_type; - typedef A1 arg1_type; - typedef A2 arg2_type; - typedef A3 arg3_type; - - explicit af3(F f): f_(f) - { - } - - result_type operator()(A1 a1, A2 a2, A3 a3) - { - return f_(a1, a2, a3); - } - - result_type operator()(A1 a1, A2 a2, A3 a3) const - { - return f_(a1, a2, a3); - } - -private: - - F f_; -}; - -template class af4 -{ -public: - - typedef R result_type; - typedef A1 arg1_type; - typedef A2 arg2_type; - typedef A3 arg3_type; - typedef A4 arg4_type; - - explicit af4(F f): f_(f) - { - } - - result_type operator()(A1 a1, A2 a2, A3 a3, A4 a4) - { - return f_(a1, a2, a3, a4); - } - - result_type operator()(A1 a1, A2 a2, A3 a3, A4 a4) const - { - return f_(a1, a2, a3, a4); - } - -private: - - F f_; -}; - -} // namespace _bi - -template _bi::af0 make_adaptable(F f) -{ - return _bi::af0(f); -} - -template _bi::af1 make_adaptable(F f) -{ - return _bi::af1(f); -} - -template _bi::af2 make_adaptable(F f) -{ - return _bi::af2(f); -} - -template _bi::af3 make_adaptable(F f) -{ - return _bi::af3(f); -} - -template _bi::af4 make_adaptable(F f) -{ - return _bi::af4(f); -} - -} // namespace boost - -#endif // #ifndef BOOST_BIND_MAKE_ADAPTABLE_HPP_INCLUDED diff --git a/contrib/libboost/boost_1_65_0/boost/bind/mem_fn.hpp b/contrib/libboost/boost_1_65_0/boost/bind/mem_fn.hpp deleted file mode 100644 index 956e7d88853..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/bind/mem_fn.hpp +++ /dev/null @@ -1,389 +0,0 @@ -#ifndef BOOST_BIND_MEM_FN_HPP_INCLUDED -#define BOOST_BIND_MEM_FN_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// mem_fn.hpp - a generalization of std::mem_fun[_ref] -// -// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd. -// Copyright (c) 2001 David Abrahams -// Copyright (c) 2003-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) -// -// See http://www.boost.org/libs/bind/mem_fn.html for documentation. -// - -#include -#include -#include - -namespace boost -{ - -#if defined(BOOST_NO_VOID_RETURNS) - -#define BOOST_MEM_FN_CLASS_F , class F -#define BOOST_MEM_FN_TYPEDEF(X) - -namespace _mfi // mem_fun_impl -{ - -template struct mf -{ - -#define BOOST_MEM_FN_RETURN return - -#define BOOST_MEM_FN_NAME(X) inner_##X -#define BOOST_MEM_FN_CC - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#ifdef BOOST_MEM_FN_ENABLE_CDECL - -#define BOOST_MEM_FN_NAME(X) inner_##X##_cdecl -#define BOOST_MEM_FN_CC __cdecl - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#ifdef BOOST_MEM_FN_ENABLE_STDCALL - -#define BOOST_MEM_FN_NAME(X) inner_##X##_stdcall -#define BOOST_MEM_FN_CC __stdcall - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#ifdef BOOST_MEM_FN_ENABLE_FASTCALL - -#define BOOST_MEM_FN_NAME(X) inner_##X##_fastcall -#define BOOST_MEM_FN_CC __fastcall - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#undef BOOST_MEM_FN_RETURN - -}; // struct mf - -template<> struct mf -{ - -#define BOOST_MEM_FN_RETURN - -#define BOOST_MEM_FN_NAME(X) inner_##X -#define BOOST_MEM_FN_CC - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#ifdef BOOST_MEM_FN_ENABLE_CDECL - -#define BOOST_MEM_FN_NAME(X) inner_##X##_cdecl -#define BOOST_MEM_FN_CC __cdecl - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#ifdef BOOST_MEM_FN_ENABLE_STDCALL - -#define BOOST_MEM_FN_NAME(X) inner_##X##_stdcall -#define BOOST_MEM_FN_CC __stdcall - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#ifdef BOOST_MEM_FN_ENABLE_FASTCALL - -#define BOOST_MEM_FN_NAME(X) inner_##X##_fastcall -#define BOOST_MEM_FN_CC __fastcall - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#undef BOOST_MEM_FN_RETURN - -}; // struct mf - -#undef BOOST_MEM_FN_CLASS_F -#undef BOOST_MEM_FN_TYPEDEF_F - -#define BOOST_MEM_FN_NAME(X) X -#define BOOST_MEM_FN_NAME2(X) inner_##X -#define BOOST_MEM_FN_CC - -#include - -#undef BOOST_MEM_FN_NAME -#undef BOOST_MEM_FN_NAME2 -#undef BOOST_MEM_FN_CC - -#ifdef BOOST_MEM_FN_ENABLE_CDECL - -#define BOOST_MEM_FN_NAME(X) X##_cdecl -#define BOOST_MEM_FN_NAME2(X) inner_##X##_cdecl -#define BOOST_MEM_FN_CC __cdecl - -#include - -#undef BOOST_MEM_FN_NAME -#undef BOOST_MEM_FN_NAME2 -#undef BOOST_MEM_FN_CC - -#endif - -#ifdef BOOST_MEM_FN_ENABLE_STDCALL - -#define BOOST_MEM_FN_NAME(X) X##_stdcall -#define BOOST_MEM_FN_NAME2(X) inner_##X##_stdcall -#define BOOST_MEM_FN_CC __stdcall - -#include - -#undef BOOST_MEM_FN_NAME -#undef BOOST_MEM_FN_NAME2 -#undef BOOST_MEM_FN_CC - -#endif - -#ifdef BOOST_MEM_FN_ENABLE_FASTCALL - -#define BOOST_MEM_FN_NAME(X) X##_fastcall -#define BOOST_MEM_FN_NAME2(X) inner_##X##_fastcall -#define BOOST_MEM_FN_CC __fastcall - -#include - -#undef BOOST_MEM_FN_NAME -#undef BOOST_MEM_FN_NAME2 -#undef BOOST_MEM_FN_CC - -#endif - -} // namespace _mfi - -#else // #ifdef BOOST_NO_VOID_RETURNS - -#define BOOST_MEM_FN_CLASS_F -#define BOOST_MEM_FN_TYPEDEF(X) typedef X; - -namespace _mfi -{ - -#define BOOST_MEM_FN_RETURN return - -#define BOOST_MEM_FN_NAME(X) X -#define BOOST_MEM_FN_CC - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#ifdef BOOST_MEM_FN_ENABLE_CDECL - -#define BOOST_MEM_FN_NAME(X) X##_cdecl -#define BOOST_MEM_FN_CC __cdecl - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#ifdef BOOST_MEM_FN_ENABLE_STDCALL - -#define BOOST_MEM_FN_NAME(X) X##_stdcall -#define BOOST_MEM_FN_CC __stdcall - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#ifdef BOOST_MEM_FN_ENABLE_FASTCALL - -#define BOOST_MEM_FN_NAME(X) X##_fastcall -#define BOOST_MEM_FN_CC __fastcall - -#include - -#undef BOOST_MEM_FN_CC -#undef BOOST_MEM_FN_NAME - -#endif - -#undef BOOST_MEM_FN_RETURN - -} // namespace _mfi - -#undef BOOST_MEM_FN_CLASS_F -#undef BOOST_MEM_FN_TYPEDEF - -#endif // #ifdef BOOST_NO_VOID_RETURNS - -#define BOOST_MEM_FN_NAME(X) X -#define BOOST_MEM_FN_CC - -#include - -#undef BOOST_MEM_FN_NAME -#undef BOOST_MEM_FN_CC - -#ifdef BOOST_MEM_FN_ENABLE_CDECL - -#define BOOST_MEM_FN_NAME(X) X##_cdecl -#define BOOST_MEM_FN_CC __cdecl - -#include - -#undef BOOST_MEM_FN_NAME -#undef BOOST_MEM_FN_CC - -#endif - -#ifdef BOOST_MEM_FN_ENABLE_STDCALL - -#define BOOST_MEM_FN_NAME(X) X##_stdcall -#define BOOST_MEM_FN_CC __stdcall - -#include - -#undef BOOST_MEM_FN_NAME -#undef BOOST_MEM_FN_CC - -#endif - -#ifdef BOOST_MEM_FN_ENABLE_FASTCALL - -#define BOOST_MEM_FN_NAME(X) X##_fastcall -#define BOOST_MEM_FN_CC __fastcall - -#include - -#undef BOOST_MEM_FN_NAME -#undef BOOST_MEM_FN_CC - -#endif - -// data member support - -namespace _mfi -{ - -template class dm -{ -public: - - typedef R const & result_type; - typedef T const * argument_type; - -private: - - typedef R (T::*F); - F f_; - - template R const & call(U & u, T const *) const - { - return (u.*f_); - } - - template R const & call(U & u, void const *) const - { - return (get_pointer(u)->*f_); - } - -public: - - explicit dm(F f): f_(f) {} - - R & operator()(T * p) const - { - return (p->*f_); - } - - R const & operator()(T const * p) const - { - return (p->*f_); - } - - template R const & operator()(U const & u) const - { - return call(u, &u); - } - -#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) && !BOOST_WORKAROUND(__MWERKS__, < 0x3200) - - R & operator()(T & t) const - { - return (t.*f_); - } - - R const & operator()(T const & t) const - { - return (t.*f_); - } - -#endif - - bool operator==(dm const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(dm const & rhs) const - { - return f_ != rhs.f_; - } -}; - -} // namespace _mfi - -template _mfi::dm mem_fn(R T::*f) -{ - return _mfi::dm(f); -} - -} // namespace boost - -#endif // #ifndef BOOST_BIND_MEM_FN_HPP_INCLUDED diff --git a/contrib/libboost/boost_1_65_0/boost/bind/mem_fn_cc.hpp b/contrib/libboost/boost_1_65_0/boost/bind/mem_fn_cc.hpp deleted file mode 100644 index 8b6ea0ba13d..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/bind/mem_fn_cc.hpp +++ /dev/null @@ -1,103 +0,0 @@ -// -// bind/mem_fn_cc.hpp - support for different calling conventions -// -// Do not include this header directly. -// -// Copyright (c) 2001 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) -// -// See http://www.boost.org/libs/bind/mem_fn.html for documentation. -// - -template _mfi::BOOST_MEM_FN_NAME(mf0) mem_fn(R (BOOST_MEM_FN_CC T::*f) ()) -{ - return _mfi::BOOST_MEM_FN_NAME(mf0)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf0) mem_fn(R (BOOST_MEM_FN_CC T::*f) () const) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf0)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(mf1) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1)) -{ - return _mfi::BOOST_MEM_FN_NAME(mf1)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf1) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1) const) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf1)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(mf2) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2)) -{ - return _mfi::BOOST_MEM_FN_NAME(mf2)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf2) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2) const) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf2)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(mf3) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3)) -{ - return _mfi::BOOST_MEM_FN_NAME(mf3)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf3) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3) const) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf3)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(mf4) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4)) -{ - return _mfi::BOOST_MEM_FN_NAME(mf4)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf4) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4) const) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf4)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(mf5) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5)) -{ - return _mfi::BOOST_MEM_FN_NAME(mf5)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf5) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5) const) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf5)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(mf6) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6)) -{ - return _mfi::BOOST_MEM_FN_NAME(mf6)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf6) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6) const) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf6)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(mf7) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7)) -{ - return _mfi::BOOST_MEM_FN_NAME(mf7)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf7) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7) const) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf7)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(mf8) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7, A8)) -{ - return _mfi::BOOST_MEM_FN_NAME(mf8)(f); -} - -template _mfi::BOOST_MEM_FN_NAME(cmf8) mem_fn(R (BOOST_MEM_FN_CC T::*f) (A1, A2, A3, A4, A5, A6, A7, A8) const) -{ - return _mfi::BOOST_MEM_FN_NAME(cmf8)(f); -} diff --git a/contrib/libboost/boost_1_65_0/boost/bind/mem_fn_template.hpp b/contrib/libboost/boost_1_65_0/boost/bind/mem_fn_template.hpp deleted file mode 100644 index b26d585dbc8..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/bind/mem_fn_template.hpp +++ /dev/null @@ -1,1047 +0,0 @@ -// -// bind/mem_fn_template.hpp -// -// Do not include this header directly -// -// Copyright (c) 2001 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) -// -// See http://www.boost.org/libs/bind/mem_fn.html for documentation. -// - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) -# define BOOST_MEM_FN_ENABLE_CONST_OVERLOADS -#endif - -// mf0 - -template class BOOST_MEM_FN_NAME(mf0) -{ -public: - - typedef R result_type; - typedef T * argument_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) ()) - F f_; - - template R call(U & u, T const *) const - { - BOOST_MEM_FN_RETURN (u.*f_)(); - } - - template R call(U & u, void const *) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf0)(F f): f_(f) {} - - R operator()(T * p) const - { - BOOST_MEM_FN_RETURN (p->*f_)(); - } - - template R operator()(U & u) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p); - } - -#endif - - R operator()(T & t) const - { - BOOST_MEM_FN_RETURN (t.*f_)(); - } - - bool operator==(BOOST_MEM_FN_NAME(mf0) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf0) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf0 - -template class BOOST_MEM_FN_NAME(cmf0) -{ -public: - - typedef R result_type; - typedef T const * argument_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) () const) - F f_; - - template R call(U & u, T const *) const - { - BOOST_MEM_FN_RETURN (u.*f_)(); - } - - template R call(U & u, void const *) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf0)(F f): f_(f) {} - - template R operator()(U const & u) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p); - } - - R operator()(T const & t) const - { - BOOST_MEM_FN_RETURN (t.*f_)(); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf0) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf0) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// mf1 - -template class BOOST_MEM_FN_NAME(mf1) -{ -public: - - typedef R result_type; - typedef T * first_argument_type; - typedef A1 second_argument_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1)) - F f_; - - template R call(U & u, T const *, B1 & b1) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1); - } - - template R call(U & u, void const *, B1 & b1) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf1)(F f): f_(f) {} - - R operator()(T * p, A1 a1) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1); - } - - template R operator()(U & u, A1 a1) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u, A1 a1) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1); - } - -#endif - - R operator()(T & t, A1 a1) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1); - } - - bool operator==(BOOST_MEM_FN_NAME(mf1) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf1) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf1 - -template class BOOST_MEM_FN_NAME(cmf1) -{ -public: - - typedef R result_type; - typedef T const * first_argument_type; - typedef A1 second_argument_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1) const) - F f_; - - template R call(U & u, T const *, B1 & b1) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1); - } - - template R call(U & u, void const *, B1 & b1) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf1)(F f): f_(f) {} - - template R operator()(U const & u, A1 a1) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1); - } - - R operator()(T const & t, A1 a1) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf1) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf1) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// mf2 - -template class BOOST_MEM_FN_NAME(mf2) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2)) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf2)(F f): f_(f) {} - - R operator()(T * p, A1 a1, A2 a2) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1, a2); - } - - template R operator()(U & u, A1 a1, A2 a2) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u, A1 a1, A2 a2) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2); - } - -#endif - - R operator()(T & t, A1 a1, A2 a2) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2); - } - - bool operator==(BOOST_MEM_FN_NAME(mf2) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf2) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf2 - -template class BOOST_MEM_FN_NAME(cmf2) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2) const) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf2)(F f): f_(f) {} - - template R operator()(U const & u, A1 a1, A2 a2) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2); - } - - R operator()(T const & t, A1 a1, A2 a2) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf2) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf2) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// mf3 - -template class BOOST_MEM_FN_NAME(mf3) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3)) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf3)(F f): f_(f) {} - - R operator()(T * p, A1 a1, A2 a2, A3 a3) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3); - } - - template R operator()(U & u, A1 a1, A2 a2, A3 a3) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); - } - -#endif - - R operator()(T & t, A1 a1, A2 a2, A3 a3) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3); - } - - bool operator==(BOOST_MEM_FN_NAME(mf3) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf3) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf3 - -template class BOOST_MEM_FN_NAME(cmf3) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3) const) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf3)(F f): f_(f) {} - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3); - } - - R operator()(T const & t, A1 a1, A2 a2, A3 a3) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf3) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf3) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// mf4 - -template class BOOST_MEM_FN_NAME(mf4) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4)) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf4)(F f): f_(f) {} - - R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4); - } - - template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); - } - -#endif - - R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4); - } - - bool operator==(BOOST_MEM_FN_NAME(mf4) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf4) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf4 - -template class BOOST_MEM_FN_NAME(cmf4) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4) const) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf4)(F f): f_(f) {} - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4); - } - - R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf4) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf4) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// mf5 - -template class BOOST_MEM_FN_NAME(mf5) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5)) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf5)(F f): f_(f) {} - - R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5); - } - - template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); - } - -#endif - - R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5); - } - - bool operator==(BOOST_MEM_FN_NAME(mf5) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf5) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf5 - -template class BOOST_MEM_FN_NAME(cmf5) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5) const) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf5)(F f): f_(f) {} - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5); - } - - R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf5) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf5) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// mf6 - -template class BOOST_MEM_FN_NAME(mf6) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6)) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf6)(F f): f_(f) {} - - R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6); - } - - template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); - } - -#endif - - R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6); - } - - bool operator==(BOOST_MEM_FN_NAME(mf6) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf6) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf6 - -template class BOOST_MEM_FN_NAME(cmf6) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6) const) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf6)(F f): f_(f) {} - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6); - } - - R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf6) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf6) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// mf7 - -template class BOOST_MEM_FN_NAME(mf7) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7)) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf7)(F f): f_(f) {} - - R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7); - } - - template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); - } - -#endif - - R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7); - } - - bool operator==(BOOST_MEM_FN_NAME(mf7) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf7) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf7 - -template class BOOST_MEM_FN_NAME(cmf7) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7) const) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf7)(F f): f_(f) {} - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7); - } - - R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf7) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf7) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// mf8 - -template class BOOST_MEM_FN_NAME(mf8) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8)) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8); - } - -public: - - explicit BOOST_MEM_FN_NAME(mf8)(F f): f_(f) {} - - R operator()(T * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8); - } - - template R operator()(U & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); - } - -#ifdef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); - } - -#endif - - R operator()(T & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8); - } - - bool operator==(BOOST_MEM_FN_NAME(mf8) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(mf8) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -// cmf8 - -template class BOOST_MEM_FN_NAME(cmf8) -{ -public: - - typedef R result_type; - -private: - - BOOST_MEM_FN_TYPEDEF(R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const) - F f_; - - template R call(U & u, T const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const - { - BOOST_MEM_FN_RETURN (u.*f_)(b1, b2, b3, b4, b5, b6, b7, b8); - } - - template R call(U & u, void const *, B1 & b1, B2 & b2, B3 & b3, B4 & b4, B5 & b5, B6 & b6, B7 & b7, B8 & b8) const - { - BOOST_MEM_FN_RETURN (get_pointer(u)->*f_)(b1, b2, b3, b4, b5, b6, b7, b8); - } - -public: - - explicit BOOST_MEM_FN_NAME(cmf8)(F f): f_(f) {} - - R operator()(T const * p, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const - { - BOOST_MEM_FN_RETURN (p->*f_)(a1, a2, a3, a4, a5, a6, a7, a8); - } - - template R operator()(U const & u, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const - { - U const * p = 0; - BOOST_MEM_FN_RETURN call(u, p, a1, a2, a3, a4, a5, a6, a7, a8); - } - - R operator()(T const & t, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) const - { - BOOST_MEM_FN_RETURN (t.*f_)(a1, a2, a3, a4, a5, a6, a7, a8); - } - - bool operator==(BOOST_MEM_FN_NAME(cmf8) const & rhs) const - { - return f_ == rhs.f_; - } - - bool operator!=(BOOST_MEM_FN_NAME(cmf8) const & rhs) const - { - return f_ != rhs.f_; - } -}; - -#undef BOOST_MEM_FN_ENABLE_CONST_OVERLOADS diff --git a/contrib/libboost/boost_1_65_0/boost/bind/mem_fn_vw.hpp b/contrib/libboost/boost_1_65_0/boost/bind/mem_fn_vw.hpp deleted file mode 100644 index f3fc58db04e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/bind/mem_fn_vw.hpp +++ /dev/null @@ -1,130 +0,0 @@ -// -// bind/mem_fn_vw.hpp - void return helper wrappers -// -// Do not include this header directly -// -// Copyright (c) 2001 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) -// -// See http://www.boost.org/libs/bind/mem_fn.html for documentation. -// - -template struct BOOST_MEM_FN_NAME(mf0): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf0) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (); - explicit BOOST_MEM_FN_NAME(mf0)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf0)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf0): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf0) -{ - typedef R (BOOST_MEM_FN_CC T::*F) () const; - explicit BOOST_MEM_FN_NAME(cmf0)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf0)(f) {} -}; - - -template struct BOOST_MEM_FN_NAME(mf1): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf1) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1); - explicit BOOST_MEM_FN_NAME(mf1)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf1)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf1): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf1) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1) const; - explicit BOOST_MEM_FN_NAME(cmf1)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf1)(f) {} -}; - - -template struct BOOST_MEM_FN_NAME(mf2): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf2) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2); - explicit BOOST_MEM_FN_NAME(mf2)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf2)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf2): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf2) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2) const; - explicit BOOST_MEM_FN_NAME(cmf2)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf2)(f) {} -}; - - -template struct BOOST_MEM_FN_NAME(mf3): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf3) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3); - explicit BOOST_MEM_FN_NAME(mf3)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf3)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf3): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf3) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3) const; - explicit BOOST_MEM_FN_NAME(cmf3)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf3)(f) {} -}; - - -template struct BOOST_MEM_FN_NAME(mf4): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf4) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4); - explicit BOOST_MEM_FN_NAME(mf4)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf4)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf4): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf4) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4) const; - explicit BOOST_MEM_FN_NAME(cmf4)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf4)(f) {} -}; - - -template struct BOOST_MEM_FN_NAME(mf5): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf5) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5); - explicit BOOST_MEM_FN_NAME(mf5)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf5)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf5): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf5) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5) const; - explicit BOOST_MEM_FN_NAME(cmf5)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf5)(f) {} -}; - - -template struct BOOST_MEM_FN_NAME(mf6): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf6) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6); - explicit BOOST_MEM_FN_NAME(mf6)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf6)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf6): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf6) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6) const; - explicit BOOST_MEM_FN_NAME(cmf6)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf6)(f) {} -}; - - -template struct BOOST_MEM_FN_NAME(mf7): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf7) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7); - explicit BOOST_MEM_FN_NAME(mf7)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf7)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf7): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf7) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7) const; - explicit BOOST_MEM_FN_NAME(cmf7)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf7)(f) {} -}; - - -template struct BOOST_MEM_FN_NAME(mf8): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf8) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8); - explicit BOOST_MEM_FN_NAME(mf8)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(mf8)(f) {} -}; - -template struct BOOST_MEM_FN_NAME(cmf8): public mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf8) -{ - typedef R (BOOST_MEM_FN_CC T::*F) (A1, A2, A3, A4, A5, A6, A7, A8) const; - explicit BOOST_MEM_FN_NAME(cmf8)(F f): mf::BOOST_NESTED_TEMPLATE BOOST_MEM_FN_NAME2(cmf8)(f) {} -}; - diff --git a/contrib/libboost/boost_1_65_0/boost/bind/placeholders.hpp b/contrib/libboost/boost_1_65_0/boost/bind/placeholders.hpp deleted file mode 100644 index b819ef4c46d..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/bind/placeholders.hpp +++ /dev/null @@ -1,62 +0,0 @@ -#ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED -#define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// bind/placeholders.hpp - _N definitions -// -// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. -// Copyright 2015 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 -// -// See http://www.boost.org/libs/bind/bind.html for documentation. -// - -#include -#include - -namespace boost -{ - -namespace placeholders -{ - -#if defined(__BORLANDC__) || defined(__GNUC__) && (__GNUC__ < 4) - -inline boost::arg<1> _1() { return boost::arg<1>(); } -inline boost::arg<2> _2() { return boost::arg<2>(); } -inline boost::arg<3> _3() { return boost::arg<3>(); } -inline boost::arg<4> _4() { return boost::arg<4>(); } -inline boost::arg<5> _5() { return boost::arg<5>(); } -inline boost::arg<6> _6() { return boost::arg<6>(); } -inline boost::arg<7> _7() { return boost::arg<7>(); } -inline boost::arg<8> _8() { return boost::arg<8>(); } -inline boost::arg<9> _9() { return boost::arg<9>(); } - -#else - -BOOST_STATIC_CONSTEXPR boost::arg<1> _1; -BOOST_STATIC_CONSTEXPR boost::arg<2> _2; -BOOST_STATIC_CONSTEXPR boost::arg<3> _3; -BOOST_STATIC_CONSTEXPR boost::arg<4> _4; -BOOST_STATIC_CONSTEXPR boost::arg<5> _5; -BOOST_STATIC_CONSTEXPR boost::arg<6> _6; -BOOST_STATIC_CONSTEXPR boost::arg<7> _7; -BOOST_STATIC_CONSTEXPR boost::arg<8> _8; -BOOST_STATIC_CONSTEXPR boost::arg<9> _9; - -#endif - -} // namespace placeholders - -} // namespace boost - -#endif // #ifndef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED diff --git a/contrib/libboost/boost_1_65_0/boost/bind/protect.hpp b/contrib/libboost/boost_1_65_0/boost/bind/protect.hpp deleted file mode 100644 index 749e158c349..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/bind/protect.hpp +++ /dev/null @@ -1,304 +0,0 @@ -#ifndef BOOST_BIND_PROTECT_HPP_INCLUDED -#define BOOST_BIND_PROTECT_HPP_INCLUDED - -// -// protect.hpp -// -// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. -// Copyright (c) 2009 Steven Watanabe -// -// 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 - -namespace boost -{ - -namespace _bi -{ - -template class protected_bind_t -{ -public: - - typedef typename F::result_type result_type; - - explicit protected_bind_t(F f): f_(f) - { - } - - result_type operator()() - { - return f_(); - } - - result_type operator()() const - { - return f_(); - } - - template result_type operator()(A1 & a1) - { - return f_(a1); - } - - template result_type operator()(A1 & a1) const - { - return f_(a1); - } - - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(const A1 & a1) - { - return f_(a1); - } - - template result_type operator()(const A1 & a1) const - { - return f_(a1); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2) - { - return f_(a1, a2); - } - - template result_type operator()(A1 & a1, A2 & a2) const - { - return f_(a1, a2); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 & a2) - { - return f_(a1, a2); - } - - template result_type operator()(A1 const & a1, A2 & a2) const - { - return f_(a1, a2); - } - - template result_type operator()(A1 & a1, A2 const & a2) - { - return f_(a1, a2); - } - - template result_type operator()(A1 & a1, A2 const & a2) const - { - return f_(a1, a2); - } - - template result_type operator()(A1 const & a1, A2 const & a2) - { - return f_(a1, a2); - } - - template result_type operator()(A1 const & a1, A2 const & a2) const - { - return f_(a1, a2); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3) - { - return f_(a1, a2, a3); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3) const - { - return f_(a1, a2, a3); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) - { - return f_(a1, a2, a3); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3) const - { - return f_(a1, a2, a3); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) - { - return f_(a1, a2, a3, a4); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4) const - { - return f_(a1, a2, a3, a4); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) - { - return f_(a1, a2, a3, a4); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4) const - { - return f_(a1, a2, a3, a4); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) - { - return f_(a1, a2, a3, a4, a5); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5) const - { - return f_(a1, a2, a3, a4, a5); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) - { - return f_(a1, a2, a3, a4, a5); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5) const - { - return f_(a1, a2, a3, a4, a5); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) - { - return f_(a1, a2, a3, a4, a5, a6); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6) const - { - return f_(a1, a2, a3, a4, a5, a6); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) - { - return f_(a1, a2, a3, a4, a5, a6); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6) const - { - return f_(a1, a2, a3, a4, a5, a6); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) - { - return f_(a1, a2, a3, a4, a5, a6, a7); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7) const - { - return f_(a1, a2, a3, a4, a5, a6, a7); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) - { - return f_(a1, a2, a3, a4, a5, a6, a7); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7) const - { - return f_(a1, a2, a3, a4, a5, a6, a7); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) - { - return f_(a1, a2, a3, a4, a5, a6, a7, a8); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8) const - { - return f_(a1, a2, a3, a4, a5, a6, a7, a8); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) - { - return f_(a1, a2, a3, a4, a5, a6, a7, a8); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8) const - { - return f_(a1, a2, a3, a4, a5, a6, a7, a8); - } - -#endif - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) - { - return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); - } - - template result_type operator()(A1 & a1, A2 & a2, A3 & a3, A4 & a4, A5 & a5, A6 & a6, A7 & a7, A8 & a8, A9 & a9) const - { - return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); - } - -#if !defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) \ - && !BOOST_WORKAROUND(__EDG_VERSION__, <= 238) - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) - { - return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); - } - - template result_type operator()(A1 const & a1, A2 const & a2, A3 const & a3, A4 const & a4, A5 const & a5, A6 const & a6, A7 const & a7, A8 const & a8, A9 const & a9) const - { - return f_(a1, a2, a3, a4, a5, a6, a7, a8, a9); - } - -#endif - -private: - - F f_; -}; - -} // namespace _bi - -template _bi::protected_bind_t protect(F f) -{ - return _bi::protected_bind_t(f); -} - -} // namespace boost - -#endif // #ifndef BOOST_BIND_PROTECT_HPP_INCLUDED diff --git a/contrib/libboost/boost_1_65_0/boost/bind/storage.hpp b/contrib/libboost/boost_1_65_0/boost/bind/storage.hpp deleted file mode 100644 index be490b0f593..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/bind/storage.hpp +++ /dev/null @@ -1,475 +0,0 @@ -#ifndef BOOST_BIND_STORAGE_HPP_INCLUDED -#define BOOST_BIND_STORAGE_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// bind/storage.hpp -// -// boost/bind.hpp support header, optimized storage -// -// Copyright (c) 2006 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 -// -// See http://www.boost.org/libs/bind/bind.html for documentation. -// - -#include -#include - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable: 4512) // assignment operator could not be generated -#endif - -namespace boost -{ - -namespace _bi -{ - -// 1 - -template struct storage1 -{ - explicit storage1( A1 a1 ): a1_( a1 ) {} - - template void accept(V & v) const - { - BOOST_BIND_VISIT_EACH(v, a1_, 0); - } - - A1 a1_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( __BORLANDC__ ) - -template struct storage1< boost::arg > -{ - explicit storage1( boost::arg ) {} - - template void accept(V &) const { } - - static boost::arg a1_() { return boost::arg(); } -}; - -template struct storage1< boost::arg (*) () > -{ - explicit storage1( boost::arg (*) () ) {} - - template void accept(V &) const { } - - static boost::arg a1_() { return boost::arg(); } -}; - -#endif - -// 2 - -template struct storage2: public storage1 -{ - typedef storage1 inherited; - - storage2( A1 a1, A2 a2 ): storage1( a1 ), a2_( a2 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a2_, 0); - } - - A2 a2_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage2< A1, boost::arg >: public storage1 -{ - typedef storage1 inherited; - - storage2( A1 a1, boost::arg ): storage1( a1 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a2_() { return boost::arg(); } -}; - -template struct storage2< A1, boost::arg (*) () >: public storage1 -{ - typedef storage1 inherited; - - storage2( A1 a1, boost::arg (*) () ): storage1( a1 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a2_() { return boost::arg(); } -}; - -#endif - -// 3 - -template struct storage3: public storage2< A1, A2 > -{ - typedef storage2 inherited; - - storage3( A1 a1, A2 a2, A3 a3 ): storage2( a1, a2 ), a3_( a3 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a3_, 0); - } - - A3 a3_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage3< A1, A2, boost::arg >: public storage2< A1, A2 > -{ - typedef storage2 inherited; - - storage3( A1 a1, A2 a2, boost::arg ): storage2( a1, a2 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a3_() { return boost::arg(); } -}; - -template struct storage3< A1, A2, boost::arg (*) () >: public storage2< A1, A2 > -{ - typedef storage2 inherited; - - storage3( A1 a1, A2 a2, boost::arg (*) () ): storage2( a1, a2 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a3_() { return boost::arg(); } -}; - -#endif - -// 4 - -template struct storage4: public storage3< A1, A2, A3 > -{ - typedef storage3 inherited; - - storage4( A1 a1, A2 a2, A3 a3, A4 a4 ): storage3( a1, a2, a3 ), a4_( a4 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a4_, 0); - } - - A4 a4_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage4< A1, A2, A3, boost::arg >: public storage3< A1, A2, A3 > -{ - typedef storage3 inherited; - - storage4( A1 a1, A2 a2, A3 a3, boost::arg ): storage3( a1, a2, a3 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a4_() { return boost::arg(); } -}; - -template struct storage4< A1, A2, A3, boost::arg (*) () >: public storage3< A1, A2, A3 > -{ - typedef storage3 inherited; - - storage4( A1 a1, A2 a2, A3 a3, boost::arg (*) () ): storage3( a1, a2, a3 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a4_() { return boost::arg(); } -}; - -#endif - -// 5 - -template struct storage5: public storage4< A1, A2, A3, A4 > -{ - typedef storage4 inherited; - - storage5( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5 ): storage4( a1, a2, a3, a4 ), a5_( a5 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a5_, 0); - } - - A5 a5_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage5< A1, A2, A3, A4, boost::arg >: public storage4< A1, A2, A3, A4 > -{ - typedef storage4 inherited; - - storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg ): storage4( a1, a2, a3, a4 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a5_() { return boost::arg(); } -}; - -template struct storage5< A1, A2, A3, A4, boost::arg (*) () >: public storage4< A1, A2, A3, A4 > -{ - typedef storage4 inherited; - - storage5( A1 a1, A2 a2, A3 a3, A4 a4, boost::arg (*) () ): storage4( a1, a2, a3, a4 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a5_() { return boost::arg(); } -}; - -#endif - -// 6 - -template struct storage6: public storage5< A1, A2, A3, A4, A5 > -{ - typedef storage5 inherited; - - storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6 ): storage5( a1, a2, a3, a4, a5 ), a6_( a6 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a6_, 0); - } - - A6 a6_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage6< A1, A2, A3, A4, A5, boost::arg >: public storage5< A1, A2, A3, A4, A5 > -{ - typedef storage5 inherited; - - storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg ): storage5( a1, a2, a3, a4, a5 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a6_() { return boost::arg(); } -}; - -template struct storage6< A1, A2, A3, A4, A5, boost::arg (*) () >: public storage5< A1, A2, A3, A4, A5 > -{ - typedef storage5 inherited; - - storage6( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, boost::arg (*) () ): storage5( a1, a2, a3, a4, a5 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a6_() { return boost::arg(); } -}; - -#endif - -// 7 - -template struct storage7: public storage6< A1, A2, A3, A4, A5, A6 > -{ - typedef storage6 inherited; - - storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7 ): storage6( a1, a2, a3, a4, a5, a6 ), a7_( a7 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a7_, 0); - } - - A7 a7_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg >: public storage6< A1, A2, A3, A4, A5, A6 > -{ - typedef storage6 inherited; - - storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg ): storage6( a1, a2, a3, a4, a5, a6 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a7_() { return boost::arg(); } -}; - -template struct storage7< A1, A2, A3, A4, A5, A6, boost::arg (*) () >: public storage6< A1, A2, A3, A4, A5, A6 > -{ - typedef storage6 inherited; - - storage7( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, boost::arg (*) () ): storage6( a1, a2, a3, a4, a5, a6 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a7_() { return boost::arg(); } -}; - -#endif - -// 8 - -template struct storage8: public storage7< A1, A2, A3, A4, A5, A6, A7 > -{ - typedef storage7 inherited; - - storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8 ): storage7( a1, a2, a3, a4, a5, a6, a7 ), a8_( a8 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a8_, 0); - } - - A8 a8_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg >: public storage7< A1, A2, A3, A4, A5, A6, A7 > -{ - typedef storage7 inherited; - - storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a8_() { return boost::arg(); } -}; - -template struct storage8< A1, A2, A3, A4, A5, A6, A7, boost::arg (*) () >: public storage7< A1, A2, A3, A4, A5, A6, A7 > -{ - typedef storage7 inherited; - - storage8( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, boost::arg (*) () ): storage7( a1, a2, a3, a4, a5, a6, a7 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a8_() { return boost::arg(); } -}; - -#endif - -// 9 - -template struct storage9: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > -{ - typedef storage8 inherited; - - storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9 ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ), a9_( a9 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - BOOST_BIND_VISIT_EACH(v, a9_, 0); - } - - A9 a9_; -}; - -#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) - -template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > -{ - typedef storage8 inherited; - - storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a9_() { return boost::arg(); } -}; - -template struct storage9< A1, A2, A3, A4, A5, A6, A7, A8, boost::arg (*) () >: public storage8< A1, A2, A3, A4, A5, A6, A7, A8 > -{ - typedef storage8 inherited; - - storage9( A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, boost::arg (*) () ): storage8( a1, a2, a3, a4, a5, a6, a7, a8 ) {} - - template void accept(V & v) const - { - inherited::accept(v); - } - - static boost::arg a9_() { return boost::arg(); } -}; - -#endif - -} // namespace _bi - -} // namespace boost - -#ifdef BOOST_MSVC -# pragma warning(default: 4512) // assignment operator could not be generated -# pragma warning(pop) -#endif - -#endif // #ifndef BOOST_BIND_STORAGE_HPP_INCLUDED diff --git a/contrib/libboost/boost_1_65_0/boost/blank.hpp b/contrib/libboost/boost_1_65_0/boost/blank.hpp deleted file mode 100644 index d0fe5abca56..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/blank.hpp +++ /dev/null @@ -1,106 +0,0 @@ -//----------------------------------------------------------------------------- -// boost blank.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2003 -// Eric Friedman -// -// 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_BLANK_HPP -#define BOOST_BLANK_HPP - -#include "boost/blank_fwd.hpp" - -#if !defined(BOOST_NO_IOSTREAM) -#include // for std::basic_ostream forward declare -#include "boost/detail/templated_streams.hpp" -#endif // BOOST_NO_IOSTREAM - -#include "boost/mpl/bool.hpp" -#include "boost/type_traits/is_empty.hpp" -#include "boost/type_traits/is_pod.hpp" -#include "boost/type_traits/is_stateless.hpp" - -namespace boost { - -struct blank -{ -}; - -// type traits specializations -// - -template <> -struct is_pod< blank > - : mpl::true_ -{ -}; - -template <> -struct is_empty< blank > - : mpl::true_ -{ -}; - -template <> -struct is_stateless< blank > - : mpl::true_ -{ -}; - -// relational operators -// - -inline bool operator==(const blank&, const blank&) -{ - return true; -} - -inline bool operator<=(const blank&, const blank&) -{ - return true; -} - -inline bool operator>=(const blank&, const blank&) -{ - return true; -} - -inline bool operator!=(const blank&, const blank&) -{ - return false; -} - -inline bool operator<(const blank&, const blank&) -{ - return false; -} - -inline bool operator>(const blank&, const blank&) -{ - return false; -} - -// streaming support -// -#if !defined(BOOST_NO_IOSTREAM) - -BOOST_TEMPLATED_STREAM_TEMPLATE(E,T) -inline BOOST_TEMPLATED_STREAM(ostream, E,T)& operator<<( - BOOST_TEMPLATED_STREAM(ostream, E,T)& out - , const blank& - ) -{ - // (output nothing) - return out; -} - -#endif // BOOST_NO_IOSTREAM - -} // namespace boost - -#endif // BOOST_BLANK_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/blank_fwd.hpp b/contrib/libboost/boost_1_65_0/boost/blank_fwd.hpp deleted file mode 100644 index 8bfe97c4699..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/blank_fwd.hpp +++ /dev/null @@ -1,22 +0,0 @@ -//----------------------------------------------------------------------------- -// boost blank_fwd.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2003 -// Eric Friedman -// -// 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_BLANK_FWD_HPP -#define BOOST_BLANK_FWD_HPP - -namespace boost { - -struct blank; - -} // namespace boost - -#endif // BOOST_BLANK_FWD_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/call_traits.hpp b/contrib/libboost/boost_1_65_0/boost/call_traits.hpp deleted file mode 100644 index 2c1328e94d7..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/call_traits.hpp +++ /dev/null @@ -1,20 +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 boost/detail/call_traits.hpp -// for full copyright notices. - -#ifndef BOOST_CALL_TRAITS_HPP -#define BOOST_CALL_TRAITS_HPP - -#ifndef BOOST_CONFIG_HPP -#include -#endif - -#include - -#endif // BOOST_CALL_TRAITS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/cerrno.hpp b/contrib/libboost/boost_1_65_0/boost/cerrno.hpp deleted file mode 100644 index 57278f5ceed..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/cerrno.hpp +++ /dev/null @@ -1,331 +0,0 @@ -// Boost cerrno.hpp header -------------------------------------------------// - -// Copyright Beman Dawes 2005. -// 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 library home page at http://www.boost.org/libs/system - -#ifndef BOOST_SYSTEM_CERRNO_HPP -#define BOOST_SYSTEM_CERRNO_HPP - -#include - -// supply errno values likely to be missing, particularly on Windows - -#ifndef EAFNOSUPPORT -#define EAFNOSUPPORT 9901 -#endif - -#ifndef EADDRINUSE -#define EADDRINUSE 9902 -#endif - -#ifndef EADDRNOTAVAIL -#define EADDRNOTAVAIL 9903 -#endif - -#ifndef EISCONN -#define EISCONN 9904 -#endif - -#ifndef EBADMSG -#define EBADMSG 9905 -#endif - -#ifndef ECONNABORTED -#define ECONNABORTED 9906 -#endif - -#ifndef EALREADY -#define EALREADY 9907 -#endif - -#ifndef ECONNREFUSED -#define ECONNREFUSED 9908 -#endif - -#ifndef ECONNRESET -#define ECONNRESET 9909 -#endif - -#ifndef EDESTADDRREQ -#define EDESTADDRREQ 9910 -#endif - -#ifndef EHOSTUNREACH -#define EHOSTUNREACH 9911 -#endif - -#ifndef EIDRM -#define EIDRM 9912 -#endif - -#ifndef EMSGSIZE -#define EMSGSIZE 9913 -#endif - -#ifndef ENETDOWN -#define ENETDOWN 9914 -#endif - -#ifndef ENETRESET -#define ENETRESET 9915 -#endif - -#ifndef ENETUNREACH -#define ENETUNREACH 9916 -#endif - -#ifndef ENOBUFS -#define ENOBUFS 9917 -#endif - -#ifndef ENOLINK -#define ENOLINK 9918 -#endif - -#ifndef ENODATA -#define ENODATA 9919 -#endif - -#ifndef ENOMSG -#define ENOMSG 9920 -#endif - -#ifndef ENOPROTOOPT -#define ENOPROTOOPT 9921 -#endif - -#ifndef ENOSR -#define ENOSR 9922 -#endif - -#ifndef ENOTSOCK -#define ENOTSOCK 9923 -#endif - -#ifndef ENOSTR -#define ENOSTR 9924 -#endif - -#ifndef ENOTCONN -#define ENOTCONN 9925 -#endif - -#ifndef ENOTSUP -#define ENOTSUP 9926 -#endif - -#ifndef ECANCELED -#define ECANCELED 9927 -#endif - -#ifndef EINPROGRESS -#define EINPROGRESS 9928 -#endif - -#ifndef EOPNOTSUPP -#define EOPNOTSUPP 9929 -#endif - -#ifndef EWOULDBLOCK -#define EWOULDBLOCK 9930 -#endif - -#ifndef EOWNERDEAD -#define EOWNERDEAD 9931 -#endif - -#ifndef EPROTO -#define EPROTO 9932 -#endif - -#ifndef EPROTONOSUPPORT -#define EPROTONOSUPPORT 9933 -#endif - -#ifndef ENOTRECOVERABLE -#define ENOTRECOVERABLE 9934 -#endif - -#ifndef ETIME -#define ETIME 9935 -#endif - -#ifndef ETXTBSY -#define ETXTBSY 9936 -#endif - -#ifndef ETIMEDOUT -#define ETIMEDOUT 9938 -#endif - -#ifndef ELOOP -#define ELOOP 9939 -#endif - -#ifndef EOVERFLOW -#define EOVERFLOW 9940 -#endif - -#ifndef EPROTOTYPE -#define EPROTOTYPE 9941 -#endif - -#ifndef ENOSYS -#define ENOSYS 9942 -#endif - -#ifndef EINVAL -#define EINVAL 9943 -#endif - -#ifndef ERANGE -#define ERANGE 9944 -#endif - -#ifndef EILSEQ -#define EILSEQ 9945 -#endif - -// Windows Mobile doesn't appear to define these: - -#ifndef E2BIG -#define E2BIG 9946 -#endif - -#ifndef EDOM -#define EDOM 9947 -#endif - -#ifndef EFAULT -#define EFAULT 9948 -#endif - -#ifndef EBADF -#define EBADF 9949 -#endif - -#ifndef EPIPE -#define EPIPE 9950 -#endif - -#ifndef EXDEV -#define EXDEV 9951 -#endif - -#ifndef EBUSY -#define EBUSY 9952 -#endif - -#ifndef ENOTEMPTY -#define ENOTEMPTY 9953 -#endif - -#ifndef ENOEXEC -#define ENOEXEC 9954 -#endif - -#ifndef EEXIST -#define EEXIST 9955 -#endif - -#ifndef EFBIG -#define EFBIG 9956 -#endif - -#ifndef ENAMETOOLONG -#define ENAMETOOLONG 9957 -#endif - -#ifndef ENOTTY -#define ENOTTY 9958 -#endif - -#ifndef EINTR -#define EINTR 9959 -#endif - -#ifndef ESPIPE -#define ESPIPE 9960 -#endif - -#ifndef EIO -#define EIO 9961 -#endif - -#ifndef EISDIR -#define EISDIR 9962 -#endif - -#ifndef ECHILD -#define ECHILD 9963 -#endif - -#ifndef ENOLCK -#define ENOLCK 9964 -#endif - -#ifndef ENOSPC -#define ENOSPC 9965 -#endif - -#ifndef ENXIO -#define ENXIO 9966 -#endif - -#ifndef ENODEV -#define ENODEV 9967 -#endif - -#ifndef ENOENT -#define ENOENT 9968 -#endif - -#ifndef ESRCH -#define ESRCH 9969 -#endif - -#ifndef ENOTDIR -#define ENOTDIR 9970 -#endif - -#ifndef ENOMEM -#define ENOMEM 9971 -#endif - -#ifndef EPERM -#define EPERM 9972 -#endif - -#ifndef EACCES -#define EACCES 9973 -#endif - -#ifndef EROFS -#define EROFS 9974 -#endif - -#ifndef EDEADLK -#define EDEADLK 9975 -#endif - -#ifndef EAGAIN -#define EAGAIN 9976 -#endif - -#ifndef ENFILE -#define ENFILE 9977 -#endif - -#ifndef EMFILE -#define EMFILE 9978 -#endif - -#ifndef EMLINK -#define EMLINK 9979 -#endif - -#endif // include guard diff --git a/contrib/libboost/boost_1_65_0/boost/checked_delete.hpp b/contrib/libboost/boost_1_65_0/boost/checked_delete.hpp deleted file mode 100644 index fb71c789c8d..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/checked_delete.hpp +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) 2014 Glen Fernandes - * - * 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_CHECKED_DELETE_HPP -#define BOOST_CHECKED_DELETE_HPP - -// The header file at this path is deprecated; -// use boost/core/checked_delete.hpp instead. - -#include - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/compressed_pair.hpp b/contrib/libboost/boost_1_65_0/boost/compressed_pair.hpp deleted file mode 100644 index a7be0f2ba2e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/compressed_pair.hpp +++ /dev/null @@ -1,20 +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 boost/detail/compressed_pair.hpp -// for full copyright notices. - -#ifndef BOOST_COMPRESSED_PAIR_HPP -#define BOOST_COMPRESSED_PAIR_HPP - -#ifndef BOOST_CONFIG_HPP -#include -#endif - -#include - -#endif // BOOST_COMPRESSED_PAIR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/concept/assert.hpp b/contrib/libboost/boost_1_65_0/boost/concept/assert.hpp deleted file mode 100644 index cf981795229..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/concept/assert.hpp +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright David Abrahams 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) -#ifndef BOOST_CONCEPT_ASSERT_DWA2006430_HPP -# define BOOST_CONCEPT_ASSERT_DWA2006430_HPP - -# include -# include - -// The old protocol used a constraints() member function in concept -// checking classes. If the compiler supports SFINAE, we can detect -// that function and seamlessly support the old concept checking -// classes. In this release, backward compatibility with the old -// concept checking classes is enabled by default, where available. -// The old protocol is deprecated, though, and backward compatibility -// will no longer be the default in the next release. - -# if !defined(BOOST_NO_OLD_CONCEPT_SUPPORT) \ - && !defined(BOOST_NO_SFINAE) \ - \ - && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4)) - -// Note: gcc-2.96 through 3.3.x have some SFINAE, but no ability to -// check for the presence of particularmember functions. - -# define BOOST_OLD_CONCEPT_SUPPORT - -# endif - -# ifdef BOOST_MSVC -# include -# elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -# include -# else -# include -# endif - - // Usage, in class or function context: - // - // BOOST_CONCEPT_ASSERT((UnaryFunctionConcept)); - // -# define BOOST_CONCEPT_ASSERT(ModelInParens) \ - BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens) - -#endif // BOOST_CONCEPT_ASSERT_DWA2006430_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/concept/detail/backward_compatibility.hpp b/contrib/libboost/boost_1_65_0/boost/concept/detail/backward_compatibility.hpp deleted file mode 100644 index 66d573ef4bb..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/concept/detail/backward_compatibility.hpp +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright David Abrahams 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) -#ifndef BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP -# define BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP - -namespace boost -{ - namespace concepts {} - -# if defined(BOOST_HAS_CONCEPTS) && !defined(BOOST_CONCEPT_NO_BACKWARD_KEYWORD) - namespace concept = concepts; -# endif -} // namespace boost::concept - -#endif // BOOST_CONCEPT_BACKWARD_COMPATIBILITY_DWA200968_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/concept/detail/borland.hpp b/contrib/libboost/boost_1_65_0/boost/concept/detail/borland.hpp deleted file mode 100644 index 300d5d40503..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/concept/detail/borland.hpp +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright David Abrahams 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) -#ifndef BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP -# define BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP - -# include -# include - -namespace boost { namespace concepts { - -template -struct require; - -template -struct require -{ - enum { instantiate = sizeof((((Model*)0)->~Model()), 3) }; -}; - -# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ - enum \ - { \ - BOOST_PP_CAT(boost_concept_check,__LINE__) = \ - boost::concepts::require::instantiate \ - } - -}} // namespace boost::concept - -#endif // BOOST_CONCEPT_DETAIL_BORLAND_DWA2006429_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/concept/detail/concept_def.hpp b/contrib/libboost/boost_1_65_0/boost/concept/detail/concept_def.hpp deleted file mode 100644 index 750561ee301..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/concept/detail/concept_def.hpp +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright David Abrahams 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) -#ifndef BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP -# define BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP -# include -# include -# include -# include -#endif // BOOST_CONCEPT_DETAIL_CONCEPT_DEF_DWA200651_HPP - -// BOOST_concept(SomeName, (p1)(p2)...(pN)) -// -// Expands to "template struct SomeName" -// -// Also defines an equivalent SomeNameConcept for backward compatibility. -// Maybe in the next release we can kill off the "Concept" suffix for good. -# define BOOST_concept(name, params) \ - template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ - struct name; /* forward declaration */ \ - \ - template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ - struct BOOST_PP_CAT(name,Concept) \ - : name< BOOST_PP_SEQ_ENUM(params) > \ - { \ - }; \ - \ - template < BOOST_PP_SEQ_FOR_EACH_I(BOOST_CONCEPT_typename,~,params) > \ - struct name - -// Helper for BOOST_concept, above. -# define BOOST_CONCEPT_typename(r, ignored, index, t) \ - BOOST_PP_COMMA_IF(index) typename t - diff --git a/contrib/libboost/boost_1_65_0/boost/concept/detail/concept_undef.hpp b/contrib/libboost/boost_1_65_0/boost/concept/detail/concept_undef.hpp deleted file mode 100644 index 713db89123b..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/concept/detail/concept_undef.hpp +++ /dev/null @@ -1,5 +0,0 @@ -// Copyright David Abrahams 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) -# undef BOOST_concept_typename -# undef BOOST_concept diff --git a/contrib/libboost/boost_1_65_0/boost/concept/detail/general.hpp b/contrib/libboost/boost_1_65_0/boost/concept/detail/general.hpp deleted file mode 100644 index 525ea656c2d..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/concept/detail/general.hpp +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright David Abrahams 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) -#ifndef BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP -# define BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP - -# include -# include -# include - -# ifdef BOOST_OLD_CONCEPT_SUPPORT -# include -# include -# endif - -// This implementation works on Comeau and GCC, all the way back to -// 2.95 -namespace boost { namespace concepts { - -template -struct requirement_; - -namespace detail -{ - template struct instantiate {}; -} - -template -struct requirement -{ - static void failed() { ((Model*)0)->~Model(); } -}; - -struct failed {}; - -template -struct requirement -{ - static void failed() { ((Model*)0)->~Model(); } -}; - -# ifdef BOOST_OLD_CONCEPT_SUPPORT - -template -struct constraint -{ - static void failed() { ((Model*)0)->constraints(); } -}; - -template -struct requirement_ - : mpl::if_< - concepts::not_satisfied - , constraint - , requirement - >::type -{}; - -# else - -// For GCC-2.x, these can't have exactly the same name -template -struct requirement_ - : requirement -{}; - -# endif - -# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ - typedef ::boost::concepts::detail::instantiate< \ - &::boost::concepts::requirement_::failed> \ - BOOST_PP_CAT(boost_concept_check,__LINE__) \ - BOOST_ATTRIBUTE_UNUSED - -}} - -#endif // BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/concept/detail/has_constraints.hpp b/contrib/libboost/boost_1_65_0/boost/concept/detail/has_constraints.hpp deleted file mode 100644 index a309db3d88a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/concept/detail/has_constraints.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright David Abrahams 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) -#ifndef BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP -# define BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP - -# include -# include -# include - -namespace boost { namespace concepts { - -namespace detail -{ - -// Here we implement the metafunction that detects whether a -// constraints metafunction exists - typedef char yes; - typedef char (&no)[2]; - - template - struct wrap_constraints {}; - -#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) || defined(__CUDACC__) - // Work around the following bogus error in Sun Studio 11, by - // turning off the has_constraints function entirely: - // Error: complex expression not allowed in dependent template - // argument expression - inline no has_constraints_(...); -#else - template - inline yes has_constraints_(Model*, wrap_constraints* = 0); - inline no has_constraints_(...); -#endif -} - -// This would be called "detail::has_constraints," but it has a strong -// tendency to show up in error messages. -template -struct not_satisfied -{ - BOOST_STATIC_CONSTANT( - bool - , value = sizeof( detail::has_constraints_((Model*)0) ) == sizeof(detail::yes) ); - typedef mpl::bool_ type; -}; - -}} // namespace boost::concepts::detail - -#endif // BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/concept/detail/msvc.hpp b/contrib/libboost/boost_1_65_0/boost/concept/detail/msvc.hpp deleted file mode 100644 index 078dd22330e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/concept/detail/msvc.hpp +++ /dev/null @@ -1,123 +0,0 @@ -// Copyright David Abrahams 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) -#ifndef BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP -# define BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP - -# include -# include -# include - -# ifdef BOOST_OLD_CONCEPT_SUPPORT -# include -# include -# endif - -# ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable:4100) -# endif - -namespace boost { namespace concepts { - - -template -struct check -{ - virtual void failed(Model* x) - { - x->~Model(); - } -}; - -# ifndef BOOST_NO_PARTIAL_SPECIALIZATION -struct failed {}; -template -struct check -{ - virtual void failed(Model* x) - { - x->~Model(); - } -}; -# endif - -# ifdef BOOST_OLD_CONCEPT_SUPPORT - -namespace detail -{ - // No need for a virtual function here, since evaluating - // not_satisfied below will have already instantiated the - // constraints() member. - struct constraint {}; -} - -template -struct require - : mpl::if_c< - not_satisfied::value - , detail::constraint -# ifndef BOOST_NO_PARTIAL_SPECIALIZATION - , check -# else - , check -# endif - >::type -{}; - -# else - -template -struct require -# ifndef BOOST_NO_PARTIAL_SPECIALIZATION - : check -# else - : check -# endif -{}; - -# endif - -# if BOOST_WORKAROUND(BOOST_MSVC, == 1310) - -// -// The iterator library sees some really strange errors unless we -// do things this way. -// -template -struct require -{ - virtual void failed(Model*) - { - require(); - } -}; - -# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ -enum \ -{ \ - BOOST_PP_CAT(boost_concept_check,__LINE__) = \ - sizeof(::boost::concepts::require) \ -} - -# else // Not vc-7.1 - -template -require -require_(void(*)(Model)); - -# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \ -enum \ -{ \ - BOOST_PP_CAT(boost_concept_check,__LINE__) = \ - sizeof(::boost::concepts::require_((ModelFnPtr)0)) \ -} - -# endif -}} - -# ifdef BOOST_MSVC -# pragma warning(pop) -# endif - -#endif // BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/concept/requires.hpp b/contrib/libboost/boost_1_65_0/boost/concept/requires.hpp deleted file mode 100644 index 365ce10045f..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/concept/requires.hpp +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright David Abrahams 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) -#ifndef BOOST_CONCEPT_REQUIRES_DWA2006430_HPP -# define BOOST_CONCEPT_REQUIRES_DWA2006430_HPP - -# include -# include -# include - -namespace boost { - -// unaryfunptr_arg_type from parameter/aux_/parenthesized_type.hpp - -namespace ccheck_aux { - -// A metafunction that transforms void(*)(T) -> T -template -struct unaryfunptr_arg_type; - -template -struct unaryfunptr_arg_type -{ - typedef Arg type; -}; - -template <> -struct unaryfunptr_arg_type -{ - typedef void type; -}; - -} // namespace ccheck_aux - -// Template for use in handwritten assertions -template -struct requires_ : More -{ - BOOST_CONCEPT_ASSERT((Model)); -}; - -// Template for use by macros, where models must be wrapped in parens. -// This isn't in namespace detail to keep extra cruft out of resulting -// error messages. -template -struct _requires_ -{ - enum { value = 0 }; - BOOST_CONCEPT_ASSERT_FN(ModelFn); -}; - -template -struct Requires_ : ::boost::ccheck_aux::unaryfunptr_arg_type -{ -}; - -# if BOOST_WORKAROUND(BOOST_INTEL_WIN, BOOST_TESTED_AT(1010)) -# define BOOST_CONCEPT_REQUIRES_(r,data,t) | (::boost::_requires_::value) -# else -# define BOOST_CONCEPT_REQUIRES_(r,data,t) + (::boost::_requires_::value) -# endif - -#if defined(NDEBUG) - -# define BOOST_CONCEPT_REQUIRES(models, result) \ - typename ::boost::ccheck_aux::unaryfunptr_arg_type::type - -#elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) - -// Same thing as below without the initial typename -# define BOOST_CONCEPT_REQUIRES(models, result) \ - ::boost::Requires_< \ - (0 BOOST_PP_SEQ_FOR_EACH(BOOST_CONCEPT_REQUIRES_, ~, models)), \ - ::boost::ccheck_aux::unaryfunptr_arg_type \ - >::type - -#else - -// This just ICEs on MSVC6 :( -# define BOOST_CONCEPT_REQUIRES(models, result) \ - typename ::boost::Requires_< \ - (0 BOOST_PP_SEQ_FOR_EACH(BOOST_CONCEPT_REQUIRES_, ~, models)), \ - void(*)result \ - >::type - -#endif - -// C++0x proposed syntax changed. This supports an older usage -#define BOOST_CONCEPT_WHERE(models,result) BOOST_CONCEPT_REQUIRES(models,result) - -} // namespace boost::concept_check - -#endif // BOOST_CONCEPT_REQUIRES_DWA2006430_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/concept/usage.hpp b/contrib/libboost/boost_1_65_0/boost/concept/usage.hpp deleted file mode 100644 index e73370fb37e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/concept/usage.hpp +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright David Abrahams 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) -#ifndef BOOST_CONCEPT_USAGE_DWA2006919_HPP -# define BOOST_CONCEPT_USAGE_DWA2006919_HPP - -# include -# include -# include - -namespace boost { namespace concepts { - -template -struct usage_requirements -{ - ~usage_requirements() { ((Model*)0)->~Model(); } -}; - -# if BOOST_WORKAROUND(__GNUC__, <= 3) - -# define BOOST_CONCEPT_USAGE(model) \ - model(); /* at least 2.96 and 3.4.3 both need this :( */ \ - BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements)); \ - ~model() - -# else - -# define BOOST_CONCEPT_USAGE(model) \ - BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements)); \ - ~model() - -# endif - -}} // namespace boost::concepts - -#endif // BOOST_CONCEPT_USAGE_DWA2006919_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/concept_check.hpp b/contrib/libboost/boost_1_65_0/boost/concept_check.hpp deleted file mode 100644 index 25f118b6438..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/concept_check.hpp +++ /dev/null @@ -1,1082 +0,0 @@ -// -// (C) Copyright Jeremy Siek 2000. -// Copyright 2002 The Trustees of Indiana University. -// -// 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) -// -// Revision History: -// 05 May 2001: Workarounds for HP aCC from Thomas Matelich. (Jeremy Siek) -// 02 April 2001: Removed limits header altogether. (Jeremy Siek) -// 01 April 2001: Modified to use new header. (JMaddock) -// - -// See http://www.boost.org/libs/concept_check for documentation. - -#ifndef BOOST_CONCEPT_CHECKS_HPP -# define BOOST_CONCEPT_CHECKS_HPP - -# include - -# include -# include -# include -# include -# include -# include -# include -# include - -# include -# include - -#if (defined _MSC_VER) -# pragma warning( push ) -# pragma warning( disable : 4510 ) // default constructor could not be generated -# pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required -#endif - -namespace boost -{ - - // - // Backward compatibility - // - - template - inline void function_requires(Model* = 0) - { - BOOST_CONCEPT_ASSERT((Model)); - } - template inline void ignore_unused_variable_warning(T const&) {} - -# define BOOST_CLASS_REQUIRE(type_var, ns, concept) \ - BOOST_CONCEPT_ASSERT((ns::concept)) - -# define BOOST_CLASS_REQUIRE2(type_var1, type_var2, ns, concept) \ - BOOST_CONCEPT_ASSERT((ns::concept)) - -# define BOOST_CLASS_REQUIRE3(tv1, tv2, tv3, ns, concept) \ - BOOST_CONCEPT_ASSERT((ns::concept)) - -# define BOOST_CLASS_REQUIRE4(tv1, tv2, tv3, tv4, ns, concept) \ - BOOST_CONCEPT_ASSERT((ns::concept)) - - - // - // Begin concept definitions - // - BOOST_concept(Integer, (T)) - { - BOOST_CONCEPT_USAGE(Integer) - { - x.error_type_must_be_an_integer_type(); - } - private: - T x; - }; - - template <> struct Integer {}; - template <> struct Integer {}; - template <> struct Integer {}; - template <> struct Integer {}; - template <> struct Integer {}; - template <> struct Integer {}; - template <> struct Integer {}; - template <> struct Integer {}; - template <> struct Integer {}; -# if defined(BOOST_HAS_LONG_LONG) - template <> struct Integer< ::boost::long_long_type> {}; - template <> struct Integer< ::boost::ulong_long_type> {}; -# elif defined(BOOST_HAS_MS_INT64) - template <> struct Integer<__int64> {}; - template <> struct Integer {}; -# endif - - BOOST_concept(SignedInteger,(T)) { - BOOST_CONCEPT_USAGE(SignedInteger) { - x.error_type_must_be_a_signed_integer_type(); - } - private: - T x; - }; - template <> struct SignedInteger { }; - template <> struct SignedInteger {}; - template <> struct SignedInteger {}; - template <> struct SignedInteger {}; -# if defined(BOOST_HAS_LONG_LONG) - template <> struct SignedInteger< ::boost::long_long_type> {}; -# elif defined(BOOST_HAS_MS_INT64) - template <> struct SignedInteger<__int64> {}; -# endif - - BOOST_concept(UnsignedInteger,(T)) { - BOOST_CONCEPT_USAGE(UnsignedInteger) { - x.error_type_must_be_an_unsigned_integer_type(); - } - private: - T x; - }; - - template <> struct UnsignedInteger {}; - template <> struct UnsignedInteger {}; - template <> struct UnsignedInteger {}; - template <> struct UnsignedInteger {}; -# if defined(BOOST_HAS_LONG_LONG) - template <> struct UnsignedInteger< ::boost::ulong_long_type> {}; -# elif defined(BOOST_HAS_MS_INT64) - template <> struct UnsignedInteger {}; -# endif - - //=========================================================================== - // Basic Concepts - - BOOST_concept(DefaultConstructible,(TT)) - { - BOOST_CONCEPT_USAGE(DefaultConstructible) { - TT a; // require default constructor - ignore_unused_variable_warning(a); - } - }; - - BOOST_concept(Assignable,(TT)) - { - BOOST_CONCEPT_USAGE(Assignable) { -#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL - a = b; // require assignment operator -#endif - const_constraints(b); - } - private: - void const_constraints(const TT& x) { -#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL - a = x; // const required for argument to assignment -#else - ignore_unused_variable_warning(x); -#endif - } - private: - TT a; - TT b; - }; - - - BOOST_concept(CopyConstructible,(TT)) - { - BOOST_CONCEPT_USAGE(CopyConstructible) { - TT a(b); // require copy constructor - TT* ptr = &a; // require address of operator - const_constraints(a); - ignore_unused_variable_warning(ptr); - } - private: - void const_constraints(const TT& a) { - TT c(a); // require const copy constructor - const TT* ptr = &a; // require const address of operator - ignore_unused_variable_warning(c); - ignore_unused_variable_warning(ptr); - } - TT b; - }; - - // The SGI STL version of Assignable requires copy constructor and operator= - BOOST_concept(SGIAssignable,(TT)) - { - BOOST_CONCEPT_USAGE(SGIAssignable) { - TT c(a); -#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL - a = b; // require assignment operator -#endif - const_constraints(b); - ignore_unused_variable_warning(c); - } - private: - void const_constraints(const TT& x) { - TT c(x); -#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL - a = x; // const required for argument to assignment -#endif - ignore_unused_variable_warning(c); - } - TT a; - TT b; - }; - - BOOST_concept(Convertible,(X)(Y)) - { - BOOST_CONCEPT_USAGE(Convertible) { - Y y = x; - ignore_unused_variable_warning(y); - } - private: - X x; - }; - - // The C++ standard requirements for many concepts talk about return - // types that must be "convertible to bool". The problem with this - // requirement is that it leaves the door open for evil proxies that - // define things like operator|| with strange return types. Two - // possible solutions are: - // 1) require the return type to be exactly bool - // 2) stay with convertible to bool, and also - // specify stuff about all the logical operators. - // For now we just test for convertible to bool. - template - void require_boolean_expr(const TT& t) { - bool x = t; - ignore_unused_variable_warning(x); - } - - BOOST_concept(EqualityComparable,(TT)) - { - BOOST_CONCEPT_USAGE(EqualityComparable) { - require_boolean_expr(a == b); - require_boolean_expr(a != b); - } - private: - TT a, b; - }; - - BOOST_concept(LessThanComparable,(TT)) - { - BOOST_CONCEPT_USAGE(LessThanComparable) { - require_boolean_expr(a < b); - } - private: - TT a, b; - }; - - // This is equivalent to SGI STL's LessThanComparable. - BOOST_concept(Comparable,(TT)) - { - BOOST_CONCEPT_USAGE(Comparable) { - require_boolean_expr(a < b); - require_boolean_expr(a > b); - require_boolean_expr(a <= b); - require_boolean_expr(a >= b); - } - private: - TT a, b; - }; - -#define BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(OP,NAME) \ - BOOST_concept(NAME, (First)(Second)) \ - { \ - BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \ - private: \ - bool constraints_() { return a OP b; } \ - First a; \ - Second b; \ - } - -#define BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(OP,NAME) \ - BOOST_concept(NAME, (Ret)(First)(Second)) \ - { \ - BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \ - private: \ - Ret constraints_() { return a OP b; } \ - First a; \ - Second b; \ - } - - BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, EqualOp); - BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, NotEqualOp); - BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, LessThanOp); - BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, LessEqualOp); - BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, GreaterThanOp); - BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, GreaterEqualOp); - - BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, PlusOp); - BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, TimesOp); - BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, DivideOp); - BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, SubtractOp); - BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, ModOp); - - //=========================================================================== - // Function Object Concepts - - BOOST_concept(Generator,(Func)(Return)) - { - BOOST_CONCEPT_USAGE(Generator) { test(is_void()); } - - private: - void test(boost::mpl::false_) - { - // Do we really want a reference here? - const Return& r = f(); - ignore_unused_variable_warning(r); - } - - void test(boost::mpl::true_) - { - f(); - } - - Func f; - }; - - BOOST_concept(UnaryFunction,(Func)(Return)(Arg)) - { - BOOST_CONCEPT_USAGE(UnaryFunction) { test(is_void()); } - - private: - void test(boost::mpl::false_) - { - f(arg); // "priming the pump" this way keeps msvc6 happy (ICE) - Return r = f(arg); - ignore_unused_variable_warning(r); - } - - void test(boost::mpl::true_) - { - f(arg); - } - -#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ - && BOOST_WORKAROUND(__GNUC__, > 3))) - // Declare a dummy construktor to make gcc happy. - // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. - // (warning: non-static reference "const double& boost::UnaryFunction::arg" - // in class without a constructor [-Wuninitialized]) - UnaryFunction(); -#endif - - Func f; - Arg arg; - }; - - BOOST_concept(BinaryFunction,(Func)(Return)(First)(Second)) - { - BOOST_CONCEPT_USAGE(BinaryFunction) { test(is_void()); } - private: - void test(boost::mpl::false_) - { - f(first,second); - Return r = f(first, second); // require operator() - (void)r; - } - - void test(boost::mpl::true_) - { - f(first,second); - } - -#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ - && BOOST_WORKAROUND(__GNUC__, > 3))) - // Declare a dummy constructor to make gcc happy. - // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. - // (warning: non-static reference "const double& boost::BinaryFunction::arg" - // in class without a constructor [-Wuninitialized]) - BinaryFunction(); -#endif - - Func f; - First first; - Second second; - }; - - BOOST_concept(UnaryPredicate,(Func)(Arg)) - { - BOOST_CONCEPT_USAGE(UnaryPredicate) { - require_boolean_expr(f(arg)); // require operator() returning bool - } - private: -#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ - && BOOST_WORKAROUND(__GNUC__, > 3))) - // Declare a dummy constructor to make gcc happy. - // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. - // (warning: non-static reference "const double& boost::UnaryPredicate::arg" - // in class without a constructor [-Wuninitialized]) - UnaryPredicate(); -#endif - - Func f; - Arg arg; - }; - - BOOST_concept(BinaryPredicate,(Func)(First)(Second)) - { - BOOST_CONCEPT_USAGE(BinaryPredicate) { - require_boolean_expr(f(a, b)); // require operator() returning bool - } - private: -#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ - && BOOST_WORKAROUND(__GNUC__, > 3))) - // Declare a dummy constructor to make gcc happy. - // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. - // (warning: non-static reference "const double& boost::BinaryPredicate::arg" - // in class without a constructor [-Wuninitialized]) - BinaryPredicate(); -#endif - Func f; - First a; - Second b; - }; - - // use this when functor is used inside a container class like std::set - BOOST_concept(Const_BinaryPredicate,(Func)(First)(Second)) - : BinaryPredicate - { - BOOST_CONCEPT_USAGE(Const_BinaryPredicate) { - const_constraints(f); - } - private: - void const_constraints(const Func& fun) { - // operator() must be a const member function - require_boolean_expr(fun(a, b)); - } -#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \ - && BOOST_WORKAROUND(__GNUC__, > 3))) - // Declare a dummy constructor to make gcc happy. - // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type. - // (warning: non-static reference "const double& boost::Const_BinaryPredicate::arg" - // in class without a constructor [-Wuninitialized]) - Const_BinaryPredicate(); -#endif - - Func f; - First a; - Second b; - }; - - BOOST_concept(AdaptableGenerator,(Func)(Return)) - : Generator - { - typedef typename Func::result_type result_type; - - BOOST_CONCEPT_USAGE(AdaptableGenerator) - { - BOOST_CONCEPT_ASSERT((Convertible)); - } - }; - - BOOST_concept(AdaptableUnaryFunction,(Func)(Return)(Arg)) - : UnaryFunction - { - typedef typename Func::argument_type argument_type; - typedef typename Func::result_type result_type; - - ~AdaptableUnaryFunction() - { - BOOST_CONCEPT_ASSERT((Convertible)); - BOOST_CONCEPT_ASSERT((Convertible)); - } - }; - - BOOST_concept(AdaptableBinaryFunction,(Func)(Return)(First)(Second)) - : BinaryFunction< - Func - , typename Func::result_type - , typename Func::first_argument_type - , typename Func::second_argument_type - > - { - typedef typename Func::first_argument_type first_argument_type; - typedef typename Func::second_argument_type second_argument_type; - typedef typename Func::result_type result_type; - - ~AdaptableBinaryFunction() - { - BOOST_CONCEPT_ASSERT((Convertible)); - BOOST_CONCEPT_ASSERT((Convertible)); - BOOST_CONCEPT_ASSERT((Convertible)); - } - }; - - BOOST_concept(AdaptablePredicate,(Func)(Arg)) - : UnaryPredicate - , AdaptableUnaryFunction - { - }; - - BOOST_concept(AdaptableBinaryPredicate,(Func)(First)(Second)) - : BinaryPredicate - , AdaptableBinaryFunction - { - }; - - //=========================================================================== - // Iterator Concepts - - BOOST_concept(InputIterator,(TT)) - : Assignable - , EqualityComparable - { - typedef typename std::iterator_traits::value_type value_type; - typedef typename std::iterator_traits::difference_type difference_type; - typedef typename std::iterator_traits::reference reference; - typedef typename std::iterator_traits::pointer pointer; - typedef typename std::iterator_traits::iterator_category iterator_category; - - BOOST_CONCEPT_USAGE(InputIterator) - { - BOOST_CONCEPT_ASSERT((SignedInteger)); - BOOST_CONCEPT_ASSERT((Convertible)); - - TT j(i); - (void)*i; // require dereference operator - ++j; // require preincrement operator - i++; // require postincrement operator - } - private: - TT i; - }; - - BOOST_concept(OutputIterator,(TT)(ValueT)) - : Assignable - { - BOOST_CONCEPT_USAGE(OutputIterator) { - - ++i; // require preincrement operator - i++; // require postincrement operator - *i++ = t; // require postincrement and assignment - } - private: - TT i, j; - ValueT t; - }; - - BOOST_concept(ForwardIterator,(TT)) - : InputIterator - { - BOOST_CONCEPT_USAGE(ForwardIterator) - { - BOOST_CONCEPT_ASSERT((Convertible< - BOOST_DEDUCED_TYPENAME ForwardIterator::iterator_category - , std::forward_iterator_tag - >)); - - typename InputIterator::reference r = *i; - ignore_unused_variable_warning(r); - } - - private: - TT i; - }; - - BOOST_concept(Mutable_ForwardIterator,(TT)) - : ForwardIterator - { - BOOST_CONCEPT_USAGE(Mutable_ForwardIterator) { - *i++ = *j; // require postincrement and assignment - } - private: - TT i, j; - }; - - BOOST_concept(BidirectionalIterator,(TT)) - : ForwardIterator - { - BOOST_CONCEPT_USAGE(BidirectionalIterator) - { - BOOST_CONCEPT_ASSERT((Convertible< - BOOST_DEDUCED_TYPENAME BidirectionalIterator::iterator_category - , std::bidirectional_iterator_tag - >)); - - --i; // require predecrement operator - i--; // require postdecrement operator - } - private: - TT i; - }; - - BOOST_concept(Mutable_BidirectionalIterator,(TT)) - : BidirectionalIterator - , Mutable_ForwardIterator - { - BOOST_CONCEPT_USAGE(Mutable_BidirectionalIterator) - { - *i-- = *j; // require postdecrement and assignment - } - private: - TT i, j; - }; - - BOOST_concept(RandomAccessIterator,(TT)) - : BidirectionalIterator - , Comparable - { - BOOST_CONCEPT_USAGE(RandomAccessIterator) - { - BOOST_CONCEPT_ASSERT((Convertible< - BOOST_DEDUCED_TYPENAME BidirectionalIterator::iterator_category - , std::random_access_iterator_tag - >)); - - i += n; // require assignment addition operator - i = i + n; i = n + i; // require addition with difference type - i -= n; // require assignment subtraction operator - i = i - n; // require subtraction with difference type - n = i - j; // require difference operator - (void)i[n]; // require element access operator - } - - private: - TT a, b; - TT i, j; - typename std::iterator_traits::difference_type n; - }; - - BOOST_concept(Mutable_RandomAccessIterator,(TT)) - : RandomAccessIterator - , Mutable_BidirectionalIterator - { - BOOST_CONCEPT_USAGE(Mutable_RandomAccessIterator) - { - i[n] = *i; // require element access and assignment - } - private: - TT i; - typename std::iterator_traits::difference_type n; - }; - - //=========================================================================== - // Container s - - BOOST_concept(Container,(C)) - : Assignable - { - typedef typename C::value_type value_type; - typedef typename C::difference_type difference_type; - typedef typename C::size_type size_type; - typedef typename C::const_reference const_reference; - typedef typename C::const_pointer const_pointer; - typedef typename C::const_iterator const_iterator; - - BOOST_CONCEPT_USAGE(Container) - { - BOOST_CONCEPT_ASSERT((InputIterator)); - const_constraints(c); - } - - private: - void const_constraints(const C& cc) { - i = cc.begin(); - i = cc.end(); - n = cc.size(); - n = cc.max_size(); - b = cc.empty(); - } - C c; - bool b; - const_iterator i; - size_type n; - }; - - BOOST_concept(Mutable_Container,(C)) - : Container - { - typedef typename C::reference reference; - typedef typename C::iterator iterator; - typedef typename C::pointer pointer; - - BOOST_CONCEPT_USAGE(Mutable_Container) - { - BOOST_CONCEPT_ASSERT(( - Assignable)); - - BOOST_CONCEPT_ASSERT((InputIterator)); - - i = c.begin(); - i = c.end(); - c.swap(c2); - } - - private: - iterator i; - C c, c2; - }; - - BOOST_concept(ForwardContainer,(C)) - : Container - { - BOOST_CONCEPT_USAGE(ForwardContainer) - { - BOOST_CONCEPT_ASSERT(( - ForwardIterator< - typename ForwardContainer::const_iterator - >)); - } - }; - - BOOST_concept(Mutable_ForwardContainer,(C)) - : ForwardContainer - , Mutable_Container - { - BOOST_CONCEPT_USAGE(Mutable_ForwardContainer) - { - BOOST_CONCEPT_ASSERT(( - Mutable_ForwardIterator< - typename Mutable_ForwardContainer::iterator - >)); - } - }; - - BOOST_concept(ReversibleContainer,(C)) - : ForwardContainer - { - typedef typename - C::const_reverse_iterator - const_reverse_iterator; - - BOOST_CONCEPT_USAGE(ReversibleContainer) - { - BOOST_CONCEPT_ASSERT(( - BidirectionalIterator< - typename ReversibleContainer::const_iterator>)); - - BOOST_CONCEPT_ASSERT((BidirectionalIterator)); - - const_constraints(c); - } - private: - void const_constraints(const C& cc) - { - const_reverse_iterator i = cc.rbegin(); - i = cc.rend(); - } - C c; - }; - - BOOST_concept(Mutable_ReversibleContainer,(C)) - : Mutable_ForwardContainer - , ReversibleContainer - { - typedef typename C::reverse_iterator reverse_iterator; - - BOOST_CONCEPT_USAGE(Mutable_ReversibleContainer) - { - typedef typename Mutable_ForwardContainer::iterator iterator; - BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator)); - BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator)); - - reverse_iterator i = c.rbegin(); - i = c.rend(); - } - private: - C c; - }; - - BOOST_concept(RandomAccessContainer,(C)) - : ReversibleContainer - { - typedef typename C::size_type size_type; - typedef typename C::const_reference const_reference; - - BOOST_CONCEPT_USAGE(RandomAccessContainer) - { - BOOST_CONCEPT_ASSERT(( - RandomAccessIterator< - typename RandomAccessContainer::const_iterator - >)); - - const_constraints(c); - } - private: - void const_constraints(const C& cc) - { - const_reference r = cc[n]; - ignore_unused_variable_warning(r); - } - - C c; - size_type n; - }; - - BOOST_concept(Mutable_RandomAccessContainer,(C)) - : Mutable_ReversibleContainer - , RandomAccessContainer - { - private: - typedef Mutable_RandomAccessContainer self; - public: - BOOST_CONCEPT_USAGE(Mutable_RandomAccessContainer) - { - BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator)); - BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator)); - - typename self::reference r = c[i]; - ignore_unused_variable_warning(r); - } - - private: - typename Mutable_ReversibleContainer::size_type i; - C c; - }; - - // A Sequence is inherently mutable - BOOST_concept(Sequence,(S)) - : Mutable_ForwardContainer - // Matt Austern's book puts DefaultConstructible here, the C++ - // standard places it in Container --JGS - // ... so why aren't we following the standard? --DWA - , DefaultConstructible - { - BOOST_CONCEPT_USAGE(Sequence) - { - S - c(n, t), - c2(first, last); - - c.insert(p, t); - c.insert(p, n, t); - c.insert(p, first, last); - - c.erase(p); - c.erase(p, q); - - typename Sequence::reference r = c.front(); - - ignore_unused_variable_warning(c); - ignore_unused_variable_warning(c2); - ignore_unused_variable_warning(r); - const_constraints(c); - } - private: - void const_constraints(const S& c) { - typename Sequence::const_reference r = c.front(); - ignore_unused_variable_warning(r); - } - - typename S::value_type t; - typename S::size_type n; - typename S::value_type* first, *last; - typename S::iterator p, q; - }; - - BOOST_concept(FrontInsertionSequence,(S)) - : Sequence - { - BOOST_CONCEPT_USAGE(FrontInsertionSequence) - { - c.push_front(t); - c.pop_front(); - } - private: - S c; - typename S::value_type t; - }; - - BOOST_concept(BackInsertionSequence,(S)) - : Sequence - { - BOOST_CONCEPT_USAGE(BackInsertionSequence) - { - c.push_back(t); - c.pop_back(); - typename BackInsertionSequence::reference r = c.back(); - ignore_unused_variable_warning(r); - const_constraints(c); - } - private: - void const_constraints(const S& cc) { - typename BackInsertionSequence::const_reference - r = cc.back(); - ignore_unused_variable_warning(r); - } - S c; - typename S::value_type t; - }; - - BOOST_concept(AssociativeContainer,(C)) - : ForwardContainer - , DefaultConstructible - { - typedef typename C::key_type key_type; - typedef typename C::key_compare key_compare; - typedef typename C::value_compare value_compare; - typedef typename C::iterator iterator; - - BOOST_CONCEPT_USAGE(AssociativeContainer) - { - i = c.find(k); - r = c.equal_range(k); - c.erase(k); - c.erase(i); - c.erase(r.first, r.second); - const_constraints(c); - BOOST_CONCEPT_ASSERT((BinaryPredicate)); - - typedef typename AssociativeContainer::value_type value_type_; - BOOST_CONCEPT_ASSERT((BinaryPredicate)); - } - - // Redundant with the base concept, but it helps below. - typedef typename C::const_iterator const_iterator; - private: - void const_constraints(const C& cc) - { - ci = cc.find(k); - n = cc.count(k); - cr = cc.equal_range(k); - } - - C c; - iterator i; - std::pair r; - const_iterator ci; - std::pair cr; - typename C::key_type k; - typename C::size_type n; - }; - - BOOST_concept(UniqueAssociativeContainer,(C)) - : AssociativeContainer - { - BOOST_CONCEPT_USAGE(UniqueAssociativeContainer) - { - C c(first, last); - - pos_flag = c.insert(t); - c.insert(first, last); - - ignore_unused_variable_warning(c); - } - private: - std::pair pos_flag; - typename C::value_type t; - typename C::value_type* first, *last; - }; - - BOOST_concept(MultipleAssociativeContainer,(C)) - : AssociativeContainer - { - BOOST_CONCEPT_USAGE(MultipleAssociativeContainer) - { - C c(first, last); - - pos = c.insert(t); - c.insert(first, last); - - ignore_unused_variable_warning(c); - ignore_unused_variable_warning(pos); - } - private: - typename C::iterator pos; - typename C::value_type t; - typename C::value_type* first, *last; - }; - - BOOST_concept(SimpleAssociativeContainer,(C)) - : AssociativeContainer - { - BOOST_CONCEPT_USAGE(SimpleAssociativeContainer) - { - typedef typename C::key_type key_type; - typedef typename C::value_type value_type; - BOOST_MPL_ASSERT((boost::is_same)); - } - }; - - BOOST_concept(PairAssociativeContainer,(C)) - : AssociativeContainer - { - BOOST_CONCEPT_USAGE(PairAssociativeContainer) - { - typedef typename C::key_type key_type; - typedef typename C::value_type value_type; - typedef typename C::mapped_type mapped_type; - typedef std::pair required_value_type; - BOOST_MPL_ASSERT((boost::is_same)); - } - }; - - BOOST_concept(SortedAssociativeContainer,(C)) - : AssociativeContainer - , ReversibleContainer - { - BOOST_CONCEPT_USAGE(SortedAssociativeContainer) - { - C - c(kc), - c2(first, last), - c3(first, last, kc); - - p = c.upper_bound(k); - p = c.lower_bound(k); - r = c.equal_range(k); - - c.insert(p, t); - - ignore_unused_variable_warning(c); - ignore_unused_variable_warning(c2); - ignore_unused_variable_warning(c3); - const_constraints(c); - } - - void const_constraints(const C& c) - { - kc = c.key_comp(); - vc = c.value_comp(); - - cp = c.upper_bound(k); - cp = c.lower_bound(k); - cr = c.equal_range(k); - } - - private: - typename C::key_compare kc; - typename C::value_compare vc; - typename C::value_type t; - typename C::key_type k; - typedef typename C::iterator iterator; - typedef typename C::const_iterator const_iterator; - - typedef SortedAssociativeContainer self; - iterator p; - const_iterator cp; - std::pair r; - std::pair cr; - typename C::value_type* first, *last; - }; - - // HashedAssociativeContainer - - BOOST_concept(Collection,(C)) - { - BOOST_CONCEPT_USAGE(Collection) - { - boost::function_requires >(); - boost::function_requires >(); - boost::function_requires >(); - const_constraints(c); - i = c.begin(); - i = c.end(); - c.swap(c); - } - - void const_constraints(const C& cc) { - ci = cc.begin(); - ci = cc.end(); - n = cc.size(); - b = cc.empty(); - } - - private: - typedef typename C::value_type value_type; - typedef typename C::iterator iterator; - typedef typename C::const_iterator const_iterator; - typedef typename C::reference reference; - typedef typename C::const_reference const_reference; - // typedef typename C::pointer pointer; - typedef typename C::difference_type difference_type; - typedef typename C::size_type size_type; - - C c; - bool b; - iterator i; - const_iterator ci; - size_type n; - }; -} // namespace boost - -#if (defined _MSC_VER) -# pragma warning( pop ) -#endif - -# include - -#endif // BOOST_CONCEPT_CHECKS_HPP - diff --git a/contrib/libboost/boost_1_65_0/boost/config.hpp b/contrib/libboost/boost_1_65_0/boost/config.hpp deleted file mode 100644 index f00a9805790..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config.hpp +++ /dev/null @@ -1,67 +0,0 @@ -// Boost config.hpp configuration header file ------------------------------// - -// (C) Copyright John Maddock 2002. -// 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/config for most recent version. - -// Boost config.hpp policy and rationale documentation has been moved to -// http://www.boost.org/libs/config -// -// CAUTION: This file is intended to be completely stable - -// DO NOT MODIFY THIS FILE! -// - -#ifndef BOOST_CONFIG_HPP -#define BOOST_CONFIG_HPP - -// if we don't have a user config, then use the default location: -#if !defined(BOOST_USER_CONFIG) && !defined(BOOST_NO_USER_CONFIG) -# define BOOST_USER_CONFIG -#if 0 -// For dependency trackers: -# include -#endif -#endif -// include it first: -#ifdef BOOST_USER_CONFIG -# include BOOST_USER_CONFIG -#endif - -// 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 -#endif -// if we have a compiler config, include it now: -#ifdef BOOST_COMPILER_CONFIG -# include BOOST_COMPILER_CONFIG -#endif - -// 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 -#endif -// if we have a std library config, include it now: -#ifdef BOOST_STDLIB_CONFIG -# include BOOST_STDLIB_CONFIG -#endif - -// 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 -#endif -// if we have a platform config, include it now: -#ifdef BOOST_PLATFORM_CONFIG -# include BOOST_PLATFORM_CONFIG -#endif - -// get config suffix code: -#include - -#ifdef BOOST_HAS_PRAGMA_ONCE -#pragma once -#endif - -#endif // BOOST_CONFIG_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/config/abi/borland_prefix.hpp b/contrib/libboost/boost_1_65_0/boost/config/abi/borland_prefix.hpp deleted file mode 100644 index 3a0e5ae2d77..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/abi/borland_prefix.hpp +++ /dev/null @@ -1,27 +0,0 @@ -// (C) Copyright John Maddock 2003. -// 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) - -// for C++ Builder the following options effect the ABI: -// -// -b (on or off - effect emum sizes) -// -Vx (on or off - empty members) -// -Ve (on or off - empty base classes) -// -aX (alignment - 5 options). -// -pX (Calling convention - 4 options) -// -VmX (member pointer size and layout - 5 options) -// -VC (on or off, changes name mangling) -// -Vl (on or off, changes struct layout). - -// In addition the following warnings are sufficiently annoying (and -// unfixable) to have them turned off by default: -// -// 8027 - functions containing [for|while] loops are not expanded inline -// 8026 - functions taking class by value arguments are not expanded inline - -#pragma nopushoptwarn -# pragma option push -a8 -Vx- -Ve- -b- -pc -Vmv -VC- -Vl- -w-8027 -w-8026 - - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/abi/borland_suffix.hpp b/contrib/libboost/boost_1_65_0/boost/config/abi/borland_suffix.hpp deleted file mode 100644 index 940535f3819..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/abi/borland_suffix.hpp +++ /dev/null @@ -1,12 +0,0 @@ -// (C) Copyright John Maddock 2003. -// 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) - -# pragma option pop -#pragma nopushoptwarn - - - - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/abi/msvc_prefix.hpp b/contrib/libboost/boost_1_65_0/boost/config/abi/msvc_prefix.hpp deleted file mode 100644 index 97f06cdc0c2..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/abi/msvc_prefix.hpp +++ /dev/null @@ -1,22 +0,0 @@ -// (C) Copyright John Maddock 2003. -// 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) - -// -// Boost binaries are built with the compiler's default ABI settings, -// if the user changes their default alignment in the VS IDE then their -// code will no longer be binary compatible with the bjam built binaries -// unless this header is included to force Boost code into a consistent ABI. -// -// Note that inclusion of this header is only necessary for libraries with -// separate source, header only libraries DO NOT need this as long as all -// translation units are built with the same options. -// -#if defined(_M_X64) -# pragma pack(push,16) -#else -# pragma pack(push,8) -#endif - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/abi/msvc_suffix.hpp b/contrib/libboost/boost_1_65_0/boost/config/abi/msvc_suffix.hpp deleted file mode 100644 index a64d783eb0f..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/abi/msvc_suffix.hpp +++ /dev/null @@ -1,8 +0,0 @@ -// (C) Copyright John Maddock 2003. -// 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) - -#pragma pack(pop) - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/abi_prefix.hpp b/contrib/libboost/boost_1_65_0/boost/config/abi_prefix.hpp deleted file mode 100644 index 3b1347492ca..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/abi_prefix.hpp +++ /dev/null @@ -1,25 +0,0 @@ -// abi_prefix header -------------------------------------------------------// - -// (c) Copyright John Maddock 2003 - -// 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). - -#ifndef BOOST_CONFIG_ABI_PREFIX_HPP -# define BOOST_CONFIG_ABI_PREFIX_HPP -#else -# error double inclusion of header boost/config/abi_prefix.hpp is an error -#endif - -#include - -// this must occur after all other includes and before any code appears: -#ifdef BOOST_HAS_ABI_HEADERS -# include BOOST_ABI_PREFIX -#endif - -#if defined( __BORLANDC__ ) -#pragma nopushoptwarn -#endif - diff --git a/contrib/libboost/boost_1_65_0/boost/config/abi_suffix.hpp b/contrib/libboost/boost_1_65_0/boost/config/abi_suffix.hpp deleted file mode 100644 index 939161662ae..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/abi_suffix.hpp +++ /dev/null @@ -1,27 +0,0 @@ -// abi_sufffix header -------------------------------------------------------// - -// (c) Copyright John Maddock 2003 - -// 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). - -// This header should be #included AFTER code that was preceded by a #include -// . - -#ifndef BOOST_CONFIG_ABI_PREFIX_HPP -# error Header boost/config/abi_suffix.hpp must only be used after boost/config/abi_prefix.hpp -#else -# undef BOOST_CONFIG_ABI_PREFIX_HPP -#endif - -// the suffix header occurs after all of our code: -#ifdef BOOST_HAS_ABI_HEADERS -# include BOOST_ABI_SUFFIX -#endif - -#if defined( __BORLANDC__ ) -#pragma nopushoptwarn -#endif - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/auto_link.hpp b/contrib/libboost/boost_1_65_0/boost/config/auto_link.hpp deleted file mode 100644 index c71e8035dda..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/auto_link.hpp +++ /dev/null @@ -1,444 +0,0 @@ -// (C) Copyright John Maddock 2003. -// 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) - - /* - * LOCATION: see http://www.boost.org for most recent version. - * FILE auto_link.hpp - * VERSION see - * DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers. - */ - -/************************************************************************* - -USAGE: -~~~~~~ - -Before including this header you must define one or more of define the following macros: - -BOOST_LIB_NAME: Required: A string containing the basename of the library, - for example boost_regex. -BOOST_LIB_TOOLSET: Optional: the base name of the toolset. -BOOST_DYN_LINK: Optional: when set link to dll rather than static library. -BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name - of the library selected (useful for debugging). -BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib, - rather than a mangled-name version. -BOOST_AUTO_LINK_TAGGED: Specifies that we link to libraries built with the --layout=tagged option. - This is essentially the same as the default name-mangled version, but without - the compiler name and version, or the Boost version. Just the build options. - -These macros will be undef'ed at the end of the header, further this header -has no include guards - so be sure to include it only once from your library! - -Algorithm: -~~~~~~~~~~ - -Libraries for Borland and Microsoft compilers are automatically -selected here, the name of the lib is selected according to the following -formula: - -BOOST_LIB_PREFIX - + BOOST_LIB_NAME - + "_" - + BOOST_LIB_TOOLSET - + BOOST_LIB_THREAD_OPT - + BOOST_LIB_RT_OPT - "-" - + BOOST_LIB_VERSION - -These are defined as: - -BOOST_LIB_PREFIX: "lib" for static libraries otherwise "". - -BOOST_LIB_NAME: The base name of the lib ( for example boost_regex). - -BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc). - -BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing. - -BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used, - contains one or more of the following letters after - a hyphen: - - s static runtime (dynamic if not present). - g debug/diagnostic runtime (release if not present). - y Python debug/diagnostic runtime (release if not present). - d debug build (release if not present). - p STLport build. - n STLport build without its IOStreams. - -BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y. - - -***************************************************************************/ - -#ifdef __cplusplus -# ifndef BOOST_CONFIG_HPP -# include -# endif -#elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__) -// -// C language compatability (no, honestly) -// -# define BOOST_MSVC _MSC_VER -# define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X) -# define BOOST_DO_STRINGIZE(X) #X -#endif -// -// Only include what follows for known and supported compilers: -// -#if defined(BOOST_MSVC) \ - || defined(__BORLANDC__) \ - || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \ - || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200)) - -#ifndef BOOST_VERSION_HPP -# include -#endif - -#ifndef BOOST_LIB_NAME -# error "Macro BOOST_LIB_NAME not set (internal error)" -#endif - -// -// error check: -// -#if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG) -# pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors") -# pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes") -# error "Incompatible build options" -#endif -// -// select toolset if not defined already: -// -#ifndef BOOST_LIB_TOOLSET -# if defined(BOOST_MSVC) && (BOOST_MSVC < 1200) - // Note: no compilers before 1200 are supported -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1300) - -# ifdef UNDER_CE - // eVC4: -# define BOOST_LIB_TOOLSET "evc4" -# else - // vc6: -# define BOOST_LIB_TOOLSET "vc6" -# endif - -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1310) - - // vc7: -# define BOOST_LIB_TOOLSET "vc7" - -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1400) - - // vc71: -# define BOOST_LIB_TOOLSET "vc71" - -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1500) - - // vc80: -# define BOOST_LIB_TOOLSET "vc80" - -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1600) - - // vc90: -# define BOOST_LIB_TOOLSET "vc90" - -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1700) - - // vc10: -# define BOOST_LIB_TOOLSET "vc100" - -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1800) - - // vc11: -# define BOOST_LIB_TOOLSET "vc110" - -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1900) - - // vc12: -# define BOOST_LIB_TOOLSET "vc120" - -# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1910) - - // vc14: -# define BOOST_LIB_TOOLSET "vc140" - -# elif defined(BOOST_MSVC) - - // vc14.1: -# define BOOST_LIB_TOOLSET "vc141" - -# elif defined(__BORLANDC__) - - // CBuilder 6: -# define BOOST_LIB_TOOLSET "bcb" - -# elif defined(__ICL) - - // Intel C++, no version number: -# define BOOST_LIB_TOOLSET "iw" - -# elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF ) - - // Metrowerks CodeWarrior 8.x -# define BOOST_LIB_TOOLSET "cw8" - -# elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF ) - - // Metrowerks CodeWarrior 9.x -# define BOOST_LIB_TOOLSET "cw9" - -# endif -#endif // BOOST_LIB_TOOLSET - -// -// select thread opt: -// -#if defined(_MT) || defined(__MT__) -# define BOOST_LIB_THREAD_OPT "-mt" -#else -# define BOOST_LIB_THREAD_OPT -#endif - -#if defined(_MSC_VER) || defined(__MWERKS__) - -# ifdef _DLL - -# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS)) - -# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-gydp" -# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) -# define BOOST_LIB_RT_OPT "-gdp" -# elif defined(_DEBUG)\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-gydp" -# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") -# error "Build options aren't compatible with pre-built libraries" -# elif defined(_DEBUG) -# define BOOST_LIB_RT_OPT "-gdp" -# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") -# error "Build options aren't compatible with pre-built libraries" -# else -# define BOOST_LIB_RT_OPT "-p" -# endif - -# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) - -# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-gydpn" -# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) -# define BOOST_LIB_RT_OPT "-gdpn" -# elif defined(_DEBUG)\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-gydpn" -# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") -# error "Build options aren't compatible with pre-built libraries" -# elif defined(_DEBUG) -# define BOOST_LIB_RT_OPT "-gdpn" -# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") -# error "Build options aren't compatible with pre-built libraries" -# else -# define BOOST_LIB_RT_OPT "-pn" -# endif - -# else - -# if defined(_DEBUG) && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-gyd" -# elif defined(_DEBUG) -# define BOOST_LIB_RT_OPT "-gd" -# else -# define BOOST_LIB_RT_OPT -# endif - -# endif - -# else - -# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS)) - -# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-sgydp" -# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) -# define BOOST_LIB_RT_OPT "-sgdp" -# elif defined(_DEBUG)\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-sgydp" -# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") -# error "Build options aren't compatible with pre-built libraries" -# elif defined(_DEBUG) -# define BOOST_LIB_RT_OPT "-sgdp" -# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") -# error "Build options aren't compatible with pre-built libraries" -# else -# define BOOST_LIB_RT_OPT "-sp" -# endif - -# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) - -# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-sgydpn" -# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG)) -# define BOOST_LIB_RT_OPT "-sgdpn" -# elif defined(_DEBUG)\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-sgydpn" -# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") -# error "Build options aren't compatible with pre-built libraries" -# elif defined(_DEBUG) -# define BOOST_LIB_RT_OPT "-sgdpn" -# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1") -# error "Build options aren't compatible with pre-built libraries" -# else -# define BOOST_LIB_RT_OPT "-spn" -# endif - -# else - -# if defined(_DEBUG)\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-sgyd" -# elif defined(_DEBUG) -# define BOOST_LIB_RT_OPT "-sgd" -# else -# define BOOST_LIB_RT_OPT "-s" -# endif - -# endif - -# endif - -#elif defined(__BORLANDC__) - -// -// figure out whether we want the debug builds or not: -// -#if __BORLANDC__ > 0x561 -#pragma defineonoption BOOST_BORLAND_DEBUG -v -#endif -// -// sanity check: -// -#if defined(__STL_DEBUG) || defined(_STLP_DEBUG) -#error "Pre-built versions of the Boost libraries are not provided in STLport-debug form" -#endif - -# ifdef _RTLDLL - -# if defined(BOOST_BORLAND_DEBUG)\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-yd" -# elif defined(BOOST_BORLAND_DEBUG) -# define BOOST_LIB_RT_OPT "-d" -# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT -y -# else -# define BOOST_LIB_RT_OPT -# endif - -# else - -# if defined(BOOST_BORLAND_DEBUG)\ - && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-syd" -# elif defined(BOOST_BORLAND_DEBUG) -# define BOOST_LIB_RT_OPT "-sd" -# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON) -# define BOOST_LIB_RT_OPT "-sy" -# else -# define BOOST_LIB_RT_OPT "-s" -# endif - -# endif - -#endif - -// -// select linkage opt: -// -#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK) -# define BOOST_LIB_PREFIX -#elif defined(BOOST_DYN_LINK) -# error "Mixing a dll boost library with a static runtime is a really bad idea..." -#else -# define BOOST_LIB_PREFIX "lib" -#endif - -// -// now include the lib: -// -#if defined(BOOST_LIB_NAME) \ - && defined(BOOST_LIB_PREFIX) \ - && defined(BOOST_LIB_TOOLSET) \ - && defined(BOOST_LIB_THREAD_OPT) \ - && defined(BOOST_LIB_RT_OPT) \ - && defined(BOOST_LIB_VERSION) - -#ifdef BOOST_AUTO_LINK_TAGGED -# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib") -# ifdef BOOST_LIB_DIAGNOSTIC -# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib") -# endif -#elif defined(BOOST_AUTO_LINK_NOMANGLE) -# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib") -# ifdef BOOST_LIB_DIAGNOSTIC -# 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") -# 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") -# 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") -# 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") -# endif -#endif - -#else -# error "some required macros where not defined (internal logic error)." -#endif - - -#endif // _MSC_VER || __BORLANDC__ - -// -// finally undef any macros we may have set: -// -#ifdef BOOST_LIB_PREFIX -# undef BOOST_LIB_PREFIX -#endif -#if defined(BOOST_LIB_NAME) -# undef BOOST_LIB_NAME -#endif -// Don't undef this one: it can be set by the user and should be the -// same for all libraries: -//#if defined(BOOST_LIB_TOOLSET) -//# undef BOOST_LIB_TOOLSET -//#endif -#if defined(BOOST_LIB_THREAD_OPT) -# undef BOOST_LIB_THREAD_OPT -#endif -#if defined(BOOST_LIB_RT_OPT) -# undef BOOST_LIB_RT_OPT -#endif -#if defined(BOOST_LIB_LINK_OPT) -# undef BOOST_LIB_LINK_OPT -#endif -#if defined(BOOST_LIB_DEBUG_OPT) -# undef BOOST_LIB_DEBUG_OPT -#endif -#if defined(BOOST_DYN_LINK) -# undef BOOST_DYN_LINK -#endif - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/borland.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/borland.hpp deleted file mode 100644 index fa891def419..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/borland.hpp +++ /dev/null @@ -1,331 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright David Abrahams 2002 - 2003. -// (C) Copyright Aleksey Gurtovoy 2002. -// 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. - -// Borland C++ compiler setup: - -// -// versions check: -// we don't support Borland prior to version 5.4: -#if __BORLANDC__ < 0x540 -# error "Compiler not supported or configured - please reconfigure" -#endif - -// last known compiler version: -#if (__BORLANDC__ > 0x613) -//# 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") -//# endif -#elif (__BORLANDC__ == 0x600) -# error "CBuilderX preview compiler is no longer supported" -#endif - -// -// Support macros to help with standard library detection -#if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL) -# define BOOST_BCB_WITH_ROGUE_WAVE -#elif __BORLANDC__ < 0x570 -# define BOOST_BCB_WITH_STLPORT -#else -# define BOOST_BCB_WITH_DINKUMWARE -#endif - -// -// Version 5.0 and below: -# if __BORLANDC__ <= 0x0550 -// Borland C++Builder 4 and 5: -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -# if __BORLANDC__ == 0x0550 -// Borland C++Builder 5, command-line compiler 5.5: -# define BOOST_NO_OPERATORS_IN_NAMESPACE -# endif -// Variadic macros do not exist for C++ Builder versions 5 and below -#define BOOST_NO_CXX11_VARIADIC_MACROS -# endif - -// Version 5.51 and below: -#if (__BORLANDC__ <= 0x551) -# define BOOST_NO_CV_SPECIALIZATIONS -# define BOOST_NO_CV_VOID_SPECIALIZATIONS -# define BOOST_NO_DEDUCED_TYPENAME -// workaround for missing WCHAR_MAX/WCHAR_MIN: -#ifdef __cplusplus -#include -#include -#else -#include -#include -#endif // __cplusplus -#ifndef WCHAR_MAX -# define WCHAR_MAX 0xffff -#endif -#ifndef WCHAR_MIN -# define WCHAR_MIN 0 -#endif -#endif - -// Borland C++ Builder 6 and below: -#if (__BORLANDC__ <= 0x564) - -# if defined(NDEBUG) && defined(__cplusplus) - // fix broken so that Boost.test works: -# include -# undef strcmp -# endif - // fix broken errno declaration: -# include -# ifndef errno -# define errno errno -# endif - -#endif - -// -// new bug in 5.61: -#if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580) - // this seems to be needed by the command line compiler, but not the IDE: -# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS -#endif - -// Borland C++ Builder 2006 Update 2 and below: -#if (__BORLANDC__ <= 0x582) -# define BOOST_NO_SFINAE -# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG -# define BOOST_NO_TEMPLATE_TEMPLATES - -# define BOOST_NO_PRIVATE_IN_AGGREGATE - -# ifdef _WIN32 -# define BOOST_NO_SWPRINTF -# elif defined(linux) || defined(__linux__) || defined(__linux) - // we should really be able to do without this - // but the wcs* functions aren't imported into std:: -# define BOOST_NO_STDC_NAMESPACE - // _CPPUNWIND doesn't get automatically set for some reason: -# pragma defineonoption BOOST_CPPUNWIND -x -# endif -#endif - -#if (__BORLANDC__ <= 0x613) // Beman has asked Alisdair for more info - // we shouldn't really need this - but too many things choke - // without it, this needs more investigation: -# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS -# define BOOST_NO_IS_ABSTRACT -# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS -# define BOOST_NO_USING_TEMPLATE -# define BOOST_SP_NO_SP_CONVERTIBLE - -// Temporary workaround -#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -#endif - -// Borland C++ Builder 2008 and below: -# define BOOST_NO_INTEGRAL_INT64_T -# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE -# define BOOST_NO_NESTED_FRIENDSHIP -# define BOOST_NO_TYPENAME_WITH_CTOR -#if (__BORLANDC__ < 0x600) -# define BOOST_ILLEGAL_CV_REFERENCES -#endif - -// -// Positive Feature detection -// -// Borland C++ Builder 2008 and below: -#if (__BORLANDC__ >= 0x599) -# pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax -#endif -// -// C++0x Macros: -// -#if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610) -# define BOOST_NO_CXX11_CHAR16_T -# define BOOST_NO_CXX11_CHAR32_T -# define BOOST_NO_CXX11_DECLTYPE -# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -# define BOOST_NO_CXX11_EXTERN_TEMPLATE -# define BOOST_NO_CXX11_RVALUE_REFERENCES -# define BOOST_NO_CXX11_SCOPED_ENUMS -# define BOOST_NO_CXX11_STATIC_ASSERT -#else -# define BOOST_HAS_ALIGNOF -# define BOOST_HAS_CHAR16_T -# define BOOST_HAS_CHAR32_T -# define BOOST_HAS_DECLTYPE -# define BOOST_HAS_EXPLICIT_CONVERSION_OPS -# define BOOST_HAS_REF_QUALIFIER -# define BOOST_HAS_RVALUE_REFS -# define BOOST_HAS_STATIC_ASSERT -#endif - -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_DECLTYPE_N3276 -#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#define BOOST_NO_CXX11_LAMBDAS -#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#define BOOST_NO_CXX11_NULLPTR -#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_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 -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#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 -#define BOOST_NO_CXX11_THREAD_LOCAL - -// 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 - -// 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 - -# define BOOST_HAS_MACRO_USE_FACET -#endif - -// -// Post 0x561 we have long long and stdint.h: -#if __BORLANDC__ >= 0x561 -# ifndef __NO_LONG_LONG -# define BOOST_HAS_LONG_LONG -# else -# define BOOST_NO_LONG_LONG -# endif - // On non-Win32 platforms let the platform config figure this out: -# ifdef _WIN32 -# define BOOST_HAS_STDINT_H -# endif -#endif - -// Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is -// defined, then we have 0x560 or greater with the Rogue Wave implementation -// which presumably has the std::DBL_MAX bug. -#if defined( BOOST_BCB_WITH_ROGUE_WAVE ) -// is partly broken, some macros define symbols that are really in -// namespace std, so you end up having to use illegal constructs like -// std::DBL_MAX, as a fix we'll just include float.h and have done with: -#include -#endif -// -// __int64: -// -#if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__) -# define BOOST_HAS_MS_INT64 -#endif -// -// check for exception handling support: -// -#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -#endif -// -// all versions have a : -// -#ifndef __STRICT_ANSI__ -# define BOOST_HAS_DIRENT_H -#endif -// -// all versions support __declspec: -// -#if defined(__STRICT_ANSI__) -// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined -# define BOOST_SYMBOL_EXPORT -#endif -// -// ABI fixing headers: -// -#if __BORLANDC__ != 0x600 // not implemented for version 6 compiler yet -#ifndef BOOST_ABI_PREFIX -# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" -#endif -#ifndef BOOST_ABI_SUFFIX -# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" -#endif -#endif -// -// Disable Win32 support in ANSI mode: -// -#if __BORLANDC__ < 0x600 -# pragma defineonoption BOOST_DISABLE_WIN32 -A -#elif defined(__STRICT_ANSI__) -# define BOOST_DISABLE_WIN32 -#endif -// -// MSVC compatibility mode does some nasty things: -// TODO: look up if this doesn't apply to the whole 12xx range -// -#if defined(_MSC_VER) && (_MSC_VER <= 1200) -# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP -# define BOOST_NO_VOID_RETURNS -#endif - -// Borland did not implement value-initialization completely, as I reported -// in 2007, Borland Report 51854, "Value-initialization: POD struct should be -// zero-initialized", http://qc.embarcadero.com/wc/qcmain.aspx?d=51854 -// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues -// (Niels Dekker, LKEB, April 2010) -#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION - -#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__) diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/clang.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/clang.hpp deleted file mode 100644 index 157a94d267e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/clang.hpp +++ /dev/null @@ -1,327 +0,0 @@ -// (C) Copyright Douglas Gregor 2010 -// -// 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. - -// Clang compiler setup. - -#define BOOST_HAS_PRAGMA_ONCE - -// Detecting `-fms-extension` compiler flag assuming that _MSC_VER defined when that flag is used. -#if defined (_MSC_VER) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4)) -# define BOOST_HAS_PRAGMA_DETECT_MISMATCH -#endif - -// When compiling with clang before __has_extension was defined, -// even if one writes 'defined(__has_extension) && __has_extension(xxx)', -// clang reports a compiler error. So the only workaround found is: - -#ifndef __has_extension -#define __has_extension __has_feature -#endif - -#ifndef __has_attribute -#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 - -#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI) -# define BOOST_NO_RTTI -#endif - -#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID) -# define BOOST_NO_TYPEID -#endif - -#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 (__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) -#endif -#endif - -// Clang supports "long long" in all compilation modes. -#define BOOST_HAS_LONG_LONG - -// -// We disable this if the compiler is really nvcc with C++03 as it -// doesn't actually support __int128 as of CUDA_VERSION=7500 -// even though it defines __SIZEOF_INT128__. -// See https://svn.boost.org/trac/boost/ticket/10418 -// https://svn.boost.org/trac/boost/ticket/11852 -// Only re-enable this for nvcc if you're absolutely sure -// of the circumstances under which it's supported. -// Similarly __SIZEOF_INT128__ is defined when targetting msvc -// compatibility even though the required support functions are absent. -// -#if defined(__CUDACC__) -# if defined(BOOST_GCC_CXX11) -# define BOOST_NVCC_CXX11 -# else -# define BOOST_NVCC_CXX03 -# endif -#endif - -#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03) && !defined(_MSC_VER) -# define BOOST_HAS_INT128 -#endif - - -// -// Dynamic shared object (DSO) and dynamic-link library (DLL) support -// -#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32) -# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) -# define BOOST_SYMBOL_IMPORT -# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) -#endif - -// -// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through -// between switch labels. -// -#if __cplusplus >= 201103L && defined(__has_warning) -# if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") -# define BOOST_FALLTHROUGH [[clang::fallthrough]] -# endif -#endif - -#if !__has_feature(cxx_auto_type) -# define BOOST_NO_CXX11_AUTO_DECLARATIONS -# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#endif - -// -// Currently clang on Windows using VC++ RTL does not support C++11's char16_t or char32_t -// -#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 - -#if !__has_feature(cxx_decltype) -# define BOOST_NO_CXX11_DECLTYPE -#endif - -#if !__has_feature(cxx_decltype_incomplete_return_types) -# define BOOST_NO_CXX11_DECLTYPE_N3276 -#endif - -#if !__has_feature(cxx_defaulted_functions) -# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#endif - -#if !__has_feature(cxx_deleted_functions) -# define BOOST_NO_CXX11_DELETED_FUNCTIONS -#endif - -#if !__has_feature(cxx_explicit_conversions) -# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#endif - -#if !__has_feature(cxx_default_function_template_args) -# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#endif - -#if !__has_feature(cxx_generalized_initializers) -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#endif - -#if !__has_feature(cxx_lambdas) -# define BOOST_NO_CXX11_LAMBDAS -#endif - -#if !__has_feature(cxx_local_type_template_args) -# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#endif - -#if !__has_feature(cxx_noexcept) -# define BOOST_NO_CXX11_NOEXCEPT -#endif - -#if !__has_feature(cxx_nullptr) -# define BOOST_NO_CXX11_NULLPTR -#endif - -#if !__has_feature(cxx_range_for) -# define BOOST_NO_CXX11_RANGE_BASED_FOR -#endif - -#if !__has_feature(cxx_raw_string_literals) -# define BOOST_NO_CXX11_RAW_LITERALS -#endif - -#if !__has_feature(cxx_reference_qualified_functions) -# define BOOST_NO_CXX11_REF_QUALIFIERS -#endif - -#if !__has_feature(cxx_generalized_initializers) -# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#endif - -#if !__has_feature(cxx_rvalue_references) -# define BOOST_NO_CXX11_RVALUE_REFERENCES -#endif - -#if !__has_feature(cxx_strong_enums) -# define BOOST_NO_CXX11_SCOPED_ENUMS -#endif - -#if !__has_feature(cxx_static_assert) -# define BOOST_NO_CXX11_STATIC_ASSERT -#endif - -#if !__has_feature(cxx_alias_templates) -# define BOOST_NO_CXX11_TEMPLATE_ALIASES -#endif - -#if !__has_feature(cxx_unicode_literals) -# define BOOST_NO_CXX11_UNICODE_LITERALS -#endif - -#if !__has_feature(cxx_variadic_templates) -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#endif - -#if !__has_feature(cxx_user_literals) -# define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#endif - -#if !__has_feature(cxx_alignas) -# define BOOST_NO_CXX11_ALIGNAS -#endif - -#if !__has_feature(cxx_trailing_return) -# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#endif - -#if !__has_feature(cxx_inline_namespaces) -# define BOOST_NO_CXX11_INLINE_NAMESPACES -#endif - -#if !__has_feature(cxx_override_control) -# define BOOST_NO_CXX11_FINAL -#endif - -#if !(__has_feature(__cxx_binary_literals__) || __has_extension(__cxx_binary_literals__)) -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif - -#if !__has_feature(__cxx_decltype_auto__) -# define BOOST_NO_CXX14_DECLTYPE_AUTO -#endif - -#if !__has_feature(__cxx_aggregate_nsdmi__) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif - -#if !__has_feature(__cxx_init_captures__) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -#endif - -#if !__has_feature(__cxx_generic_lambdas__) -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -#endif - -// clang < 3.5 has a defect with dependent type, like following. -// -// template -// constexpr typename enable_if >::type foo(T &) -// { } // error: no return statement in constexpr function -// -// This issue also affects C++11 mode, but C++11 constexpr requires return stmt. -// Therefore we don't care such case. -// -// Note that we can't check Clang version directly as the numbering system changes depending who's -// creating the Clang release (see https://github.com/boostorg/config/pull/39#issuecomment-59927873) -// so instead verify that we have a feature that was introduced at the same time as working C++14 -// constexpr (generic lambda's in this case): -// -#if !__has_feature(__cxx_generic_lambdas__) || !__has_feature(__cxx_relaxed_constexpr__) -# define BOOST_NO_CXX14_CONSTEXPR -#endif - -#if !__has_feature(__cxx_return_type_deduction__) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -#endif - -#if !__has_feature(__cxx_variable_templates__) -# 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 -#endif -// -// __builtin_unreachable: -#if defined(__has_builtin) && __has_builtin(__builtin_unreachable) -#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__)) - -#ifndef BOOST_COMPILER -# define BOOST_COMPILER "Clang version " __clang_version__ -#endif - -// Macro used to identify the Clang compiler. -#define BOOST_CLANG 1 - diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/codegear.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/codegear.hpp deleted file mode 100644 index 44ca8428e47..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/codegear.hpp +++ /dev/null @@ -1,235 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright David Abrahams 2002 - 2003. -// (C) Copyright Aleksey Gurtovoy 2002. -// 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. - -// CodeGear C++ compiler setup: - -#if !defined( BOOST_WITH_CODEGEAR_WARNINGS ) -// these warnings occur frequently in optimized template code -# pragma warn -8004 // var assigned value, but never used -# pragma warn -8008 // condition always true/false -# pragma warn -8066 // dead code can never execute -# pragma warn -8104 // static members with ctors not threadsafe -# pragma warn -8105 // reference member in class without ctors -#endif -// -// versions check: -// last known and checked version is 0x621 -#if (__CODEGEARC__ > 0x621) -# 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") -# endif -#endif - -// CodeGear C++ Builder 2009 -#if (__CODEGEARC__ <= 0x613) -# define BOOST_NO_INTEGRAL_INT64_T -# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS -# define BOOST_NO_PRIVATE_IN_AGGREGATE -# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE - // we shouldn't really need this - but too many things choke - // without it, this needs more investigation: -# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS -# define BOOST_SP_NO_SP_CONVERTIBLE -#endif - -// CodeGear C++ Builder 2010 -#if (__CODEGEARC__ <= 0x621) -# define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type -# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -# define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member -# define BOOST_NO_USING_TEMPLATE -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -// Temporary hack, until specific MPL preprocessed headers are generated -# define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS - -// CodeGear has not yet completely implemented value-initialization, for -// example for array types, as I reported in 2010: Embarcadero Report 83751, -// "Value-initialization: arrays should have each element value-initialized", -// http://qc.embarcadero.com/wc/qcmain.aspx?d=83751 -// Last checked version: Embarcadero C++ 6.21 -// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues -// (Niels Dekker, LKEB, April 2010) -# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION - -# if defined(NDEBUG) && defined(__cplusplus) - // fix broken so that Boost.test works: -# include -# undef strcmp -# endif - // fix broken errno declaration: -# include -# ifndef errno -# define errno errno -# endif - -#endif - -// Reportedly, #pragma once is supported since C++ Builder 2010 -#if (__CODEGEARC__ >= 0x620) -# define BOOST_HAS_PRAGMA_ONCE -#endif - -// -// C++0x macros: -// -#if (__CODEGEARC__ <= 0x620) -#define BOOST_NO_CXX11_STATIC_ASSERT -#else -#define BOOST_HAS_STATIC_ASSERT -#endif -#define BOOST_HAS_CHAR16_T -#define BOOST_HAS_CHAR32_T -#define BOOST_HAS_LONG_LONG -// #define BOOST_HAS_ALIGNOF -#define BOOST_HAS_DECLTYPE -#define BOOST_HAS_EXPLICIT_CONVERSION_OPS -// #define BOOST_HAS_RVALUE_REFS -#define BOOST_HAS_SCOPED_ENUM -// #define BOOST_HAS_STATIC_ASSERT -#define BOOST_HAS_STD_TYPE_TRAITS - -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#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_RANGE_BASED_FOR -#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 -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#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 -#define BOOST_NO_CXX11_THREAD_LOCAL - -// 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 - -// 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: -// -#define BOOST_HAS_TR1_HASH -#define BOOST_HAS_TR1_TYPE_TRAITS -#define BOOST_HAS_TR1_UNORDERED_MAP -#define BOOST_HAS_TR1_UNORDERED_SET - -#define BOOST_HAS_MACRO_USE_FACET - -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST - -// On non-Win32 platforms let the platform config figure this out: -#ifdef _WIN32 -# define BOOST_HAS_STDINT_H -#endif - -// -// __int64: -// -#if !defined(__STRICT_ANSI__) -# define BOOST_HAS_MS_INT64 -#endif -// -// check for exception handling support: -// -#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -#endif -// -// all versions have a : -// -#if !defined(__STRICT_ANSI__) -# define BOOST_HAS_DIRENT_H -#endif -// -// all versions support __declspec: -// -#if defined(__STRICT_ANSI__) -// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined -# define BOOST_SYMBOL_EXPORT -#endif -// -// ABI fixing headers: -// -#ifndef BOOST_ABI_PREFIX -# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" -#endif -#ifndef BOOST_ABI_SUFFIX -# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" -#endif -// -// Disable Win32 support in ANSI mode: -// -# pragma defineonoption BOOST_DISABLE_WIN32 -A -// -// MSVC compatibility mode does some nasty things: -// TODO: look up if this doesn't apply to the whole 12xx range -// -#if defined(_MSC_VER) && (_MSC_VER <= 1200) -# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP -# define BOOST_NO_VOID_RETURNS -#endif - -#define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__) - diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/comeau.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/comeau.hpp deleted file mode 100644 index 09841604f90..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/comeau.hpp +++ /dev/null @@ -1,59 +0,0 @@ -// (C) Copyright John Maddock 2001. -// (C) Copyright Douglas Gregor 2001. -// (C) Copyright Peter Dimov 2001. -// (C) Copyright Aleksey Gurtovoy 2003. -// (C) Copyright Beman Dawes 2003. -// (C) Copyright Jens Maurer 2003. -// 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. - -// Comeau C++ compiler setup: - -#include - -#if (__COMO_VERSION__ <= 4245) - -# if defined(_MSC_VER) && _MSC_VER <= 1300 -# if _MSC_VER > 100 - // only set this in non-strict mode: -# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP -# endif -# endif - -// Void returns don't work when emulating VC 6 (Peter Dimov) -// TODO: look up if this doesn't apply to the whole 12xx range -# if defined(_MSC_VER) && (_MSC_VER < 1300) -# define BOOST_NO_VOID_RETURNS -# endif - -#endif // version 4245 - -// -// enable __int64 support in VC emulation mode -// -# if defined(_MSC_VER) && (_MSC_VER >= 1200) -# define BOOST_HAS_MS_INT64 -# endif - -#define BOOST_COMPILER "Comeau compiler version " BOOST_STRINGIZE(__COMO_VERSION__) - -// -// versions check: -// we don't know Comeau prior to version 4245: -#if __COMO_VERSION__ < 4245 -# error "Compiler not configured - please reconfigure" -#endif -// -// last known and checked version is 4245: -#if (__COMO_VERSION__ > 4245) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif - - - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/common_edg.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/common_edg.hpp deleted file mode 100644 index d49ceb68e2b..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/common_edg.hpp +++ /dev/null @@ -1,156 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2002. -// (C) Copyright Jens Maurer 2001. -// (C) Copyright David Abrahams 2002. -// (C) Copyright Aleksey Gurtovoy 2002. -// (C) Copyright Markus Schoepflin 2005. -// 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. - -// -// Options common to all edg based compilers. -// -// This is included from within the individual compiler mini-configs. - -#ifndef __EDG_VERSION__ -# error This file requires that __EDG_VERSION__ be defined. -#endif - -#if (__EDG_VERSION__ <= 238) -# define BOOST_NO_INTEGRAL_INT64_T -# define BOOST_NO_SFINAE -#endif - -#if (__EDG_VERSION__ <= 240) -# define BOOST_NO_VOID_RETURNS -#endif - -#if (__EDG_VERSION__ <= 241) && !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) -# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP -#endif - -#if (__EDG_VERSION__ <= 244) && !defined(BOOST_NO_TEMPLATE_TEMPLATES) -# define BOOST_NO_TEMPLATE_TEMPLATES -#endif - -#if (__EDG_VERSION__ < 300) && !defined(BOOST_NO_IS_ABSTRACT) -# define BOOST_NO_IS_ABSTRACT -#endif - -#if (__EDG_VERSION__ <= 303) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) -# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -#endif - -// See also kai.hpp which checks a Kai-specific symbol for EH -# if !defined(__KCC) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -# endif - -# if !defined(__NO_LONG_LONG) -# define BOOST_HAS_LONG_LONG -# else -# define BOOST_NO_LONG_LONG -# endif - -// Not sure what version was the first to support #pragma once, but -// different EDG-based compilers (e.g. Intel) supported it for ages. -// Add a proper version check if it causes problems. -#define BOOST_HAS_PRAGMA_ONCE - -// -// C++0x features -// -// See above for BOOST_NO_LONG_LONG -// -#if (__EDG_VERSION__ < 310) -# define BOOST_NO_CXX11_EXTERN_TEMPLATE -#endif -#if (__EDG_VERSION__ <= 310) -// No support for initializer lists -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#endif -#if (__EDG_VERSION__ < 400) -# define BOOST_NO_CXX11_VARIADIC_MACROS -#endif - -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#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_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_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_SFINAE_EXPR -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#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 -#define BOOST_NO_CXX11_THREAD_LOCAL - -// 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 - -// 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 -// #define BOOST_HAS_LONG_LONG -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/compaq_cxx.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/compaq_cxx.hpp deleted file mode 100644 index 4d6b8ab3ac7..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/compaq_cxx.hpp +++ /dev/null @@ -1,19 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// 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. - -// Tru64 C++ compiler setup (now HP): - -#define BOOST_COMPILER "HP Tru64 C++ " BOOST_STRINGIZE(__DECCXX_VER) - -#include - -// -// versions check: -// Nothing to do here? - - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/cray.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/cray.hpp deleted file mode 100644 index eab52877517..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/cray.hpp +++ /dev/null @@ -1,94 +0,0 @@ -// (C) Copyright John Maddock 2011. -// (C) Copyright Cray, Inc. 2013 -// 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. - -// Greenhills C compiler setup: - -#define BOOST_COMPILER "Cray C version " BOOST_STRINGIZE(_RELEASE) - -#if _RELEASE < 8 -# error "Boost is not configured for Cray compilers prior to version 8, please try the configure script." -#endif - -// -// Check this is a recent EDG based compiler, otherwise we don't support it here: -// -#ifndef __EDG_VERSION__ -# error "Unsupported Cray compiler, please try running the configure script." -#endif - -#include - - -// -// -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#define BOOST_HAS_NRVO -#define BOOST_NO_CXX11_VARIADIC_MACROS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_HAS_NRVO -#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 -#define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_NULLPTR -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_LAMBDAS -#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DECLTYPE_N3276 -#define BOOST_NO_CXX11_DECLTYPE -#define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -#define BOOST_NO_CXX11_CHAR32_T -#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 -#define BOOST_MATH_DISABLE_STD_FPCLASSIFY -//#define BOOST_HAS_FPCLASSIFY - -#define BOOST_SP_USE_PTHREADS -#define BOOST_AC_USE_PTHREADS - -/* everything that follows is working around what are thought to be - * compiler shortcomings. Revist all of these regularly. - */ - -//#define BOOST_USE_ENUM_STATIC_ASSERT -//#define BOOST_BUGGY_INTEGRAL_CONSTANT_EXPRESSIONS //(this may be implied by the previous #define - -// These constants should be provided by the -// compiler, at least when -hgnu is asserted on the command line. - -#ifndef __ATOMIC_RELAXED -#define __ATOMIC_RELAXED 0 -#define __ATOMIC_CONSUME 1 -#define __ATOMIC_ACQUIRE 2 -#define __ATOMIC_RELEASE 3 -#define __ATOMIC_ACQ_REL 4 -#define __ATOMIC_SEQ_CST 5 -#endif - - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/diab.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/diab.hpp deleted file mode 100644 index 0de72d06aa6..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/diab.hpp +++ /dev/null @@ -1,19 +0,0 @@ -// (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_HAS_LONG_LONG -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#define BOOST_NO_CXX11_HDR_CODECVT -#define BOOST_COMPILER "Wind River Diab " BOOST_STRINGIZE(__VERSION_NUMBER__) diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/digitalmars.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/digitalmars.hpp deleted file mode 100644 index e4c5afddd2d..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/digitalmars.hpp +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (C) Christof Meerwald 2003 -// Copyright (C) Dan Watkins 2003 -// -// 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) - -// Digital Mars C++ compiler setup: -#define BOOST_COMPILER __DMC_VERSION_STRING__ - -#define BOOST_HAS_LONG_LONG -#define BOOST_HAS_PRAGMA_ONCE - -#if !defined(BOOST_STRICT_CONFIG) -#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -#define BOOST_NO_OPERATORS_IN_NAMESPACE -#define BOOST_NO_UNREACHABLE_RETURN_DETECTION -#define BOOST_NO_SFINAE -#define BOOST_NO_USING_TEMPLATE -#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -#endif - -// -// has macros: -#define BOOST_HAS_DIRENT_H -#define BOOST_HAS_STDINT_H -#define BOOST_HAS_WINTHREADS - -#if (__DMC__ >= 0x847) -#define BOOST_HAS_EXPM1 -#define BOOST_HAS_LOG1P -#endif - -// -// Is this really the best way to detect whether the std lib is in namespace std? -// -#ifdef __cplusplus -#include -#endif -#if !defined(__STL_IMPORT_VENDOR_CSTD) && !defined(_STLP_IMPORT_VENDOR_CSTD) -# define BOOST_NO_STDC_NAMESPACE -#endif - - -// check for exception handling support: -#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -#endif - -// -// C++0x features -// -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#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_HDR_INITIALIZER_LIST -#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_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_SFINAE_EXPR -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#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 -#define BOOST_NO_CXX11_THREAD_LOCAL - -// 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 - -// 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 -// -// last known and checked version is ...: -#if (__DMC__ > 0x848) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/gcc.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/gcc.hpp deleted file mode 100644 index d1cfed7a323..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/gcc.hpp +++ /dev/null @@ -1,351 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Darin Adler 2001 - 2002. -// (C) Copyright Jens Maurer 2001 - 2002. -// (C) Copyright Beman Dawes 2001 - 2003. -// (C) Copyright Douglas Gregor 2002. -// (C) Copyright David Abrahams 2002 - 2003. -// (C) Copyright Synge Todo 2003. -// 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. - -// GNU C++ compiler setup. - -// -// Define BOOST_GCC so we know this is "real" GCC and not some pretender: -// -#define BOOST_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) -#if !defined(__CUDACC__) -#define BOOST_GCC BOOST_GCC_VERSION -#endif - -#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) -# define BOOST_GCC_CXX11 -#endif - -#if __GNUC__ == 3 -# if defined (__PATHSCALE__) -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -# define BOOST_NO_IS_ABSTRACT -# endif - -# if __GNUC_MINOR__ < 4 -# define BOOST_NO_IS_ABSTRACT -# endif -# define BOOST_NO_CXX11_EXTERN_TEMPLATE -#endif -#if __GNUC__ < 4 -// -// All problems to gcc-3.x and earlier here: -// -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP -# ifdef __OPEN64__ -# define BOOST_NO_IS_ABSTRACT -# endif -#endif - -// GCC prior to 3.4 had #pragma once too but it didn't work well with filesystem links -#if BOOST_GCC_VERSION >= 30400 -#define BOOST_HAS_PRAGMA_ONCE -#endif - -#if BOOST_GCC_VERSION < 40400 -// Previous versions of GCC did not completely implement value-initialization: -// GCC Bug 30111, "Value-initialization of POD base class doesn't initialize -// members", reported by Jonathan Wakely in 2006, -// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4) -// GCC Bug 33916, "Default constructor fails to initialize array members", -// reported by Michael Elizabeth Chastain in 2007, -// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4) -// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues -#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -#endif - -#if !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -#endif - - -// -// Threading support: Turn this on unconditionally here (except for -// those platforms where we can know for sure). It will get turned off again -// later if no threading API is detected. -// -#if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__) -# define BOOST_HAS_THREADS -#endif - -// -// gcc has "long long" -// Except on Darwin with standard compliance enabled (-pedantic) -// Apple gcc helpfully defines this macro we can query -// -#if !defined(__DARWIN_NO_LONG_LONG) -# define BOOST_HAS_LONG_LONG -#endif - -// -// gcc implements the named return value optimization since version 3.1 -// -#define BOOST_HAS_NRVO - -// Branch prediction hints -#define BOOST_LIKELY(x) __builtin_expect(x, 1) -#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) - -// -// Dynamic shared object (DSO) and dynamic-link library (DLL) support -// -#if __GNUC__ >= 4 -# 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. -# 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 -# endif -# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) -#else -// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined -# define BOOST_SYMBOL_EXPORT -#endif - -// -// RTTI and typeinfo detection is possible post gcc-4.3: -// -#if BOOST_GCC_VERSION > 40300 -# ifndef __GXX_RTTI -# ifndef BOOST_NO_TYPEID -# define BOOST_NO_TYPEID -# endif -# ifndef BOOST_NO_RTTI -# define BOOST_NO_RTTI -# endif -# endif -#endif - -// -// Recent GCC versions have __int128 when in 64-bit mode. -// -// We disable this if the compiler is really nvcc with C++03 as it -// doesn't actually support __int128 as of CUDA_VERSION=7500 -// even though it defines __SIZEOF_INT128__. -// See https://svn.boost.org/trac/boost/ticket/8048 -// https://svn.boost.org/trac/boost/ticket/11852 -// Only re-enable this for nvcc if you're absolutely sure -// of the circumstances under which it's supported: -// -#if defined(__CUDACC__) -# if defined(BOOST_GCC_CXX11) -# define BOOST_NVCC_CXX11 -# else -# define BOOST_NVCC_CXX03 -# endif -#endif - -#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03) -# define BOOST_HAS_INT128 -#endif -// -// Recent GCC versions have a __float128 native type, we need to -// include a std lib header to detect this - not ideal, but we'll -// be including later anyway when we select the std lib. -// -// Nevertheless, as of CUDA 7.5, using __float128 with the host -// compiler in pre-C++11 mode is still not supported. -// See https://svn.boost.org/trac/boost/ticket/11852 -// -#ifdef __cplusplus -#include -#else -#include -#endif -#if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__) && !defined(BOOST_NVCC_CXX03) -# define BOOST_HAS_FLOAT128 -#endif - -// C++0x features in 4.3.n and later -// -#if (BOOST_GCC_VERSION >= 40300) && defined(BOOST_GCC_CXX11) -// C++0x features are only enabled when -std=c++0x or -std=gnu++0x are -// passed on the command line, which in turn defines -// __GXX_EXPERIMENTAL_CXX0X__. -# define BOOST_HAS_DECLTYPE -# define BOOST_HAS_RVALUE_REFS -# define BOOST_HAS_STATIC_ASSERT -# define BOOST_HAS_VARIADIC_TMPL -#else -# define BOOST_NO_CXX11_DECLTYPE -# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -# define BOOST_NO_CXX11_RVALUE_REFERENCES -# define BOOST_NO_CXX11_STATIC_ASSERT -#endif - -// C++0x features in 4.4.n and later -// -#if (BOOST_GCC_VERSION < 40400) || !defined(BOOST_GCC_CXX11) -# define BOOST_NO_CXX11_AUTO_DECLARATIONS -# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -# define BOOST_NO_CXX11_CHAR16_T -# define BOOST_NO_CXX11_CHAR32_T -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -# define BOOST_NO_CXX11_DELETED_FUNCTIONS -# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -# define BOOST_NO_CXX11_INLINE_NAMESPACES -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#endif - -#if BOOST_GCC_VERSION < 40500 -# define BOOST_NO_SFINAE_EXPR -#endif - -// GCC 4.5 forbids declaration of defaulted functions in private or protected sections -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 5) || !defined(BOOST_GCC_CXX11) -# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS -#endif - -// C++0x features in 4.5.0 and later -// -#if (BOOST_GCC_VERSION < 40500) || !defined(BOOST_GCC_CXX11) -# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -# define BOOST_NO_CXX11_LAMBDAS -# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -# define BOOST_NO_CXX11_RAW_LITERALS -# define BOOST_NO_CXX11_UNICODE_LITERALS -#endif - -// C++0x features in 4.5.1 and later -// -#if (BOOST_GCC_VERSION < 40501) || !defined(BOOST_GCC_CXX11) -// scoped enums have a serious bug in 4.4.0, so define BOOST_NO_CXX11_SCOPED_ENUMS before 4.5.1 -// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064 -# define BOOST_NO_CXX11_SCOPED_ENUMS -#endif - -// C++0x features in 4.6.n and later -// -#if (BOOST_GCC_VERSION < 40600) || !defined(BOOST_GCC_CXX11) -#define BOOST_NO_CXX11_CONSTEXPR -#define BOOST_NO_CXX11_NOEXCEPT -#define BOOST_NO_CXX11_NULLPTR -#define BOOST_NO_CXX11_RANGE_BASED_FOR -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#endif - -// C++0x features in 4.7.n and later -// -#if (BOOST_GCC_VERSION < 40700) || !defined(BOOST_GCC_CXX11) -# define BOOST_NO_CXX11_FINAL -# define BOOST_NO_CXX11_TEMPLATE_ALIASES -# define BOOST_NO_CXX11_USER_DEFINED_LITERALS -# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS -#endif - -// C++0x features in 4.8.n and later -// -#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 -// -#if (BOOST_GCC_VERSION < 40801) || !defined(BOOST_GCC_CXX11) -# define BOOST_NO_CXX11_DECLTYPE_N3276 -# define BOOST_NO_CXX11_REF_QUALIFIERS -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif - -// C++14 features in 4.9.0 and later -// -#if (BOOST_GCC_VERSION < 40900) || (__cplusplus < 201300) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -# define BOOST_NO_CXX14_DIGIT_SEPARATORS -# define BOOST_NO_CXX14_DECLTYPE_AUTO -# if !((BOOST_GCC_VERSION >= 40801) && (BOOST_GCC_VERSION < 40900) && defined(BOOST_GCC_CXX11)) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -# endif -#endif - - -// C++ 14: -#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif -#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304) -# define BOOST_NO_CXX14_CONSTEXPR -#endif -#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 - -#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 -// -// __builtin_unreachable: -#if BOOST_GCC_VERSION >= 40800 -#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable(); -#endif - -#ifndef BOOST_COMPILER -# define BOOST_COMPILER "GNU C++ version " __VERSION__ -#endif - -// ConceptGCC compiler: -// http://www.generic-programming.org/software/ConceptGCC/ -#ifdef __GXX_CONCEPTS__ -# define BOOST_HAS_CONCEPTS -# define BOOST_COMPILER "ConceptGCC version " __VERSION__ -#endif - -// versions check: -// we don't know gcc prior to version 3.30: -#if (BOOST_GCC_VERSION< 30300) -# error "Compiler not configured - please reconfigure" -#endif -// -// last known and checked version is 4.9: -#if (BOOST_GCC_VERSION > 40900) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# 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... -//# warning "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif - diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/gcc_xml.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/gcc_xml.hpp deleted file mode 100644 index 2b47585ab86..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/gcc_xml.hpp +++ /dev/null @@ -1,108 +0,0 @@ -// (C) Copyright John Maddock 2006. -// 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. - -// GCC-XML C++ compiler setup: - -# if !defined(__GCCXML_GNUC__) || ((__GCCXML_GNUC__ <= 3) && (__GCCXML_GNUC_MINOR__ <= 3)) -# define BOOST_NO_IS_ABSTRACT -# endif - -// -// Threading support: Turn this on unconditionally here (except for -// those platforms where we can know for sure). It will get turned off again -// later if no threading API is detected. -// -#if !defined(__MINGW32__) && !defined(_MSC_VER) && !defined(linux) && !defined(__linux) && !defined(__linux__) -# define BOOST_HAS_THREADS -#endif - -// -// gcc has "long long" -// -#define BOOST_HAS_LONG_LONG - -// C++0x features: -// -# define BOOST_NO_CXX11_CONSTEXPR -# define BOOST_NO_CXX11_NULLPTR -# define BOOST_NO_CXX11_TEMPLATE_ALIASES -# define BOOST_NO_CXX11_DECLTYPE -# define BOOST_NO_CXX11_DECLTYPE_N3276 -# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -# define BOOST_NO_CXX11_RVALUE_REFERENCES -# define BOOST_NO_CXX11_STATIC_ASSERT -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -# define BOOST_NO_CXX11_VARIADIC_MACROS -# define BOOST_NO_CXX11_AUTO_DECLARATIONS -# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -# define BOOST_NO_CXX11_CHAR16_T -# define BOOST_NO_CXX11_CHAR32_T -# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -# define BOOST_NO_CXX11_DELETED_FUNCTIONS -# 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 -# define BOOST_NO_CXX11_RANGE_BASED_FOR -# define BOOST_NO_CXX11_RAW_LITERALS -# define BOOST_NO_CXX11_UNICODE_LITERALS -# define BOOST_NO_CXX11_NOEXCEPT -# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -# 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 -# define BOOST_NO_CXX11_THREAD_LOCAL - -// 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 - -// 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/contrib/libboost/boost_1_65_0/boost/config/compiler/greenhills.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/greenhills.hpp deleted file mode 100644 index a76a07cf4a6..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/greenhills.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright John Maddock 2001. -// 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. - -// Greenhills C++ compiler setup: - -#define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs) - -#include - -// -// versions check: -// we don't support Greenhills prior to version 0: -#if __ghs < 0 -# error "Compiler not supported or configured - please reconfigure" -#endif -// -// last known and checked version is 0: -#if (__ghs > 0) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/hp_acc.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/hp_acc.hpp deleted file mode 100644 index 9df18eaf672..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/hp_acc.hpp +++ /dev/null @@ -1,147 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2001 - 2003. -// (C) Copyright Aleksey Gurtovoy 2002. -// (C) Copyright David Abrahams 2002 - 2003. -// (C) Copyright Toon Knapen 2003. -// (C) Copyright Boris Gubenko 2006 - 2007. -// 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. - -// HP aCC C++ compiler setup: - -#if defined(__EDG__) -#include -#endif - -#if (__HP_aCC <= 33100) -# define BOOST_NO_INTEGRAL_INT64_T -# define BOOST_NO_OPERATORS_IN_NAMESPACE -# if !defined(_NAMESPACE_STD) -# define BOOST_NO_STD_LOCALE -# define BOOST_NO_STRINGSTREAM -# endif -#endif - -#if (__HP_aCC <= 33300) -// member templates are sufficiently broken that we disable them for now -# define BOOST_NO_MEMBER_TEMPLATES -# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS -# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE -#endif - -#if (__HP_aCC <= 38000) -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#endif - -#if (__HP_aCC > 50000) && (__HP_aCC < 60000) -# define BOOST_NO_UNREACHABLE_RETURN_DETECTION -# define BOOST_NO_TEMPLATE_TEMPLATES -# define BOOST_NO_SWPRINTF -# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS -# define BOOST_NO_IS_ABSTRACT -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -#endif - -// optional features rather than defects: -#if (__HP_aCC >= 33900) -# define BOOST_HAS_LONG_LONG -# define BOOST_HAS_PARTIAL_STD_ALLOCATOR -#endif - -#if (__HP_aCC >= 50000 ) && (__HP_aCC <= 53800 ) || (__HP_aCC < 31300 ) -# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD -#endif - -// This macro should not be defined when compiling in strict ansi -// mode, but, currently, we don't have the ability to determine -// what standard mode we are compiling with. Some future version -// of aCC6 compiler will provide predefined macros reflecting the -// compilation options, including the standard mode. -#if (__HP_aCC >= 60000) || ((__HP_aCC > 38000) && defined(__hpxstd98)) -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#endif - -#define BOOST_COMPILER "HP aCC version " BOOST_STRINGIZE(__HP_aCC) - -// -// versions check: -// we don't support HP aCC prior to version 33000: -#if __HP_aCC < 33000 -# error "Compiler not supported or configured - please reconfigure" -#endif - -// -// Extended checks for supporting aCC on PA-RISC -#if __HP_aCC > 30000 && __HP_aCC < 50000 -# if __HP_aCC < 38000 - // versions prior to version A.03.80 not supported -# error "Compiler version not supported - version A.03.80 or higher is required" -# elif !defined(__hpxstd98) - // must compile using the option +hpxstd98 with version A.03.80 and above -# error "Compiler option '+hpxstd98' is required for proper support" -# endif //PA-RISC -#endif - -// -// C++0x features -// -// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG -// -#if !defined(__EDG__) - -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#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_HDR_INITIALIZER_LIST -#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_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_SFINAE_EXPR -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#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_THREAD_LOCAL - -/* - See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and - https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443436 -*/ - -#if (__HP_aCC < 62500) || !defined(HP_CXX0x_SOURCE) - #define BOOST_NO_CXX11_VARIADIC_MACROS -#endif - -#endif - -// -// last known and checked version for HP-UX/ia64 is 61300 -// last known and checked version for PA-RISC is 38000 -#if ((__HP_aCC > 61300) || ((__HP_aCC > 38000) && defined(__hpxstd98))) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/intel.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/intel.hpp deleted file mode 100644 index f55189a0ab9..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/intel.hpp +++ /dev/null @@ -1,557 +0,0 @@ -// (C) Copyright John Maddock 2001-8. -// (C) Copyright Peter Dimov 2001. -// (C) Copyright Jens Maurer 2001. -// (C) Copyright David Abrahams 2002 - 2003. -// (C) Copyright Aleksey Gurtovoy 2002 - 2003. -// (C) Copyright Guillaume Melquiond 2002 - 2003. -// (C) Copyright Beman Dawes 2003. -// (C) Copyright Martin Wille 2003. -// 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. - -// Intel compiler setup: - -#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__)) - -#ifdef _MSC_VER - -#include - -#undef BOOST_MSVC -#undef BOOST_MSVC_FULL_VER - -#if (__INTEL_COMPILER >= 1500) && (_MSC_VER >= 1900) -// -// These appear to be supported, even though VC++ may not support them: -// -#define BOOST_HAS_EXPM1 -#define BOOST_HAS_LOG1P -#undef BOOST_NO_CXX14_BINARY_LITERALS -// This one may be a little risky to enable?? -#undef BOOST_NO_SFINAE_EXPR - -#endif - -#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 - -// 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) -#if __INTEL_COMPILER == 9999 -# define BOOST_INTEL_CXX_VERSION 1200 // Intel bug in 12.1. -#else -# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER -#endif -#elif defined(__ICL) -# define BOOST_INTEL_CXX_VERSION __ICL -#elif defined(__ICC) -# define BOOST_INTEL_CXX_VERSION __ICC -#elif defined(__ECC) -# define BOOST_INTEL_CXX_VERSION __ECC -#endif - -// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x' -#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__) -# define BOOST_INTEL_STDCXX0X -#endif -#if defined(_MSC_VER) && (_MSC_VER >= 1600) -# define BOOST_INTEL_STDCXX0X -#endif - -#ifdef __GNUC__ -# define BOOST_INTEL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) -#endif - -#if !defined(BOOST_COMPILER) -# if defined(BOOST_INTEL_STDCXX0X) -# define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) -# else -# define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) -# endif -#endif - -#define BOOST_INTEL BOOST_INTEL_CXX_VERSION - -#if defined(_WIN32) || defined(_WIN64) -# define BOOST_INTEL_WIN BOOST_INTEL -#else -# define BOOST_INTEL_LINUX BOOST_INTEL -#endif - -#else // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__)) - -#include - -#if defined(__INTEL_COMPILER) -#if __INTEL_COMPILER == 9999 -# define BOOST_INTEL_CXX_VERSION 1200 // Intel bug in 12.1. -#else -# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER -#endif -#elif defined(__ICL) -# define BOOST_INTEL_CXX_VERSION __ICL -#elif defined(__ICC) -# define BOOST_INTEL_CXX_VERSION __ICC -#elif defined(__ECC) -# define BOOST_INTEL_CXX_VERSION __ECC -#endif - -// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x' -#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__) -# define BOOST_INTEL_STDCXX0X -#endif -#if defined(_MSC_VER) && (_MSC_VER >= 1600) -# define BOOST_INTEL_STDCXX0X -#endif - -#ifdef __GNUC__ -# define BOOST_INTEL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) -#endif - -#if !defined(BOOST_COMPILER) -# if defined(BOOST_INTEL_STDCXX0X) -# define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) -# else -# define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) -# endif -#endif - -#define BOOST_INTEL BOOST_INTEL_CXX_VERSION - -#if defined(_WIN32) || defined(_WIN64) -# define BOOST_INTEL_WIN BOOST_INTEL -#else -# define BOOST_INTEL_LINUX BOOST_INTEL -#endif - -#if (BOOST_INTEL_CXX_VERSION <= 600) - -# if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov) - -// Boost libraries assume strong standard conformance unless otherwise -// indicated by a config macro. As configured by Intel, the EDG front-end -// requires certain compiler options be set to achieve that strong conformance. -// Particularly /Qoption,c,--arg_dep_lookup (reported by Kirk Klobe & Thomas Witt) -// and /Zc:wchar_t,forScope. See boost-root/tools/build/intel-win32-tools.jam for -// details as they apply to particular versions of the compiler. When the -// compiler does not predefine a macro indicating if an option has been set, -// this config file simply assumes the option has been set. -// Thus BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP will not be defined, even if -// the compiler option is not enabled. - -# define BOOST_NO_SWPRINTF -# endif - -// Void returns, 64 bit integrals don't work when emulating VC 6 (Peter Dimov) - -# if defined(_MSC_VER) && (_MSC_VER <= 1200) -# define BOOST_NO_VOID_RETURNS -# define BOOST_NO_INTEGRAL_INT64_T -# endif - -#endif - -#if (BOOST_INTEL_CXX_VERSION <= 710) && defined(_WIN32) -# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS -#endif - -// See http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864 -#if BOOST_INTEL_CXX_VERSION < 600 -# define BOOST_NO_INTRINSIC_WCHAR_T -#else -// We should test the macro _WCHAR_T_DEFINED to check if the compiler -// supports wchar_t natively. *BUT* there is a problem here: the standard -// headers define this macro if they typedef wchar_t. Anyway, we're lucky -// because they define it without a value, while Intel C++ defines it -// to 1. So we can check its value to see if the macro was defined natively -// or not. -// Under UNIX, the situation is exactly the same, but the macro _WCHAR_T -// is used instead. -# if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0) -# define BOOST_NO_INTRINSIC_WCHAR_T -# endif -#endif - -#if defined(__GNUC__) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) -// -// Figure out when Intel is emulating this gcc bug -// (All Intel versions prior to 9.0.26, and versions -// later than that if they are set up to emulate gcc 3.2 -// or earlier): -// -# if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL < 900) || (__INTEL_COMPILER_BUILD_DATE < 20050912) -# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -# endif -#endif -#if (defined(__GNUC__) && (__GNUC__ < 4)) || (defined(_WIN32) && (BOOST_INTEL_CXX_VERSION <= 1200)) || (BOOST_INTEL_CXX_VERSION <= 1200) -// GCC or VC emulation: -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#endif -// -// Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T -// set correctly, if we don't do this now, we will get errors later -// in type_traits code among other things, getting this correct -// for the Intel compiler is actually remarkably fragile and tricky: -// -#ifdef __cplusplus -#if defined(BOOST_NO_INTRINSIC_WCHAR_T) -#include -template< typename T > struct assert_no_intrinsic_wchar_t; -template<> struct assert_no_intrinsic_wchar_t { typedef void type; }; -// if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T -// where it is defined above: -typedef assert_no_intrinsic_wchar_t::type assert_no_intrinsic_wchar_t_; -#else -template< typename T > struct assert_intrinsic_wchar_t; -template<> struct assert_intrinsic_wchar_t {}; -// if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line: -template<> struct assert_intrinsic_wchar_t {}; -#endif -#endif - -#if defined(_MSC_VER) && (_MSC_VER+0 >= 1000) -# if _MSC_VER >= 1200 -# define BOOST_HAS_MS_INT64 -# endif -# define BOOST_NO_SWPRINTF -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#elif defined(_WIN32) -# define BOOST_DISABLE_WIN32 -#endif - -// I checked version 6.0 build 020312Z, it implements the NRVO. -// Correct this as you find out which version of the compiler -// implemented the NRVO first. (Daniel Frey) -#if (BOOST_INTEL_CXX_VERSION >= 600) -# define BOOST_HAS_NRVO -#endif - -// Branch prediction hints -// I'm not sure 8.0 was the first version to support these builtins, -// update the condition if the version is not accurate. (Andrey Semashev) -#if defined(__GNUC__) && BOOST_INTEL_CXX_VERSION >= 800 -#define BOOST_LIKELY(x) __builtin_expect(x, 1) -#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) -#endif - -// RTTI -// __RTTI is the EDG macro -// __INTEL_RTTI__ is the Intel macro -// __GXX_RTTI is the g++ macro -// _CPPRTTI is the MSVC++ macro -#if !defined(__RTTI) && !defined(__INTEL_RTTI__) && !defined(__GXX_RTTI) && !defined(_CPPRTTI) - -#if !defined(BOOST_NO_RTTI) -# define BOOST_NO_RTTI -#endif - -// in MS mode, static typeid works even when RTTI is off -#if !defined(_MSC_VER) && !defined(BOOST_NO_TYPEID) -# define BOOST_NO_TYPEID -#endif - -#endif - -// -// versions check: -// we don't support Intel prior to version 6.0: -#if BOOST_INTEL_CXX_VERSION < 600 -# error "Compiler not supported or configured - please reconfigure" -#endif - -// Intel on MacOS requires -#if defined(__APPLE__) && defined(__INTEL_COMPILER) -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#endif - -// Intel on Altix Itanium -#if defined(__itanium__) && defined(__INTEL_COMPILER) -# define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#endif - -// -// An attempt to value-initialize a pointer-to-member may trigger an -// internal error on Intel <= 11.1 (last checked version), as was -// reported by John Maddock, Intel support issue 589832, May 2010. -// Moreover, according to test results from Huang-Vista-x86_32_intel, -// intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some -// cases when it should be value-initialized. -// (Niels Dekker, LKEB, May 2010) -// Apparently Intel 12.1 (compiler version number 9999 !!) has the same issue (compiler regression). -#if defined(__INTEL_COMPILER) -# if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999) || (defined(_WIN32) && (__INTEL_COMPILER < 1600)) -# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -# endif -#endif - -// -// Dynamic shared object (DSO) and dynamic-link library (DLL) support -// -#if defined(__GNUC__) && (__GNUC__ >= 4) -# define BOOST_SYMBOL_EXPORT __attribute__((visibility("default"))) -# define BOOST_SYMBOL_IMPORT -# define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default"))) -#endif -// -// C++0x features -// For each feature we need to check both the Intel compiler version, -// and the version of MSVC or GCC that we are emulating. -// See http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/ -// for a list of which features were implemented in which Intel releases. -// -#if defined(BOOST_INTEL_STDCXX0X) -// BOOST_NO_CXX11_CONSTEXPR: -#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && !defined(_MSC_VER) -// Available in earlier Intel versions, but fail our tests: -# undef BOOST_NO_CXX11_CONSTEXPR -#endif -// BOOST_NO_CXX11_NULLPTR: -#if (BOOST_INTEL_CXX_VERSION >= 1210) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) -# undef BOOST_NO_CXX11_NULLPTR -#endif -// BOOST_NO_CXX11_TEMPLATE_ALIASES -#if (BOOST_INTEL_CXX_VERSION >= 1210) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) -# undef BOOST_NO_CXX11_TEMPLATE_ALIASES -#endif - -// BOOST_NO_CXX11_DECLTYPE -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) -# undef BOOST_NO_CXX11_DECLTYPE -#endif - -// BOOST_NO_CXX11_DECLTYPE_N3276 -#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) -# undef BOOST_NO_CXX11_DECLTYPE_N3276 -#endif - -// BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) -# undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#endif - -// BOOST_NO_CXX11_RVALUE_REFERENCES -#if (BOOST_INTEL_CXX_VERSION >= 1300) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) -// This is available from earlier Intel versions, but breaks Filesystem and other libraries: -# undef BOOST_NO_CXX11_RVALUE_REFERENCES -#endif - -// BOOST_NO_CXX11_STATIC_ASSERT -#if (BOOST_INTEL_CXX_VERSION >= 1110) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) -# undef BOOST_NO_CXX11_STATIC_ASSERT -#endif - -// BOOST_NO_CXX11_VARIADIC_TEMPLATES -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) -# undef BOOST_NO_CXX11_VARIADIC_TEMPLATES -#endif - -// BOOST_NO_CXX11_VARIADIC_MACROS -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40200)) && (!defined(_MSC_VER) || (_MSC_VER >= 1400)) -# undef BOOST_NO_CXX11_VARIADIC_MACROS -#endif - -// BOOST_NO_CXX11_AUTO_DECLARATIONS -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) -# undef BOOST_NO_CXX11_AUTO_DECLARATIONS -#endif - -// BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) -# undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#endif - -// BOOST_NO_CXX11_CHAR16_T -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) -# undef BOOST_NO_CXX11_CHAR16_T -#endif - -// BOOST_NO_CXX11_CHAR32_T -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) -# undef BOOST_NO_CXX11_CHAR32_T -#endif - -// BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) -# undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#endif - -// BOOST_NO_CXX11_DELETED_FUNCTIONS -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) -# undef BOOST_NO_CXX11_DELETED_FUNCTIONS -#endif - -// BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) -# undef BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#endif - -// BOOST_NO_CXX11_SCOPED_ENUMS -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40501)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) -// This is available but broken in earlier Intel releases. -# undef BOOST_NO_CXX11_SCOPED_ENUMS -#endif - -// BOOST_NO_SFINAE_EXPR -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) -# 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: -# undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#endif - -// BOOST_NO_CXX11_LAMBDAS -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600)) -# undef BOOST_NO_CXX11_LAMBDAS -#endif - -// BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) -# undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#endif - -// BOOST_NO_CXX11_RANGE_BASED_FOR -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) -# undef BOOST_NO_CXX11_RANGE_BASED_FOR -#endif - -// BOOST_NO_CXX11_RAW_LITERALS -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) -# undef BOOST_NO_CXX11_RAW_LITERALS -#endif - -// BOOST_NO_CXX11_UNICODE_LITERALS -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) -# undef BOOST_NO_CXX11_UNICODE_LITERALS -#endif - -// BOOST_NO_CXX11_NOEXCEPT -#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) -// Available in earlier Intel release, but generates errors when used with -// conditional exception specifications, for example in multiprecision: -# undef BOOST_NO_CXX11_NOEXCEPT -#endif - -// BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999)) -# undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#endif - -// BOOST_NO_CXX11_USER_DEFINED_LITERALS -#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) -# undef BOOST_NO_CXX11_USER_DEFINED_LITERALS -#endif - -// BOOST_NO_CXX11_ALIGNAS -#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) -# undef BOOST_NO_CXX11_ALIGNAS -#endif - -// BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827)) -# undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#endif - -// BOOST_NO_CXX11_INLINE_NAMESPACES -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) -# undef BOOST_NO_CXX11_INLINE_NAMESPACES -#endif - -// BOOST_NO_CXX11_REF_QUALIFIERS -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730)) -# undef BOOST_NO_CXX11_REF_QUALIFIERS -#endif - -// BOOST_NO_CXX11_FINAL -#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700)) -# undef BOOST_NO_CXX11_FINAL -#endif - -#endif // defined(BOOST_INTEL_STDCXX0X) - -// -// Broken in all versions up to 15: -#define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS - -#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION <= 1310) -# define BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#endif - -#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION == 1400) -// A regression in Intel's compiler means that seems to be broken in this release as well as : -# define BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_TUPLE -#endif - -#if (BOOST_INTEL_CXX_VERSION < 1200) -// -// fenv.h appears not to work with Intel prior to 12.0: -// -# define BOOST_NO_FENV_H -#endif - -// Intel 13.10 fails to access defaulted functions of a base class declared in private or protected sections, -// producing the following errors: -// error #453: protected function "..." (declared at ...") is not accessible through a "..." pointer or object -#if (BOOST_INTEL_CXX_VERSION <= 1310) -# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS -#endif - -#if defined(_MSC_VER) && (_MSC_VER >= 1600) -# define BOOST_HAS_STDINT_H -#endif - -#if defined(__CUDACC__) -# if defined(BOOST_GCC_CXX11) -# define BOOST_NVCC_CXX11 -# else -# define BOOST_NVCC_CXX03 -# endif -#endif - -#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310) && !defined(BOOST_NVCC_CXX03) -# define BOOST_HAS_INT128 -#endif - -#endif // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__)) -// -// last known and checked version: -#if (BOOST_INTEL_CXX_VERSION > 1700) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# elif defined(_MSC_VER) -// -// We don't emit this warning any more, since we have so few -// defect macros set anyway (just the one). -// -//# pragma message("Unknown compiler version - please run the configure tests and report the results") -# endif -#endif - diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/kai.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/kai.hpp deleted file mode 100644 index 960d501c860..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/kai.hpp +++ /dev/null @@ -1,33 +0,0 @@ -// (C) Copyright John Maddock 2001. -// (C) Copyright David Abrahams 2002. -// (C) Copyright Aleksey Gurtovoy 2002. -// 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. - -// Kai C++ compiler setup: - -#include - -# if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG) - // at least on Sun, the contents of is not in namespace std -# define BOOST_NO_STDC_NAMESPACE -# endif - -// see also common_edg.hpp which needs a special check for __KCC -# if !defined(_EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -# endif - -// -// last known and checked version is 4001: -#if (__KCC_VERSION > 4001) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif - - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/metrowerks.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/metrowerks.hpp deleted file mode 100644 index 99ff0f5eeaf..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/metrowerks.hpp +++ /dev/null @@ -1,192 +0,0 @@ -// (C) Copyright John Maddock 2001. -// (C) Copyright Darin Adler 2001. -// (C) Copyright Peter Dimov 2001. -// (C) Copyright David Abrahams 2001 - 2002. -// (C) Copyright Beman Dawes 2001 - 2003. -// (C) Copyright Stefan Slapeta 2004. -// 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. - -// Metrowerks C++ compiler setup: - -// locale support is disabled when linking with the dynamic runtime -# ifdef _MSL_NO_LOCALE -# define BOOST_NO_STD_LOCALE -# endif - -# if __MWERKS__ <= 0x2301 // 5.3 -# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING -# define BOOST_NO_POINTER_TO_MEMBER_CONST -# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS -# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD -# endif - -# if __MWERKS__ <= 0x2401 // 6.2 -//# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING -# endif - -# if(__MWERKS__ <= 0x2407) // 7.x -# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS -# define BOOST_NO_UNREACHABLE_RETURN_DETECTION -# endif - -# if(__MWERKS__ <= 0x3003) // 8.x -# define BOOST_NO_SFINAE -# endif - -// the "|| !defined(BOOST_STRICT_CONFIG)" part should apply to the last -// tested version *only*: -# if(__MWERKS__ <= 0x3207) || !defined(BOOST_STRICT_CONFIG) // 9.6 -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -# define BOOST_NO_IS_ABSTRACT -# endif - -#if !__option(wchar_type) -# define BOOST_NO_INTRINSIC_WCHAR_T -#endif - -#if !__option(exceptions) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -#endif - -#if (__INTEL__ && _WIN32) || (__POWERPC__ && macintosh) -# if __MWERKS__ == 0x3000 -# define BOOST_COMPILER_VERSION 8.0 -# elif __MWERKS__ == 0x3001 -# define BOOST_COMPILER_VERSION 8.1 -# elif __MWERKS__ == 0x3002 -# define BOOST_COMPILER_VERSION 8.2 -# elif __MWERKS__ == 0x3003 -# define BOOST_COMPILER_VERSION 8.3 -# elif __MWERKS__ == 0x3200 -# define BOOST_COMPILER_VERSION 9.0 -# elif __MWERKS__ == 0x3201 -# define BOOST_COMPILER_VERSION 9.1 -# elif __MWERKS__ == 0x3202 -# define BOOST_COMPILER_VERSION 9.2 -# elif __MWERKS__ == 0x3204 -# define BOOST_COMPILER_VERSION 9.3 -# elif __MWERKS__ == 0x3205 -# define BOOST_COMPILER_VERSION 9.4 -# elif __MWERKS__ == 0x3206 -# define BOOST_COMPILER_VERSION 9.5 -# elif __MWERKS__ == 0x3207 -# define BOOST_COMPILER_VERSION 9.6 -# else -# define BOOST_COMPILER_VERSION __MWERKS__ -# endif -#else -# define BOOST_COMPILER_VERSION __MWERKS__ -#endif - -// -// C++0x features -// -// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG -// -#if __MWERKS__ > 0x3206 && __option(rvalue_refs) -# define BOOST_HAS_RVALUE_REFS -#else -# define BOOST_NO_CXX11_RVALUE_REFERENCES -#endif -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#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_HDR_INITIALIZER_LIST -#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_RANGE_BASED_FOR -#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 -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_VARIADIC_MACROS -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#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 -#define BOOST_NO_CXX11_THREAD_LOCAL - -// 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 - -// 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) - -// -// versions check: -// we don't support Metrowerks prior to version 5.3: -#if __MWERKS__ < 0x2301 -# error "Compiler not supported or configured - please reconfigure" -#endif -// -// last known and checked version: -#if (__MWERKS__ > 0x3205) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif - - - - - - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/mpw.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/mpw.hpp deleted file mode 100644 index d9544345ac0..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/mpw.hpp +++ /dev/null @@ -1,134 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2002. -// (C) Copyright Aleksey Gurtovoy 2002. -// 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. - -// MPW C++ compilers setup: - -# if defined(__SC__) -# define BOOST_COMPILER "MPW SCpp version " BOOST_STRINGIZE(__SC__) -# elif defined(__MRC__) -# define BOOST_COMPILER "MPW MrCpp version " BOOST_STRINGIZE(__MRC__) -# else -# error "Using MPW compiler configuration by mistake. Please update." -# endif - -// -// MPW 8.90: -// -#if (MPW_CPLUS <= 0x890) || !defined(BOOST_STRICT_CONFIG) -# define BOOST_NO_CV_SPECIALIZATIONS -# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS -# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS -# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION -# define BOOST_NO_INTRINSIC_WCHAR_T -# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# define BOOST_NO_USING_TEMPLATE - -# define BOOST_NO_CWCHAR -# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS - -# define BOOST_NO_STD_ALLOCATOR /* actually a bug with const reference overloading */ - -#endif - -// -// C++0x features -// -// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG -// -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#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_HDR_INITIALIZER_LIST -#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_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_SFINAE_EXPR -#define BOOST_NO_CXX11_STATIC_ASSERT -#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_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 -#define BOOST_NO_CXX11_THREAD_LOCAL - -// 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 - -// 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: -#if MPW_CPLUS < 0x890 -# error "Compiler not supported or configured - please reconfigure" -#endif -// -// last known and checked version is 0x890: -#if (MPW_CPLUS > 0x890) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/nvcc.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/nvcc.hpp deleted file mode 100644 index 43039b5c257..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/nvcc.hpp +++ /dev/null @@ -1,51 +0,0 @@ -// (C) Copyright Eric Jourdanneau, Joel Falcou 2010 -// 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. - -// NVIDIA CUDA C++ compiler setup - -#ifndef BOOST_COMPILER -# define BOOST_COMPILER "NVIDIA CUDA C++ Compiler" -#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__ - -// A bug in version 7.0 of CUDA prevents use of variadic templates in some occasions -// 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) -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#endif -// The same bug is back again in 8.0: -#if (__CUDACC_VER__ > 80000) && (__CUDACC_VER__ < 80100) -# 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 (__CUDACC_VER__ >= 80000) && (__CUDACC_VER__ < 80100) -# define BOOST_NO_CXX11_NOEXCEPT -#endif - -#endif - diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/pathscale.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/pathscale.hpp deleted file mode 100644 index 94b3f91d07c..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/pathscale.hpp +++ /dev/null @@ -1,132 +0,0 @@ -// (C) Copyright Bryce Lelbach 2011 - -// 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. - -// PathScale EKOPath C++ Compiler - -#ifndef BOOST_COMPILER -# define BOOST_COMPILER "PathScale EKOPath C++ Compiler version " __PATHSCALE__ -#endif - -#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 -# define BOOST_HAS_SIGACTION -# define BOOST_HAS_SCHED_YIELD -# define BOOST_HAS_THREADS -# 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_HAS_LONG_LONG -# define BOOST_HAS_LOG1P -# define BOOST_HAS_GETTIMEOFDAY -# define BOOST_HAS_EXPM1 -# define BOOST_HAS_DIRENT_H -# define BOOST_HAS_CLOCK_GETTIME -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -# define BOOST_NO_CXX11_UNICODE_LITERALS -# 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 -# define BOOST_NO_CXX11_RAW_LITERALS -# define BOOST_NO_CXX11_NULLPTR -# define BOOST_NO_CXX11_NUMERIC_LIMITS -# define BOOST_NO_CXX11_NOEXCEPT -# define BOOST_NO_CXX11_LAMBDAS -# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -# define BOOST_NO_MS_INT64_NUMERIC_LIMITS -# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -# define BOOST_NO_CXX11_DELETED_FUNCTIONS -# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -# define BOOST_NO_CXX11_DECLTYPE -# define BOOST_NO_CXX11_DECLTYPE_N3276 -# define BOOST_NO_CXX11_CONSTEXPR -# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -# define BOOST_NO_CXX11_CHAR32_T -# define BOOST_NO_CXX11_CHAR16_T -# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -# define BOOST_NO_CXX11_AUTO_DECLARATIONS -# 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_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_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 -# define BOOST_NO_CXX11_THREAD_LOCAL - -// 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 - -// 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/contrib/libboost/boost_1_65_0/boost/config/compiler/pgi.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/pgi.hpp deleted file mode 100644 index 4c402ba0d6c..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/pgi.hpp +++ /dev/null @@ -1,168 +0,0 @@ -// (C) Copyright Noel Belcourt 2007. -// 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. - -// PGI C++ compiler setup: - -#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. -// - -#if __PGIC__ >= 11 - -// 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_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 -#define BOOST_NO_CXX11_THREAD_LOCAL - -// 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 - -// 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 -// -// version check: -// probably nothing to do here? - diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/sgi_mipspro.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/sgi_mipspro.hpp deleted file mode 100644 index 54433c99789..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/sgi_mipspro.hpp +++ /dev/null @@ -1,29 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2002. -// 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. - -// SGI C++ compiler setup: - -#define BOOST_COMPILER "SGI Irix compiler version " BOOST_STRINGIZE(_COMPILER_VERSION) - -#include - -// -// Threading support: -// Turn this on unconditionally here, it will get turned off again later -// if no threading API is detected. -// -#define BOOST_HAS_THREADS -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP - -#undef BOOST_NO_SWPRINTF -#undef BOOST_DEDUCED_TYPENAME - -// -// version check: -// probably nothing to do here? - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/sunpro_cc.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/sunpro_cc.hpp deleted file mode 100644 index 2453e7cfc1f..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/sunpro_cc.hpp +++ /dev/null @@ -1,210 +0,0 @@ -// (C) Copyright John Maddock 2001. -// (C) Copyright Jens Maurer 2001 - 2003. -// (C) Copyright Peter Dimov 2002. -// (C) Copyright Aleksey Gurtovoy 2002 - 2003. -// (C) Copyright David Abrahams 2002. -// 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. - -// Sun C++ compiler setup: - -# if __SUNPRO_CC <= 0x500 -# define BOOST_NO_MEMBER_TEMPLATES -# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING -# endif - -# if (__SUNPRO_CC <= 0x520) - // - // Sunpro 5.2 and earler: - // - // although sunpro 5.2 supports the syntax for - // inline initialization it often gets the value - // wrong, especially where the value is computed - // from other constants (J Maddock 6th May 2001) -# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION - - // Although sunpro 5.2 supports the syntax for - // partial specialization, it often seems to - // bind to the wrong specialization. Better - // to disable it until suppport becomes more stable - // (J Maddock 6th May 2001). -# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# endif - -# if (__SUNPRO_CC <= 0x530) - // Requesting debug info (-g) with Boost.Python results - // in an internal compiler error for "static const" - // initialized in-class. - // >> Assertion: (../links/dbg_cstabs.cc, line 611) - // while processing ../test.cpp at line 0. - // (Jens Maurer according to Gottfried Ganssauge 04 Mar 2002) -# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION - - // SunPro 5.3 has better support for partial specialization, - // but breaks when compiling std::less > - // (Jens Maurer 4 Nov 2001). - - // std::less specialization fixed as reported by George - // Heintzelman; partial specialization re-enabled - // (Peter Dimov 17 Jan 2002) - -//# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - - // integral constant expressions with 64 bit numbers fail -# define BOOST_NO_INTEGRAL_INT64_T -# endif - -# if (__SUNPRO_CC < 0x570) -# define BOOST_NO_TEMPLATE_TEMPLATES - // see http://lists.boost.org/MailArchives/boost/msg47184.php - // and http://lists.boost.org/MailArchives/boost/msg47220.php -# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION -# define BOOST_NO_SFINAE -# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS -# endif -# if (__SUNPRO_CC <= 0x580) -# define BOOST_NO_IS_ABSTRACT -# endif - -# if (__SUNPRO_CC <= 0x5100) - // Sun 5.10 may not correctly value-initialize objects of - // some user defined types, as was reported in April 2010 - // (CR 6947016), and confirmed by Steve Clamage. - // (Niels Dekker, LKEB, May 2010). -# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -# endif - -// -// Dynamic shared object (DSO) and dynamic-link library (DLL) support -// -#if __SUNPRO_CC > 0x500 -# define BOOST_SYMBOL_EXPORT __global -# define BOOST_SYMBOL_IMPORT __global -# define BOOST_SYMBOL_VISIBLE __global -#endif - -#if (__SUNPRO_CC < 0x5130) -// C++03 features in 12.4: -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_NO_SFINAE_EXPR -#define BOOST_NO_ADL_BARRIER -#define BOOST_NO_CXX11_VARIADIC_MACROS -#endif - -#if (__SUNPRO_CC < 0x5130) || (__cplusplus < 201100) -// C++11 only featuires in 12.4: -#define BOOST_NO_CXX11_AUTO_DECLARATIONS -#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#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_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_HDR_INITIALIZER_LIST -#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_RANGE_BASED_FOR -#define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_RVALUE_REFERENCES -#define BOOST_NO_CXX11_SCOPED_ENUMS -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_UNICODE_LITERALS -#define BOOST_NO_CXX11_ALIGNAS -#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#define BOOST_NO_CXX11_INLINE_NAMESPACES -#define BOOST_NO_CXX11_FINAL -#endif - -#if (__SUNPRO_CC < 0x5140) || (__cplusplus < 201103) -#define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS -#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 -// -// C++0x features -// -# define BOOST_HAS_LONG_LONG - -#define BOOST_NO_CXX11_SFINAE_EXPR - -// 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) || (__cplusplus < 201402L) -# 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 - -// 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 -// - -#define BOOST_COMPILER "Sun compiler version " BOOST_STRINGIZE(__SUNPRO_CC) - -// -// versions check: -// we don't support sunpro prior to version 4: -#if __SUNPRO_CC < 0x400 -#error "Compiler not supported or configured - please reconfigure" -#endif -// -// last known and checked version is 0x590: -#if (__SUNPRO_CC > 0x590) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/vacpp.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/vacpp.hpp deleted file mode 100644 index 683c167dbf7..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/vacpp.hpp +++ /dev/null @@ -1,175 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Toon Knapen 2001 - 2003. -// (C) Copyright Lie-Quan Lee 2001. -// (C) Copyright Markus Schoepflin 2002 - 2003. -// (C) Copyright Beman Dawes 2002 - 2003. -// 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. - -// Visual Age (IBM) C++ compiler setup: - -#if __IBMCPP__ <= 501 -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS -#endif - -#if (__IBMCPP__ <= 502) -// Actually the compiler supports inclass member initialization but it -// requires a definition for the class member and it doesn't recognize -// it as an integral constant expression when used as a template argument. -# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION -# define BOOST_NO_INTEGRAL_INT64_T -# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD -#endif - -#if (__IBMCPP__ <= 600) || !defined(BOOST_STRICT_CONFIG) -# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS -#endif - -#if (__IBMCPP__ <= 1110) -// XL C++ V11.1 and earlier versions may not always value-initialize -// a temporary object T(), when T is a non-POD aggregate class type. -// Michael Wong (IBM Canada Ltd) has confirmed this issue and gave it -// high priority. -- Niels Dekker (LKEB), May 2010. -# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -#endif - -// -// On AIX thread support seems to be indicated by _THREAD_SAFE: -// -#ifdef _THREAD_SAFE -# define BOOST_HAS_THREADS -#endif - -#define BOOST_COMPILER "IBM Visual Age version " BOOST_STRINGIZE(__IBMCPP__) - -// -// versions check: -// we don't support Visual age prior to version 5: -#if __IBMCPP__ < 500 -#error "Compiler not supported or configured - please reconfigure" -#endif -// -// last known and checked version is 1210: -#if (__IBMCPP__ > 1210) -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown compiler version - please run the configure tests and report the results" -# endif -#endif - -// Some versions of the compiler have issues with default arguments on partial specializations -#if __IBMCPP__ <= 1010 -#define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS -#endif - -// -// C++0x features -// -// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG -// -#if ! __IBMCPP_AUTO_TYPEDEDUCTION -# define BOOST_NO_CXX11_AUTO_DECLARATIONS -# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#endif -#if ! __IBMCPP_UTF_LITERAL__ -# define BOOST_NO_CXX11_CHAR16_T -# define BOOST_NO_CXX11_CHAR32_T -#endif -#if ! __IBMCPP_CONSTEXPR -# define BOOST_NO_CXX11_CONSTEXPR -#endif -#if ! __IBMCPP_DECLTYPE -# define BOOST_NO_CXX11_DECLTYPE -#else -# define BOOST_HAS_DECLTYPE -#endif -#define BOOST_NO_CXX11_DECLTYPE_N3276 -#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#define BOOST_NO_CXX11_DELETED_FUNCTIONS -#if ! __IBMCPP_EXPLICIT_CONVERSION_OPERATORS -# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#endif -#if ! __IBMCPP_EXTERN_TEMPLATE -# define BOOST_NO_CXX11_EXTERN_TEMPLATE -#endif -#if ! __IBMCPP_VARIADIC_TEMPLATES -// not enabled separately at this time -# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#endif -#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#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_RANGE_BASED_FOR -#define BOOST_NO_CXX11_RAW_LITERALS -#define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#if ! __IBMCPP_RVALUE_REFERENCES -# define BOOST_NO_CXX11_RVALUE_REFERENCES -#endif -#if ! __IBMCPP_SCOPED_ENUM -# 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 -#endif -#define BOOST_NO_CXX11_TEMPLATE_ALIASES -#define BOOST_NO_CXX11_UNICODE_LITERALS -#if ! __IBMCPP_VARIADIC_TEMPLATES -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#endif -#if ! __C99_MACRO_WITH_VA_ARGS -# define BOOST_NO_CXX11_VARIADIC_MACROS -#endif -#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 -#define BOOST_NO_CXX11_THREAD_LOCAL - -// 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 - -// 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/contrib/libboost/boost_1_65_0/boost/config/compiler/visualc.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/visualc.hpp deleted file mode 100644 index c0557de7123..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/visualc.hpp +++ /dev/null @@ -1,331 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Darin Adler 2001 - 2002. -// (C) Copyright Peter Dimov 2001. -// (C) Copyright Aleksey Gurtovoy 2002. -// (C) Copyright David Abrahams 2002 - 2003. -// (C) Copyright Beman Dawes 2002 - 2003. -// 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. -// -// Microsoft Visual C++ compiler setup: -// -// We need to be careful with the checks in this file, as contrary -// to popular belief there are versions with _MSC_VER with the final -// digit non-zero (mainly the MIPS cross compiler). -// -// So we either test _MSC_VER >= XXXX or else _MSC_VER < XXXX. -// No other comparisons (==, >, or <=) are safe. -// - -#define BOOST_MSVC _MSC_VER - -// -// Helper macro BOOST_MSVC_FULL_VER for use in Boost code: -// -#if _MSC_FULL_VER > 100000000 -# define BOOST_MSVC_FULL_VER _MSC_FULL_VER -#else -# define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10) -#endif - -// Attempt to suppress VC6 warnings about the length of decorated names (obsolete): -#pragma warning( disable : 4503 ) // warning: decorated name length exceeded - -#define BOOST_HAS_PRAGMA_ONCE - -// -// versions check: -// we don't support Visual C++ prior to version 7.1: -#if _MSC_VER < 1310 -# error "Compiler not supported or configured - please reconfigure" -#endif - -#if _MSC_FULL_VER < 180020827 -# define BOOST_NO_FENV_H -#endif - -#if _MSC_VER < 1400 -// although a conforming signature for swprint exists in VC7.1 -// it appears not to actually work: -# define BOOST_NO_SWPRINTF -// Our extern template tests also fail for this compiler: -# define BOOST_NO_CXX11_EXTERN_TEMPLATE -// Variadic macros do not exist for VC7.1 and lower -# define BOOST_NO_CXX11_VARIADIC_MACROS -# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#endif - -#if _MSC_VER < 1500 // 140X == VC++ 8.0 -# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS -#endif - -#if _MSC_VER < 1600 // 150X == VC++ 9.0 - // A bug in VC9: -# define BOOST_NO_ADL_BARRIER -#endif - - -#ifndef _NATIVE_WCHAR_T_DEFINED -# define BOOST_NO_INTRINSIC_WCHAR_T -#endif - -// -// check for exception handling support: -#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS) -# define BOOST_NO_EXCEPTIONS -#endif - -// -// __int64 support: -// -#define BOOST_HAS_MS_INT64 -#if defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400) -# define BOOST_HAS_LONG_LONG -#else -# define BOOST_NO_LONG_LONG -#endif -#if (_MSC_VER >= 1400) && !defined(_DEBUG) -# define BOOST_HAS_NRVO -#endif -#if _MSC_VER >= 1600 // 160X == VC++ 10.0 -# define BOOST_HAS_PRAGMA_DETECT_MISMATCH -#endif -// -// disable Win32 API's if compiler extensions are -// turned off: -// -#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32) -# define BOOST_DISABLE_WIN32 -#endif -#if !defined(_CPPRTTI) && !defined(BOOST_NO_RTTI) -# define BOOST_NO_RTTI -#endif - -// -// TR1 features: -// -#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 -# define BOOST_HAS_TR1_UNORDERED_SET -#endif - -// -// C++0x features -// -// See above for BOOST_NO_LONG_LONG - -// C++ features supported by VC++ 10 (aka 2010) -// -#if _MSC_VER < 1600 -# define BOOST_NO_CXX11_AUTO_DECLARATIONS -# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -# define BOOST_NO_CXX11_LAMBDAS -# define BOOST_NO_CXX11_RVALUE_REFERENCES -# define BOOST_NO_CXX11_STATIC_ASSERT -# define BOOST_NO_CXX11_NULLPTR -# define BOOST_NO_CXX11_DECLTYPE -#endif // _MSC_VER < 1600 - -#if _MSC_VER >= 1600 -# define BOOST_HAS_STDINT_H -#endif - -// C++11 features supported by VC++ 11 (aka 2012) -// -#if _MSC_VER < 1700 -# define BOOST_NO_CXX11_FINAL -# define BOOST_NO_CXX11_RANGE_BASED_FOR -# define BOOST_NO_CXX11_SCOPED_ENUMS -#endif // _MSC_VER < 1700 - -// C++11 features supported by VC++ 12 (aka 2013). -// -#if _MSC_FULL_VER < 180020827 -# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -# define BOOST_NO_CXX11_DELETED_FUNCTIONS -# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -# define BOOST_NO_CXX11_RAW_LITERALS -# define BOOST_NO_CXX11_TEMPLATE_ALIASES -# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -# 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_REF_QUALIFIERS -# define BOOST_NO_CXX11_USER_DEFINED_LITERALS -# define BOOST_NO_CXX11_ALIGNAS -# define BOOST_NO_CXX11_INLINE_NAMESPACES -# define BOOST_NO_CXX11_CHAR16_T -# define BOOST_NO_CXX11_CHAR32_T -# define BOOST_NO_CXX11_UNICODE_LITERALS -# define BOOST_NO_CXX14_DECLTYPE_AUTO -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -# 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 - -// MSVC including version 14 has not yet completely -// implemented value-initialization, as is reported: -// "VC++ does not value-initialize members of derived classes without -// user-declared constructor", reported in 2009 by Sylvester Hesp: -// https://connect.microsoft.com/VisualStudio/feedback/details/484295 -// "Presence of copy constructor breaks member class initialization", -// reported in 2009 by Alex Vakulenko: -// https://connect.microsoft.com/VisualStudio/feedback/details/499606 -// "Value-initialization in new-expression", reported in 2005 by -// Pavel Kuznetsov (MetaCommunications Engineering): -// https://connect.microsoft.com/VisualStudio/feedback/details/100744 -// Reported again by John Maddock in 2015 for VC14: -// 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) -#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION -// -// C++ 11: -// -#define BOOST_NO_TWO_PHASE_NAME_LOOKUP -#define BOOST_NO_CXX11_SFINAE_EXPR -// C++ 14: -# define BOOST_NO_CXX14_CONSTEXPR -// C++ 17: -#define BOOST_NO_CXX17_STRUCTURED_BINDINGS -#define BOOST_NO_CXX17_INLINE_VARIABLES -#define BOOST_NO_CXX17_FOLD_EXPRESSIONS - -// -// 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 -#endif - -// -// prefix and suffix headers: -// -#ifndef BOOST_ABI_PREFIX -# define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp" -#endif -#ifndef BOOST_ABI_SUFFIX -# define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp" -#endif - -#ifndef BOOST_COMPILER -// TODO: -// these things are mostly bogus. 1200 means version 12.0 of the compiler. The -// artificial versions assigned to them only refer to the versions of some IDE -// these compilers have been shipped with, and even that is not all of it. Some -// were shipped with freely downloadable SDKs, others as crosscompilers in eVC. -// IOW, you can't use these 'versions' in any sensible way. Sorry. -# if defined(UNDER_CE) -# if _MSC_VER < 1400 - // Note: I'm not aware of any CE compiler with version 13xx -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown EVC++ compiler version - please run the configure tests and report the results" -# else -# pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results") -# endif -# elif _MSC_VER < 1500 -# define BOOST_COMPILER_VERSION evc8 -# elif _MSC_VER < 1600 -# define BOOST_COMPILER_VERSION evc9 -# elif _MSC_VER < 1700 -# define BOOST_COMPILER_VERSION evc10 -# elif _MSC_VER < 1800 -# define BOOST_COMPILER_VERSION evc11 -# elif _MSC_VER < 1900 -# define BOOST_COMPILER_VERSION evc12 -# elif _MSC_VER < 2000 -# define BOOST_COMPILER_VERSION evc14 -# else -# if defined(BOOST_ASSERT_CONFIG) -# error "Unknown EVC++ compiler version - please run the configure tests and report the results" -# else -# pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results") -# endif -# endif -# else -# if _MSC_VER < 1310 - // Note: Versions up to 7.0 aren't supported. -# define BOOST_COMPILER_VERSION 5.0 -# elif _MSC_VER < 1300 -# define BOOST_COMPILER_VERSION 6.0 -# elif _MSC_VER < 1310 -# define BOOST_COMPILER_VERSION 7.0 -# elif _MSC_VER < 1400 -# define BOOST_COMPILER_VERSION 7.1 -# elif _MSC_VER < 1500 -# define BOOST_COMPILER_VERSION 8.0 -# elif _MSC_VER < 1600 -# define BOOST_COMPILER_VERSION 9.0 -# elif _MSC_VER < 1700 -# define BOOST_COMPILER_VERSION 10.0 -# elif _MSC_VER < 1800 -# define BOOST_COMPILER_VERSION 11.0 -# elif _MSC_VER < 1900 -# define BOOST_COMPILER_VERSION 12.0 -# 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 -# endif - -# define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION) -#endif - -// -// last known and checked version is 19.10.25017 (VC++ 2017): -#if (_MSC_VER > 1910) -# 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") -# endif -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/xlcpp.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/xlcpp.hpp deleted file mode 100644 index b267f49bad8..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/xlcpp.hpp +++ /dev/null @@ -1,276 +0,0 @@ -// (C) Copyright Douglas Gregor 2010 -// -// 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. - -// compiler setup for IBM XL C/C++ for Linux (Little Endian) based on clang. - -#define BOOST_HAS_PRAGMA_ONCE - -// Detecting `-fms-extension` compiler flag assuming that _MSC_VER defined when that flag is used. -#if defined (_MSC_VER) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4)) -# define BOOST_HAS_PRAGMA_DETECT_MISMATCH -#endif - -// When compiling with clang before __has_extension was defined, -// even if one writes 'defined(__has_extension) && __has_extension(xxx)', -// clang reports a compiler error. So the only workaround found is: - -#ifndef __has_extension -#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 - -#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI) -# define BOOST_NO_RTTI -#endif - -#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID) -# define BOOST_NO_TYPEID -#endif - -#if defined(__int64) && !defined(__GNUC__) -# define BOOST_HAS_MS_INT64 -#endif - -#define BOOST_HAS_NRVO - -// Branch prediction hints -#if defined(__has_builtin) -#if __has_builtin(__builtin_expect) -#define BOOST_LIKELY(x) __builtin_expect(x, 1) -#define BOOST_UNLIKELY(x) __builtin_expect(x, 0) -#endif -#endif - -// Clang supports "long long" in all compilation modes. -#define BOOST_HAS_LONG_LONG - -// -// Dynamic shared object (DSO) and dynamic-link library (DLL) support -// -#if !defined(_WIN32) && !defined(__WIN32__) && !defined(WIN32) -# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default"))) -# define BOOST_SYMBOL_IMPORT -# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default"))) -#endif - -// -// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through -// between switch labels. -// -#if __cplusplus >= 201103L && defined(__has_warning) -# if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough") -# define BOOST_FALLTHROUGH [[clang::fallthrough]] -# endif -#endif - -#if !__has_feature(cxx_auto_type) -# define BOOST_NO_CXX11_AUTO_DECLARATIONS -# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS -#endif - -// -// 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) -# define BOOST_NO_CXX11_CHAR16_T -# define BOOST_NO_CXX11_CHAR32_T -#endif - -#if !__has_feature(cxx_constexpr) -# define BOOST_NO_CXX11_CONSTEXPR -#endif - -#if !__has_feature(cxx_decltype) -# define BOOST_NO_CXX11_DECLTYPE -#endif - -#if !__has_feature(cxx_decltype_incomplete_return_types) -# define BOOST_NO_CXX11_DECLTYPE_N3276 -#endif - -#if !__has_feature(cxx_defaulted_functions) -# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS -#endif - -#if !__has_feature(cxx_deleted_functions) -# define BOOST_NO_CXX11_DELETED_FUNCTIONS -#endif - -#if !__has_feature(cxx_explicit_conversions) -# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS -#endif - -#if !__has_feature(cxx_default_function_template_args) -# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS -#endif - -#if !__has_feature(cxx_generalized_initializers) -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -#endif - -#if !__has_feature(cxx_lambdas) -# define BOOST_NO_CXX11_LAMBDAS -#endif - -#if !__has_feature(cxx_local_type_template_args) -# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS -#endif - -#if !__has_feature(cxx_noexcept) -# define BOOST_NO_CXX11_NOEXCEPT -#endif - -#if !__has_feature(cxx_nullptr) -# define BOOST_NO_CXX11_NULLPTR -#endif - -#if !__has_feature(cxx_range_for) -# define BOOST_NO_CXX11_RANGE_BASED_FOR -#endif - -#if !__has_feature(cxx_raw_string_literals) -# define BOOST_NO_CXX11_RAW_LITERALS -#endif - -#if !__has_feature(cxx_reference_qualified_functions) -# define BOOST_NO_CXX11_REF_QUALIFIERS -#endif - -#if !__has_feature(cxx_generalized_initializers) -# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX -#endif - -#if !__has_feature(cxx_rvalue_references) -# define BOOST_NO_CXX11_RVALUE_REFERENCES -#endif - -#if !__has_feature(cxx_strong_enums) -# define BOOST_NO_CXX11_SCOPED_ENUMS -#endif - -#if !__has_feature(cxx_static_assert) -# define BOOST_NO_CXX11_STATIC_ASSERT -#endif - -#if !__has_feature(cxx_alias_templates) -# define BOOST_NO_CXX11_TEMPLATE_ALIASES -#endif - -#if !__has_feature(cxx_unicode_literals) -# define BOOST_NO_CXX11_UNICODE_LITERALS -#endif - -#if !__has_feature(cxx_variadic_templates) -# define BOOST_NO_CXX11_VARIADIC_TEMPLATES -#endif - -#if !__has_feature(cxx_user_literals) -# define BOOST_NO_CXX11_USER_DEFINED_LITERALS -#endif - -#if !__has_feature(cxx_alignas) -# define BOOST_NO_CXX11_ALIGNAS -#endif - -#if !__has_feature(cxx_trailing_return) -# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES -#endif - -#if !__has_feature(cxx_inline_namespaces) -# define BOOST_NO_CXX11_INLINE_NAMESPACES -#endif - -#if !__has_feature(cxx_override_control) -# define BOOST_NO_CXX11_FINAL -#endif - -#if !(__has_feature(__cxx_binary_literals__) || __has_extension(__cxx_binary_literals__)) -# define BOOST_NO_CXX14_BINARY_LITERALS -#endif - -#if !__has_feature(__cxx_decltype_auto__) -# define BOOST_NO_CXX14_DECLTYPE_AUTO -#endif - -#if !__has_feature(__cxx_aggregate_nsdmi__) -# define BOOST_NO_CXX14_AGGREGATE_NSDMI -#endif - -#if !__has_feature(__cxx_init_captures__) -# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES -#endif - -#if !__has_feature(__cxx_generic_lambdas__) -# define BOOST_NO_CXX14_GENERIC_LAMBDAS -#endif - -// clang < 3.5 has a defect with dependent type, like following. -// -// template -// constexpr typename enable_if >::type foo(T &) -// { } // error: no return statement in constexpr function -// -// This issue also affects C++11 mode, but C++11 constexpr requires return stmt. -// Therefore we don't care such case. -// -// Note that we can't check Clang version directly as the numbering system changes depending who's -// creating the Clang release (see https://github.com/boostorg/config/pull/39#issuecomment-59927873) -// so instead verify that we have a feature that was introduced at the same time as working C++14 -// constexpr (generic lambda's in this case): -// -#if !__has_feature(__cxx_generic_lambdas__) || !__has_feature(__cxx_relaxed_constexpr__) -# define BOOST_NO_CXX14_CONSTEXPR -#endif - -#if !__has_feature(__cxx_return_type_deduction__) -# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION -#endif - -#if !__has_feature(__cxx_variable_templates__) -# 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 -#endif - - -// Unused attribute: -#if defined(__GNUC__) && (__GNUC__ >= 4) -# define BOOST_ATTRIBUTE_UNUSED __attribute__((unused)) -#endif - -#ifndef BOOST_COMPILER -# define BOOST_COMPILER "Clang version " __clang_version__ -#endif - -// Macro used to identify the Clang compiler. -#define BOOST_CLANG 1 - diff --git a/contrib/libboost/boost_1_65_0/boost/config/compiler/xlcpp_zos.hpp b/contrib/libboost/boost_1_65_0/boost/config/compiler/xlcpp_zos.hpp deleted file mode 100644 index c554903a0ba..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/compiler/xlcpp_zos.hpp +++ /dev/null @@ -1,168 +0,0 @@ -// 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__)) -// 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/contrib/libboost/boost_1_65_0/boost/config/detail/posix_features.hpp b/contrib/libboost/boost_1_65_0/boost/config/detail/posix_features.hpp deleted file mode 100644 index d12954797f9..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/detail/posix_features.hpp +++ /dev/null @@ -1,95 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// 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. - -// All POSIX feature tests go in this file, -// Note that we test _POSIX_C_SOURCE and _XOPEN_SOURCE as well -// _POSIX_VERSION and _XOPEN_VERSION: on some systems POSIX API's -// may be present but none-functional unless _POSIX_C_SOURCE and -// _XOPEN_SOURCE have been defined to the right value (it's up -// to the user to do this *before* including any header, although -// in most cases the compiler will do this for you). - -# if defined(BOOST_HAS_UNISTD_H) -# include - - // XOpen has , but is this the correct version check? -# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION >= 3) -# define BOOST_HAS_NL_TYPES_H -# endif - - // POSIX version 6 requires -# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 200100) -# define BOOST_HAS_STDINT_H -# endif - - // POSIX version 2 requires -# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199009L) -# define BOOST_HAS_DIRENT_H -# endif - - // POSIX version 3 requires to have sigaction: -# if defined(_POSIX_VERSION) && (_POSIX_VERSION >= 199506L) -# define BOOST_HAS_SIGACTION -# endif - // POSIX defines _POSIX_THREADS > 0 for pthread support, - // however some platforms define _POSIX_THREADS without - // a value, hence the (_POSIX_THREADS+0 >= 0) check. - // Strictly speaking this may catch platforms with a - // non-functioning stub , but such occurrences should - // occur very rarely if at all. -# if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_MPTASKS) -# define BOOST_HAS_PTHREADS -# endif - - // BOOST_HAS_NANOSLEEP: - // This is predicated on _POSIX_TIMERS or _XOPEN_REALTIME: -# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) \ - || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) -# define BOOST_HAS_NANOSLEEP -# endif - - // BOOST_HAS_CLOCK_GETTIME: - // This is predicated on _POSIX_TIMERS (also on _XOPEN_REALTIME - // but at least one platform - linux - defines that flag without - // defining clock_gettime): -# if (defined(_POSIX_TIMERS) && (_POSIX_TIMERS+0 >= 0)) -# define BOOST_HAS_CLOCK_GETTIME -# endif - - // BOOST_HAS_SCHED_YIELD: - // This is predicated on _POSIX_PRIORITY_SCHEDULING or - // on _POSIX_THREAD_PRIORITY_SCHEDULING or on _XOPEN_REALTIME. -# if defined(_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING+0 > 0)\ - || (defined(_POSIX_THREAD_PRIORITY_SCHEDULING) && (_POSIX_THREAD_PRIORITY_SCHEDULING+0 > 0))\ - || (defined(_XOPEN_REALTIME) && (_XOPEN_REALTIME+0 >= 0)) -# define BOOST_HAS_SCHED_YIELD -# endif - - // BOOST_HAS_GETTIMEOFDAY: - // BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE: - // These are predicated on _XOPEN_VERSION, and appears to be first released - // in issue 4, version 2 (_XOPEN_VERSION > 500). - // Likewise for the functions log1p and expm1. -# if defined(_XOPEN_VERSION) && (_XOPEN_VERSION+0 >= 500) -# define BOOST_HAS_GETTIMEOFDAY -# if defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE+0 >= 500) -# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# endif -# ifndef BOOST_HAS_LOG1P -# define BOOST_HAS_LOG1P -# endif -# ifndef BOOST_HAS_EXPM1 -# define BOOST_HAS_EXPM1 -# endif -# endif - -# endif - - - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/detail/select_compiler_config.hpp b/contrib/libboost/boost_1_65_0/boost/config/detail/select_compiler_config.hpp deleted file mode 100644 index 97d47c1c56e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/detail/select_compiler_config.hpp +++ /dev/null @@ -1,158 +0,0 @@ -// Boost compiler configuration selection header file - -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Martin Wille 2003. -// (C) Copyright Guillaume Melquiond 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 most recent version. - -// locate which compiler we are using and define -// BOOST_COMPILER_CONFIG as needed: - -#if defined __CUDACC__ -// NVIDIA CUDA C++ compiler for GPU -# include "boost/config/compiler/nvcc.hpp" - -#endif - -#if defined(__GCCXML__) -// GCC-XML emulates other compilers, it has to appear first here! -# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp" - -#elif defined(_CRAYC) -// EDG based Cray compiler: -# define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp" - -#elif defined __COMO__ -// Comeau C++ -# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp" - -#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4) -// PathScale EKOPath compiler (has to come before clang and gcc) -# define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp" - -#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) -// Intel -# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp" - -#elif defined __clang__ && !defined(__CUDACC__) && !defined(__ibmxl__) -// when using clang and cuda at same time, you want to appear as gcc -// Clang C++ emulates GCC, so it has to appear early. -# define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp" - -#elif defined __DMC__ -// 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(__GNUC__) && !defined(__ibmxl__) -// GNU C++: -# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp" - -#elif defined __KCC -// Kai C++ -# define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp" - -#elif defined __sgi -// SGI MIPSpro C++ -# define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp" - -#elif defined __DECCXX -// Compaq Tru64 Unix cxx -# define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp" - -#elif defined __ghs -// Greenhills C++ -# define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp" - -#elif defined __CODEGEARC__ -// CodeGear - must be checked for before Borland -# define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp" - -#elif defined __BORLANDC__ -// Borland -# define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp" - -#elif defined __MWERKS__ -// Metrowerks CodeWarrior -# define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp" - -#elif defined __SUNPRO_CC -// Sun Workshop Compiler C++ -# define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp" - -#elif defined __HP_aCC -// HP aCC -# define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp" - -#elif defined(__MRC__) || defined(__SC__) -// 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) -# 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++ -// -// Must remain the last #elif since some other vendors (Metrowerks, for -// example) also #define _MSC_VER -# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp" - -#elif defined (BOOST_ASSERT_CONFIG) -// this must come last - generate an error if we don't -// recognise the compiler: -# error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)" - -#endif - -#if 0 -// -// This section allows dependency scanners to find all the headers we *might* include: -// -#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/contrib/libboost/boost_1_65_0/boost/config/detail/select_platform_config.hpp b/contrib/libboost/boost_1_65_0/boost/config/detail/select_platform_config.hpp deleted file mode 100644 index b36eca57a24..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/detail/select_platform_config.hpp +++ /dev/null @@ -1,142 +0,0 @@ -// Boost compiler configuration selection header file - -// (C) Copyright John Maddock 2001 - 2002. -// (C) Copyright Jens Maurer 2001. -// 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. - -// locate which platform we are on and define BOOST_PLATFORM_CONFIG as needed. -// Note that we define the headers to include using "header_name" not -// in order to prevent macro expansion within the header -// name (for example "linux" is a macro on linux systems). - -#if (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC) -// linux, also other platforms (Hurd etc) that use GLIBC, should these really have their own config headers though? -# define BOOST_PLATFORM_CONFIG "boost/config/platform/linux.hpp" - -#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) -// BSD: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/bsd.hpp" - -#elif defined(sun) || defined(__sun) -// solaris: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/solaris.hpp" - -#elif defined(__sgi) -// SGI Irix: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/irix.hpp" - -#elif defined(__hpux) -// hp unix: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/hpux.hpp" - -#elif defined(__CYGWIN__) -// cygwin is not win32: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/cygwin.hpp" - -#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) -// win32: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/win32.hpp" - -#elif defined(__HAIKU__) -// Haiku -# define BOOST_PLATFORM_CONFIG "boost/config/platform/haiku.hpp" - -#elif defined(__BEOS__) -// BeOS -# define BOOST_PLATFORM_CONFIG "boost/config/platform/beos.hpp" - -#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) -// 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 AIX -# define BOOST_PLATFORM_CONFIG "boost/config/platform/aix.hpp" - -#elif defined(__amigaos__) -// AmigaOS -# define BOOST_PLATFORM_CONFIG "boost/config/platform/amigaos.hpp" - -#elif defined(__QNXNTO__) -// QNX: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/qnxnto.hpp" - -#elif defined(__VXWORKS__) -// vxWorks: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/vxworks.hpp" - -#elif defined(__SYMBIAN32__) -// Symbian: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/symbian.hpp" - -#elif defined(_CRAYC) -// Cray: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/cray.hpp" - -#elif defined(__VMS) -// VMS: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/vms.hpp" - -#elif defined(__CloudABI__) -// Nuxi CloudABI: -# define BOOST_PLATFORM_CONFIG "boost/config/platform/cloudabi.hpp" -#else - -# if defined(unix) \ - || defined(__unix) \ - || defined(_XOPEN_SOURCE) \ - || defined(_POSIX_SOURCE) - - // generic unix platform: - -# ifndef BOOST_HAS_UNISTD_H -# define BOOST_HAS_UNISTD_H -# endif - -# include - -# endif - -# if defined (BOOST_ASSERT_CONFIG) - // this must come last - generate an error if we don't - // recognise the platform: -# error "Unknown platform - please configure and report the results to boost.org" -# endif - -#endif - -#if 0 -// -// This section allows dependency scanners to find all the files we *might* include: -// -# include "boost/config/platform/linux.hpp" -# include "boost/config/platform/bsd.hpp" -# include "boost/config/platform/solaris.hpp" -# include "boost/config/platform/irix.hpp" -# include "boost/config/platform/hpux.hpp" -# include "boost/config/platform/cygwin.hpp" -# 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" -# include "boost/config/platform/vxworks.hpp" -# include "boost/config/platform/symbian.hpp" -# include "boost/config/platform/cray.hpp" -# include "boost/config/platform/vms.hpp" -# include - - - -#endif - diff --git a/contrib/libboost/boost_1_65_0/boost/config/detail/select_stdlib_config.hpp b/contrib/libboost/boost_1_65_0/boost/config/detail/select_stdlib_config.hpp deleted file mode 100644 index 8db778c86ba..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/detail/select_stdlib_config.hpp +++ /dev/null @@ -1,110 +0,0 @@ -// Boost compiler configuration selection header file - -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2001 - 2002. -// 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. - -// locate which std lib we are using and define BOOST_STDLIB_CONFIG as needed: - -// First include to determine if some version of STLport is in use as the std lib -// (do not rely on this header being included since users can short-circuit this header -// if they know whose std lib they are using.) -#ifdef __cplusplus -# include -#else -# include -#endif - -#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) -// STLPort library; this _must_ come first, otherwise since -// STLport typically sits on top of some other library, we -// can end up detecting that first rather than STLport: -# define BOOST_STDLIB_CONFIG "boost/config/stdlib/stlport.hpp" - -#else - -// If our std lib was not some version of STLport, and has not otherwise -// been detected, then include as it is about -// the smallest of the std lib headers that includes real C++ stuff. -// Some std libs do not include their C++-related macros in -// so this additional include makes sure we get those definitions. -// Note: do not rely on this header being included since users can short-circuit this -// #include if they know whose std lib they are using. -#if !defined(__LIBCOMO__) && !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)\ - && !defined(_LIBCPP_VERSION) && !defined(__GLIBCPP__) && !defined(__GLIBCXX__)\ - && !defined(__STL_CONFIG_H) && !defined(__MSL_CPP__) && !defined(__IBMCPP__)\ - && !defined(MSIPL_COMPILE_H) && !defined(_YVALS) && !defined(_CPPLIB_VER) -#include -#endif - -#if defined(__LIBCOMO__) -// Comeau STL: -#define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcomo.hpp" - -#elif defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) -// Rogue Wave library: -# define BOOST_STDLIB_CONFIG "boost/config/stdlib/roguewave.hpp" - -#elif defined(_LIBCPP_VERSION) -// libc++ -# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libcpp.hpp" - -#elif defined(__GLIBCPP__) || defined(__GLIBCXX__) -// GNU libstdc++ 3 -# define BOOST_STDLIB_CONFIG "boost/config/stdlib/libstdcpp3.hpp" - -#elif defined(__STL_CONFIG_H) -// generic SGI STL -# define BOOST_STDLIB_CONFIG "boost/config/stdlib/sgi.hpp" - -#elif defined(__MSL_CPP__) -// 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" - -#elif defined(MSIPL_COMPILE_H) -// Modena C++ standard library -# define BOOST_STDLIB_CONFIG "boost/config/stdlib/modena.hpp" - -#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) -// Dinkumware Library (this has to appear after any possible replacement libraries): -# define BOOST_STDLIB_CONFIG "boost/config/stdlib/dinkumware.hpp" - -#elif defined (BOOST_ASSERT_CONFIG) -// this must come last - generate an error if we don't -// recognise the library: -# error "Unknown standard library - please configure and report the results to boost.org" - -#endif - -#endif - -#if 0 -// -// This section allows dependency scanners to find all the files we *might* include: -// -# include "boost/config/stdlib/stlport.hpp" -# include "boost/config/stdlib/libcomo.hpp" -# include "boost/config/stdlib/roguewave.hpp" -# include "boost/config/stdlib/libcpp.hpp" -# 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" -#endif - diff --git a/contrib/libboost/boost_1_65_0/boost/config/detail/suffix.hpp b/contrib/libboost/boost_1_65_0/boost/config/detail/suffix.hpp deleted file mode 100644 index 6abec22f58f..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/detail/suffix.hpp +++ /dev/null @@ -1,1038 +0,0 @@ -// Boost config.hpp configuration header file ------------------------------// -// boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file - -// Copyright (c) 2001-2003 John Maddock -// Copyright (c) 2001 Darin Adler -// Copyright (c) 2001 Peter Dimov -// Copyright (c) 2002 Bill Kempf -// Copyright (c) 2002 Jens Maurer -// Copyright (c) 2002-2003 David Abrahams -// Copyright (c) 2003 Gennaro Prota -// Copyright (c) 2003 Eric Friedman -// Copyright (c) 2010 Eric Jourdanneau, Joel Falcou -// 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. - -// Boost config.hpp policy and rationale documentation has been moved to -// http://www.boost.org/libs/config/ -// -// This file is intended to be stable, and relatively unchanging. -// It should contain boilerplate code only - no compiler specific -// code unless it is unavoidable - no changes unless unavoidable. - -#ifndef BOOST_CONFIG_SUFFIX_HPP -#define BOOST_CONFIG_SUFFIX_HPP - -#if defined(__GNUC__) && (__GNUC__ >= 4) -// -// Some GCC-4.x versions issue warnings even when __extension__ is used, -// so use this as a workaround: -// -#pragma GCC system_header -#endif - -// -// ensure that visibility macros are always defined, thus symplifying use -// -#ifndef BOOST_SYMBOL_EXPORT -# define BOOST_SYMBOL_EXPORT -#endif -#ifndef BOOST_SYMBOL_IMPORT -# define BOOST_SYMBOL_IMPORT -#endif -#ifndef BOOST_SYMBOL_VISIBLE -# define BOOST_SYMBOL_VISIBLE -#endif - -// -// look for long long by looking for the appropriate macros in . -// Note that we use limits.h rather than climits for maximal portability, -// remember that since these just declare a bunch of macros, there should be -// no namespace issues from this. -// -#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \ - && !defined(BOOST_MSVC) && !defined(__BORLANDC__) -# include -# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX)) -# define BOOST_HAS_LONG_LONG -# else -# define BOOST_NO_LONG_LONG -# endif -#endif - -// GCC 3.x will clean up all of those nasty macro definitions that -// BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine -// it under GCC 3.x. -#if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS) -# undef BOOST_NO_CTYPE_FUNCTIONS -#endif - -// -// Assume any extensions are in namespace std:: unless stated otherwise: -// -# ifndef BOOST_STD_EXTENSION_NAMESPACE -# define BOOST_STD_EXTENSION_NAMESPACE std -# endif - -// -// If cv-qualified specializations are not allowed, then neither are cv-void ones: -// -# if defined(BOOST_NO_CV_SPECIALIZATIONS) \ - && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS) -# define BOOST_NO_CV_VOID_SPECIALIZATIONS -# endif - -// -// If there is no numeric_limits template, then it can't have any compile time -// constants either! -// -# if defined(BOOST_NO_LIMITS) \ - && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) -# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS -# define BOOST_NO_MS_INT64_NUMERIC_LIMITS -# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS -# endif - -// -// if there is no long long then there is no specialisation -// for numeric_limits either: -// -#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS) -# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS -#endif - -// -// if there is no __int64 then there is no specialisation -// for numeric_limits<__int64> either: -// -#if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS) -# define BOOST_NO_MS_INT64_NUMERIC_LIMITS -#endif - -// -// if member templates are supported then so is the -// VC6 subset of member templates: -// -# if !defined(BOOST_NO_MEMBER_TEMPLATES) \ - && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) -# define BOOST_MSVC6_MEMBER_TEMPLATES -# endif - -// -// Without partial specialization, can't test for partial specialisation bugs: -// -# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG) -# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG -# endif - -// -// Without partial specialization, we can't have array-type partial specialisations: -// -# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) -# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS -# endif - -// -// Without partial specialization, std::iterator_traits can't work: -// -# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_NO_STD_ITERATOR_TRAITS) -# define BOOST_NO_STD_ITERATOR_TRAITS -# endif - -// -// Without partial specialization, partial -// specialization with default args won't work either: -// -# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS) -# define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS -# endif - -// -// Without member template support, we can't have template constructors -// in the standard library either: -// -# if defined(BOOST_NO_MEMBER_TEMPLATES) \ - && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ - && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS) -# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS -# endif - -// -// Without member template support, we can't have a conforming -// std::allocator template either: -// -# if defined(BOOST_NO_MEMBER_TEMPLATES) \ - && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \ - && !defined(BOOST_NO_STD_ALLOCATOR) -# define BOOST_NO_STD_ALLOCATOR -# endif - -// -// without ADL support then using declarations will break ADL as well: -// -#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) -# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL -#endif - -// -// Without typeid support we have no dynamic RTTI either: -// -#if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI) -# define BOOST_NO_RTTI -#endif - -// -// If we have a standard allocator, then we have a partial one as well: -// -#if !defined(BOOST_NO_STD_ALLOCATOR) -# define BOOST_HAS_PARTIAL_STD_ALLOCATOR -#endif - -// -// We can't have a working std::use_facet if there is no std::locale: -// -# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET) -# define BOOST_NO_STD_USE_FACET -# endif - -// -// We can't have a std::messages facet if there is no std::locale: -// -# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES) -# define BOOST_NO_STD_MESSAGES -# endif - -// -// We can't have a working std::wstreambuf if there is no std::locale: -// -# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF) -# define BOOST_NO_STD_WSTREAMBUF -# endif - -// -// We can't have a if there is no : -// -# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE) -# define BOOST_NO_CWCTYPE -# endif - -// -// We can't have a swprintf if there is no : -// -# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF) -# define BOOST_NO_SWPRINTF -# endif - -// -// If Win32 support is turned off, then we must turn off -// threading support also, unless there is some other -// thread API enabled: -// -#if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \ - && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS) -# define BOOST_DISABLE_THREADS -#endif - -// -// Turn on threading support if the compiler thinks that it's in -// multithreaded mode. We put this here because there are only a -// limited number of macros that identify this (if there's any missing -// from here then add to the appropriate compiler section): -// -#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \ - || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \ - && !defined(BOOST_HAS_THREADS) -# define BOOST_HAS_THREADS -#endif - -// -// Turn threading support off if BOOST_DISABLE_THREADS is defined: -// -#if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS) -# undef BOOST_HAS_THREADS -#endif - -// -// Turn threading support off if we don't recognise the threading API: -// -#if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\ - && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\ - && !defined(BOOST_HAS_MPTASKS) -# undef BOOST_HAS_THREADS -#endif - -// -// Turn threading detail macros off if we don't (want to) use threading -// -#ifndef BOOST_HAS_THREADS -# undef BOOST_HAS_PTHREADS -# undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# undef BOOST_HAS_PTHREAD_YIELD -# undef BOOST_HAS_PTHREAD_DELAY_NP -# undef BOOST_HAS_WINTHREADS -# undef BOOST_HAS_BETHREADS -# undef BOOST_HAS_MPTASKS -#endif - -// -// If the compiler claims to be C99 conformant, then it had better -// have a : -// -# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901) -# define BOOST_HAS_STDINT_H -# ifndef BOOST_HAS_LOG1P -# define BOOST_HAS_LOG1P -# endif -# ifndef BOOST_HAS_EXPM1 -# define BOOST_HAS_EXPM1 -# endif -# endif - -// -// Define BOOST_NO_SLIST and BOOST_NO_HASH if required. -// Note that this is for backwards compatibility only. -// -# if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST) -# define BOOST_NO_SLIST -# endif - -# if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH) -# define BOOST_NO_HASH -# endif - -// -// Set BOOST_SLIST_HEADER if not set already: -// -#if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER) -# define BOOST_SLIST_HEADER -#endif - -// -// Set BOOST_HASH_SET_HEADER if not set already: -// -#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER) -# define BOOST_HASH_SET_HEADER -#endif - -// -// Set BOOST_HASH_MAP_HEADER if not set already: -// -#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER) -# define BOOST_HASH_MAP_HEADER -#endif - -// BOOST_HAS_ABI_HEADERS -// This macro gets set if we have headers that fix the ABI, -// and prevent ODR violations when linking to external libraries: -#if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS) -# define BOOST_HAS_ABI_HEADERS -#endif - -#if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS) -# undef BOOST_HAS_ABI_HEADERS -#endif - -// BOOST_NO_STDC_NAMESPACE workaround --------------------------------------// -// Because std::size_t usage is so common, even in boost headers which do not -// otherwise use the C library, the workaround is included here so -// that ugly workaround code need not appear in many other boost headers. -// NOTE WELL: This is a workaround for non-conforming compilers; -// must still be #included in the usual places so that inclusion -// works as expected with standard conforming compilers. The resulting -// double inclusion of is harmless. - -# if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus) -# include - namespace std { using ::ptrdiff_t; using ::size_t; } -# endif - -// Workaround for the unfortunate min/max macros defined by some platform headers - -#define BOOST_PREVENT_MACRO_SUBSTITUTION - -#ifndef BOOST_USING_STD_MIN -# define BOOST_USING_STD_MIN() using std::min -#endif - -#ifndef BOOST_USING_STD_MAX -# define BOOST_USING_STD_MAX() using std::max -#endif - -// BOOST_NO_STD_MIN_MAX workaround -----------------------------------------// - -# if defined(BOOST_NO_STD_MIN_MAX) && defined(__cplusplus) - -namespace std { - template - inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { - return __b < __a ? __b : __a; - } - template - inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) { - return __a < __b ? __b : __a; - } -} - -# endif - -// BOOST_STATIC_CONSTANT workaround --------------------------------------- // -// On compilers which don't allow in-class initialization of static integral -// constant members, we must use enums as a workaround if we want the constants -// to be available at compile-time. This macro gives us a convenient way to -// declare such constants. - -# ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION -# define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment } -# else -# define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment -# endif - -// BOOST_USE_FACET / HAS_FACET workaround ----------------------------------// -// When the standard library does not have a conforming std::use_facet there -// are various workarounds available, but they differ from library to library. -// The same problem occurs with has_facet. -// These macros provide a consistent way to access a locale's facets. -// Usage: -// replace -// std::use_facet(loc); -// with -// BOOST_USE_FACET(Type, loc); -// Note do not add a std:: prefix to the front of BOOST_USE_FACET! -// Use for BOOST_HAS_FACET is analogous. - -#if defined(BOOST_NO_STD_USE_FACET) -# ifdef BOOST_HAS_TWO_ARG_USE_FACET -# define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast(0)) -# define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast(0)) -# elif defined(BOOST_HAS_MACRO_USE_FACET) -# define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type) -# define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type) -# elif defined(BOOST_HAS_STLP_USE_FACET) -# define BOOST_USE_FACET(Type, loc) (*std::_Use_facet(loc)) -# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) -# endif -#else -# define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc) -# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc) -#endif - -// BOOST_NESTED_TEMPLATE workaround ------------------------------------------// -// Member templates are supported by some compilers even though they can't use -// the A::template member syntax, as a workaround replace: -// -// typedef typename A::template rebind binder; -// -// with: -// -// typedef typename A::BOOST_NESTED_TEMPLATE rebind binder; - -#ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD -# define BOOST_NESTED_TEMPLATE template -#else -# define BOOST_NESTED_TEMPLATE -#endif - -// BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------// -// Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION -// is defined, in which case it evaluates to return x; Use when you have a return -// statement that can never be reached. - -#ifndef BOOST_UNREACHABLE_RETURN -# ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION -# define BOOST_UNREACHABLE_RETURN(x) return x; -# else -# define BOOST_UNREACHABLE_RETURN(x) -# endif -#endif - -// BOOST_DEDUCED_TYPENAME workaround ------------------------------------------// -// -// Some compilers don't support the use of `typename' for dependent -// types in deduced contexts, e.g. -// -// template void f(T, typename T::type); -// ^^^^^^^^ -// Replace these declarations with: -// -// template void f(T, BOOST_DEDUCED_TYPENAME T::type); - -#ifndef BOOST_NO_DEDUCED_TYPENAME -# define BOOST_DEDUCED_TYPENAME typename -#else -# define BOOST_DEDUCED_TYPENAME -#endif - -#ifndef BOOST_NO_TYPENAME_WITH_CTOR -# define BOOST_CTOR_TYPENAME typename -#else -# define BOOST_CTOR_TYPENAME -#endif - -// long long workaround ------------------------------------------// -// On gcc (and maybe other compilers?) long long is alway supported -// but it's use may generate either warnings (with -ansi), or errors -// (with -pedantic -ansi) unless it's use is prefixed by __extension__ -// -#if defined(BOOST_HAS_LONG_LONG) && defined(__cplusplus) -namespace boost{ -# ifdef __GNUC__ - __extension__ typedef long long long_long_type; - __extension__ typedef unsigned long long ulong_long_type; -# else - typedef long long long_long_type; - typedef unsigned long long ulong_long_type; -# endif -} -#endif -// same again for __int128: -#if defined(BOOST_HAS_INT128) && defined(__cplusplus) -namespace boost{ -# ifdef __GNUC__ - __extension__ typedef __int128 int128_type; - __extension__ typedef unsigned __int128 uint128_type; -# else - typedef __int128 int128_type; - typedef unsigned __int128 uint128_type; -# endif -} -#endif -// same again for __float128: -#if defined(BOOST_HAS_FLOAT128) && defined(__cplusplus) -namespace boost { -# ifdef __GNUC__ - __extension__ typedef __float128 float128_type; -# else - typedef __float128 float128_type; -# endif -} -#endif - -// BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------// - -// These macros are obsolete. Port away and remove. - -# define BOOST_EXPLICIT_TEMPLATE_TYPE(t) -# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t) -# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v) -# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) - -# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t) -# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t) -# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v) -# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v) - -// When BOOST_NO_STD_TYPEINFO is defined, we can just import -// the global definition into std namespace: -#if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus) -#include -namespace std{ using ::type_info; } -#endif - -// ---------------------------------------------------------------------------// - -// -// 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 - -// -// Set some default values for compiler/library/platform names. -// These are for debugging config setup only: -// -# ifndef BOOST_COMPILER -# define BOOST_COMPILER "Unknown ISO C++ Compiler" -# endif -# ifndef BOOST_STDLIB -# define BOOST_STDLIB "Unknown ISO standard library" -# endif -# ifndef BOOST_PLATFORM -# if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \ - || defined(_POSIX_SOURCE) -# define BOOST_PLATFORM "Generic Unix" -# else -# define BOOST_PLATFORM "Unknown" -# endif -# endif - -// -// Set some default values GPU support -// -# ifndef BOOST_GPU_ENABLED -# 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_FORCEINLINE ---------------------------------------------// -// Macro to use in place of 'inline' to force a function to be inline -#if !defined(BOOST_FORCEINLINE) -# if defined(_MSC_VER) -# define BOOST_FORCEINLINE __forceinline -# elif defined(__GNUC__) && __GNUC__ > 3 - // Clang also defines __GNUC__ (as 4) -# define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__)) -# else -# define BOOST_FORCEINLINE inline -# endif -#endif - -// BOOST_NOINLINE ---------------------------------------------// -// Macro to use in place of 'inline' to prevent a function to be inlined -#if !defined(BOOST_NOINLINE) -# if defined(_MSC_VER) -# define BOOST_NOINLINE __declspec(noinline) -# elif defined(__GNUC__) && __GNUC__ > 3 - // Clang also defines __GNUC__ (as 4) -# if defined(__CUDACC__) - // nvcc doesn't always parse __noinline__, - // see: https://svn.boost.org/trac/boost/ticket/9392 -# define BOOST_NOINLINE __attribute__ ((noinline)) -# else -# define BOOST_NOINLINE __attribute__ ((__noinline__)) -# endif -# else -# define BOOST_NOINLINE -# endif -#endif - -// BOOST_NORETURN ---------------------------------------------// -// Macro to use before a function declaration/definition to designate -// the function as not returning normally (i.e. with a return statement -// or by leaving the function scope, if the function return type is void). -#if !defined(BOOST_NORETURN) -# if defined(_MSC_VER) -# define BOOST_NORETURN __declspec(noreturn) -# elif defined(__GNUC__) -# define BOOST_NORETURN __attribute__ ((__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 -// -// if (BOOST_LIKELY(var == 10)) -// { -// // the most probable code here -// } -// -#if !defined(BOOST_LIKELY) -# define BOOST_LIKELY(x) x -#endif -#if !defined(BOOST_UNLIKELY) -# define BOOST_UNLIKELY(x) x -#endif - -// Type and data alignment specification -// -#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 -#if !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) && defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) -# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS -#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 -// body, which will be used if the compiler doesn't support defaulted functions. -// BOOST_DELETED_FUNCTION only accepts the function declaration. It -// will expand to a private function declaration, if the compiler doesn't support -// deleted functions. Because of this it is recommended to use BOOST_DELETED_FUNCTION -// in the end of the class definition. -// -// class my_class -// { -// public: -// // Default-constructible -// BOOST_DEFAULTED_FUNCTION(my_class(), {}) -// // Copying prohibited -// BOOST_DELETED_FUNCTION(my_class(my_class const&)) -// BOOST_DELETED_FUNCTION(my_class& operator= (my_class const&)) -// }; -// -#if !(defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)) -# define BOOST_DEFAULTED_FUNCTION(fun, body) fun = default; -#else -# define BOOST_DEFAULTED_FUNCTION(fun, body) fun body -#endif - -#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) -# define BOOST_DELETED_FUNCTION(fun) fun = delete; -#else -# define BOOST_DELETED_FUNCTION(fun) private: fun; -#endif - -// -// Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined -// -#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276) -#define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE -#endif - -// -------------------- Deprecated macros for 1.50 --------------------------- -// These will go away in a future release - -// Use BOOST_NO_CXX11_HDR_UNORDERED_SET or BOOST_NO_CXX11_HDR_UNORDERED_MAP -// instead of BOOST_NO_STD_UNORDERED -#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined (BOOST_NO_CXX11_HDR_UNORDERED_SET) -# ifndef BOOST_NO_CXX11_STD_UNORDERED -# define BOOST_NO_CXX11_STD_UNORDERED -# endif -#endif - -// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS -#if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS) -# define BOOST_NO_INITIALIZER_LISTS -#endif - -// Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY -#if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_0X_HDR_ARRAY) -# define BOOST_NO_0X_HDR_ARRAY -#endif -// Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO -#if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_NO_0X_HDR_CHRONO) -# define BOOST_NO_0X_HDR_CHRONO -#endif -// Use BOOST_NO_CXX11_HDR_CODECVT instead of BOOST_NO_0X_HDR_CODECVT -#if defined(BOOST_NO_CXX11_HDR_CODECVT) && !defined(BOOST_NO_0X_HDR_CODECVT) -# define BOOST_NO_0X_HDR_CODECVT -#endif -// Use BOOST_NO_CXX11_HDR_CONDITION_VARIABLE instead of BOOST_NO_0X_HDR_CONDITION_VARIABLE -#if defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) && !defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE) -# define BOOST_NO_0X_HDR_CONDITION_VARIABLE -#endif -// Use BOOST_NO_CXX11_HDR_FORWARD_LIST instead of BOOST_NO_0X_HDR_FORWARD_LIST -#if defined(BOOST_NO_CXX11_HDR_FORWARD_LIST) && !defined(BOOST_NO_0X_HDR_FORWARD_LIST) -# define BOOST_NO_0X_HDR_FORWARD_LIST -#endif -// Use BOOST_NO_CXX11_HDR_FUTURE instead of BOOST_NO_0X_HDR_FUTURE -#if defined(BOOST_NO_CXX11_HDR_FUTURE) && !defined(BOOST_NO_0X_HDR_FUTURE) -# define BOOST_NO_0X_HDR_FUTURE -#endif - -// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST -// instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS -#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST -# define BOOST_NO_0X_HDR_INITIALIZER_LIST -# endif -# ifndef BOOST_NO_INITIALIZER_LISTS -# define BOOST_NO_INITIALIZER_LISTS -# endif -#endif - -// Use BOOST_NO_CXX11_HDR_MUTEX instead of BOOST_NO_0X_HDR_MUTEX -#if defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_NO_0X_HDR_MUTEX) -# define BOOST_NO_0X_HDR_MUTEX -#endif -// Use BOOST_NO_CXX11_HDR_RANDOM instead of BOOST_NO_0X_HDR_RANDOM -#if defined(BOOST_NO_CXX11_HDR_RANDOM) && !defined(BOOST_NO_0X_HDR_RANDOM) -# define BOOST_NO_0X_HDR_RANDOM -#endif -// Use BOOST_NO_CXX11_HDR_RATIO instead of BOOST_NO_0X_HDR_RATIO -#if defined(BOOST_NO_CXX11_HDR_RATIO) && !defined(BOOST_NO_0X_HDR_RATIO) -# define BOOST_NO_0X_HDR_RATIO -#endif -// Use BOOST_NO_CXX11_HDR_REGEX instead of BOOST_NO_0X_HDR_REGEX -#if defined(BOOST_NO_CXX11_HDR_REGEX) && !defined(BOOST_NO_0X_HDR_REGEX) -# define BOOST_NO_0X_HDR_REGEX -#endif -// Use BOOST_NO_CXX11_HDR_SYSTEM_ERROR instead of BOOST_NO_0X_HDR_SYSTEM_ERROR -#if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_0X_HDR_SYSTEM_ERROR) -# define BOOST_NO_0X_HDR_SYSTEM_ERROR -#endif -// Use BOOST_NO_CXX11_HDR_THREAD instead of BOOST_NO_0X_HDR_THREAD -#if defined(BOOST_NO_CXX11_HDR_THREAD) && !defined(BOOST_NO_0X_HDR_THREAD) -# define BOOST_NO_0X_HDR_THREAD -#endif -// Use BOOST_NO_CXX11_HDR_TUPLE instead of BOOST_NO_0X_HDR_TUPLE -#if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_0X_HDR_TUPLE) -# define BOOST_NO_0X_HDR_TUPLE -#endif -// Use BOOST_NO_CXX11_HDR_TYPE_TRAITS instead of BOOST_NO_0X_HDR_TYPE_TRAITS -#if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_0X_HDR_TYPE_TRAITS) -# define BOOST_NO_0X_HDR_TYPE_TRAITS -#endif -// Use BOOST_NO_CXX11_HDR_TYPEINDEX instead of BOOST_NO_0X_HDR_TYPEINDEX -#if defined(BOOST_NO_CXX11_HDR_TYPEINDEX) && !defined(BOOST_NO_0X_HDR_TYPEINDEX) -# define BOOST_NO_0X_HDR_TYPEINDEX -#endif -// Use BOOST_NO_CXX11_HDR_UNORDERED_MAP instead of BOOST_NO_0X_HDR_UNORDERED_MAP -#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) && !defined(BOOST_NO_0X_HDR_UNORDERED_MAP) -# define BOOST_NO_0X_HDR_UNORDERED_MAP -#endif -// Use BOOST_NO_CXX11_HDR_UNORDERED_SET instead of BOOST_NO_0X_HDR_UNORDERED_SET -#if defined(BOOST_NO_CXX11_HDR_UNORDERED_SET) && !defined(BOOST_NO_0X_HDR_UNORDERED_SET) -# define BOOST_NO_0X_HDR_UNORDERED_SET -#endif - -// ------------------ End of deprecated macros for 1.50 --------------------------- - -// -------------------- Deprecated macros for 1.51 --------------------------- -// These will go away in a future release - -// Use BOOST_NO_CXX11_AUTO_DECLARATIONS instead of BOOST_NO_AUTO_DECLARATIONS -#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_AUTO_DECLARATIONS) -# define BOOST_NO_AUTO_DECLARATIONS -#endif -// Use BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS instead of BOOST_NO_AUTO_MULTIDECLARATIONS -#if defined(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS) && !defined(BOOST_NO_AUTO_MULTIDECLARATIONS) -# define BOOST_NO_AUTO_MULTIDECLARATIONS -#endif -// Use BOOST_NO_CXX11_CHAR16_T instead of BOOST_NO_CHAR16_T -#if defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CHAR16_T) -# define BOOST_NO_CHAR16_T -#endif -// Use BOOST_NO_CXX11_CHAR32_T instead of BOOST_NO_CHAR32_T -#if defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CHAR32_T) -# define BOOST_NO_CHAR32_T -#endif -// Use BOOST_NO_CXX11_TEMPLATE_ALIASES instead of BOOST_NO_TEMPLATE_ALIASES -#if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_TEMPLATE_ALIASES) -# define BOOST_NO_TEMPLATE_ALIASES -#endif -// Use BOOST_NO_CXX11_CONSTEXPR instead of BOOST_NO_CONSTEXPR -#if defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CONSTEXPR) -# define BOOST_NO_CONSTEXPR -#endif -// Use BOOST_NO_CXX11_DECLTYPE_N3276 instead of BOOST_NO_DECLTYPE_N3276 -#if defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_DECLTYPE_N3276) -# define BOOST_NO_DECLTYPE_N3276 -#endif -// Use BOOST_NO_CXX11_DECLTYPE instead of BOOST_NO_DECLTYPE -#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_DECLTYPE) -# define BOOST_NO_DECLTYPE -#endif -// Use BOOST_NO_CXX11_DEFAULTED_FUNCTIONS instead of BOOST_NO_DEFAULTED_FUNCTIONS -#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_DEFAULTED_FUNCTIONS) -# define BOOST_NO_DEFAULTED_FUNCTIONS -#endif -// Use BOOST_NO_CXX11_DELETED_FUNCTIONS instead of BOOST_NO_DELETED_FUNCTIONS -#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_DELETED_FUNCTIONS) -# define BOOST_NO_DELETED_FUNCTIONS -#endif -// Use BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS instead of BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS) -# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS -#endif -// Use BOOST_NO_CXX11_EXTERN_TEMPLATE instead of BOOST_NO_EXTERN_TEMPLATE -#if defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) && !defined(BOOST_NO_EXTERN_TEMPLATE) -# define BOOST_NO_EXTERN_TEMPLATE -#endif -// Use BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS instead of BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS -#if defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS) -# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS -#endif -// Use BOOST_NO_CXX11_LAMBDAS instead of BOOST_NO_LAMBDAS -#if defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS) -# define BOOST_NO_LAMBDAS -#endif -// Use BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS instead of BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS -#if defined(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS) && !defined(BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS) -# define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS -#endif -// Use BOOST_NO_CXX11_NOEXCEPT instead of BOOST_NO_NOEXCEPT -#if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_NOEXCEPT) -# define BOOST_NO_NOEXCEPT -#endif -// Use BOOST_NO_CXX11_NULLPTR instead of BOOST_NO_NULLPTR -#if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR) -# define BOOST_NO_NULLPTR -#endif -// Use BOOST_NO_CXX11_RAW_LITERALS instead of BOOST_NO_RAW_LITERALS -#if defined(BOOST_NO_CXX11_RAW_LITERALS) && !defined(BOOST_NO_RAW_LITERALS) -# define BOOST_NO_RAW_LITERALS -#endif -// Use BOOST_NO_CXX11_RVALUE_REFERENCES instead of BOOST_NO_RVALUE_REFERENCES -#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_RVALUE_REFERENCES) -# define BOOST_NO_RVALUE_REFERENCES -#endif -// Use BOOST_NO_CXX11_SCOPED_ENUMS instead of BOOST_NO_SCOPED_ENUMS -#if defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_NO_SCOPED_ENUMS) -# define BOOST_NO_SCOPED_ENUMS -#endif -// Use BOOST_NO_CXX11_STATIC_ASSERT instead of BOOST_NO_STATIC_ASSERT -#if defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_NO_STATIC_ASSERT) -# define BOOST_NO_STATIC_ASSERT -#endif -// Use BOOST_NO_CXX11_STD_UNORDERED instead of BOOST_NO_STD_UNORDERED -#if defined(BOOST_NO_CXX11_STD_UNORDERED) && !defined(BOOST_NO_STD_UNORDERED) -# define BOOST_NO_STD_UNORDERED -#endif -// Use BOOST_NO_CXX11_UNICODE_LITERALS instead of BOOST_NO_UNICODE_LITERALS -#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(BOOST_NO_UNICODE_LITERALS) -# define BOOST_NO_UNICODE_LITERALS -#endif -// Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead of BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX -#if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX) -# define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX -#endif -// Use BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of BOOST_NO_VARIADIC_TEMPLATES -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_VARIADIC_TEMPLATES) -# define BOOST_NO_VARIADIC_TEMPLATES -#endif -// Use BOOST_NO_CXX11_VARIADIC_MACROS instead of BOOST_NO_VARIADIC_MACROS -#if defined(BOOST_NO_CXX11_VARIADIC_MACROS) && !defined(BOOST_NO_VARIADIC_MACROS) -# define BOOST_NO_VARIADIC_MACROS -#endif -// Use BOOST_NO_CXX11_NUMERIC_LIMITS instead of BOOST_NO_NUMERIC_LIMITS_LOWEST -#if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_NO_NUMERIC_LIMITS_LOWEST) -# define BOOST_NO_NUMERIC_LIMITS_LOWEST -#endif -// ------------------ End of deprecated macros for 1.51 --------------------------- - - - -// -// Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR -// These aid the transition to C++11 while still supporting C++03 compilers -// -#ifdef BOOST_NO_CXX11_NOEXCEPT -# define BOOST_NOEXCEPT -# define BOOST_NOEXCEPT_OR_NOTHROW throw() -# define BOOST_NOEXCEPT_IF(Predicate) -# define BOOST_NOEXCEPT_EXPR(Expression) false -#else -# define BOOST_NOEXCEPT noexcept -# define BOOST_NOEXCEPT_OR_NOTHROW noexcept -# define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate)) -# define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression)) -#endif -// -// Helper macro BOOST_FALLTHROUGH -// Fallback definition of BOOST_FALLTHROUGH macro used to mark intended -// fall-through between case labels in a switch statement. We use a definition -// that requires a semicolon after it to avoid at least one type of misuse even -// on unsupported compilers. -// -#ifndef BOOST_FALLTHROUGH -# define BOOST_FALLTHROUGH ((void)0) -#endif - -// -// constexpr workarounds -// -#if defined(BOOST_NO_CXX11_CONSTEXPR) -#define BOOST_CONSTEXPR -#define BOOST_CONSTEXPR_OR_CONST const -#else -#define BOOST_CONSTEXPR constexpr -#define BOOST_CONSTEXPR_OR_CONST constexpr -#endif -#if defined(BOOST_NO_CXX14_CONSTEXPR) -#define BOOST_CXX14_CONSTEXPR -#else -#define BOOST_CXX14_CONSTEXPR constexpr -#endif - -// -// Unused variable/typedef workarounds: -// -#ifndef BOOST_ATTRIBUTE_UNUSED -# define BOOST_ATTRIBUTE_UNUSED -#endif - -#define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST - -// -// Set BOOST_HAS_STATIC_ASSERT when BOOST_NO_CXX11_STATIC_ASSERT is not defined -// -#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT) -# define BOOST_HAS_STATIC_ASSERT -#endif - -// -// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined -// -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS) -#define BOOST_HAS_RVALUE_REFS -#endif - -// -// Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_CXX11_VARIADIC_TEMPLATES is not defined -// -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL) -#define BOOST_HAS_VARIADIC_TMPL -#endif -// -// Set BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS when -// BOOST_NO_CXX11_VARIADIC_TEMPLATES is set: -// -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS) -# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS -#endif - -// -// Finish off with checks for macros that are depricated / no longer supported, -// if any of these are set then it's very likely that much of Boost will no -// longer work. So stop with a #error for now, but give the user a chance -// to continue at their own risk if they really want to: -// -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_CONFIG_ALLOW_DEPRECATED) -# error "You are using a compiler which lacks features which are now a minimum requirement in order to use Boost, define BOOST_CONFIG_ALLOW_DEPRECATED if you want to continue at your own risk!!!" -#endif - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/config/no_tr1/cmath.hpp b/contrib/libboost/boost_1_65_0/boost/config/no_tr1/cmath.hpp deleted file mode 100644 index d8268d842a7..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/no_tr1/cmath.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright John Maddock 2008. -// 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) -// -// The aim of this header is just to include but to do -// so in a way that does not result in recursive inclusion of -// the Boost TR1 components if boost/tr1/tr1/cmath is in the -// include search path. We have to do this to avoid circular -// dependencies: -// - -#ifndef BOOST_CONFIG_CMATH -# define BOOST_CONFIG_CMATH - -# ifndef BOOST_TR1_NO_RECURSION -# define BOOST_TR1_NO_RECURSION -# define BOOST_CONFIG_NO_CMATH_RECURSION -# endif - -# include - -# ifdef BOOST_CONFIG_NO_CMATH_RECURSION -# undef BOOST_TR1_NO_RECURSION -# undef BOOST_CONFIG_NO_CMATH_RECURSION -# endif - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/config/no_tr1/complex.hpp b/contrib/libboost/boost_1_65_0/boost/config/no_tr1/complex.hpp deleted file mode 100644 index ca200922b3c..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/no_tr1/complex.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright John Maddock 2005. -// 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) -// -// The aim of this header is just to include but to do -// so in a way that does not result in recursive inclusion of -// the Boost TR1 components if boost/tr1/tr1/complex is in the -// include search path. We have to do this to avoid circular -// dependencies: -// - -#ifndef BOOST_CONFIG_COMPLEX -# define BOOST_CONFIG_COMPLEX - -# ifndef BOOST_TR1_NO_RECURSION -# define BOOST_TR1_NO_RECURSION -# define BOOST_CONFIG_NO_COMPLEX_RECURSION -# endif - -# include - -# ifdef BOOST_CONFIG_NO_COMPLEX_RECURSION -# undef BOOST_TR1_NO_RECURSION -# undef BOOST_CONFIG_NO_COMPLEX_RECURSION -# endif - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/config/no_tr1/functional.hpp b/contrib/libboost/boost_1_65_0/boost/config/no_tr1/functional.hpp deleted file mode 100644 index e395efc1977..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/no_tr1/functional.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright John Maddock 2005. -// 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) -// -// The aim of this header is just to include but to do -// so in a way that does not result in recursive inclusion of -// the Boost TR1 components if boost/tr1/tr1/functional is in the -// include search path. We have to do this to avoid circular -// dependencies: -// - -#ifndef BOOST_CONFIG_FUNCTIONAL -# define BOOST_CONFIG_FUNCTIONAL - -# ifndef BOOST_TR1_NO_RECURSION -# define BOOST_TR1_NO_RECURSION -# define BOOST_CONFIG_NO_FUNCTIONAL_RECURSION -# endif - -# include - -# ifdef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION -# undef BOOST_TR1_NO_RECURSION -# undef BOOST_CONFIG_NO_FUNCTIONAL_RECURSION -# endif - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/config/no_tr1/memory.hpp b/contrib/libboost/boost_1_65_0/boost/config/no_tr1/memory.hpp deleted file mode 100644 index 2b5d2080272..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/no_tr1/memory.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright John Maddock 2005. -// 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) -// -// The aim of this header is just to include but to do -// so in a way that does not result in recursive inclusion of -// the Boost TR1 components if boost/tr1/tr1/memory is in the -// include search path. We have to do this to avoid circular -// dependencies: -// - -#ifndef BOOST_CONFIG_MEMORY -# define BOOST_CONFIG_MEMORY - -# ifndef BOOST_TR1_NO_RECURSION -# define BOOST_TR1_NO_RECURSION -# define BOOST_CONFIG_NO_MEMORY_RECURSION -# endif - -# include - -# ifdef BOOST_CONFIG_NO_MEMORY_RECURSION -# undef BOOST_TR1_NO_RECURSION -# undef BOOST_CONFIG_NO_MEMORY_RECURSION -# endif - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/config/no_tr1/utility.hpp b/contrib/libboost/boost_1_65_0/boost/config/no_tr1/utility.hpp deleted file mode 100644 index dea8f115bce..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/no_tr1/utility.hpp +++ /dev/null @@ -1,28 +0,0 @@ -// (C) Copyright John Maddock 2005. -// 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) -// -// The aim of this header is just to include but to do -// so in a way that does not result in recursive inclusion of -// the Boost TR1 components if boost/tr1/tr1/utility is in the -// include search path. We have to do this to avoid circular -// dependencies: -// - -#ifndef BOOST_CONFIG_UTILITY -# define BOOST_CONFIG_UTILITY - -# ifndef BOOST_TR1_NO_RECURSION -# define BOOST_TR1_NO_RECURSION -# define BOOST_CONFIG_NO_UTILITY_RECURSION -# endif - -# include - -# ifdef BOOST_CONFIG_NO_UTILITY_RECURSION -# undef BOOST_TR1_NO_RECURSION -# undef BOOST_CONFIG_NO_UTILITY_RECURSION -# endif - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/aix.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/aix.hpp deleted file mode 100644 index a48e2320618..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/aix.hpp +++ /dev/null @@ -1,33 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2002. -// 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. - -// IBM/Aix specific config options: - -#define BOOST_PLATFORM "IBM Aix" - -#define BOOST_HAS_UNISTD_H -#define BOOST_HAS_NL_TYPES_H -#define BOOST_HAS_NANOSLEEP -#define BOOST_HAS_CLOCK_GETTIME - -// This needs support in "boost/cstdint.hpp" exactly like FreeBSD. -// This platform has header named which includes all -// the things needed. -#define BOOST_HAS_STDINT_H - -// Threading API's: -#define BOOST_HAS_PTHREADS -#define BOOST_HAS_PTHREAD_DELAY_NP -#define BOOST_HAS_SCHED_YIELD -//#define BOOST_HAS_PTHREAD_YIELD - -// boilerplate code: -#include - - - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/amigaos.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/amigaos.hpp deleted file mode 100644 index 34bcf4128b7..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/amigaos.hpp +++ /dev/null @@ -1,15 +0,0 @@ -// (C) Copyright John Maddock 2002. -// 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. - -#define BOOST_PLATFORM "AmigaOS" - -#define BOOST_DISABLE_THREADS -#define BOOST_NO_CWCHAR -#define BOOST_NO_STD_WSTRING -#define BOOST_NO_INTRINSIC_WCHAR_T - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/beos.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/beos.hpp deleted file mode 100644 index 6158c1c20be..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/beos.hpp +++ /dev/null @@ -1,26 +0,0 @@ -// (C) Copyright John Maddock 2001. -// 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. - -// BeOS specific config options: - -#define BOOST_PLATFORM "BeOS" - -#define BOOST_NO_CWCHAR -#define BOOST_NO_CWCTYPE -#define BOOST_HAS_UNISTD_H - -#define BOOST_HAS_BETHREADS - -#ifndef BOOST_DISABLE_THREADS -# define BOOST_HAS_THREADS -#endif - -// boilerplate code: -#include - - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/bsd.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/bsd.hpp deleted file mode 100644 index 79e74a080a8..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/bsd.hpp +++ /dev/null @@ -1,86 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Darin Adler 2001. -// (C) Copyright Douglas Gregor 2002. -// 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. - -// generic BSD config options: - -#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) -#error "This platform is not BSD" -#endif - -#ifdef __FreeBSD__ -#define BOOST_PLATFORM "FreeBSD " BOOST_STRINGIZE(__FreeBSD__) -#elif defined(__NetBSD__) -#define BOOST_PLATFORM "NetBSD " BOOST_STRINGIZE(__NetBSD__) -#elif defined(__OpenBSD__) -#define BOOST_PLATFORM "OpenBSD " BOOST_STRINGIZE(__OpenBSD__) -#elif defined(__DragonFly__) -#define BOOST_PLATFORM "DragonFly " BOOST_STRINGIZE(__DragonFly__) -#endif - -// -// is this the correct version check? -// FreeBSD has but does not -// advertise the fact in : -// -#if (defined(__FreeBSD__) && (__FreeBSD__ >= 3)) || defined(__DragonFly__) -# define BOOST_HAS_NL_TYPES_H -#endif - -// -// FreeBSD 3.x has pthreads support, but defines _POSIX_THREADS in -// and not in -// -#if (defined(__FreeBSD__) && (__FreeBSD__ <= 3))\ - || defined(__OpenBSD__) || defined(__DragonFly__) -# define BOOST_HAS_PTHREADS -#endif - -// -// No wide character support in the BSD header files: -// -#if defined(__NetBSD__) -#define __NetBSD_GCC__ (__GNUC__ * 1000000 \ - + __GNUC_MINOR__ * 1000 \ - + __GNUC_PATCHLEVEL__) -// XXX - the following is required until c++config.h -// defines _GLIBCXX_HAVE_SWPRINTF and friends -// or the preprocessor conditionals are removed -// from the cwchar header. -#define _GLIBCXX_HAVE_SWPRINTF 1 -#endif - -#if !((defined(__FreeBSD__) && (__FreeBSD__ >= 5)) \ - || (defined(__NetBSD_GCC__) && (__NetBSD_GCC__ >= 2095003)) || defined(__DragonFly__)) -# define BOOST_NO_CWCHAR -#endif -// -// The BSD has macros only, no functions: -// -#if !defined(__OpenBSD__) || defined(__DragonFly__) -# define BOOST_NO_CTYPE_FUNCTIONS -#endif - -// -// thread API's not auto detected: -// -#define BOOST_HAS_SCHED_YIELD -#define BOOST_HAS_NANOSLEEP -#define BOOST_HAS_GETTIMEOFDAY -#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -#define BOOST_HAS_SIGACTION - -// boilerplate code: -#define BOOST_HAS_UNISTD_H -#include - - - - - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/cloudabi.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/cloudabi.hpp deleted file mode 100644 index bed7b6318dc..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/cloudabi.hpp +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright Nuxi, https://nuxi.nl/ 2015. -// 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) - -#define BOOST_PLATFORM "CloudABI" - -#define BOOST_HAS_DIRENT_H -#define BOOST_HAS_STDINT_H -#define BOOST_HAS_UNISTD_H - -#define BOOST_HAS_CLOCK_GETTIME -#define BOOST_HAS_EXPM1 -#define BOOST_HAS_GETTIMEOFDAY -#define BOOST_HAS_LOG1P -#define BOOST_HAS_NANOSLEEP -#define BOOST_HAS_PTHREADS -#define BOOST_HAS_SCHED_YIELD diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/cray.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/cray.hpp deleted file mode 100644 index 103e9c06204..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/cray.hpp +++ /dev/null @@ -1,18 +0,0 @@ -// (C) Copyright John Maddock 2011. -// 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. - -// SGI Irix specific config options: - -#define BOOST_PLATFORM "Cray" - -// boilerplate code: -#define BOOST_HAS_UNISTD_H -#include - - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/cygwin.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/cygwin.hpp deleted file mode 100644 index 8ecc4a4af5c..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/cygwin.hpp +++ /dev/null @@ -1,57 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// 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. - -// cygwin specific config options: - -#define BOOST_PLATFORM "Cygwin" -#define BOOST_HAS_DIRENT_H -#define BOOST_HAS_LOG1P -#define BOOST_HAS_EXPM1 - -// -// Threading API: -// See if we have POSIX threads, if we do use them, otherwise -// revert to native Win threads. -#define BOOST_HAS_UNISTD_H -#include -#if defined(_POSIX_THREADS) && (_POSIX_THREADS+0 >= 0) && !defined(BOOST_HAS_WINTHREADS) -# define BOOST_HAS_PTHREADS -# define BOOST_HAS_SCHED_YIELD -# define BOOST_HAS_GETTIMEOFDAY -# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -//# define BOOST_HAS_SIGACTION -#else -# if !defined(BOOST_HAS_WINTHREADS) -# define BOOST_HAS_WINTHREADS -# endif -# define BOOST_HAS_FTIME -#endif - -// -// find out if we have a stdint.h, there should be a better way to do this: -// -#include -#ifdef _STDINT_H -#define BOOST_HAS_STDINT_H -#endif - -/// Cygwin has no fenv.h -#define BOOST_NO_FENV_H - -// boilerplate code: -#include - -// -// Cygwin lies about XSI conformance, there is no nl_types.h: -// -#ifdef BOOST_HAS_NL_TYPES_H -# undef BOOST_HAS_NL_TYPES_H -#endif - - - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/haiku.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/haiku.hpp deleted file mode 100644 index 04244c5677f..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/haiku.hpp +++ /dev/null @@ -1,31 +0,0 @@ -// (C) Copyright Jessica Hamilton 2014. -// 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. - -// Haiku specific config options: - -#define BOOST_PLATFORM "Haiku" - -#define BOOST_HAS_UNISTD_H -#define BOOST_HAS_STDINT_H - -#ifndef BOOST_DISABLE_THREADS -# define BOOST_HAS_THREADS -#endif - -#define BOOST_NO_CXX11_HDR_TYPE_TRAITS -#define BOOST_NO_CXX11_ATOMIC_SMART_PTR -#define BOOST_NO_CXX11_STATIC_ASSERT -#define BOOST_NO_CXX11_VARIADIC_MACROS - -// -// thread API's not auto detected: -// -#define BOOST_HAS_SCHED_YIELD -#define BOOST_HAS_GETTIMEOFDAY - -// boilerplate code: -#include diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/hpux.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/hpux.hpp deleted file mode 100644 index 222622e7ee5..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/hpux.hpp +++ /dev/null @@ -1,87 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2001 - 2003. -// (C) Copyright David Abrahams 2002. -// (C) Copyright Toon Knapen 2003. -// (C) Copyright Boris Gubenko 2006 - 2007. -// 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. - -// hpux specific config options: - -#define BOOST_PLATFORM "HP-UX" - -// In principle, HP-UX has a nice under the name -// However, it has the following problem: -// Use of UINT32_C(0) results in "0u l" for the preprocessed source -// (verifyable with gcc 2.95.3) -#if (defined(__GNUC__) && (__GNUC__ >= 3)) || defined(__HP_aCC) -# define BOOST_HAS_STDINT_H -#endif - -#if !(defined(__HP_aCC) || !defined(_INCLUDE__STDC_A1_SOURCE)) -# define BOOST_NO_SWPRINTF -#endif -#if defined(__HP_aCC) && !defined(_INCLUDE__STDC_A1_SOURCE) -# define BOOST_NO_CWCTYPE -#endif - -#if defined(__GNUC__) -# if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3)) - // GNU C on HP-UX does not support threads (checked up to gcc 3.3) -# define BOOST_DISABLE_THREADS -# elif !defined(BOOST_DISABLE_THREADS) - // threads supported from gcc-3.3 onwards: -# define BOOST_HAS_THREADS -# define BOOST_HAS_PTHREADS -# endif -#elif defined(__HP_aCC) && !defined(BOOST_DISABLE_THREADS) -# define BOOST_HAS_PTHREADS -#endif - -// boilerplate code: -#define BOOST_HAS_UNISTD_H -#include - -// the following are always available: -#ifndef BOOST_HAS_GETTIMEOFDAY -# define BOOST_HAS_GETTIMEOFDAY -#endif -#ifndef BOOST_HAS_SCHED_YIELD -# define BOOST_HAS_SCHED_YIELD -#endif -#ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -#endif -#ifndef BOOST_HAS_NL_TYPES_H -# define BOOST_HAS_NL_TYPES_H -#endif -#ifndef BOOST_HAS_NANOSLEEP -# define BOOST_HAS_NANOSLEEP -#endif -#ifndef BOOST_HAS_GETTIMEOFDAY -# define BOOST_HAS_GETTIMEOFDAY -#endif -#ifndef BOOST_HAS_DIRENT_H -# define BOOST_HAS_DIRENT_H -#endif -#ifndef BOOST_HAS_CLOCK_GETTIME -# define BOOST_HAS_CLOCK_GETTIME -#endif -#ifndef BOOST_HAS_SIGACTION -# define BOOST_HAS_SIGACTION -#endif -#ifndef BOOST_HAS_NRVO -# ifndef __parisc -# define BOOST_HAS_NRVO -# endif -#endif -#ifndef BOOST_HAS_LOG1P -# define BOOST_HAS_LOG1P -#endif -#ifndef BOOST_HAS_EXPM1 -# define BOOST_HAS_EXPM1 -#endif - diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/irix.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/irix.hpp deleted file mode 100644 index 0acb651552e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/irix.hpp +++ /dev/null @@ -1,31 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2003. -// 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. - -// SGI Irix specific config options: - -#define BOOST_PLATFORM "SGI Irix" - -#define BOOST_NO_SWPRINTF -// -// these are not auto detected by POSIX feature tests: -// -#define BOOST_HAS_GETTIMEOFDAY -#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE - -#ifdef __GNUC__ - // GNU C on IRIX does not support threads (checked up to gcc 3.3) -# define BOOST_DISABLE_THREADS -#endif - -// boilerplate code: -#define BOOST_HAS_UNISTD_H -#include - - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/linux.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/linux.hpp deleted file mode 100644 index c4eef8f80cb..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/linux.hpp +++ /dev/null @@ -1,106 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2001 - 2003. -// 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. - -// linux specific config options: - -#define BOOST_PLATFORM "linux" - -// make sure we have __GLIBC_PREREQ if available at all -#ifdef __cplusplus -#include -#else -#include -#endif - -// -// added to glibc 2.1.1 -// We can only test for 2.1 though: -// -#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. 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 - -#if defined(__LIBCOMO__) - // - // como on linux doesn't have std:: c functions: - // NOTE: versions of libcomo prior to beta28 have octal version numbering, - // e.g. version 25 is 21 (dec) - // -# if __LIBCOMO_VERSION__ <= 20 -# define BOOST_NO_STDC_NAMESPACE -# endif - -# if __LIBCOMO_VERSION__ <= 21 -# define BOOST_NO_SWPRINTF -# endif - -#endif - -// -// If glibc is past version 2 then we definitely have -// gettimeofday, earlier versions may or may not have it: -// -#if defined(__GLIBC__) && (__GLIBC__ >= 2) -# define BOOST_HAS_GETTIMEOFDAY -#endif - -#ifdef __USE_POSIX199309 -# define BOOST_HAS_NANOSLEEP -#endif - -#if defined(__GLIBC__) && defined(__GLIBC_PREREQ) -// __GLIBC_PREREQ is available since 2.1.2 - - // swprintf is available since glibc 2.2.0 -# if !__GLIBC_PREREQ(2,2) || (!defined(__USE_ISOC99) && !defined(__USE_UNIX98)) -# define BOOST_NO_SWPRINTF -# endif -#else -# define BOOST_NO_SWPRINTF -#endif - -// boilerplate code: -#define BOOST_HAS_UNISTD_H -#include -#if defined(__USE_GNU) && !defined(__ANDROID__) && !defined(ANDROID) -#define BOOST_HAS_PTHREAD_YIELD -#endif - -#ifndef __GNUC__ -// -// if the compiler is not gcc we still need to be able to parse -// the GNU system headers, some of which (mainly ) -// use GNU specific extensions: -// -# ifndef __extension__ -# define __extension__ -# endif -# ifndef __const__ -# define __const__ const -# endif -# ifndef __volatile__ -# define __volatile__ volatile -# endif -# ifndef __signed__ -# define __signed__ signed -# endif -# ifndef __typeof__ -# define __typeof__ typeof -# endif -# ifndef __inline__ -# define __inline__ inline -# endif -#endif - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/macos.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/macos.hpp deleted file mode 100644 index ed7dc15f282..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/macos.hpp +++ /dev/null @@ -1,87 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Darin Adler 2001 - 2002. -// (C) Copyright Bill Kempf 2002. -// 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. - -// Mac OS specific config options: - -#define BOOST_PLATFORM "Mac OS" - -#if __MACH__ && !defined(_MSL_USING_MSL_C) - -// Using the Mac OS X system BSD-style C library. - -# ifndef BOOST_HAS_UNISTD_H -# define BOOST_HAS_UNISTD_H -# endif -// -// Begin by including our boilerplate code for POSIX -// feature detection, this is safe even when using -// the MSL as Metrowerks supply their own -// to replace the platform-native BSD one. G++ users -// should also always be able to do this on MaxOS X. -// -# include -# ifndef BOOST_HAS_STDINT_H -# define BOOST_HAS_STDINT_H -# endif - -// -// BSD runtime has pthreads, sigaction, sched_yield and gettimeofday, -// of these only pthreads are advertised in , so set the -// other options explicitly: -// -# define BOOST_HAS_SCHED_YIELD -# define BOOST_HAS_GETTIMEOFDAY -# define BOOST_HAS_SIGACTION - -# if (__GNUC__ < 3) && !defined( __APPLE_CC__) - -// GCC strange "ignore std" mode works better if you pretend everything -// is in the std namespace, for the most part. - -# define BOOST_NO_STDC_NAMESPACE -# endif - -# if (__GNUC__ >= 4) - -// Both gcc and intel require these. -# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# define BOOST_HAS_NANOSLEEP - -# endif - -#else - -// Using the MSL C library. - -// We will eventually support threads in non-Carbon builds, but we do -// not support this yet. -# if ( defined(TARGET_API_MAC_CARBON) && TARGET_API_MAC_CARBON ) || ( defined(TARGET_CARBON) && TARGET_CARBON ) - -# if !defined(BOOST_HAS_PTHREADS) -// MPTasks support is deprecated/removed from Boost: -//# define BOOST_HAS_MPTASKS -# elif ( __dest_os == __mac_os_x ) -// We are doing a Carbon/Mach-O/MSL build which has pthreads, but only the -// gettimeofday and no posix. -# define BOOST_HAS_GETTIMEOFDAY -# endif - -#ifdef BOOST_HAS_PTHREADS -# define BOOST_HAS_THREADS -#endif - -// The remote call manager depends on this. -# define BOOST_BIND_ENABLE_PASCAL - -# endif - -#endif - - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/qnxnto.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/qnxnto.hpp deleted file mode 100644 index d0298cb4ecb..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/qnxnto.hpp +++ /dev/null @@ -1,31 +0,0 @@ -// (C) Copyright Jim Douglas 2005. -// 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. - -// QNX specific config options: - -#define BOOST_PLATFORM "QNX" - -#define BOOST_HAS_UNISTD_H -#include - -// QNX claims XOpen version 5 compatibility, but doesn't have an nl_types.h -// or log1p and expm1: -#undef BOOST_HAS_NL_TYPES_H -#undef BOOST_HAS_LOG1P -#undef BOOST_HAS_EXPM1 - -#define BOOST_HAS_PTHREADS -#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE - -#define BOOST_HAS_GETTIMEOFDAY -#define BOOST_HAS_CLOCK_GETTIME -#define BOOST_HAS_NANOSLEEP - - - - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/solaris.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/solaris.hpp deleted file mode 100644 index 51ffe67f331..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/solaris.hpp +++ /dev/null @@ -1,31 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2003. -// 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. - -// sun specific config options: - -#define BOOST_PLATFORM "Sun Solaris" - -#define BOOST_HAS_GETTIMEOFDAY - -// boilerplate code: -#define BOOST_HAS_UNISTD_H -#include - -// -// pthreads don't actually work with gcc unless _PTHREADS is defined: -// -#if defined(__GNUC__) && defined(_POSIX_THREADS) && !defined(_PTHREADS) -# undef BOOST_HAS_PTHREADS -#endif - -#define BOOST_HAS_STDINT_H -#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -#define BOOST_HAS_LOG1P -#define BOOST_HAS_EXPM1 - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/symbian.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/symbian.hpp deleted file mode 100644 index f814d00b5b7..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/symbian.hpp +++ /dev/null @@ -1,97 +0,0 @@ -// (C) Copyright Yuriy Krasnoschek 2009. -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2001 - 2003. -// 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. - -// symbian specific config options: - - -#define BOOST_PLATFORM "Symbian" -#define BOOST_SYMBIAN 1 - - -#if defined(__S60_3X__) -// Open C / C++ plugin was introdused in this SDK, earlier versions don't have CRT / STL -# define BOOST_S60_3rd_EDITION_FP2_OR_LATER_SDK -// make sure we have __GLIBC_PREREQ if available at all -#ifdef __cplusplus -#include -#else -#include -#endif// boilerplate code: -# define BOOST_HAS_UNISTD_H -# include -// S60 SDK defines _POSIX_VERSION as POSIX.1 -# ifndef BOOST_HAS_STDINT_H -# define BOOST_HAS_STDINT_H -# endif -# ifndef BOOST_HAS_GETTIMEOFDAY -# define BOOST_HAS_GETTIMEOFDAY -# endif -# ifndef BOOST_HAS_DIRENT_H -# define BOOST_HAS_DIRENT_H -# endif -# ifndef BOOST_HAS_SIGACTION -# define BOOST_HAS_SIGACTION -# endif -# ifndef BOOST_HAS_PTHREADS -# define BOOST_HAS_PTHREADS -# endif -# ifndef BOOST_HAS_NANOSLEEP -# define BOOST_HAS_NANOSLEEP -# endif -# ifndef BOOST_HAS_SCHED_YIELD -# define BOOST_HAS_SCHED_YIELD -# endif -# ifndef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# endif -# ifndef BOOST_HAS_LOG1P -# define BOOST_HAS_LOG1P -# endif -# ifndef BOOST_HAS_EXPM1 -# define BOOST_HAS_EXPM1 -# endif -# ifndef BOOST_POSIX_API -# define BOOST_POSIX_API -# endif -// endianess support -# include -// Symbian SDK provides _BYTE_ORDER instead of __BYTE_ORDER -# ifndef __LITTLE_ENDIAN -# ifdef _LITTLE_ENDIAN -# define __LITTLE_ENDIAN _LITTLE_ENDIAN -# else -# define __LITTLE_ENDIAN 1234 -# endif -# endif -# ifndef __BIG_ENDIAN -# ifdef _BIG_ENDIAN -# define __BIG_ENDIAN _BIG_ENDIAN -# else -# define __BIG_ENDIAN 4321 -# endif -# endif -# ifndef __BYTE_ORDER -# define __BYTE_ORDER __LITTLE_ENDIAN // Symbian is LE -# endif -// Known limitations -# define BOOST_ASIO_DISABLE_SERIAL_PORT -# define BOOST_DATE_TIME_NO_LOCALE -# define BOOST_NO_STD_WSTRING -# define BOOST_EXCEPTION_DISABLE -# define BOOST_NO_EXCEPTIONS - -#else // TODO: More platform support e.g. UIQ -# error "Unsuppoted Symbian SDK" -#endif - -#if defined(__WINSCW__) && !defined(BOOST_DISABLE_WIN32) -# define BOOST_DISABLE_WIN32 // winscw defines WIN32 macro -#endif - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/vms.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/vms.hpp deleted file mode 100644 index f70efcfb8ef..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/vms.hpp +++ /dev/null @@ -1,25 +0,0 @@ -// (C) Copyright Artyom Beilis 2010. -// 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) - -#ifndef BOOST_CONFIG_PLATFORM_VMS_HPP -#define BOOST_CONFIG_PLATFORM_VMS_HPP - -#define BOOST_PLATFORM "OpenVMS" - -#undef BOOST_HAS_STDINT_H -#define BOOST_HAS_UNISTD_H -#define BOOST_HAS_NL_TYPES_H -#define BOOST_HAS_GETTIMEOFDAY -#define BOOST_HAS_DIRENT_H -#define BOOST_HAS_PTHREADS -#define BOOST_HAS_NANOSLEEP -#define BOOST_HAS_CLOCK_GETTIME -#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -#define BOOST_HAS_LOG1P -#define BOOST_HAS_EXPM1 -#define BOOST_HAS_THREADS -#undef BOOST_HAS_SCHED_YIELD - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/vxworks.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/vxworks.hpp deleted file mode 100644 index a7f571c4996..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/vxworks.hpp +++ /dev/null @@ -1,392 +0,0 @@ -// (C) Copyright Dustin Spicuzza 2009. -// Adapted to vxWorks 6.9 by Peter Brockamp 2012. -// 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! -// 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! - -// ==================================================================== -// -// Some important information regarding the usage of POSIX semaphores: -// ------------------------------------------------------------------- -// -// VxWorks as a real time operating system handles threads somewhat -// different from what "normal" OSes do, regarding their scheduling! -// This could lead to a scenario called "priority inversion" when using -// semaphores, see http://en.wikipedia.org/wiki/Priority_inversion. -// -// 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: -// -// 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. -// - Around line 917 there should be the definition of the default -// mutex attributes: -// -// LOCAL pthread_mutexattr_t defaultMutexAttr = -// { -// PTHREAD_INITIALIZED_OBJ, PTHREAD_PRIO_NONE, 0, -// PTHREAD_MUTEX_DEFAULT -// }; -// -// Here, replace PTHREAD_PRIO_NONE by PTHREAD_PRIO_INHERIT. -// - Around line 1236 there should be a definition for the function -// pthread_mutexattr_init(). A couple of lines below you should -// find a block of code like this: -// -// pAttr->mutexAttrStatus = PTHREAD_INITIALIZED_OBJ; -// pAttr->mutexAttrProtocol = PTHREAD_PRIO_NONE; -// pAttr->mutexAttrPrioceiling = 0; -// 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 -// 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 -#include -#if !defined(_WRS_VXWORKS_MAJOR) || (_WRS_VXWORKS_MAJOR < 6) -# error "The vxWorks version you're using is so badly outdated,\ - it doesn't work at all with boost, sorry, no chance!" -#endif - -// Handle versions above 5.X but below 6.9 -#if (_WRS_VXWORKS_MAJOR == 6) && (_WRS_VXWORKS_MINOR < 9) -// TODO: Starting from what version does vxWorks work with boost? -// We can't reasonably insert a #warning "" as a user hint here, -// as this will show up with every file including some boost header, -// badly bugging the user... So for the time being we just leave it. -#endif - -// vxWorks specific config options: -// -------------------------------- -#define BOOST_PLATFORM "vxWorks" - -// Special behaviour for DKMs: -#ifdef _WRS_KERNEL - // DKMs do not have the -header, - // but apparently they do have an intrinsic wchar_t meanwhile! -# define BOOST_NO_CWCHAR - - // Lots of wide-functions and -headers are unavailable for DKMs as well: -# define BOOST_NO_CWCTYPE -# define BOOST_NO_SWPRINTF -# define BOOST_NO_STD_WSTRING -# define BOOST_NO_STD_WSTREAMBUF -#endif - -// Generally available headers: -#define BOOST_HAS_UNISTD_H -#define BOOST_HAS_STDINT_H -#define BOOST_HAS_DIRENT_H -#define BOOST_HAS_SLIST - -// vxWorks does not have installed an iconv-library by default, -// so unfortunately no Unicode support from scratch is available! -// Thus, instead it is suggested to switch to ICU, as this seems -// to be the most complete and portable option... -#define BOOST_LOCALE_WITH_ICU - -// Generally available functionality: -#define BOOST_HAS_THREADS -#define BOOST_HAS_NANOSLEEP -#define BOOST_HAS_GETTIMEOFDAY -#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 -#define BOOST_HAS_SIGACTION - -// Functionality available for RTPs only: -#ifdef __RTP__ -# define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE -# define BOOST_HAS_LOG1P -# define BOOST_HAS_EXPM1 -#endif - -// Functionality available for DKMs only: -#ifdef _WRS_KERNEL - // Luckily, at the moment there seems to be none! -#endif - -// 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 -# define _POSIX_TIMERS 1 -# endif -# ifndef _POSIX_THREADS -# define _POSIX_THREADS 1 -# 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? - -// 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. -#ifdef __RTP__ -# include -# include -#endif - -// vxWorks-around: In the macros INT32_C(), UINT32_C(), INT64_C() and -// UINT64_C() are defined errorneously, 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 -#define VX_JOIN(X, Y) VX_DO_JOIN(X, Y) -#define VX_DO_JOIN(X, Y) VX_DO_JOIN2(X, Y) -#define VX_DO_JOIN2(X, Y) X##Y - -// Correctly setup the macros -#undef INT32_C -#undef UINT32_C -#undef INT64_C -#undef UINT64_C -#define INT32_C(x) VX_JOIN(x, L) -#define UINT32_C(x) VX_JOIN(x, UL) -#define INT64_C(x) VX_JOIN(x, LL) -#define UINT64_C(x) VX_JOIN(x, ULL) - -// #include Libraries required for the following function adaption -#include -#include -#include - -// Use C-linkage for the following helper functions -extern "C" { - -// vxWorks-around: The required functions getrlimit() and getrlimit() are missing. -// But we have the similar functions getprlimit() and setprlimit(), -// which may serve the purpose. -// Problem: The vxWorks-documentation regarding these functions -// doesn't deserve its name! It isn't documented what the first two -// parameters idtype and id mean, so we must fall back to an educated -// guess - null, argh... :-/ - -// TODO: getprlimit() and setprlimit() do exist for RTPs only, for whatever reason. -// Thus for DKMs there would have to be another implementation. -#ifdef __RTP__ - inline int getrlimit(int resource, struct rlimit *rlp){ - return getprlimit(0, 0, resource, rlp); - } - - inline int setrlimit(int resource, const struct rlimit *rlp){ - return setprlimit(0, 0, resource, const_cast(rlp)); - } -#endif - -// vxWorks has ftruncate() only, so we do simulate truncate(): -inline int truncate(const char *p, off_t l){ - int fd = open(p, O_WRONLY); - if (fd == -1){ - errno = EACCES; - return -1; - } - if (ftruncate(fd, l) == -1){ - close(fd); - errno = EACCES; - return -1; - } - return close(fd); -} - -// Fake symlink handling by dummy functions: -inline int symlink(const char*, const char*){ - // vxWorks has no symlinks -> always return an error! - errno = EACCES; - return -1; -} - -inline ssize_t readlink(const char*, char*, size_t){ - // vxWorks has no symlinks -> always return an error! - errno = EACCES; - return -1; -} - -#if (_WRS_VXWORKS_MAJOR < 7) - -inline int gettimeofday(struct timeval *tv, void * /*tzv*/) { - struct timespec ts; - clock_gettime(CLOCK_MONOTONIC, &ts); - tv->tv_sec = ts.tv_sec; - tv->tv_usec = ts.tv_nsec / 1000; - return 0; -} -#endif - - -// vxWorks does provide 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. -// Rather ugly but at least it suppresses compiler errors... -// Unfortunately, this of course *does* have an severe impact on -// dependant libraries, actually this is chrono only! Here it will -// not be possible to correctly use user and system times! But -// as vxWorks is lacking the ability to calculate user and system -// process times there seems to be no other possible solution. -struct tms{ - clock_t tms_utime; // User CPU time - clock_t tms_stime; // System CPU time - clock_t tms_cutime; // User CPU time of terminated child processes - clock_t tms_cstime; // System CPU time of terminated child processes -}; - -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 + - static_cast(ts.tv_nsec) * CLOCKS_PER_SEC / 1000000.0)); - t->tms_utime = ticks/2U; - t->tms_stime = ticks/2U; - t->tms_cutime = 0; // vxWorks is lacking the concept of a child process! - t->tms_cstime = 0; // -> Set the wait times for childs to 0 - return ticks; -} - -extern void bzero (void *, size_t); // FD_ZERO uses bzero() but doesn't include strings.h -} // extern "C" - -// Put the selfmade functions into the std-namespace, just in case -namespace std { -# ifdef __RTP__ - using ::getrlimit; - using ::setrlimit; -# endif - using ::truncate; - using ::symlink; - using ::readlink; - using ::times; - using ::gettimeofday; -} - -// Some more macro-magic: -// vxWorks-around: Some functions are not present or broken in vxWorks -// but may be patched to life via helper macros... - -// Include signal.h which might contain a typo to be corrected here -#include - -inline int getpagesize() { return sysconf(_SC_PAGESIZE); } // getpagesize is deprecated anyway! -#ifndef S_ISSOCK -# define S_ISSOCK(mode) ((mode & S_IFMT) == S_IFSOCK) // Is file a socket? -#endif -inline int lstat(p, b) { return 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 not present in vxWorks! - -// #include boilerplate code: -#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 Dinkum STL version and GCC version (or ICC and DCC) - -#ifndef _WRS_CONFIG_LANG_LIB_CPLUS_CPLUS_USER_2011 -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_ALLOCATOR -# define BOOST_NO_CXX11_SMART_PTR -# define BOOST_NO_CXX11_STD_ALIGN -# define BOOST_NO_CXX11_HDR_UNORDERED_SET -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# define BOOST_NO_CXX11_HDR_FUNCTIONAL -# define BOOST_NO_CXX11_HDR_ATOMIC -#else -# define BOOST_NO_CXX11_NULLPTR -#endif - diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/win32.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/win32.hpp deleted file mode 100644 index 450158fbaab..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/win32.hpp +++ /dev/null @@ -1,90 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Bill Kempf 2001. -// (C) Copyright Aleksey Gurtovoy 2003. -// (C) Copyright Rene Rivera 2005. -// 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. - -// Win32 specific config options: - -#define BOOST_PLATFORM "Win32" - -// Get the information about the MinGW runtime, i.e. __MINGW32_*VERSION. -#if defined(__MINGW32__) -# include <_mingw.h> -#endif - -#if defined(__GNUC__) && !defined(BOOST_NO_SWPRINTF) -# define BOOST_NO_SWPRINTF -#endif - -// Default defines for BOOST_SYMBOL_EXPORT and BOOST_SYMBOL_IMPORT -// If a compiler doesn't support __declspec(dllexport)/__declspec(dllimport), -// its boost/config/compiler/ file must define BOOST_SYMBOL_EXPORT and -// BOOST_SYMBOL_IMPORT -#ifndef BOOST_SYMBOL_EXPORT -# define BOOST_HAS_DECLSPEC -# define BOOST_SYMBOL_EXPORT __declspec(dllexport) -# define BOOST_SYMBOL_IMPORT __declspec(dllimport) -#endif - -#if defined(__MINGW32__) && ((__MINGW32_MAJOR_VERSION > 2) || ((__MINGW32_MAJOR_VERSION == 2) && (__MINGW32_MINOR_VERSION >= 0))) -# define BOOST_HAS_STDINT_H -# ifndef __STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS -# endif -# define BOOST_HAS_DIRENT_H -# define BOOST_HAS_UNISTD_H -#endif - -#if defined(__MINGW32__) && (__GNUC__ >= 4) -// Mingw has these functions but there are persistent problems -// with calls to these crashing, so disable for now: -//# define BOOST_HAS_EXPM1 -//# define BOOST_HAS_LOG1P -# define BOOST_HAS_GETTIMEOFDAY -#endif -// -// Win32 will normally be using native Win32 threads, -// but there is a pthread library avaliable as an option, -// we used to disable this when BOOST_DISABLE_WIN32 was -// defined but no longer - this should allow some -// files to be compiled in strict mode - while maintaining -// a consistent setting of BOOST_HAS_THREADS across -// all translation units (needed for shared_ptr etc). -// - -#ifndef BOOST_HAS_PTHREADS -# define BOOST_HAS_WINTHREADS -#endif - -// -// WinCE configuration: -// -#if defined(_WIN32_WCE) || defined(UNDER_CE) -# define BOOST_NO_ANSI_APIS -// Windows CE does not have a conforming signature for swprintf -# define BOOST_NO_SWPRINTF -#else -# define BOOST_HAS_GETSYSTEMTIMEASFILETIME -# define BOOST_HAS_THREADEX -# define BOOST_HAS_GETSYSTEMTIMEASFILETIME -#endif - -// -// Windows Runtime -// -#if defined(WINAPI_FAMILY) && \ - (WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) -# define BOOST_NO_ANSI_APIS -#endif - -#ifndef BOOST_DISABLE_WIN32 -// WEK: Added -#define BOOST_HAS_FTIME -#define BOOST_WINDOWS 1 - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/config/platform/zos.hpp b/contrib/libboost/boost_1_65_0/boost/config/platform/zos.hpp deleted file mode 100644 index fa77999edc7..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/platform/zos.hpp +++ /dev/null @@ -1,32 +0,0 @@ -// 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/contrib/libboost/boost_1_65_0/boost/config/requires_threads.hpp b/contrib/libboost/boost_1_65_0/boost/config/requires_threads.hpp deleted file mode 100644 index cfaff23027c..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/requires_threads.hpp +++ /dev/null @@ -1,92 +0,0 @@ -// (C) Copyright John Maddock 2003. -// 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) - - -#ifndef BOOST_CONFIG_REQUIRES_THREADS_HPP -#define BOOST_CONFIG_REQUIRES_THREADS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_DISABLE_THREADS) - -// -// special case to handle versions of gcc which don't currently support threads: -// -#if defined(__GNUC__) && ((__GNUC__ < 3) || (__GNUC_MINOR__ <= 3) || !defined(BOOST_STRICT_CONFIG)) -// -// this is checked up to gcc 3.3: -// -#if defined(__sgi) || defined(__hpux) -# error "Multi-threaded programs are not supported by gcc on HPUX or Irix (last checked with gcc 3.3)" -#endif - -#endif - -# error "Threading support unavaliable: it has been explicitly disabled with BOOST_DISABLE_THREADS" - -#elif !defined(BOOST_HAS_THREADS) - -# if defined __COMO__ -// Comeau C++ -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_MT (Windows) or -D_REENTRANT (Unix)" - -#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC) -// Intel -#ifdef _WIN32 -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" -#else -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -openmp" -#endif - -# elif defined __GNUC__ -// GNU C++: -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread (Linux), -pthreads (Solaris) or -mthreads (Mingw32)" - -#elif defined __sgi -// SGI MIPSpro C++ -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -D_SGI_MP_SOURCE" - -#elif defined __DECCXX -// Compaq Tru64 Unix cxx -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -pthread" - -#elif defined __BORLANDC__ -// Borland -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -tWM" - -#elif defined __MWERKS__ -// Metrowerks CodeWarrior -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either -runtime sm, -runtime smd, -runtime dm, or -runtime dmd" - -#elif defined __SUNPRO_CC -// Sun Workshop Compiler C++ -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" - -#elif defined __HP_aCC -// HP aCC -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: -mt" - -#elif defined(__IBMCPP__) -// IBM Visual Age -# error "Compiler threading support is not turned on. Please compile the code with the xlC_r compiler" - -#elif defined _MSC_VER -// Microsoft Visual C++ -// -// Must remain the last #elif since some other vendors (Metrowerks, for -// example) also #define _MSC_VER -# error "Compiler threading support is not turned on. Please set the correct command line options for threading: either /MT /MTd /MD or /MDd" - -#else - -# error "Compiler threading support is not turned on. Please consult your compiler's documentation for the appropriate options to use" - -#endif // compilers - -#endif // BOOST_HAS_THREADS - -#endif // BOOST_CONFIG_REQUIRES_THREADS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/config/stdlib/dinkumware.hpp b/contrib/libboost/boost_1_65_0/boost/config/stdlib/dinkumware.hpp deleted file mode 100644 index daac5dfb435..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/stdlib/dinkumware.hpp +++ /dev/null @@ -1,251 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2001. -// (C) Copyright Peter Dimov 2001. -// (C) Copyright David Abrahams 2002. -// (C) Copyright Guillaume Melquiond 2003. -// 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. - -// Dinkumware standard library config: - -#if !defined(_YVALS) && !defined(_CPPLIB_VER) -#include -#if !defined(_YVALS) && !defined(_CPPLIB_VER) -#error This is not the Dinkumware lib! -#endif -#endif - - -#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 306) - // full dinkumware 3.06 and above - // fully conforming provided the compiler supports it: -# if !(defined(_GLOBAL_USING) && (_GLOBAL_USING+0 > 0)) && !defined(__BORLANDC__) && !defined(_STD) && !(defined(__ICC) && (__ICC >= 700)) // can be defined in yvals.h -# define BOOST_NO_STDC_NAMESPACE -# endif -# if !(defined(_HAS_MEMBER_TEMPLATES_REBIND) && (_HAS_MEMBER_TEMPLATES_REBIND+0 > 0)) && !(defined(_MSC_VER) && (_MSC_VER > 1300)) && defined(BOOST_MSVC) -# define BOOST_NO_STD_ALLOCATOR -# endif -# define BOOST_HAS_PARTIAL_STD_ALLOCATOR -# if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) - // if this lib version is set up for vc6 then there is no std::use_facet: -# define BOOST_NO_STD_USE_FACET -# define BOOST_HAS_TWO_ARG_USE_FACET - // C lib functions aren't in namespace std either: -# define BOOST_NO_STDC_NAMESPACE - // and nor is -# define BOOST_NO_EXCEPTION_STD_NAMESPACE -# endif -// There's no numeric_limits support unless _LONGLONG is defined: -# if !defined(_LONGLONG) && (_CPPLIB_VER <= 310) -# define BOOST_NO_MS_INT64_NUMERIC_LIMITS -# endif -// 3.06 appears to have (non-sgi versions of) & , -// and no at all -#else -# define BOOST_MSVC_STD_ITERATOR 1 -# define BOOST_NO_STD_ITERATOR -# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS -# define BOOST_NO_STD_ALLOCATOR -# define BOOST_NO_STDC_NAMESPACE -# define BOOST_NO_STD_USE_FACET -# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN -# define BOOST_HAS_MACRO_USE_FACET -# ifndef _CPPLIB_VER - // Updated Dinkum library defines this, and provides - // its own min and max definitions, as does MTA version. -# ifndef __MTA__ -# define BOOST_NO_STD_MIN_MAX -# endif -# define BOOST_NO_MS_INT64_NUMERIC_LIMITS -# endif -#endif - -// -// std extension namespace is stdext for vc7.1 and later, -// the same applies to other compilers that sit on top -// of vc7.1 (Intel and Comeau): -// -#if defined(_MSC_VER) && (_MSC_VER >= 1310) && !defined(__BORLANDC__) -# define BOOST_STD_EXTENSION_NAMESPACE stdext -#endif - - -#if (defined(_MSC_VER) && (_MSC_VER <= 1300) && !defined(__BORLANDC__)) || !defined(_CPPLIB_VER) || (_CPPLIB_VER < 306) - // if we're using a dinkum lib that's - // been configured for VC6/7 then there is - // no iterator traits (true even for icl) -# define BOOST_NO_STD_ITERATOR_TRAITS -#endif - -#if defined(__ICL) && (__ICL < 800) && defined(_CPPLIB_VER) && (_CPPLIB_VER <= 310) -// Intel C++ chokes over any non-trivial use of -// this may be an overly restrictive define, but regex fails without it: -# define BOOST_NO_STD_LOCALE -#endif - -// Fix for VC++ 8.0 on up ( I do not have a previous version to test ) -// or clang-cl. If exceptions are off you must manually include the -// header before including the header. Admittedly -// trying to use Boost libraries or the standard C++ libraries without -// exception support is not suggested but currently clang-cl ( v 3.4 ) -// does not support exceptions and must be compiled with exceptions off. -#if !_HAS_EXCEPTIONS && ((defined(BOOST_MSVC) && BOOST_MSVC >= 1400) || (defined(__clang__) && defined(_MSC_VER))) -#include -#endif -#include -#if ( (!_HAS_EXCEPTIONS && !defined(__ghs__)) || (!_HAS_NAMESPACE && defined(__ghs__)) ) && !defined(__TI_COMPILER_VERSION__) && !defined(__VISUALDSPVERSION__) -# define BOOST_NO_STD_TYPEINFO -#endif - -// C++0x headers implemented in 520 (as shipped by Microsoft) -// -#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 520 -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_CODECVT -# define BOOST_NO_CXX11_HDR_FORWARD_LIST -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# define BOOST_NO_CXX11_HDR_UNORDERED_SET -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_FUNCTIONAL -# define BOOST_NO_CXX11_NUMERIC_LIMITS -# define BOOST_NO_CXX11_SMART_PTR -#endif - -#if ((!defined(_HAS_TR1_IMPORTS) || (_HAS_TR1_IMPORTS+0 == 0)) && !defined(BOOST_NO_CXX11_HDR_TUPLE)) \ - && (!defined(_CPPLIB_VER) || _CPPLIB_VER < 610) -# define BOOST_NO_CXX11_HDR_TUPLE -#endif - -// C++0x headers implemented in 540 (as shipped by Microsoft) -// -#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 540 -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_CHRONO -# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_ATOMIC_SMART_PTR -#endif - -// C++0x headers implemented in 610 (as shipped by Microsoft) -// -#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 610 -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_ALLOCATOR -// 540 has std::align but it is not a conforming implementation -# 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) && !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 -#endif -#if !defined(_CPPLIB_VER) || (_CPPLIB_VER < 650) -# define BOOST_NO_CXX17_STD_INVOKE -#endif - -#if defined(BOOST_INTEL) && (BOOST_INTEL <= 1400) -// Intel's compiler can't handle this header yet: -# define BOOST_NO_CXX11_HDR_ATOMIC -#endif - - -// 520..610 have std::addressof, but it doesn't support functions -// -#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 650 -# define BOOST_NO_CXX11_ADDRESSOF -#endif - -// Bug specific to VC14, -// See https://connect.microsoft.com/VisualStudio/feedback/details/1348277/link-error-when-using-std-codecvt-utf8-utf16-char16-t -// and discussion here: http://blogs.msdn.com/b/vcblog/archive/2014/11/12/visual-studio-2015-preview-now-available.aspx?PageIndex=2 -#if defined(_CPPLIB_VER) && (_CPPLIB_VER == 650) -# define BOOST_NO_CXX11_HDR_CODECVT -#endif - -#if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 650) -// 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 -# define BOOST_DINKUMWARE_STDLIB 1 -#endif - -#ifdef _CPPLIB_VER -# define BOOST_STDLIB "Dinkumware standard library version " BOOST_STRINGIZE(_CPPLIB_VER) -#else -# define BOOST_STDLIB "Dinkumware standard library version 1.x" -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/config/stdlib/libcomo.hpp b/contrib/libboost/boost_1_65_0/boost/config/stdlib/libcomo.hpp deleted file mode 100644 index ce83f082ccb..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/stdlib/libcomo.hpp +++ /dev/null @@ -1,91 +0,0 @@ -// (C) Copyright John Maddock 2002 - 2003. -// (C) Copyright Jens Maurer 2002 - 2003. -// (C) Copyright Beman Dawes 2002 - 2003. -// 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. - -// Comeau STL: - -#if !defined(__LIBCOMO__) -# include -# if !defined(__LIBCOMO__) -# error "This is not the Comeau STL!" -# endif -#endif - -// -// std::streambuf is non-standard -// NOTE: versions of libcomo prior to beta28 have octal version numbering, -// e.g. version 25 is 21 (dec) -#if __LIBCOMO_VERSION__ <= 22 -# define BOOST_NO_STD_WSTREAMBUF -#endif - -#if (__LIBCOMO_VERSION__ <= 31) && defined(_WIN32) -#define BOOST_NO_SWPRINTF -#endif - -#if __LIBCOMO_VERSION__ >= 31 -# define BOOST_HAS_HASH -# define BOOST_HAS_SLIST -#endif - -// C++0x headers not yet implemented -// -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_CHRONO -# 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_FUTURE -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# 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 -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_STD_ALIGN -# define BOOST_NO_CXX11_ADDRESSOF - -#if defined(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus < 201402 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#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 - -// -// Intrinsic type_traits support. -// The SGI STL has it's own __type_traits class, which -// has intrinsic compiler support with SGI's compilers. -// Whatever map SGI style type traits to boost equivalents: -// -#define BOOST_HAS_SGI_TYPE_TRAITS - -#define BOOST_STDLIB "Comeau standard library " BOOST_STRINGIZE(__LIBCOMO_VERSION__) diff --git a/contrib/libboost/boost_1_65_0/boost/config/stdlib/libcpp.hpp b/contrib/libboost/boost_1_65_0/boost/config/stdlib/libcpp.hpp deleted file mode 100644 index 9c58965f80a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/stdlib/libcpp.hpp +++ /dev/null @@ -1,124 +0,0 @@ -// (C) Copyright Christopher Jefferson 2011. -// 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. - -// config for libc++ -// Might need more in here later. - -#if !defined(_LIBCPP_VERSION) -# include -# if !defined(_LIBCPP_VERSION) -# error "This is not libc++!" -# endif -#endif - -#define BOOST_STDLIB "libc++ version " BOOST_STRINGIZE(_LIBCPP_VERSION) - -#define BOOST_HAS_THREADS - -#ifdef _LIBCPP_HAS_NO_VARIADICS -# define BOOST_NO_CXX11_HDR_TUPLE -#endif - -// BOOST_NO_CXX11_ALLOCATOR should imply no support for the C++11 -// allocator model. The C++11 allocator model requires a conforming -// std::allocator_traits which is only possible with C++11 template -// 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 -// -// 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_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# 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 -# define BOOST_NO_CXX11_ADDRESSOF -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_ATOMIC_SMART_PTR -# define BOOST_NO_CXX11_HDR_CHRONO -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_FUTURE -#elif _LIBCPP_VERSION < 3700 -// -// These appear to be unusable/incomplete so far: -// -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_ATOMIC_SMART_PTR -# define BOOST_NO_CXX11_HDR_CHRONO -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_FUTURE -#endif - - -#if _LIBCPP_VERSION < 3700 -// libc++ uses a non-standard messages_base -#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 - -#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(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus <= 201103 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#elif __cplusplus < 201402 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif - -// --- end --- diff --git a/contrib/libboost/boost_1_65_0/boost/config/stdlib/libstdcpp3.hpp b/contrib/libboost/boost_1_65_0/boost/config/stdlib/libstdcpp3.hpp deleted file mode 100644 index 9adbc8f171e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/stdlib/libstdcpp3.hpp +++ /dev/null @@ -1,346 +0,0 @@ -// (C) Copyright John Maddock 2001. -// (C) Copyright Jens Maurer 2001. -// 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. - -// config for libstdc++ v3 -// not much to go in here: - -#define BOOST_GNU_STDLIB 1 - -#ifdef __GLIBCXX__ -#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__) -#else -#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__) -#endif - -#if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T) -# define BOOST_NO_CWCHAR -# define BOOST_NO_CWCTYPE -# define BOOST_NO_STD_WSTRING -# define BOOST_NO_STD_WSTREAMBUF -#endif - -#if defined(__osf__) && !defined(_REENTRANT) \ - && ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) ) -// GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header -// file is included, therefore for consistency we define it here as well. -# define _REENTRANT -#endif - -#ifdef __GLIBCXX__ // gcc 3.4 and greater: -# if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \ - || defined(_GLIBCXX__PTHREADS) \ - || defined(_GLIBCXX_HAS_GTHREADS) \ - || defined(_WIN32) \ - || defined(_AIX) \ - || defined(__HAIKU__) - // - // If the std lib has thread support turned on, then turn it on in Boost - // as well. We do this because some gcc-3.4 std lib headers define _REENTANT - // while others do not... - // -# define BOOST_HAS_THREADS -# else -# define BOOST_DISABLE_THREADS -# endif -#elif defined(__GLIBCPP__) \ - && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \ - && !defined(_GLIBCPP__PTHREADS) - // disable thread support if the std lib was built single threaded: -# define BOOST_DISABLE_THREADS -#endif - -#if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT) -// linux on arm apparently doesn't define _REENTRANT -// so just turn on threading support whenever the std lib is thread safe: -# define BOOST_HAS_THREADS -#endif - -#if !defined(_GLIBCPP_USE_LONG_LONG) \ - && !defined(_GLIBCXX_USE_LONG_LONG)\ - && defined(BOOST_HAS_LONG_LONG) -// May have been set by compiler/*.hpp, but "long long" without library -// support is useless. -# undef BOOST_HAS_LONG_LONG -#endif - -// Apple doesn't seem to reliably defined a *unix* macro -#if !defined(CYGWIN) && ( defined(__unix__) \ - || defined(__unix) \ - || defined(unix) \ - || defined(__APPLE__) \ - || defined(__APPLE) \ - || defined(APPLE)) -# include -#endif - -#if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0 -# define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx -# define BOOST_HAS_SLIST -# define BOOST_HAS_HASH -# define BOOST_SLIST_HEADER -# if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) -# define BOOST_HASH_SET_HEADER -# define BOOST_HASH_MAP_HEADER -# else -# define BOOST_HASH_SET_HEADER -# define BOOST_HASH_MAP_HEADER -# endif -#endif - -// -// Decide whether we have C++11 support turned on: -// -#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103) -# define BOOST_LIBSTDCXX11 -#endif - -// -// Decide which version of libstdc++ we have, normally -// 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 -// GCC 4.2.4 it is set to 20080519 but in GCC 4.3.0 it is set to 20080305. -// 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 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 -// only ever claims to emulate GCC-4.2, see https://svn.boost.org/trac/boost/ticket/7473 -// for a long discussion on this issue. What we can do though is use clang's __has_include -// to detect the presence of a C++11 header that was introduced with a specific GCC release. -// We still have to be careful though as many such headers were buggy and/or incomplete when -// first introduced, so we only check for headers that were fully featured from day 1, and then -// use that to infer the underlying GCC version: -// -#ifdef __clang__ - -#if __has_include() -# define BOOST_LIBSTDCXX_VERSION 60100 -#elif __has_include() -# define BOOST_LIBSTDCXX_VERSION 50100 -#elif __has_include() -# define BOOST_LIBSTDCXX_VERSION 40900 -#elif __has_include() -# define BOOST_LIBSTDCXX_VERSION 40800 -#elif __has_include() -# define BOOST_LIBSTDCXX_VERSION 40700 -#elif __has_include() -# define BOOST_LIBSTDCXX_VERSION 40600 -#elif __has_include() -# define BOOST_LIBSTDCXX_VERSION 40500 -#elif __has_include() -# define BOOST_LIBSTDCXX_VERSION 40400 -#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 -// in early GCC versions. -// -#endif - -#if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130) && (__cplusplus >= 201103L) -// -// 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) -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# define BOOST_NO_CXX11_HDR_UNORDERED_SET -# define BOOST_NO_CXX11_HDR_FUNCTIONAL -#endif - -// C++0x headers in GCC 4.4.0 and later -// -#if (BOOST_LIBSTDCXX_VERSION < 40400) || !defined(BOOST_LIBSTDCXX11) -# 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_RATIO -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_SMART_PTR -#else -# define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG -# define BOOST_HAS_TR1_COMPLEX_OVERLOADS -#endif - -// C++0x features in GCC 4.5.0 and later -// -#if (BOOST_LIBSTDCXX_VERSION < 40500) || !defined(BOOST_LIBSTDCXX11) -# define BOOST_NO_CXX11_NUMERIC_LIMITS -# define BOOST_NO_CXX11_HDR_FUTURE -# define BOOST_NO_CXX11_HDR_RANDOM -#endif - -// C++0x features in GCC 4.6.0 and later -// -#if (BOOST_LIBSTDCXX_VERSION < 40600) || !defined(BOOST_LIBSTDCXX11) -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_ADDRESSOF -#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 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 -// -#if (BOOST_LIBSTDCXX_VERSION < 40800) || !defined(BOOST_LIBSTDCXX11) -// Note that although existed prior to gcc 4.8 it was largely unimplemented for many types: -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_HDR_THREAD -#endif -// C++0x features in GCC 4.9.0 and later -// -#if (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11) -// Although is present and compilable against, the actual implementation is not functional -// 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: -# define BOOST_NO_CXX11_HDR_ATOMIC -#endif -// -// C++0x features in GCC 5.1 and later -// -#if (BOOST_LIBSTDCXX_VERSION < 50100) || !defined(BOOST_LIBSTDCXX11) -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_CODECVT -# define BOOST_NO_CXX11_ATOMIC_SMART_PTR -# 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 -#elif __cplusplus <= 201103 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#elif __cplusplus < 201402 || (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11) -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif - -// -// Headers not present on Solaris with the Oracle compiler: -#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 -// shared_ptr is present, but is not convertible to bool -// which causes all kinds of problems especially in Boost.Thread -// but probably elsewhere as well. -#define BOOST_NO_CXX11_SMART_PTR -#endif - -#if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1)) - // Headers not always available: -# ifndef BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE -# endif -# ifndef BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_MUTEX -# 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 -#endif - -#if (!defined(_GTHREAD_USE_MUTEX_TIMEDLOCK) || (_GTHREAD_USE_MUTEX_TIMEDLOCK == 0)) && !defined(BOOST_NO_CXX11_HDR_MUTEX) -// Timed mutexes are not always available: -# define BOOST_NO_CXX11_HDR_MUTEX -#endif - -// --- end --- diff --git a/contrib/libboost/boost_1_65_0/boost/config/stdlib/modena.hpp b/contrib/libboost/boost_1_65_0/boost/config/stdlib/modena.hpp deleted file mode 100644 index 98bdc3fb3ed..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/stdlib/modena.hpp +++ /dev/null @@ -1,77 +0,0 @@ -// (C) Copyright Jens Maurer 2001. -// 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. - -// Modena C++ standard library (comes with KAI C++) - -#if !defined(MSIPL_COMPILE_H) -# include -# if !defined(__MSIPL_COMPILE_H) -# error "This is not the Modena C++ library!" -# endif -#endif - -#ifndef MSIPL_NL_TYPES -#define BOOST_NO_STD_MESSAGES -#endif - -#ifndef MSIPL_WCHART -#define BOOST_NO_STD_WSTRING -#endif - -// C++0x headers not yet implemented -// -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_CHRONO -# 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_FUTURE -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# 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 -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_STD_ALIGN -# define BOOST_NO_CXX11_ADDRESSOF - -#if defined(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus < 201402 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#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_STDLIB "Modena C++ standard library" - - - - - diff --git a/contrib/libboost/boost_1_65_0/boost/config/stdlib/msl.hpp b/contrib/libboost/boost_1_65_0/boost/config/stdlib/msl.hpp deleted file mode 100644 index 9606a9aeca6..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/stdlib/msl.hpp +++ /dev/null @@ -1,96 +0,0 @@ -// (C) Copyright John Maddock 2001. -// (C) Copyright Darin Adler 2001. -// 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. - -// Metrowerks standard library: - -#ifndef __MSL_CPP__ -# include -# ifndef __MSL_CPP__ -# error This is not the MSL standard library! -# endif -#endif - -#if __MSL_CPP__ >= 0x6000 // Pro 6 -# define BOOST_HAS_HASH -# define BOOST_STD_EXTENSION_NAMESPACE Metrowerks -#endif -#define BOOST_HAS_SLIST - -#if __MSL_CPP__ < 0x6209 -# define BOOST_NO_STD_MESSAGES -#endif - -// check C lib version for -#include - -#if defined(__MSL__) && (__MSL__ >= 0x5000) -# define BOOST_HAS_STDINT_H -# if !defined(__PALMOS_TRAPS__) -# define BOOST_HAS_UNISTD_H -# endif - // boilerplate code: -# include -#endif - -#if defined(_MWMT) || _MSL_THREADSAFE -# define BOOST_HAS_THREADS -#endif - -#ifdef _MSL_NO_EXPLICIT_FUNC_TEMPLATE_ARG -# define BOOST_NO_STD_USE_FACET -# define BOOST_HAS_TWO_ARG_USE_FACET -#endif - -// C++0x headers not yet implemented -// -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_CHRONO -# 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_FUTURE -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# 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 -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_STD_ALIGN -# define BOOST_NO_CXX11_ADDRESSOF - -#if defined(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus < 201402 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#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_STDLIB "Metrowerks Standard Library version " BOOST_STRINGIZE(__MSL_CPP__) diff --git a/contrib/libboost/boost_1_65_0/boost/config/stdlib/roguewave.hpp b/contrib/libboost/boost_1_65_0/boost/config/stdlib/roguewave.hpp deleted file mode 100644 index 380d0ff375c..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/stdlib/roguewave.hpp +++ /dev/null @@ -1,206 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Jens Maurer 2001. -// (C) Copyright David Abrahams 2003. -// (C) Copyright Boris Gubenko 2007. -// 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. - -// Rogue Wave std lib: - -#define BOOST_RW_STDLIB 1 - -#if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) -# include -# if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) -# error This is not the Rogue Wave standard library -# endif -#endif -// -// figure out a consistent version number: -// -#ifndef _RWSTD_VER -# define BOOST_RWSTD_VER 0x010000 -#elif _RWSTD_VER < 0x010000 -# define BOOST_RWSTD_VER (_RWSTD_VER << 8) -#else -# define BOOST_RWSTD_VER _RWSTD_VER -#endif - -#ifndef _RWSTD_VER -# define BOOST_STDLIB "Rogue Wave standard library version (Unknown version)" -#elif _RWSTD_VER < 0x04010200 - # define BOOST_STDLIB "Rogue Wave standard library version " BOOST_STRINGIZE(_RWSTD_VER) -#else -# ifdef _RWSTD_VER_STR -# define BOOST_STDLIB "Apache STDCXX standard library version " _RWSTD_VER_STR -# else -# define BOOST_STDLIB "Apache STDCXX standard library version " BOOST_STRINGIZE(_RWSTD_VER) -# endif -#endif - -// -// Prior to version 2.2.0 the primary template for std::numeric_limits -// does not have compile time constants, even though specializations of that -// template do: -// -#if BOOST_RWSTD_VER < 0x020200 -# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS -#endif - -// Sun CC 5.5 patch 113817-07 adds long long specialization, but does not change the -// library version number (http://sunsolve6.sun.com/search/document.do?assetkey=1-21-113817): -#if BOOST_RWSTD_VER <= 0x020101 && (!defined(__SUNPRO_CC) || (__SUNPRO_CC < 0x550)) -# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS -# endif - -// -// Borland version of numeric_limits lacks __int64 specialisation: -// -#ifdef __BORLANDC__ -# define BOOST_NO_MS_INT64_NUMERIC_LIMITS -#endif - -// -// No std::iterator if it can't figure out default template args: -// -#if defined(_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || defined(RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || (BOOST_RWSTD_VER < 0x020000) -# define BOOST_NO_STD_ITERATOR -#endif - -// -// No iterator traits without partial specialization: -// -#if defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) || defined(RWSTD_NO_CLASS_PARTIAL_SPEC) -# define BOOST_NO_STD_ITERATOR_TRAITS -#endif - -// -// Prior to version 2.0, std::auto_ptr was buggy, and there were no -// new-style iostreams, and no conformant std::allocator: -// -#if (BOOST_RWSTD_VER < 0x020000) -# define BOOST_NO_AUTO_PTR -# define BOOST_NO_STRINGSTREAM -# define BOOST_NO_STD_ALLOCATOR -# define BOOST_NO_STD_LOCALE -#endif - -// -// No template iterator constructors without member template support: -// -#if defined(RWSTD_NO_MEMBER_TEMPLATES) || defined(_RWSTD_NO_MEMBER_TEMPLATES) -# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS -#endif - -// -// RW defines _RWSTD_ALLOCATOR if the allocator is conformant and in use -// (the or _HPACC_ part is a hack - the library seems to define _RWSTD_ALLOCATOR -// on HP aCC systems even though the allocator is in fact broken): -// -#if !defined(_RWSTD_ALLOCATOR) || (defined(__HP_aCC) && __HP_aCC <= 33100) -# define BOOST_NO_STD_ALLOCATOR -#endif - -// -// If we have a std::locale, we still may not have std::use_facet: -// -#if defined(_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) && !defined(BOOST_NO_STD_LOCALE) -# define BOOST_NO_STD_USE_FACET -# define BOOST_HAS_TWO_ARG_USE_FACET -#endif - -// -// There's no std::distance prior to version 2, or without -// partial specialization support: -// -#if (BOOST_RWSTD_VER < 0x020000) || defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) - #define BOOST_NO_STD_DISTANCE -#endif - -// -// Some versions of the rogue wave library don't have assignable -// OutputIterators: -// -#if BOOST_RWSTD_VER < 0x020100 -# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN -#endif - -// -// Disable BOOST_HAS_LONG_LONG when the library has no support for it. -// -#if !defined(_RWSTD_LONG_LONG) && defined(BOOST_HAS_LONG_LONG) -# undef BOOST_HAS_LONG_LONG -#endif - -// -// check that on HP-UX, the proper RW library is used -// -#if defined(__HP_aCC) && !defined(_HP_NAMESPACE_STD) -# error "Boost requires Standard RW library. Please compile and link with -AA" -#endif - -// -// Define macros specific to RW V2.2 on HP-UX -// -#if defined(__HP_aCC) && (BOOST_RWSTD_VER == 0x02020100) -# ifndef __HP_TC1_MAKE_PAIR -# define __HP_TC1_MAKE_PAIR -# endif -# ifndef _HP_INSTANTIATE_STD2_VL -# define _HP_INSTANTIATE_STD2_VL -# endif -#endif - -#if _RWSTD_VER < 0x05000000 -# define BOOST_NO_CXX11_HDR_ARRAY -#endif -// type_traits header is incomplete: -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -// -// C++0x headers not yet implemented -// -# define BOOST_NO_CXX11_HDR_CHRONO -# 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_FUTURE -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# 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 -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_STD_ALIGN -# define BOOST_NO_CXX11_ADDRESSOF - -#if defined(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus < 201402 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#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 diff --git a/contrib/libboost/boost_1_65_0/boost/config/stdlib/sgi.hpp b/contrib/libboost/boost_1_65_0/boost/config/stdlib/sgi.hpp deleted file mode 100644 index 5016ff627bb..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/stdlib/sgi.hpp +++ /dev/null @@ -1,166 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2003. -// (C) Copyright Darin Adler 2001. -// (C) Copyright Jens Maurer 2001 - 2003. -// 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. - -// generic SGI STL: - -#if !defined(__STL_CONFIG_H) -# include -# if !defined(__STL_CONFIG_H) -# error "This is not the SGI STL!" -# endif -#endif - -// -// No std::iterator traits without partial specialisation: -// -#if !defined(__STL_CLASS_PARTIAL_SPECIALIZATION) -# define BOOST_NO_STD_ITERATOR_TRAITS -#endif - -// -// No std::stringstream with gcc < 3 -// -#if defined(__GNUC__) && (__GNUC__ < 3) && \ - ((__GNUC_MINOR__ < 95) || (__GNUC_MINOR__ == 96)) && \ - !defined(__STL_USE_NEW_IOSTREAMS) || \ - defined(__APPLE_CC__) - // Note that we only set this for GNU C++ prior to 2.95 since the - // latest patches for that release do contain a minimal - // If you are running a 2.95 release prior to 2.95.3 then this will need - // setting, but there is no way to detect that automatically (other - // than by running the configure script). - // Also, the unofficial GNU C++ 2.96 included in RedHat 7.1 doesn't - // have . -# define BOOST_NO_STRINGSTREAM -#endif - -// Apple doesn't seem to reliably defined a *unix* macro -#if !defined(CYGWIN) && ( defined(__unix__) \ - || defined(__unix) \ - || defined(unix) \ - || defined(__APPLE__) \ - || defined(__APPLE) \ - || defined(APPLE)) -# include -#endif - - -// -// Assume no std::locale without own iostreams (this may be an -// incorrect assumption in some cases): -// -#if !defined(__SGI_STL_OWN_IOSTREAMS) && !defined(__STL_USE_NEW_IOSTREAMS) -# define BOOST_NO_STD_LOCALE -#endif - -// -// Original native SGI streams have non-standard std::messages facet: -// -#if defined(__sgi) && (_COMPILER_VERSION <= 650) && !defined(__SGI_STL_OWN_IOSTREAMS) -# define BOOST_NO_STD_LOCALE -#endif - -// -// SGI's new iostreams have missing "const" in messages<>::open -// -#if defined(__sgi) && (_COMPILER_VERSION <= 740) && defined(__STL_USE_NEW_IOSTREAMS) -# define BOOST_NO_STD_MESSAGES -#endif - -// -// No template iterator constructors, or std::allocator -// without member templates: -// -#if !defined(__STL_MEMBER_TEMPLATES) -# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS -# define BOOST_NO_STD_ALLOCATOR -#endif - -// -// We always have SGI style hash_set, hash_map, and slist: -// -#define BOOST_HAS_HASH -#define BOOST_HAS_SLIST - -// -// If this is GNU libstdc++2, then no and no std::wstring: -// -#if (defined(__GNUC__) && (__GNUC__ < 3)) -# include -# if defined(__BASTRING__) -# define BOOST_NO_LIMITS -// Note: will provide compile-time constants -# undef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS -# define BOOST_NO_STD_WSTRING -# endif -#endif - -// -// There is no standard iterator unless we have namespace support: -// -#if !defined(__STL_USE_NAMESPACES) -# define BOOST_NO_STD_ITERATOR -#endif - -// -// Intrinsic type_traits support. -// The SGI STL has it's own __type_traits class, which -// has intrinsic compiler support with SGI's compilers. -// Whatever map SGI style type traits to boost equivalents: -// -#define BOOST_HAS_SGI_TYPE_TRAITS - -// C++0x headers not yet implemented -// -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_CHRONO -# 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_FUTURE -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# 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 -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_STD_ALIGN -# define BOOST_NO_CXX11_ADDRESSOF - -#if defined(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus < 201402 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#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_STDLIB "SGI standard library" diff --git a/contrib/libboost/boost_1_65_0/boost/config/stdlib/stlport.hpp b/contrib/libboost/boost_1_65_0/boost/config/stdlib/stlport.hpp deleted file mode 100644 index 81e6ccf016a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/stdlib/stlport.hpp +++ /dev/null @@ -1,256 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2002. -// (C) Copyright Darin Adler 2001. -// (C) Copyright Jens Maurer 2001. -// 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. - -// STLPort standard library config: - -#if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) -# include -# if !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION) -# error "This is not STLPort!" -# endif -#endif - -// Apple doesn't seem to reliably defined a *unix* macro -#if !defined(CYGWIN) && ( defined(__unix__) \ - || defined(__unix) \ - || defined(unix) \ - || defined(__APPLE__) \ - || defined(__APPLE) \ - || defined(APPLE)) -# include -#endif - -// -// __STL_STATIC_CONST_INIT_BUG implies BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS -// for versions prior to 4.1(beta) -// -#if (defined(__STL_STATIC_CONST_INIT_BUG) || defined(_STLP_STATIC_CONST_INIT_BUG)) && (__SGI_STL_PORT <= 0x400) -# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS -#endif - -// -// If STLport thinks that there is no partial specialisation, then there is no -// std::iterator traits: -// -#if !(defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || defined(__STL_CLASS_PARTIAL_SPECIALIZATION)) -# define BOOST_NO_STD_ITERATOR_TRAITS -#endif - -// -// No new style iostreams on GCC without STLport's iostreams enabled: -// -#if (defined(__GNUC__) && (__GNUC__ < 3)) && !(defined(__SGI_STL_OWN_IOSTREAMS) || defined(_STLP_OWN_IOSTREAMS)) -# define BOOST_NO_STRINGSTREAM -#endif - -// -// No new iostreams implies no std::locale, and no std::stringstream: -// -#if defined(__STL_NO_IOSTREAMS) || defined(__STL_NO_NEW_IOSTREAMS) || defined(_STLP_NO_IOSTREAMS) || defined(_STLP_NO_NEW_IOSTREAMS) -# define BOOST_NO_STD_LOCALE -# define BOOST_NO_STRINGSTREAM -#endif - -// -// If the streams are not native, and we have a "using ::x" compiler bug -// then the io stream facets are not available in namespace std:: -// -#ifdef _STLPORT_VERSION -# if !(_STLPORT_VERSION >= 0x500) && !defined(_STLP_OWN_IOSTREAMS) && defined(_STLP_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) -# define BOOST_NO_STD_LOCALE -# endif -#else -# if !defined(__SGI_STL_OWN_IOSTREAMS) && defined(__STL_USE_NAMESPACES) && defined(BOOST_NO_USING_TEMPLATE) && !defined(__BORLANDC__) -# define BOOST_NO_STD_LOCALE -# endif -#endif - -#if defined(_STLPORT_VERSION) && (_STLPORT_VERSION >= 0x520) -# define BOOST_HAS_TR1_UNORDERED_SET -# define BOOST_HAS_TR1_UNORDERED_MAP -#endif -// -// Without member template support enabled, their are no template -// iterate constructors, and no std::allocator: -// -#if !(defined(__STL_MEMBER_TEMPLATES) || defined(_STLP_MEMBER_TEMPLATES)) -# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS -# define BOOST_NO_STD_ALLOCATOR -#endif -// -// however we always have at least a partial allocator: -// -#define BOOST_HAS_PARTIAL_STD_ALLOCATOR - -#if !defined(_STLP_MEMBER_TEMPLATE_CLASSES) || defined(_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) -# define BOOST_NO_STD_ALLOCATOR -#endif - -#if defined(_STLP_NO_MEMBER_TEMPLATE_KEYWORD) && defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) -# define BOOST_NO_STD_ALLOCATOR -#endif - -// -// If STLport thinks there is no wchar_t at all, then we have to disable -// the support for the relevant specilazations of std:: templates. -// -#if !defined(_STLP_HAS_WCHAR_T) && !defined(_STLP_WCHAR_T_IS_USHORT) -# ifndef BOOST_NO_STD_WSTRING -# define BOOST_NO_STD_WSTRING -# endif -# ifndef BOOST_NO_STD_WSTREAMBUF -# define BOOST_NO_STD_WSTREAMBUF -# endif -#endif - -// -// We always have SGI style hash_set, hash_map, and slist: -// -#ifndef _STLP_NO_EXTENSIONS -#define BOOST_HAS_HASH -#define BOOST_HAS_SLIST -#endif - -// -// STLport does a good job of importing names into namespace std::, -// but doesn't always get them all, define BOOST_NO_STDC_NAMESPACE, since our -// workaround does not conflict with STLports: -// -// -// Harold Howe says: -// Borland switched to STLport in BCB6. Defining BOOST_NO_STDC_NAMESPACE with -// BCB6 does cause problems. If we detect C++ Builder, then don't define -// BOOST_NO_STDC_NAMESPACE -// -#if !defined(__BORLANDC__) && !defined(__DMC__) -// -// If STLport is using it's own namespace, and the real names are in -// the global namespace, then we duplicate STLport's using declarations -// (by defining BOOST_NO_STDC_NAMESPACE), we do this because STLport doesn't -// necessarily import all the names we need into namespace std:: -// -# if (defined(__STL_IMPORT_VENDOR_CSTD) \ - || defined(__STL_USE_OWN_NAMESPACE) \ - || defined(_STLP_IMPORT_VENDOR_CSTD) \ - || defined(_STLP_USE_OWN_NAMESPACE)) \ - && (defined(__STL_VENDOR_GLOBAL_CSTD) || defined (_STLP_VENDOR_GLOBAL_CSTD)) -# define BOOST_NO_STDC_NAMESPACE -# define BOOST_NO_EXCEPTION_STD_NAMESPACE -# endif -#elif defined(__BORLANDC__) && __BORLANDC__ < 0x560 -// STLport doesn't import std::abs correctly: -#include -namespace std { using ::abs; } -// and strcmp/strcpy don't get imported either ('cos they are macros) -#include -#ifdef strcpy -# undef strcpy -#endif -#ifdef strcmp -# undef strcmp -#endif -#ifdef _STLP_VENDOR_CSTD -namespace std{ using _STLP_VENDOR_CSTD::strcmp; using _STLP_VENDOR_CSTD::strcpy; } -#endif -#endif - -// -// std::use_facet may be non-standard, uses a class instead: -// -#if defined(__STL_NO_EXPLICIT_FUNCTION_TMPL_ARGS) || defined(_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS) -# define BOOST_NO_STD_USE_FACET -# define BOOST_HAS_STLP_USE_FACET -#endif - -// -// If STLport thinks there are no wide functions, etc. is not working; but -// only if BOOST_NO_STDC_NAMESPACE is not defined (if it is then we do the import -// into std:: ourselves). -// -#if defined(_STLP_NO_NATIVE_WIDE_FUNCTIONS) && !defined(BOOST_NO_STDC_NAMESPACE) -# define BOOST_NO_CWCHAR -# define BOOST_NO_CWCTYPE -#endif - -// -// If STLport for some reason was configured so that it thinks that wchar_t -// is not an intrinsic type, then we have to disable the support for it as -// well (we would be missing required specializations otherwise). -// -#if !defined( _STLP_HAS_WCHAR_T) || defined(_STLP_WCHAR_T_IS_USHORT) -# undef BOOST_NO_INTRINSIC_WCHAR_T -# define BOOST_NO_INTRINSIC_WCHAR_T -#endif - -// -// Borland ships a version of STLport with C++ Builder 6 that lacks -// hashtables and the like: -// -#if defined(__BORLANDC__) && (__BORLANDC__ == 0x560) -# undef BOOST_HAS_HASH -#endif - -// -// gcc-2.95.3/STLPort does not like the using declarations we use to get ADL with std::min/max -// -#if defined(__GNUC__) && (__GNUC__ < 3) -# include // for std::min and std::max -# define BOOST_USING_STD_MIN() ((void)0) -# define BOOST_USING_STD_MAX() ((void)0) -namespace boost { using std::min; using std::max; } -#endif - -// C++0x headers not yet implemented -// -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_CHRONO -# 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_FUTURE -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# 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 -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_STD_ALIGN -# define BOOST_NO_CXX11_ADDRESSOF - -#if defined(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus < 201402 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#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_STDLIB "STLPort standard library version " BOOST_STRINGIZE(__SGI_STL_PORT) diff --git a/contrib/libboost/boost_1_65_0/boost/config/stdlib/vacpp.hpp b/contrib/libboost/boost_1_65_0/boost/config/stdlib/vacpp.hpp deleted file mode 100644 index c159af259fe..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/stdlib/vacpp.hpp +++ /dev/null @@ -1,72 +0,0 @@ -// (C) Copyright John Maddock 2001 - 2002. -// 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. - -#if __IBMCPP__ <= 501 -# define BOOST_NO_STD_ALLOCATOR -#endif - -#define BOOST_HAS_MACRO_USE_FACET -#define BOOST_NO_STD_MESSAGES - -// Apple doesn't seem to reliably defined a *unix* macro -#if !defined(CYGWIN) && ( defined(__unix__) \ - || defined(__unix) \ - || defined(unix) \ - || defined(__APPLE__) \ - || defined(__APPLE) \ - || defined(APPLE)) -# include -#endif - -// C++0x headers not yet implemented -// -# define BOOST_NO_CXX11_HDR_ARRAY -# define BOOST_NO_CXX11_HDR_CHRONO -# 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_FUTURE -# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST -# define BOOST_NO_CXX11_HDR_MUTEX -# define BOOST_NO_CXX11_HDR_RANDOM -# define BOOST_NO_CXX11_HDR_RATIO -# define BOOST_NO_CXX11_HDR_REGEX -# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR -# define BOOST_NO_CXX11_HDR_THREAD -# define BOOST_NO_CXX11_HDR_TUPLE -# define BOOST_NO_CXX11_HDR_TYPE_TRAITS -# define BOOST_NO_CXX11_HDR_TYPEINDEX -# define BOOST_NO_CXX11_HDR_UNORDERED_MAP -# 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 -# define BOOST_NO_CXX11_HDR_ATOMIC -# define BOOST_NO_CXX11_STD_ALIGN -# define BOOST_NO_CXX11_ADDRESSOF - -#if defined(__has_include) -#if !__has_include() -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#elif __cplusplus < 201402 -# define BOOST_NO_CXX14_HDR_SHARED_MUTEX -#endif -#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_STDLIB "Visual Age default standard library" diff --git a/contrib/libboost/boost_1_65_0/boost/config/stdlib/xlcpp_zos.hpp b/contrib/libboost/boost_1_65_0/boost/config/stdlib/xlcpp_zos.hpp deleted file mode 100644 index dce40f50902..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/stdlib/xlcpp_zos.hpp +++ /dev/null @@ -1,59 +0,0 @@ -// 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 diff --git a/contrib/libboost/boost_1_65_0/boost/config/user.hpp b/contrib/libboost/boost_1_65_0/boost/config/user.hpp deleted file mode 100644 index 28e7476afd3..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/user.hpp +++ /dev/null @@ -1,133 +0,0 @@ -// boost/config/user.hpp ---------------------------------------------------// - -// (C) Copyright John Maddock 2001. -// 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) - -// Do not check in modified versions of this file, -// This file may be customized by the end user, but not by boost. - -// -// Use this file to define a site and compiler specific -// configuration policy: -// - -// define this to locate a compiler config file: -// #define BOOST_COMPILER_CONFIG - -// define this to locate a stdlib config file: -// #define BOOST_STDLIB_CONFIG - -// define this to locate a platform config file: -// #define BOOST_PLATFORM_CONFIG - -// define this to disable compiler config, -// use if your compiler config has nothing to set: -// #define BOOST_NO_COMPILER_CONFIG - -// define this to disable stdlib config, -// use if your stdlib config has nothing to set: -// #define BOOST_NO_STDLIB_CONFIG - -// define this to disable platform config, -// use if your platform config has nothing to set: -// #define BOOST_NO_PLATFORM_CONFIG - -// define this to disable all config options, -// excluding the user config. Use if your -// setup is fully ISO compliant, and has no -// useful extensions, or for autoconf generated -// setups: -// #define BOOST_NO_CONFIG - -// define this to make the config "optimistic" -// about unknown compiler versions. Normally -// unknown compiler versions are assumed to have -// all the defects of the last known version, however -// setting this flag, causes the config to assume -// that unknown compiler versions are fully conformant -// with the standard: -// #define BOOST_STRICT_CONFIG - -// define this to cause the config to halt compilation -// with an #error if it encounters anything unknown -- -// either an unknown compiler version or an unknown -// compiler/platform/library: -// #define BOOST_ASSERT_CONFIG - - -// define if you want to disable threading support, even -// when available: -// #define BOOST_DISABLE_THREADS - -// define when you want to disable Win32 specific features -// even when available: -// #define BOOST_DISABLE_WIN32 - -// BOOST_DISABLE_ABI_HEADERS: Stops boost headers from including any -// prefix/suffix headers that normally control things like struct -// packing and alignment. -// #define BOOST_DISABLE_ABI_HEADERS - -// BOOST_ABI_PREFIX: A prefix header to include in place of whatever -// boost.config would normally select, any replacement should set up -// struct packing and alignment options as required. -// #define BOOST_ABI_PREFIX my-header-name - -// BOOST_ABI_SUFFIX: A suffix header to include in place of whatever -// boost.config would normally select, any replacement should undo -// the effects of the prefix header. -// #define BOOST_ABI_SUFFIX my-header-name - -// BOOST_ALL_DYN_LINK: Forces all libraries that have separate source, -// to be linked as dll's rather than static libraries on Microsoft Windows -// (this macro is used to turn on __declspec(dllimport) modifiers, so that -// the compiler knows which symbols to look for in a dll rather than in a -// static library). Note that there may be some libraries that can only -// be linked in one way (statically or dynamically), in these cases this -// macro has no effect. -// #define BOOST_ALL_DYN_LINK - -// BOOST_WHATEVER_DYN_LINK: Forces library "whatever" to be linked as a dll -// rather than a static library on Microsoft Windows: replace the WHATEVER -// part of the macro name with the name of the library that you want to -// dynamically link to, for example use BOOST_DATE_TIME_DYN_LINK or -// BOOST_REGEX_DYN_LINK etc (this macro is used to turn on __declspec(dllimport) -// modifiers, so that the compiler knows which symbols to look for in a dll -// rather than in a static library). -// Note that there may be some libraries that can only -// be linked in one way (statically or dynamically), -// in these cases this macro is unsupported. -// #define BOOST_WHATEVER_DYN_LINK - -// BOOST_ALL_NO_LIB: Tells the config system not to automatically select -// which libraries to link against. -// Normally if a compiler supports #pragma lib, then the correct library -// build variant will be automatically selected and linked against, -// simply by the act of including one of that library's headers. -// This macro turns that feature off. -// #define BOOST_ALL_NO_LIB - -// BOOST_WHATEVER_NO_LIB: Tells the config system not to automatically -// select which library to link against for library "whatever", -// replace WHATEVER in the macro name with the name of the library; -// for example BOOST_DATE_TIME_NO_LIB or BOOST_REGEX_NO_LIB. -// Normally if a compiler supports #pragma lib, then the correct library -// build variant will be automatically selected and linked against, simply -// by the act of including one of that library's headers. This macro turns -// that feature off. -// #define BOOST_WHATEVER_NO_LIB - -// BOOST_LIB_BUILDID: Set to the same value as the value passed to Boost.Build's -// --buildid command line option. For example if you built using: -// -// bjam address-model=64 --buildid=amd64 -// -// then compile your code with: -// -// -DBOOST_LIB_BUILDID = amd64 -// -// to ensure the correct libraries are selected at link time. -// #define BOOST_LIB_BUILDID amd64 - diff --git a/contrib/libboost/boost_1_65_0/boost/config/warning_disable.hpp b/contrib/libboost/boost_1_65_0/boost/config/warning_disable.hpp deleted file mode 100644 index fea8e829f14..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/warning_disable.hpp +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright John Maddock 2008 -// 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) -// -// This file exists to turn off some overly-pedantic warning emitted -// by certain compilers. You should include this header only in: -// -// * A test case, before any other headers, or, -// * A library source file before any other headers. -// -// IT SHOULD NOT BE INCLUDED BY ANY BOOST HEADER. -// -// YOU SHOULD NOT INCLUDE IT IF YOU CAN REASONABLY FIX THE WARNING. -// -// The only warnings disabled here are those that are: -// -// * Quite unreasonably pedantic. -// * Generally only emitted by a single compiler. -// * Can't easily be fixed: for example if the vendors own std lib -// code emits these warnings! -// -// Note that THIS HEADER MUST NOT INCLUDE ANY OTHER HEADERS: -// not even std library ones! Doing so may turn the warning -// off too late to be of any use. For example the VC++ C4996 -// warning can be emitted from if that header is included -// before or by this one :-( -// - -#ifndef BOOST_CONFIG_WARNING_DISABLE_HPP -#define BOOST_CONFIG_WARNING_DISABLE_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1400) - // Error 'function': was declared deprecated - // http://msdn2.microsoft.com/en-us/library/ttcz0bys(VS.80).aspx - // This error is emitted when you use some perfectly conforming - // std lib functions in a perfectly correct way, and also by - // some of Microsoft's own std lib code ! -# pragma warning(disable:4996) -#endif -#if defined(__INTEL_COMPILER) || defined(__ICL) - // As above: gives warning when a "deprecated" - // std library function is encountered. -# pragma warning(disable:1786) -#endif - -#endif // BOOST_CONFIG_WARNING_DISABLE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/config/workaround.hpp b/contrib/libboost/boost_1_65_0/boost/config/workaround.hpp deleted file mode 100644 index 0ce8108c2e0..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/config/workaround.hpp +++ /dev/null @@ -1,277 +0,0 @@ -// 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 -#else -#define BOOST_GCC_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/contrib/libboost/boost_1_65_0/boost/container/adaptive_pool.hpp b/contrib/libboost/boost_1_65_0/boost/container/adaptive_pool.hpp deleted file mode 100644 index ac14fb397e5..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/adaptive_pool.hpp +++ /dev/null @@ -1,349 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_ADAPTIVE_POOL_HPP -#define BOOST_CONTAINER_ADAPTIVE_POOL_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - - -namespace boost { -namespace container { - -//!An STL node allocator that uses a modified DLMalloc as memory -//!source. -//! -//!This node allocator shares a segregated storage between all instances -//!of adaptive_pool with equal sizeof(T). -//! -//!NodesPerBlock is the number of nodes allocated at once when the allocator -//!needs runs out of nodes. MaxFreeBlocks is the maximum number of totally free blocks -//!that the adaptive node pool will hold. The rest of the totally free blocks will be -//!deallocated to the memory manager. -//! -//!OverheadPercent is the (approximated) maximum size overhead (1-20%) of the allocator: -//!(memory usable for nodes / total memory allocated from the memory allocator) -template < class T - , std::size_t NodesPerBlock BOOST_CONTAINER_DOCONLY(= ADP_nodes_per_block) - , std::size_t MaxFreeBlocks BOOST_CONTAINER_DOCONLY(= ADP_max_free_blocks) - , std::size_t OverheadPercent BOOST_CONTAINER_DOCONLY(= ADP_overhead_percent) - BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I unsigned Version) - > -class adaptive_pool -{ - //!If Version is 1, the allocator is a STL conforming allocator. If Version is 2, - //!the allocator offers advanced expand in place and burst allocation capabilities. - public: - typedef unsigned int allocation_type; - typedef adaptive_pool - self_t; - - static const std::size_t nodes_per_block = NodesPerBlock; - static const std::size_t max_free_blocks = MaxFreeBlocks; - static const std::size_t overhead_percent = OverheadPercent; - static const std::size_t real_nodes_per_block = NodesPerBlock; - - BOOST_CONTAINER_DOCIGN(BOOST_STATIC_ASSERT((Version <=2))); - - public: - //------- - typedef T value_type; - typedef T * pointer; - typedef const T * const_pointer; - typedef typename ::boost::container:: - container_detail::unvoid_ref::type reference; - typedef typename ::boost::container:: - container_detail::unvoid_ref::type const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - - typedef boost::container::container_detail:: - version_type version; - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - typedef boost::container::container_detail:: - basic_multiallocation_chain multiallocation_chain_void; - typedef boost::container::container_detail:: - transform_multiallocation_chain - multiallocation_chain; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - //!Obtains adaptive_pool from - //!adaptive_pool - template - struct rebind - { - typedef adaptive_pool - < T2 - , NodesPerBlock - , MaxFreeBlocks - , OverheadPercent - BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I Version) - > other; - }; - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - //!Not assignable from related adaptive_pool - template - adaptive_pool& operator= - (const adaptive_pool&); - - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - //!Default constructor - adaptive_pool() BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!Copy constructor from other adaptive_pool. - adaptive_pool(const adaptive_pool &) BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!Copy constructor from related adaptive_pool. - template - adaptive_pool - (const adaptive_pool &) BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!Destructor - ~adaptive_pool() BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!Returns the number of elements that could be allocated. - //!Never throws - size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW - { return size_type(-1)/sizeof(T); } - - //!Allocate memory for an array of count elements. - //!Throws std::bad_alloc if there is no enough memory - pointer allocate(size_type count, const void * = 0) - { - if(BOOST_UNLIKELY(count > this->max_size())) - boost::container::throw_bad_alloc(); - - if(Version == 1 && count == 1){ - typedef typename container_detail::shared_adaptive_node_pool - shared_pool_t; - typedef container_detail::singleton_default singleton_t; - return pointer(static_cast(singleton_t::instance().allocate_node())); - } - else{ - return static_cast(dlmalloc_malloc(count*sizeof(T))); - } - } - - //!Deallocate allocated memory. - //!Never throws - void deallocate(const pointer &ptr, size_type count) BOOST_NOEXCEPT_OR_NOTHROW - { - (void)count; - if(Version == 1 && count == 1){ - typedef container_detail::shared_adaptive_node_pool - shared_pool_t; - typedef container_detail::singleton_default singleton_t; - singleton_t::instance().deallocate_node(ptr); - } - else{ - dlmalloc_free(ptr); - } - } - - pointer allocation_command(allocation_type command, - size_type limit_size, - size_type &prefer_in_recvd_out_size, - pointer &reuse) - { - pointer ret = this->priv_allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse); - if(BOOST_UNLIKELY(!ret && !(command & BOOST_CONTAINER_NOTHROW_ALLOCATION))) - boost::container::throw_bad_alloc(); - return ret; - } - - //!Returns maximum the number of objects the previously allocated memory - //!pointed by p can hold. - size_type size(pointer p) const BOOST_NOEXCEPT_OR_NOTHROW - { return dlmalloc_size(p); } - - //!Allocates just one object. Memory allocated with this function - //!must be deallocated only with deallocate_one(). - //!Throws bad_alloc if there is no enough memory - pointer allocate_one() - { - typedef container_detail::shared_adaptive_node_pool - shared_pool_t; - typedef container_detail::singleton_default singleton_t; - return (pointer)singleton_t::instance().allocate_node(); - } - - //!Allocates many elements of size == 1. - //!Elements must be individually deallocated with deallocate_one() - void allocate_individual(std::size_t num_elements, multiallocation_chain &chain) - { - typedef container_detail::shared_adaptive_node_pool - shared_pool_t; - typedef container_detail::singleton_default singleton_t; - singleton_t::instance().allocate_nodes(num_elements, static_cast(chain)); - //typename shared_pool_t::multiallocation_chain ch; - //singleton_t::instance().allocate_nodes(num_elements, ch); - //chain.incorporate_after - //(chain.before_begin(), (T*)&*ch.begin(), (T*)&*ch.last(), ch.size()); - } - - //!Deallocates memory previously allocated with allocate_one(). - //!You should never use deallocate_one to deallocate memory allocated - //!with other functions different from allocate_one(). Never throws - void deallocate_one(pointer p) BOOST_NOEXCEPT_OR_NOTHROW - { - typedef container_detail::shared_adaptive_node_pool - shared_pool_t; - typedef container_detail::singleton_default singleton_t; - singleton_t::instance().deallocate_node(p); - } - - void deallocate_individual(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW - { - typedef container_detail::shared_adaptive_node_pool - shared_pool_t; - typedef container_detail::singleton_default singleton_t; - //typename shared_pool_t::multiallocation_chain ch(&*chain.begin(), &*chain.last(), chain.size()); - //singleton_t::instance().deallocate_nodes(ch); - singleton_t::instance().deallocate_nodes(chain); - } - - //!Allocates many elements of size elem_size. - //!Elements must be individually deallocated with deallocate() - void allocate_many(size_type elem_size, std::size_t n_elements, multiallocation_chain &chain) - { - BOOST_STATIC_ASSERT(( Version > 1 ));/* - dlmalloc_memchain ch; - BOOST_CONTAINER_MEMCHAIN_INIT(&ch); - if(BOOST_UNLIKELY(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch))){ - boost::container::throw_bad_alloc(); - } - chain.incorporate_after(chain.before_begin() - ,(T*)BOOST_CONTAINER_MEMCHAIN_FIRSTMEM(&ch) - ,(T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch) - ,BOOST_CONTAINER_MEMCHAIN_SIZE(&ch) );*/ - if(BOOST_UNLIKELY(!dlmalloc_multialloc_nodes - (n_elements, elem_size*sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast(&chain)))){ - boost::container::throw_bad_alloc(); - } - } - - //!Allocates n_elements elements, each one of size elem_sizes[i] - //!Elements must be individually deallocated with deallocate() - void allocate_many(const size_type *elem_sizes, size_type n_elements, multiallocation_chain &chain) - { - BOOST_STATIC_ASSERT(( Version > 1 ));/* - dlmalloc_memchain ch; - BOOST_CONTAINER_MEMCHAIN_INIT(&ch); - if(BOOST_UNLIKELY(!dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch))){ - boost::container::throw_bad_alloc(); - } - chain.incorporate_after(chain.before_begin() - ,(T*)BOOST_CONTAINER_MEMCHAIN_FIRSTMEM(&ch) - ,(T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch) - ,BOOST_CONTAINER_MEMCHAIN_SIZE(&ch) );*/ - if(BOOST_UNLIKELY(!dlmalloc_multialloc_arrays - (n_elements, elem_sizes, sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast(&chain)))){ - boost::container::throw_bad_alloc(); - } - } - - void deallocate_many(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW - {/* - dlmalloc_memchain ch; - void *beg(&*chain.begin()), *last(&*chain.last()); - size_t size(chain.size()); - BOOST_CONTAINER_MEMCHAIN_INIT_FROM(&ch, beg, last, size); - dlmalloc_multidealloc(&ch);*/ - dlmalloc_multidealloc(reinterpret_cast(&chain)); - } - - //!Deallocates all free blocks of the pool - static void deallocate_free_blocks() BOOST_NOEXCEPT_OR_NOTHROW - { - typedef container_detail::shared_adaptive_node_pool - shared_pool_t; - typedef container_detail::singleton_default singleton_t; - singleton_t::instance().deallocate_free_blocks(); - } - - //!Swaps allocators. Does not throw. If each allocator is placed in a - //!different memory segment, the result is undefined. - friend void swap(adaptive_pool &, adaptive_pool &) BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!An allocator always compares to true, as memory allocated with one - //!instance can be deallocated by another instance - friend bool operator==(const adaptive_pool &, const adaptive_pool &) BOOST_NOEXCEPT_OR_NOTHROW - { return true; } - - //!An allocator always compares to false, as memory allocated with one - //!instance can be deallocated by another instance - friend bool operator!=(const adaptive_pool &, const adaptive_pool &) BOOST_NOEXCEPT_OR_NOTHROW - { return false; } - - private: - pointer priv_allocation_command - (allocation_type command, std::size_t limit_size - ,size_type &prefer_in_recvd_out_size, pointer &reuse_ptr) - { - std::size_t const preferred_size = prefer_in_recvd_out_size; - dlmalloc_command_ret_t ret = {0 , 0}; - if(BOOST_UNLIKELY(limit_size > this->max_size() || preferred_size > this->max_size())){ - return pointer(); - } - std::size_t l_size = limit_size*sizeof(T); - std::size_t p_size = preferred_size*sizeof(T); - std::size_t r_size; - { - void* reuse_ptr_void = reuse_ptr; - ret = dlmalloc_allocation_command(command, sizeof(T), l_size, p_size, &r_size, reuse_ptr_void); - reuse_ptr = ret.second ? static_cast(reuse_ptr_void) : 0; - } - prefer_in_recvd_out_size = r_size/sizeof(T); - return (pointer)ret.first; - } -}; - -} //namespace container { -} //namespace boost { - -#include - -#endif //#ifndef BOOST_CONTAINER_ADAPTIVE_POOL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/allocator.hpp b/contrib/libboost/boost_1_65_0/boost/container/allocator.hpp deleted file mode 100644 index 9b9268f16cc..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/allocator.hpp +++ /dev/null @@ -1,368 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2007-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_ALLOCATOR_HPP -#define BOOST_CONTAINER_ALLOCATOR_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -//!\file - -namespace boost { -namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -template -class allocator -{ - typedef allocator self_t; - public: - typedef void value_type; - typedef void * pointer; - typedef const void* const_pointer; - typedef int & reference; - typedef const int & const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - typedef boost::container::container_detail:: - version_type version; - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - typedef boost::container::container_detail:: - basic_multiallocation_chain multiallocation_chain; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - //!Obtains an allocator that allocates - //!objects of type T2 - template - struct rebind - { - typedef allocator< T2 - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - , Version, AllocationDisableMask - #endif - > other; - }; - - //!Default constructor - //!Never throws - allocator() - {} - - //!Constructor from other allocator. - //!Never throws - allocator(const allocator &) - {} - - //!Constructor from related allocator. - //!Never throws - template - allocator(const allocator &) - {} -}; - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! This class is an extended STL-compatible that offers advanced allocation mechanism -//!(in-place expansion, shrinking, burst-allocation...) -//! -//! This allocator is a wrapper around a modified DLmalloc. -//! If Version is 1, the allocator is a STL conforming allocator. If Version is 2, -//! the allocator offers advanced expand in place and burst allocation capabilities. -//! -//! AllocationDisableMask works only if Version is 2 and it can be an inclusive OR -//! of allocation types the user wants to disable. -template< class T - , unsigned Version BOOST_CONTAINER_DOCONLY(=2) - , unsigned int AllocationDisableMask BOOST_CONTAINER_DOCONLY(=0)> -class allocator -{ - typedef unsigned int allocation_type; - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - - //Self type - typedef allocator self_t; - - //Not assignable from related allocator - template - allocator& operator=(const allocator&); - - static const unsigned int ForbiddenMask = - BOOST_CONTAINER_ALLOCATE_NEW | BOOST_CONTAINER_EXPAND_BWD | BOOST_CONTAINER_EXPAND_FWD ; - - //The mask can't disable all the allocation types - BOOST_STATIC_ASSERT(( (AllocationDisableMask & ForbiddenMask) != ForbiddenMask )); - - //The mask is only valid for version 2 allocators - BOOST_STATIC_ASSERT(( Version != 1 || (AllocationDisableMask == 0) )); - - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - typedef T value_type; - typedef T * pointer; - typedef const T * const_pointer; - typedef T & reference; - typedef const T & const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - - typedef boost::container::container_detail:: - version_type version; - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - typedef boost::container::container_detail:: - basic_multiallocation_chain void_multiallocation_chain; - - typedef boost::container::container_detail:: - transform_multiallocation_chain - multiallocation_chain; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - //!Obtains an allocator that allocates - //!objects of type T2 - template - struct rebind - { - typedef allocator other; - }; - - //!Default constructor - //!Never throws - allocator() BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!Constructor from other allocator. - //!Never throws - allocator(const allocator &) BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!Constructor from related allocator. - //!Never throws - template - allocator(const allocator &) BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!Allocates memory for an array of count elements. - //!Throws std::bad_alloc if there is no enough memory - //!If Version is 2, this allocated memory can only be deallocated - //!with deallocate() or (for Version == 2) deallocate_many() - pointer allocate(size_type count, const void * hint= 0) - { - (void)hint; - if(count > this->max_size()) - boost::container::throw_bad_alloc(); - void *ret = dlmalloc_malloc(count*sizeof(T)); - if(!ret) - boost::container::throw_bad_alloc(); - return static_cast(ret); - } - - //!Deallocates previously allocated memory. - //!Never throws - void deallocate(pointer ptr, size_type) BOOST_NOEXCEPT_OR_NOTHROW - { dlmalloc_free(ptr); } - - //!Returns the maximum number of elements that could be allocated. - //!Never throws - size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW - { return size_type(-1)/sizeof(T); } - - //!Swaps two allocators, does nothing - //!because this allocator is stateless - friend void swap(self_t &, self_t &) BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!An allocator always compares to true, as memory allocated with one - //!instance can be deallocated by another instance - friend bool operator==(const allocator &, const allocator &) BOOST_NOEXCEPT_OR_NOTHROW - { return true; } - - //!An allocator always compares to false, as memory allocated with one - //!instance can be deallocated by another instance - friend bool operator!=(const allocator &, const allocator &) BOOST_NOEXCEPT_OR_NOTHROW - { return false; } - - //!An advanced function that offers in-place expansion shrink to fit and new allocation - //!capabilities. Memory allocated with this function can only be deallocated with deallocate() - //!or deallocate_many(). - //!This function is available only with Version == 2 - pointer allocation_command(allocation_type command, - size_type limit_size, - size_type &prefer_in_recvd_out_size, - pointer &reuse) - { - BOOST_STATIC_ASSERT(( Version > 1 )); - const allocation_type mask(AllocationDisableMask); - command &= ~mask; - pointer ret = this->priv_allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse); - if(!ret && !(command & BOOST_CONTAINER_NOTHROW_ALLOCATION)) - boost::container::throw_bad_alloc(); - return ret; - } - - //!Returns maximum the number of objects the previously allocated memory - //!pointed by p can hold. - //!Memory must not have been allocated with - //!allocate_one or allocate_individual. - //!This function is available only with Version == 2 - size_type size(pointer p) const BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_STATIC_ASSERT(( Version > 1 )); - return dlmalloc_size(p); - } - - //!Allocates just one object. Memory allocated with this function - //!must be deallocated only with deallocate_one(). - //!Throws bad_alloc if there is no enough memory - //!This function is available only with Version == 2 - pointer allocate_one() - { - BOOST_STATIC_ASSERT(( Version > 1 )); - return this->allocate(1); - } - - //!Allocates many elements of size == 1. - //!Elements must be individually deallocated with deallocate_one() - //!This function is available only with Version == 2 - void allocate_individual(std::size_t num_elements, multiallocation_chain &chain) - { - BOOST_STATIC_ASSERT(( Version > 1 )); - this->allocate_many(1, num_elements, chain); - } - - //!Deallocates memory previously allocated with allocate_one(). - //!You should never use deallocate_one to deallocate memory allocated - //!with other functions different from allocate_one() or allocate_individual. - //Never throws - void deallocate_one(pointer p) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_STATIC_ASSERT(( Version > 1 )); - return this->deallocate(p, 1); - } - - //!Deallocates memory allocated with allocate_one() or allocate_individual(). - //!This function is available only with Version == 2 - void deallocate_individual(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_STATIC_ASSERT(( Version > 1 )); - return this->deallocate_many(chain); - } - - //!Allocates many elements of size elem_size. - //!Elements must be individually deallocated with deallocate() - //!This function is available only with Version == 2 - void allocate_many(size_type elem_size, std::size_t n_elements, multiallocation_chain &chain) - { - BOOST_STATIC_ASSERT(( Version > 1 ));/* - dlmalloc_memchain ch; - BOOST_CONTAINER_MEMCHAIN_INIT(&ch); - if(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch)){ - boost::container::throw_bad_alloc(); - } - chain.incorporate_after(chain.before_begin() - ,(T*)BOOST_CONTAINER_MEMCHAIN_FIRSTMEM(&ch) - ,(T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch) - ,BOOST_CONTAINER_MEMCHAIN_SIZE(&ch) );*/ - if(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast(&chain))){ - boost::container::throw_bad_alloc(); - } - } - - //!Allocates n_elements elements, each one of size elem_sizes[i] - //!Elements must be individually deallocated with deallocate() - //!This function is available only with Version == 2 - void allocate_many(const size_type *elem_sizes, size_type n_elements, multiallocation_chain &chain) - { - BOOST_STATIC_ASSERT(( Version > 1 )); - dlmalloc_memchain ch; - BOOST_CONTAINER_MEMCHAIN_INIT(&ch); - if(!dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch)){ - boost::container::throw_bad_alloc(); - } - chain.incorporate_after(chain.before_begin() - ,(T*)BOOST_CONTAINER_MEMCHAIN_FIRSTMEM(&ch) - ,(T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch) - ,BOOST_CONTAINER_MEMCHAIN_SIZE(&ch) ); - /* - if(!dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast(&chain))){ - boost::container::throw_bad_alloc(); - }*/ - } - - //!Deallocates several elements allocated by - //!allocate_many(), allocate(), or allocation_command(). - //!This function is available only with Version == 2 - void deallocate_many(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_STATIC_ASSERT(( Version > 1 )); - dlmalloc_memchain ch; - void *beg(&*chain.begin()), *last(&*chain.last()); - size_t size(chain.size()); - BOOST_CONTAINER_MEMCHAIN_INIT_FROM(&ch, beg, last, size); - dlmalloc_multidealloc(&ch); - //dlmalloc_multidealloc(reinterpret_cast(&chain)); - } - - private: - - pointer priv_allocation_command - (allocation_type command, std::size_t limit_size - ,size_type &prefer_in_recvd_out_size - ,pointer &reuse_ptr) - { - std::size_t const preferred_size = prefer_in_recvd_out_size; - dlmalloc_command_ret_t ret = {0 , 0}; - if((limit_size > this->max_size()) | (preferred_size > this->max_size())){ - return pointer(); - } - std::size_t l_size = limit_size*sizeof(T); - std::size_t p_size = preferred_size*sizeof(T); - std::size_t r_size; - { - void* reuse_ptr_void = reuse_ptr; - ret = dlmalloc_allocation_command(command, sizeof(T), l_size, p_size, &r_size, reuse_ptr_void); - reuse_ptr = ret.second ? static_cast(reuse_ptr_void) : 0; - } - prefer_in_recvd_out_size = r_size/sizeof(T); - return (pointer)ret.first; - } -}; - -} //namespace container { -} //namespace boost { - -#include - -#endif //BOOST_CONTAINER_ALLOCATOR_HPP - diff --git a/contrib/libboost/boost_1_65_0/boost/container/allocator_traits.hpp b/contrib/libboost/boost_1_65_0/boost/container/allocator_traits.hpp deleted file mode 100644 index b08f601461c..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/allocator_traits.hpp +++ /dev/null @@ -1,477 +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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP -#define BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -// container -#include -#include -#include //is_empty -#include -#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP -#include -#endif -// intrusive -#include -#include -// move -#include -// move/detail -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif -// other boost -#include - -#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_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_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_END }}} -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1 -#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 9 -#include - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -namespace boost { -namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -template -class small_vector_allocator; - -namespace allocator_traits_detail { - -BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_max_size, max_size) -BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_select_on_container_copy_construction, select_on_container_copy_construction) - -} //namespace allocator_traits_detail { - -namespace container_detail { - -//workaround needed for C++03 compilers with no construct() -//supporting rvalue references -template -struct is_std_allocator -{ static const bool value = false; }; - -template -struct is_std_allocator< std::allocator > -{ static const bool value = true; }; - -template -struct is_std_allocator< small_vector_allocator< std::allocator > > -{ static const bool value = true; }; - -template -struct is_not_std_allocator -{ static const bool value = !is_std_allocator::value; }; - -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(pointer) -BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(const_pointer) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reference) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_reference) -BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(void_pointer) -BOOST_INTRUSIVE_INSTANTIATE_EVAL_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(is_always_equal) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(is_partially_propagable) - -} //namespace container_detail { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! The class template allocator_traits supplies a uniform interface to all allocator types. -//! This class is a C++03-compatible implementation of std::allocator_traits -template -struct allocator_traits -{ - //allocator_type - typedef Allocator allocator_type; - //value_type - typedef typename allocator_type::value_type value_type; - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Allocator::pointer if such a type exists; otherwise, value_type* - //! - typedef unspecified pointer; - //! Allocator::const_pointer if such a type exists ; otherwise, pointer_traits::rebind::rebind. - //! - typedef see_documentation void_pointer; - //! Allocator::const_void_pointer if such a type exists ; otherwis e, pointer_traits::rebind::difference_type. - //! - typedef see_documentation difference_type; - //! Allocator::size_type if such a type exists ; otherwise, make_unsigned::type - //! - typedef see_documentation size_type; - //! Allocator::propagate_on_container_copy_assignment if such a type exists, otherwise a type - //! with an internal constant static boolean member value == false. - typedef see_documentation propagate_on_container_copy_assignment; - //! Allocator::propagate_on_container_move_assignment if such a type exists, otherwise a type - //! with an internal constant static boolean member value == false. - typedef see_documentation propagate_on_container_move_assignment; - //! Allocator::propagate_on_container_swap if such a type exists, otherwise a type - //! with an internal constant static boolean member value == false. - typedef see_documentation propagate_on_container_swap; - //! Allocator::is_always_equal if such a type exists, otherwise a type - //! with an internal constant static boolean member value == is_empty::value - typedef see_documentation is_always_equal; - //! Allocator::is_partially_propagable if such a type exists, otherwise a type - //! with an internal constant static boolean member value == false - //! Note: Non-standard extension used to implement `small_vector_allocator`. - typedef see_documentation is_partially_propagable; - //! Defines an allocator: Allocator::rebind::other if such a type exists; otherwise, Allocator - //! if Allocator is a class template instantiation of the form Allocator, where Args is zero or - //! more type arguments ; otherwise, the instantiation of rebind_alloc is ill-formed. - //! - //! In C++03 compilers rebind_alloc is a struct derived from an allocator - //! deduced by previously detailed rules. - template using rebind_alloc = see_documentation; - - //! In C++03 compilers rebind_traits is a struct derived from - //! allocator_traits, where OtherAlloc is - //! the allocator deduced by rules explained in rebind_alloc. - template using rebind_traits = allocator_traits >; - - //! Non-standard extension: Portable allocator rebind for C++03 and C++11 compilers. - //! type is an allocator related to Allocator deduced deduced by rules explained in rebind_alloc. - template - struct portable_rebind_alloc - { typedef see_documentation type; }; - #else - //pointer - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator, - pointer, value_type*) - pointer; - //const_pointer - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, 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) - reference; - //const_reference - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, Allocator, - const_reference, typename container_detail::unvoid_ref::type) - const_reference; - //void_pointer - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::container_detail::, 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, - 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, - difference_type, std::ptrdiff_t) - difference_type; - //size_type - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::container_detail::, 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) - 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) - 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) - 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) - 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) - is_partially_propagable; - - //rebind_alloc & rebind_traits - #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - //C++11 - template using rebind_alloc = typename boost::intrusive::pointer_rebind::type; - template using rebind_traits = allocator_traits< rebind_alloc >; - #else // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - //Some workaround for C++03 or C++11 compilers with no template aliases - template - struct rebind_alloc : boost::intrusive::pointer_rebind::type - { - typedef typename boost::intrusive::pointer_rebind::type Base; - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - template - rebind_alloc(BOOST_FWD_REF(Args)... args) : Base(boost::forward(args)...) {} - #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - #define BOOST_CONTAINER_ALLOCATOR_TRAITS_REBIND_ALLOC(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\ - explicit rebind_alloc(BOOST_MOVE_UREF##N) : Base(BOOST_MOVE_FWD##N){}\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_ALLOCATOR_TRAITS_REBIND_ALLOC) - #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_REBIND_ALLOC - #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - }; - - template - struct rebind_traits - : allocator_traits::type> - {}; - #endif // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - - //portable_rebind_alloc - template - struct portable_rebind_alloc - { typedef typename boost::intrusive::pointer_rebind::type type; }; - #endif //BOOST_CONTAINER_DOXYGEN_INVOKED - - //! Returns: a.allocate(n) - //! - BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n) - { return a.allocate(n); } - - //! Returns: a.deallocate(p, n) - //! - //! Throws: Nothing - 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) - BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n, const_void_pointer p) - { - const bool value = boost::container::container_detail:: - has_member_function_callable_with_allocate - ::value; - container_detail::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 - 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:: - has_member_function_callable_with_destroy - ::value; - container_detail::bool_ flag; - allocator_traits::priv_destroy(flag, a, p); - } - - //! Returns: a.max_size() if that expression is well-formed; otherwise, - //! numeric_limits::max(). - 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; - return allocator_traits::priv_max_size(flag, a); - } - - //! Returns: a.select_on_container_copy_construction() if that expression is well-formed; - //! otherwise, a. - BOOST_CONTAINER_FORCEINLINE static BOOST_CONTAINER_DOC1ST(Allocator, - typename container_detail::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; - 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 `placement new` (static_cast(p)) T(std::forward(args)...) - template - 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 - < Allocator, T*, Args... > - >::value; - container_detail::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. - BOOST_CONTAINER_FORCEINLINE static bool storage_is_unpropagable(const Allocator &a, pointer p) BOOST_NOEXCEPT_OR_NOTHROW - { - container_detail::bool_ flag; - return allocator_traits::priv_storage_is_unpropagable(flag, a, p); - } - - //! Returns: true if is_always_equal::value == true, otherwise, - //! a == b. - BOOST_CONTAINER_FORCEINLINE static bool equal(const Allocator &a, const Allocator &b) BOOST_NOEXCEPT_OR_NOTHROW - { - container_detail::bool_ flag; - return allocator_traits::priv_equal(flag, a, b); - } - - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - private: - BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(container_detail::true_type, Allocator &a, size_type n, const_void_pointer p) - { return a.allocate(n, p); } - - BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(container_detail::false_type, Allocator &a, size_type n, const_void_pointer) - { return a.allocate(n); } - - template - BOOST_CONTAINER_FORCEINLINE static void priv_destroy(container_detail::true_type, Allocator &a, T* p) BOOST_NOEXCEPT_OR_NOTHROW - { a.destroy(p); } - - template - BOOST_CONTAINER_FORCEINLINE static void priv_destroy(container_detail::false_type, Allocator &, T* p) BOOST_NOEXCEPT_OR_NOTHROW - { p->~T(); (void)p; } - - BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(container_detail::true_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW - { return a.max_size(); } - - BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(container_detail::false_type, const Allocator &) BOOST_NOEXCEPT_OR_NOTHROW - { return size_type(-1)/sizeof(value_type); } - - BOOST_CONTAINER_FORCEINLINE static Allocator priv_select_on_container_copy_construction(container_detail::true_type, const Allocator &a) - { return a.select_on_container_copy_construction(); } - - BOOST_CONTAINER_FORCEINLINE static const Allocator &priv_select_on_container_copy_construction(container_detail::false_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW - { return a; } - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - template - BOOST_CONTAINER_FORCEINLINE static void priv_construct(container_detail::true_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args) - { a.construct( p, ::boost::forward(args)...); } - - template - BOOST_CONTAINER_FORCEINLINE static void priv_construct(container_detail::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\ - 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 \ - < Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_FWD_T##N > \ - >::value; \ - container_detail::bool_ flag;\ - (priv_construct)(flag, a, p BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ - }\ - // - BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL) - #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL - - private: - ///////////////////////////////// - // priv_construct - ///////////////////////////////// - #define BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL(N) \ - template\ - BOOST_CONTAINER_FORCEINLINE static void priv_construct(container_detail::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\ - BOOST_CONTAINER_FORCEINLINE static void priv_construct(container_detail::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) - #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL - - #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - template - BOOST_CONTAINER_FORCEINLINE static void priv_construct(container_detail::false_type, Allocator &, T *p, const ::boost::container::default_init_t&) - { ::new((void*)p, boost_container_new_t()) T; } - - BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(container_detail::true_type, const Allocator &a, pointer p) - { return a.storage_is_unpropagable(p); } - - BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(container_detail::false_type, const Allocator &, pointer) - { return false; } - - BOOST_CONTAINER_FORCEINLINE static bool priv_equal(container_detail::true_type, const Allocator &, const Allocator &) - { return true; } - - BOOST_CONTAINER_FORCEINLINE static bool priv_equal(container_detail::false_type, const Allocator &a, const Allocator &b) - { return a == b; } - - #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) -}; - -} //namespace container { -} //namespace boost { - -#include - -#endif // ! defined(BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP) diff --git a/contrib/libboost/boost_1_65_0/boost/container/container_fwd.hpp b/contrib/libboost/boost_1_65_0/boost/container/container_fwd.hpp deleted file mode 100644 index e85a6ce9524..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/container_fwd.hpp +++ /dev/null @@ -1,317 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-2014. 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_CONTAINER_FWD_HPP -#define BOOST_CONTAINER_CONTAINER_FWD_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -//! \file -//! This header file forward declares the following containers: -//! - boost::container::vector -//! - boost::container::stable_vector -//! - boost::container::static_vector -//! - boost::container::small_vector -//! - boost::container::slist -//! - boost::container::list -//! - boost::container::set -//! - boost::container::multiset -//! - boost::container::map -//! - boost::container::multimap -//! - boost::container::flat_set -//! - boost::container::flat_multiset -//! - boost::container::flat_map -//! - boost::container::flat_multimap -//! - boost::container::basic_string -//! - boost::container::string -//! - boost::container::wstring -//! -//! Forward declares the following allocators: -//! - boost::container::allocator -//! - boost::container::node_allocator -//! - boost::container::adaptive_pool -//! -//! Forward declares the following polymorphic resource classes: -//! - boost::container::pmr::memory_resource -//! - boost::container::pmr::polymorphic_allocator -//! - boost::container::pmr::monotonic_buffer_resource -//! - boost::container::pmr::pool_options -//! - boost::container::pmr::unsynchronized_pool_resource -//! - boost::container::pmr::synchronized_pool_resource -//! -//! And finally it defines the following types - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//Std forward declarations -#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP - #include -#endif - -namespace boost{ -namespace intrusive{ -namespace detail{ - //Create namespace to avoid compilation errors -}}} - -namespace boost{ namespace container{ namespace container_detail{ - namespace bi = boost::intrusive; - namespace bid = boost::intrusive::detail; -}}} - -namespace boost{ namespace container{ namespace pmr{ - namespace bi = boost::intrusive; - namespace bid = boost::intrusive::detail; -}}} - -#include - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -////////////////////////////////////////////////////////////////////////////// -// Containers -////////////////////////////////////////////////////////////////////////////// - -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 vector; - -template > -class stable_vector; - -template -class static_vector; - -template < class T, std::size_t N - , class Allocator= new_allocator > -class small_vector; - -template > -class deque; - -template > -class list; - -template > -class slist; - -template -struct tree_opt; - -typedef tree_opt tree_assoc_defaults; - -template - ,class Allocator = new_allocator - ,class Options = tree_assoc_defaults > -class set; - -template - ,class Allocator = new_allocator - ,class Options = tree_assoc_defaults > -class multiset; - -template - ,class Allocator = new_allocator > - ,class Options = tree_assoc_defaults > -class map; - -template - ,class Allocator = new_allocator > - ,class Options = tree_assoc_defaults > -class multimap; - -template - ,class Allocator = new_allocator > -class flat_set; - -template - ,class Allocator = new_allocator > -class flat_multiset; - -template - ,class Allocator = new_allocator > > -class flat_map; - -template - ,class Allocator = new_allocator > > -class flat_multimap; - -template - ,class Allocator = new_allocator > -class basic_string; - -typedef basic_string - - ,new_allocator > -string; - -typedef basic_string - - ,new_allocator > -wstring; - -static const std::size_t ADP_nodes_per_block = 256u; -static const std::size_t ADP_max_free_blocks = 2u; -static const std::size_t ADP_overhead_percent = 1u; -static const std::size_t ADP_only_alignment = 0u; - -template < class T - , std::size_t NodesPerBlock = ADP_nodes_per_block - , std::size_t MaxFreeBlocks = ADP_max_free_blocks - , std::size_t OverheadPercent = ADP_overhead_percent - , unsigned Version = 2 - > -class adaptive_pool; - -template < class T - , unsigned Version = 2 - , unsigned int AllocationDisableMask = 0> -class allocator; - -static const std::size_t NodeAlloc_nodes_per_block = 256u; - -template - < class T - , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block - , std::size_t Version = 2> -class node_allocator; - -namespace pmr { - -class memory_resource; - -template -class polymorphic_allocator; - -class monotonic_buffer_resource; - -struct pool_options; - -template -class resource_adaptor_imp; - -class unsynchronized_pool_resource; - -class synchronized_pool_resource; - -} //namespace pmr { - -#else - -//! Default options for tree-based associative containers -//! - tree_type -//! - optimize_size -typedef implementation_defined tree_assoc_defaults; - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! Type used to tag that the input range is -//! guaranteed to be ordered -struct ordered_range_t -{}; - -//! Value used to tag that the input range is -//! guaranteed to be ordered -static const ordered_range_t ordered_range = ordered_range_t(); - -//! Type used to tag that the input range is -//! guaranteed to be ordered and unique -struct ordered_unique_range_t - : public ordered_range_t -{}; - -//! Value used to tag that the input range is -//! guaranteed to be ordered and unique -static const ordered_unique_range_t ordered_unique_range = ordered_unique_range_t(); - -//! Type used to tag that the inserted values -//! should be default initialized -struct default_init_t -{}; - -//! Value used to tag that the inserted values -//! should be default initialized -static const default_init_t default_init = default_init_t(); -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! Type used to tag that the inserted values -//! should be value initialized -struct value_init_t -{}; - -//! Value used to tag that the inserted values -//! should be value initialized -static const value_init_t value_init = value_init_t(); - -namespace container_detail_really_deep_namespace { - -//Otherwise, gcc issues a warning of previously defined -//anonymous_instance and unique_instance -struct dummy -{ - dummy() - { - (void)ordered_range; - (void)ordered_unique_range; - (void)default_init; - } -}; - -} //detail_really_deep_namespace { - - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -}} //namespace boost { namespace container { - -#endif //#ifndef BOOST_CONTAINER_CONTAINER_FWD_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/deque.hpp b/contrib/libboost/boost_1_65_0/boost/container/deque.hpp deleted file mode 100644 index b838f6e4eb7..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/deque.hpp +++ /dev/null @@ -1,2263 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-2015. 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_DEQUE_HPP -#define BOOST_CONTAINER_DEQUE_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -// container -#include -#include -#include //new_allocator -#include -// container/detail -#include -#include //algo_equal(), algo_lexicographical_compare -#include -#include -#include -#include -#include -#include -#include -#include -#include -// move -#include -#include -#include -#include -// move/detail -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif -#include -// other -#include -#include -// std -#include - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) -#include -#endif - -namespace boost { -namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -template -class deque; - -template -struct deque_value_traits -{ - typedef T value_type; - static const bool trivial_dctr = container_detail::is_trivially_destructible::value; - static const bool trivial_dctr_after_move = ::boost::has_trivial_destructor_after_move::value; -}; - -// Note: this function is simply a kludge to work around several compilers' -// bugs in handling constant expressions. -template -struct deque_buf_size -{ - static const std::size_t min_size = 512u; - static const std::size_t sizeof_t = sizeof(T); - static const std::size_t value = sizeof_t < min_size ? (min_size/sizeof_t) : std::size_t(1); -}; - -namespace container_detail { - -// Class invariants: -// For any nonsingular iterator i: -// i.node is the address of an element in the map array. The -// contents of i.node is a pointer to the beginning of a node. -// i.first == //(i.node) -// i.last == i.first + node_size -// i.cur is a pointer in the range [i.first, i.last). NOTE: -// the implication of this is that i.cur is always a dereferenceable -// pointer, even if i is a past-the-end iterator. -// Start and Finish are always nonsingular iterators. NOTE: this means -// that an empty deque must have one node, and that a deque -// with N elements, where N is the buffer size, must have two nodes. -// For every node other than start.node and finish.node, every element -// in the node is an initialized object. If start.node == finish.node, -// then [start.cur, finish.cur) are initialized objects, and -// the elements outside that range are uninitialized storage. Otherwise, -// [start.cur, start.last) and [finish.first, finish.cur) are initialized -// objects, and [start.first, start.cur) and [finish.cur, finish.last) -// are uninitialized storage. -// [map, map + map_size) is a valid, non-empty range. -// [start.node, finish.node] is a valid range contained within -// [map, map + map_size). -// A pointer in the range [map, map + map_size) points to an allocated node -// if and only if the pointer is in the range [start.node, finish.node]. -template -class deque_iterator -{ - public: - typedef std::random_access_iterator_tag iterator_category; - typedef typename boost::intrusive::pointer_traits::element_type value_type; - typedef typename boost::intrusive::pointer_traits::difference_type difference_type; - typedef typename if_c - < IsConst - , typename boost::intrusive::pointer_traits::template - rebind_pointer::type - , Pointer - >::type pointer; - typedef typename if_c - < IsConst - , const value_type& - , value_type& - >::type reference; - - static std::size_t s_buffer_size() - { return deque_buf_size::value; } - - typedef Pointer val_alloc_ptr; - typedef typename boost::intrusive::pointer_traits:: - template rebind_pointer::type index_pointer; - - Pointer m_cur; - Pointer m_first; - Pointer m_last; - index_pointer m_node; - - public: - - Pointer get_cur() const { return m_cur; } - Pointer get_first() const { return m_first; } - Pointer get_last() const { return m_last; } - index_pointer get_node() const { return m_node; } - - deque_iterator(val_alloc_ptr x, index_pointer y) BOOST_NOEXCEPT_OR_NOTHROW - : m_cur(x), m_first(*y), m_last(*y + s_buffer_size()), m_node(y) - {} - - deque_iterator() BOOST_NOEXCEPT_OR_NOTHROW - : m_cur(), m_first(), m_last(), m_node() //Value initialization to achieve "null iterators" (N3644) - {} - - deque_iterator(deque_iterator const& x) BOOST_NOEXCEPT_OR_NOTHROW - : m_cur(x.get_cur()), m_first(x.get_first()), m_last(x.get_last()), m_node(x.get_node()) - {} - - deque_iterator(Pointer cur, Pointer first, Pointer last, index_pointer node) BOOST_NOEXCEPT_OR_NOTHROW - : m_cur(cur), m_first(first), m_last(last), m_node(node) - {} - - deque_iterator unconst() const BOOST_NOEXCEPT_OR_NOTHROW - { - return deque_iterator(this->get_cur(), this->get_first(), this->get_last(), this->get_node()); - } - - reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW - { return *this->m_cur; } - - pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->m_cur; } - - difference_type operator-(const deque_iterator& x) const BOOST_NOEXCEPT_OR_NOTHROW - { - if(!this->m_cur && !x.m_cur){ - return 0; - } - return difference_type(this->s_buffer_size()) * (this->m_node - x.m_node - 1) + - (this->m_cur - this->m_first) + (x.m_last - x.m_cur); - } - - deque_iterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW - { - ++this->m_cur; - if (this->m_cur == this->m_last) { - this->priv_set_node(this->m_node + 1); - this->m_cur = this->m_first; - } - return *this; - } - - deque_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW - { - deque_iterator tmp(*this); - ++*this; - return tmp; - } - - deque_iterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW - { - if (this->m_cur == this->m_first) { - this->priv_set_node(this->m_node - 1); - this->m_cur = this->m_last; - } - --this->m_cur; - return *this; - } - - deque_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW - { - deque_iterator tmp(*this); - --*this; - return tmp; - } - - deque_iterator& operator+=(difference_type n) BOOST_NOEXCEPT_OR_NOTHROW - { - difference_type offset = n + (this->m_cur - this->m_first); - if (offset >= 0 && offset < difference_type(this->s_buffer_size())) - this->m_cur += n; - else { - difference_type node_offset = - offset > 0 ? offset / difference_type(this->s_buffer_size()) - : -difference_type((-offset - 1) / this->s_buffer_size()) - 1; - this->priv_set_node(this->m_node + node_offset); - this->m_cur = this->m_first + - (offset - node_offset * difference_type(this->s_buffer_size())); - } - return *this; - } - - deque_iterator operator+(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW - { deque_iterator tmp(*this); return tmp += n; } - - deque_iterator& operator-=(difference_type n) BOOST_NOEXCEPT_OR_NOTHROW - { return *this += -n; } - - deque_iterator operator-(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW - { deque_iterator tmp(*this); return tmp -= n; } - - reference operator[](difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW - { return *(*this + n); } - - friend bool operator==(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return l.m_cur == r.m_cur; } - - friend bool operator!=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return l.m_cur != r.m_cur; } - - friend bool operator<(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return (l.m_node == r.m_node) ? (l.m_cur < r.m_cur) : (l.m_node < r.m_node); } - - friend bool operator>(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return r < l; } - - friend bool operator<=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return !(r < l); } - - friend bool operator>=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return !(l < r); } - - void priv_set_node(index_pointer new_node) BOOST_NOEXCEPT_OR_NOTHROW - { - this->m_node = new_node; - this->m_first = *new_node; - this->m_last = this->m_first + this->s_buffer_size(); - } - - friend deque_iterator operator+(difference_type n, deque_iterator x) BOOST_NOEXCEPT_OR_NOTHROW - { return x += n; } -}; - -} //namespace container_detail { - -// Deque base class. It has two purposes. First, its constructor -// and destructor allocate (but don't initialize) storage. This makes -// exception safety easier. -template -class deque_base -{ - BOOST_COPYABLE_AND_MOVABLE(deque_base) - public: - typedef allocator_traits val_alloc_traits_type; - typedef typename val_alloc_traits_type::value_type val_alloc_val; - typedef typename val_alloc_traits_type::pointer val_alloc_ptr; - typedef typename val_alloc_traits_type::const_pointer val_alloc_cptr; - typedef typename val_alloc_traits_type::reference val_alloc_ref; - typedef typename val_alloc_traits_type::const_reference val_alloc_cref; - typedef typename val_alloc_traits_type::difference_type val_alloc_diff; - typedef typename val_alloc_traits_type::size_type val_alloc_size; - typedef typename val_alloc_traits_type::template - portable_rebind_alloc::type ptr_alloc_t; - typedef allocator_traits ptr_alloc_traits_type; - typedef typename ptr_alloc_traits_type::value_type ptr_alloc_val; - typedef typename ptr_alloc_traits_type::pointer ptr_alloc_ptr; - typedef typename ptr_alloc_traits_type::const_pointer ptr_alloc_cptr; - typedef typename ptr_alloc_traits_type::reference ptr_alloc_ref; - typedef typename ptr_alloc_traits_type::const_reference ptr_alloc_cref; - typedef Allocator allocator_type; - typedef allocator_type stored_allocator_type; - typedef val_alloc_size size_type; - - protected: - - typedef deque_value_traits traits_t; - typedef ptr_alloc_t map_allocator_type; - - static size_type s_buffer_size() BOOST_NOEXCEPT_OR_NOTHROW - { return deque_buf_size::value; } - - val_alloc_ptr priv_allocate_node() - { return this->alloc().allocate(s_buffer_size()); } - - void priv_deallocate_node(val_alloc_ptr p) BOOST_NOEXCEPT_OR_NOTHROW - { this->alloc().deallocate(p, s_buffer_size()); } - - ptr_alloc_ptr priv_allocate_map(size_type n) - { return this->ptr_alloc().allocate(n); } - - void priv_deallocate_map(ptr_alloc_ptr p, size_type n) BOOST_NOEXCEPT_OR_NOTHROW - { this->ptr_alloc().deallocate(p, n); } - - typedef container_detail::deque_iterator iterator; - typedef container_detail::deque_iterator const_iterator; - - deque_base(size_type num_elements, const allocator_type& a) - : members_(a) - { this->priv_initialize_map(num_elements); } - - explicit deque_base(const allocator_type& a) - : members_(a) - {} - - deque_base() - : members_() - {} - - explicit deque_base(BOOST_RV_REF(deque_base) x) - : members_( boost::move(x.ptr_alloc()) - , boost::move(x.alloc()) ) - {} - - ~deque_base() - { - if (this->members_.m_map) { - this->priv_destroy_nodes(this->members_.m_start.m_node, this->members_.m_finish.m_node + 1); - this->priv_deallocate_map(this->members_.m_map, this->members_.m_map_size); - } - } - - private: - deque_base(const deque_base&); - - protected: - - void swap_members(deque_base &x) BOOST_NOEXCEPT_OR_NOTHROW - { - ::boost::adl_move_swap(this->members_.m_start, x.members_.m_start); - ::boost::adl_move_swap(this->members_.m_finish, x.members_.m_finish); - ::boost::adl_move_swap(this->members_.m_map, x.members_.m_map); - ::boost::adl_move_swap(this->members_.m_map_size, x.members_.m_map_size); - } - - void priv_initialize_map(size_type num_elements) - { -// if(num_elements){ - size_type num_nodes = num_elements / s_buffer_size() + 1; - - this->members_.m_map_size = container_detail::max_value((size_type) InitialMapSize, num_nodes + 2); - this->members_.m_map = this->priv_allocate_map(this->members_.m_map_size); - - ptr_alloc_ptr nstart = this->members_.m_map + (this->members_.m_map_size - num_nodes) / 2; - ptr_alloc_ptr nfinish = nstart + num_nodes; - - BOOST_TRY { - this->priv_create_nodes(nstart, nfinish); - } - BOOST_CATCH(...){ - this->priv_deallocate_map(this->members_.m_map, this->members_.m_map_size); - this->members_.m_map = 0; - this->members_.m_map_size = 0; - BOOST_RETHROW - } - BOOST_CATCH_END - - this->members_.m_start.priv_set_node(nstart); - this->members_.m_finish.priv_set_node(nfinish - 1); - this->members_.m_start.m_cur = this->members_.m_start.m_first; - this->members_.m_finish.m_cur = this->members_.m_finish.m_first + - num_elements % s_buffer_size(); -// } - } - - void priv_create_nodes(ptr_alloc_ptr nstart, ptr_alloc_ptr nfinish) - { - ptr_alloc_ptr cur = nstart; - BOOST_TRY { - for (; cur < nfinish; ++cur) - *cur = this->priv_allocate_node(); - } - BOOST_CATCH(...){ - this->priv_destroy_nodes(nstart, cur); - BOOST_RETHROW - } - BOOST_CATCH_END - } - - void priv_destroy_nodes(ptr_alloc_ptr nstart, ptr_alloc_ptr nfinish) BOOST_NOEXCEPT_OR_NOTHROW - { - for (ptr_alloc_ptr n = nstart; n < nfinish; ++n) - this->priv_deallocate_node(*n); - } - - void priv_clear_map() BOOST_NOEXCEPT_OR_NOTHROW - { - if (this->members_.m_map) { - this->priv_destroy_nodes(this->members_.m_start.m_node, this->members_.m_finish.m_node + 1); - this->priv_deallocate_map(this->members_.m_map, this->members_.m_map_size); - this->members_.m_map = 0; - this->members_.m_map_size = 0; - this->members_.m_start = iterator(); - this->members_.m_finish = this->members_.m_start; - } - } - - enum { InitialMapSize = 8 }; - - protected: - struct members_holder - : public ptr_alloc_t - , public allocator_type - { - members_holder() - : map_allocator_type(), allocator_type() - , m_map(0), m_map_size(0) - , m_start(), m_finish(m_start) - {} - - explicit members_holder(const allocator_type &a) - : map_allocator_type(a), allocator_type(a) - , m_map(0), m_map_size(0) - , m_start(), m_finish(m_start) - {} - - template - members_holder(BOOST_FWD_REF(PtrAllocConvertible) pa, BOOST_FWD_REF(ValAllocConvertible) va) - : map_allocator_type(boost::forward(pa)) - , allocator_type (boost::forward(va)) - , m_map(0), m_map_size(0) - , m_start(), m_finish(m_start) - {} - - ptr_alloc_ptr m_map; - val_alloc_size m_map_size; - iterator m_start; - iterator m_finish; - } members_; - - ptr_alloc_t &ptr_alloc() BOOST_NOEXCEPT_OR_NOTHROW - { return members_; } - - const ptr_alloc_t &ptr_alloc() const BOOST_NOEXCEPT_OR_NOTHROW - { return members_; } - - allocator_type &alloc() BOOST_NOEXCEPT_OR_NOTHROW - { return members_; } - - const allocator_type &alloc() const BOOST_NOEXCEPT_OR_NOTHROW - { return members_; } -}; -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED -//! A double-ended queue is a sequence that supports random access to elements, constant time insertion -//! and removal of elements at the end of the sequence, and linear time insertion and removal of elements in the middle. -//! -//! \tparam T The type of object that is stored in the deque -//! \tparam Allocator The allocator used for all internal memory management -template > -#else -template -#endif -class deque : protected deque_base -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - typedef deque_base Base; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - - ////////////////////////////////////////////// - // - // types - // - ////////////////////////////////////////////// - - typedef T value_type; - typedef typename ::boost::container::allocator_traits::pointer pointer; - typedef typename ::boost::container::allocator_traits::const_pointer const_pointer; - typedef typename ::boost::container::allocator_traits::reference reference; - typedef typename ::boost::container::allocator_traits::const_reference const_reference; - typedef typename ::boost::container::allocator_traits::size_type size_type; - typedef typename ::boost::container::allocator_traits::difference_type difference_type; - typedef Allocator allocator_type; - typedef BOOST_CONTAINER_IMPDEF(allocator_type) stored_allocator_type; - typedef BOOST_CONTAINER_IMPDEF(typename Base::iterator) iterator; - typedef BOOST_CONTAINER_IMPDEF(typename Base::const_iterator) const_iterator; - typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) reverse_iterator; - typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) const_reverse_iterator; - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - private: // Internal typedefs - BOOST_COPYABLE_AND_MOVABLE(deque) - typedef typename Base::ptr_alloc_ptr index_pointer; - static size_type s_buffer_size() - { return Base::s_buffer_size(); } - typedef allocator_traits allocator_traits_type; - - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - ////////////////////////////////////////////// - // - // construct/copy/destroy - // - ////////////////////////////////////////////// - - //! Effects: Default constructors a deque. - //! - //! Throws: If allocator_type's default constructor throws. - //! - //! Complexity: Constant. - deque() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible::value) - : Base() - {} - - //! Effects: Constructs a deque taking the allocator as parameter. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - explicit deque(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW - : Base(a) - {} - - //! Effects: Constructs a deque - //! and inserts n value initialized values. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's value initialization throws. - //! - //! Complexity: Linear to n. - explicit deque(size_type n) - : Base(n, allocator_type()) - { - container_detail::insert_value_initialized_n_proxy proxy; - proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n); - //deque_base will deallocate in case of exception... - } - - //! Effects: Constructs a deque - //! and inserts n default initialized values. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's default initialization or copy constructor throws. - //! - //! Complexity: Linear to n. - //! - //! Note: Non-standard extension - deque(size_type n, default_init_t) - : Base(n, allocator_type()) - { - container_detail::insert_default_initialized_n_proxy proxy; - proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n); - //deque_base will deallocate in case of exception... - } - - //! Effects: Constructs a deque that will use a copy of allocator a - //! and inserts n value initialized values. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's value initialization throws. - //! - //! Complexity: Linear to n. - explicit deque(size_type n, const allocator_type &a) - : Base(n, a) - { - container_detail::insert_value_initialized_n_proxy proxy; - proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n); - //deque_base will deallocate in case of exception... - } - - //! Effects: Constructs a deque that will use a copy of allocator a - //! and inserts n default initialized values. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's default initialization or copy constructor throws. - //! - //! Complexity: Linear to n. - //! - //! Note: Non-standard extension - deque(size_type n, default_init_t, const allocator_type &a) - : Base(n, a) - { - container_detail::insert_default_initialized_n_proxy proxy; - proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n); - //deque_base will deallocate in case of exception... - } - - //! Effects: Constructs a deque that will use a copy of allocator a - //! and inserts n copies of value. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's copy constructor throws. - //! - //! Complexity: Linear to n. - deque(size_type n, const value_type& value) - : Base(n, allocator_type()) - { this->priv_fill_initialize(value); } - - //! Effects: Constructs a deque that will use a copy of allocator a - //! and inserts n copies of value. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's copy constructor throws. - //! - //! Complexity: Linear to n. - deque(size_type n, const value_type& value, const allocator_type& a) - : Base(n, a) - { this->priv_fill_initialize(value); } - - //! Effects: Constructs a deque that will use a copy of allocator a - //! and inserts a copy of the range [first, last) in the deque. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's constructor taking a dereferenced InIt throws. - //! - //! Complexity: Linear to the range [first, last). - template - deque(InIt first, InIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::disable_if_convertible - ::type * = 0 - #endif - ) - : Base(allocator_type()) - { - this->priv_range_initialize(first, last); - } - - //! Effects: Constructs a deque that will use a copy of allocator a - //! and inserts a copy of the range [first, last) in the deque. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's constructor taking a dereferenced InIt throws. - //! - //! Complexity: Linear to the range [first, last). - template - deque(InIt first, InIt last, const allocator_type& a - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::disable_if_convertible - ::type * = 0 - #endif - ) - : Base(a) - { - this->priv_range_initialize(first, last); - } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Constructs a deque that will use a copy of allocator a - //! and inserts a copy of the range [il.begin(), il.end()) in the deque. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's constructor taking a dereferenced std::initializer_list iterator throws. - //! - //! Complexity: Linear to the range [il.begin(), il.end()). - deque(std::initializer_list il, const allocator_type& a = allocator_type()) - : Base(a) - { - this->priv_range_initialize(il.begin(), il.end()); - } -#endif - - //! Effects: Copy constructs a deque. - //! - //! Postcondition: x == *this. - //! - //! Complexity: Linear to the elements x contains. - deque(const deque& x) - : Base(allocator_traits_type::select_on_container_copy_construction(x.alloc())) - { - if(x.size()){ - this->priv_initialize_map(x.size()); - boost::container::uninitialized_copy_alloc - (this->alloc(), x.begin(), x.end(), this->members_.m_start); - } - } - - //! Effects: Move constructor. Moves x's resources to *this. - //! - //! Throws: If allocator_type's copy constructor throws. - //! - //! Complexity: Constant. - deque(BOOST_RV_REF(deque) x) BOOST_NOEXCEPT_OR_NOTHROW - : Base(BOOST_MOVE_BASE(Base, x)) - { this->swap_members(x); } - - //! Effects: Copy constructs a vector using the specified allocator. - //! - //! Postcondition: x == *this. - //! - //! Throws: If allocation - //! throws or T's copy constructor throws. - //! - //! Complexity: Linear to the elements x contains. - deque(const deque& x, const allocator_type &a) - : Base(a) - { - if(x.size()){ - this->priv_initialize_map(x.size()); - boost::container::uninitialized_copy_alloc - (this->alloc(), x.begin(), x.end(), this->members_.m_start); - } - } - - //! Effects: Move constructor using the specified allocator. - //! Moves x's resources to *this if a == allocator_type(). - //! Otherwise copies values from x to *this. - //! - //! Throws: If allocation or T's copy constructor throws. - //! - //! Complexity: Constant if a == x.get_allocator(), linear otherwise. - deque(BOOST_RV_REF(deque) x, const allocator_type &a) - : Base(a) - { - if(x.alloc() == a){ - this->swap_members(x); - } - else{ - if(x.size()){ - this->priv_initialize_map(x.size()); - boost::container::uninitialized_copy_alloc - ( this->alloc(), boost::make_move_iterator(x.begin()) - , boost::make_move_iterator(x.end()), this->members_.m_start); - } - } - } - - //! Effects: Destroys the deque. All stored values are destroyed - //! and used memory is deallocated. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the number of elements. - ~deque() BOOST_NOEXCEPT_OR_NOTHROW - { - this->priv_destroy_range(this->members_.m_start, this->members_.m_finish); - } - - //! Effects: Makes *this contain the same elements as x. - //! - //! Postcondition: this->size() == x.size(). *this contains a copy - //! of each of x's elements. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to the number of elements in x. - deque& operator= (BOOST_COPY_ASSIGN_REF(deque) x) - { - if (&x != this){ - allocator_type &this_alloc = this->alloc(); - const allocator_type &x_alloc = x.alloc(); - container_detail::bool_ flag; - if(flag && this_alloc != x_alloc){ - this->clear(); - this->shrink_to_fit(); - } - container_detail::assign_alloc(this->alloc(), x.alloc(), flag); - container_detail::assign_alloc(this->ptr_alloc(), x.ptr_alloc(), flag); - this->assign(x.cbegin(), x.cend()); - } - return *this; - } - - //! Effects: Move assignment. All x's values are transferred to *this. - //! - //! Throws: If allocator_traits_type::propagate_on_container_move_assignment - //! is false and (allocation throws or value_type's move constructor throws) - //! - //! Complexity: Constant if allocator_traits_type:: - //! propagate_on_container_move_assignment is true or - //! this->get>allocator() == x.get_allocator(). Linear otherwise. - deque& operator= (BOOST_RV_REF(deque) x) - BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value - || allocator_traits_type::is_always_equal::value) - { - BOOST_ASSERT(this != &x); - allocator_type &this_alloc = this->alloc(); - allocator_type &x_alloc = x.alloc(); - const bool propagate_alloc = allocator_traits_type:: - propagate_on_container_move_assignment::value; - container_detail::bool_ flag; - const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal; - //Resources can be transferred if both allocators are - //going to be equal after this function (either propagated or already equal) - if(propagate_alloc || allocators_equal){ - //Destroy objects but retain memory in case x reuses it in the future - this->clear(); - //Move allocator if needed - container_detail::move_alloc(this_alloc, x_alloc, flag); - container_detail::move_alloc(this->ptr_alloc(), x.ptr_alloc(), flag); - //Nothrow swap - this->swap_members(x); - } - //Else do a one by one move - else{ - this->assign( boost::make_move_iterator(x.begin()) - , boost::make_move_iterator(x.end())); - } - return *this; - } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Makes *this contain the same elements as il. - //! - //! Postcondition: this->size() == il.size(). *this contains a copy - //! of each of x's elements. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to the number of elements in il. - deque& operator=(std::initializer_list il) - { - this->assign(il.begin(), il.end()); - return *this; - } -#endif - - //! Effects: Assigns the n copies of val to *this. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to n. - void assign(size_type n, const T& val) - { - typedef constant_iterator c_it; - this->assign(c_it(val, n), c_it()); - } - - //! Effects: Assigns the the range [first, last) to *this. - //! - //! Throws: If memory allocation throws or - //! T's constructor from dereferencing InIt throws. - //! - //! Complexity: Linear to n. - template - void assign(InIt first, InIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::disable_if_or - < void - , container_detail::is_convertible - , container_detail::is_not_input_iterator - >::type * = 0 - #endif - ) - { - iterator cur = this->begin(); - for ( ; first != last && cur != end(); ++cur, ++first){ - *cur = *first; - } - if (first == last){ - this->erase(cur, this->cend()); - } - else{ - this->insert(this->cend(), first, last); - } - } - - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - template - void assign(FwdIt first, FwdIt last - , typename container_detail::disable_if_or - < void - , container_detail::is_convertible - , container_detail::is_input_iterator - >::type * = 0 - ) - { - const size_type len = boost::container::iterator_distance(first, last); - if (len > size()) { - FwdIt mid = first; - boost::container::iterator_advance(mid, this->size()); - boost::container::copy(first, mid, begin()); - this->insert(this->cend(), mid, last); - } - else{ - this->erase(boost::container::copy(first, last, this->begin()), cend()); - } - } - #endif - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Assigns the the range [il.begin(), il.end()) to *this. - //! - //! Throws: If memory allocation throws or - //! T's constructor from dereferencing std::initializer_list iterator throws. - //! - //! Complexity: Linear to il.size(). - void assign(std::initializer_list il) - { this->assign(il.begin(), il.end()); } -#endif - - //! Effects: Returns a copy of the internal allocator. - //! - //! Throws: If allocator's copy constructor throws. - //! - //! Complexity: Constant. - allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW - { return Base::alloc(); } - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW - { return Base::alloc(); } - - ////////////////////////////////////////////// - // - // iterators - // - ////////////////////////////////////////////// - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW - { return Base::alloc(); } - - //! Effects: Returns an iterator to the first element contained in the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - iterator begin() BOOST_NOEXCEPT_OR_NOTHROW - { return this->members_.m_start; } - - //! Effects: Returns a const_iterator to the first element contained in the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->members_.m_start; } - - //! Effects: Returns an iterator to the end of the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - iterator end() BOOST_NOEXCEPT_OR_NOTHROW - { return this->members_.m_finish; } - - //! Effects: Returns a const_iterator to the end of the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->members_.m_finish; } - - //! Effects: Returns a reverse_iterator pointing to the beginning - //! of the reversed deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW - { return reverse_iterator(this->members_.m_finish); } - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_reverse_iterator(this->members_.m_finish); } - - //! Effects: Returns a reverse_iterator pointing to the end - //! of the reversed deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW - { return reverse_iterator(this->members_.m_start); } - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_reverse_iterator(this->members_.m_start); } - - //! Effects: Returns a const_iterator to the first element contained in the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->members_.m_start; } - - //! Effects: Returns a const_iterator to the end of the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->members_.m_finish; } - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_reverse_iterator(this->members_.m_finish); } - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_reverse_iterator(this->members_.m_start); } - - ////////////////////////////////////////////// - // - // capacity - // - ////////////////////////////////////////////// - - //! Effects: Returns true if the deque contains no elements. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - bool empty() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->members_.m_finish == this->members_.m_start; } - - //! Effects: Returns the number of the elements contained in the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - size_type size() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->members_.m_finish - this->members_.m_start; } - - //! Effects: Returns the largest possible size of the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW - { return allocator_traits_type::max_size(this->alloc()); } - - //! Effects: Inserts or erases elements at the end such that - //! the size becomes n. New elements are value initialized. - //! - //! Throws: If memory allocation throws, or T's constructor throws. - //! - //! Complexity: Linear to the difference between size() and new_size. - void resize(size_type new_size) - { - const size_type len = size(); - if (new_size < len) - this->priv_erase_last_n(len - new_size); - else{ - const size_type n = new_size - this->size(); - container_detail::insert_value_initialized_n_proxy proxy; - priv_insert_back_aux_impl(n, proxy); - } - } - - //! Effects: Inserts or erases elements at the end such that - //! the size becomes n. New elements are default initialized. - //! - //! Throws: If memory allocation throws, or T's constructor throws. - //! - //! Complexity: Linear to the difference between size() and new_size. - //! - //! Note: Non-standard extension - void resize(size_type new_size, default_init_t) - { - const size_type len = size(); - if (new_size < len) - this->priv_erase_last_n(len - new_size); - else{ - const size_type n = new_size - this->size(); - container_detail::insert_default_initialized_n_proxy proxy; - priv_insert_back_aux_impl(n, proxy); - } - } - - //! Effects: Inserts or erases elements at the end such that - //! the size becomes n. New elements are copy constructed from x. - //! - //! Throws: If memory allocation throws, or T's copy constructor throws. - //! - //! Complexity: Linear to the difference between size() and new_size. - void resize(size_type new_size, const value_type& x) - { - const size_type len = size(); - if (new_size < len) - this->erase(this->members_.m_start + new_size, this->members_.m_finish); - else - this->insert(this->members_.m_finish, new_size - len, x); - } - - //! Effects: Tries to deallocate the excess of memory created - //! with previous allocations. The size of the deque is unchanged - //! - //! Throws: If memory allocation throws. - //! - //! Complexity: Constant. - void shrink_to_fit() - { - //This deque implementation already - //deallocates excess nodes when erasing - //so there is nothing to do except for - //empty deque - if(this->empty()){ - this->priv_clear_map(); - } - } - - ////////////////////////////////////////////// - // - // element access - // - ////////////////////////////////////////////// - - //! Requires: !empty() - //! - //! Effects: Returns a reference to the first - //! element of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reference front() BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - return *this->members_.m_start; - } - - //! Requires: !empty() - //! - //! Effects: Returns a const reference to the first element - //! from the beginning of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - return *this->members_.m_start; - } - - //! Requires: !empty() - //! - //! Effects: Returns a reference to the last - //! element of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reference back() BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - return *(end()-1); - } - - //! Requires: !empty() - //! - //! Effects: Returns a const reference to the last - //! element of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - return *(cend()-1); - } - - //! Requires: size() > n. - //! - //! Effects: Returns a reference to the nth element - //! from the beginning of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->size() > n); - return this->members_.m_start[difference_type(n)]; - } - - //! Requires: size() > n. - //! - //! Effects: Returns a const reference to the nth element - //! from the beginning of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->size() > n); - return this->members_.m_start[difference_type(n)]; - } - - //! Requires: size() >= n. - //! - //! Effects: Returns an iterator to the nth element - //! from the beginning of the container. Returns end() - //! if n == size(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension - iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->size() >= n); - return iterator(this->begin()+n); - } - - //! Requires: size() >= n. - //! - //! Effects: Returns a const_iterator to the nth element - //! from the beginning of the container. Returns end() - //! if n == size(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension - const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->size() >= n); - return const_iterator(this->cbegin()+n); - } - - //! Requires: begin() <= p <= end(). - //! - //! Effects: Returns the index of the element pointed by p - //! and size() if p == end(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension - size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW - { - //Range checked priv_index_of - return this->priv_index_of(p); - } - - //! Requires: begin() <= p <= end(). - //! - //! Effects: Returns the index of the element pointed by p - //! and size() if p == end(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension - size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW - { - //Range checked priv_index_of - return this->priv_index_of(p); - } - - //! Requires: size() > n. - //! - //! Effects: Returns a reference to the nth element - //! from the beginning of the container. - //! - //! Throws: std::range_error if n >= size() - //! - //! Complexity: Constant. - reference at(size_type n) - { - this->priv_throw_if_out_of_range(n); - return (*this)[n]; - } - - //! Requires: size() > n. - //! - //! Effects: Returns a const reference to the nth element - //! from the beginning of the container. - //! - //! Throws: std::range_error if n >= size() - //! - //! Complexity: Constant. - const_reference at(size_type n) const - { - this->priv_throw_if_out_of_range(n); - return (*this)[n]; - } - - ////////////////////////////////////////////// - // - // modifiers - // - ////////////////////////////////////////////// - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... in the beginning of the deque. - //! - //! Returns: A reference to the created object. - //! - //! Throws: If memory allocation throws or the in-place constructor throws. - //! - //! Complexity: Amortized constant time - template - reference emplace_front(BOOST_FWD_REF(Args)... args) - { - if(this->priv_push_front_simple_available()){ - reference r = *this->priv_push_front_simple_pos(); - allocator_traits_type::construct - ( this->alloc() - , this->priv_push_front_simple_pos() - , boost::forward(args)...); - this->priv_push_front_simple_commit(); - return r; - } - else{ - typedef container_detail::insert_nonmovable_emplace_proxy type; - return *this->priv_insert_front_aux_impl(1, type(boost::forward(args)...)); - } - } - - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... in the end of the deque. - //! - //! Returns: A reference to the created object. - //! - //! Throws: If memory allocation throws or the in-place constructor throws. - //! - //! Complexity: Amortized constant time - template - reference emplace_back(BOOST_FWD_REF(Args)... args) - { - if(this->priv_push_back_simple_available()){ - reference r = *this->priv_push_back_simple_pos(); - allocator_traits_type::construct - ( this->alloc() - , this->priv_push_back_simple_pos() - , boost::forward(args)...); - this->priv_push_back_simple_commit(); - return r; - } - else{ - typedef container_detail::insert_nonmovable_emplace_proxy type; - return *this->priv_insert_back_aux_impl(1, type(boost::forward(args)...)); - } - } - - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... before p - //! - //! Throws: If memory allocation throws or the in-place constructor throws. - //! - //! Complexity: If p is end(), amortized constant time - //! Linear time otherwise. - template - iterator emplace(const_iterator p, BOOST_FWD_REF(Args)... args) - { - BOOST_ASSERT(this->priv_in_range_or_end(p)); - if(p == this->cbegin()){ - this->emplace_front(boost::forward(args)...); - return this->begin(); - } - else if(p == this->cend()){ - this->emplace_back(boost::forward(args)...); - return (this->end()-1); - } - else{ - typedef container_detail::insert_emplace_proxy type; - return this->priv_insert_aux_impl(p, 1, type(boost::forward(args)...)); - } - } - - #else //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #define BOOST_CONTAINER_DEQUE_EMPLACE_CODE(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\ - reference emplace_front(BOOST_MOVE_UREF##N)\ - {\ - if(priv_push_front_simple_available()){\ - reference r = *this->priv_push_front_simple_pos();\ - allocator_traits_type::construct\ - ( this->alloc(), this->priv_push_front_simple_pos() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ - priv_push_front_simple_commit();\ - return r;\ - }\ - else{\ - typedef container_detail::insert_nonmovable_emplace_proxy##N\ - type;\ - return *priv_insert_front_aux_impl(1, type(BOOST_MOVE_FWD##N));\ - }\ - }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\ - reference emplace_back(BOOST_MOVE_UREF##N)\ - {\ - if(priv_push_back_simple_available()){\ - reference r = *this->priv_push_back_simple_pos();\ - allocator_traits_type::construct\ - ( this->alloc(), this->priv_push_back_simple_pos() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ - priv_push_back_simple_commit();\ - return r;\ - }\ - else{\ - typedef container_detail::insert_nonmovable_emplace_proxy##N\ - type;\ - return *priv_insert_back_aux_impl(1, type(BOOST_MOVE_FWD##N));\ - }\ - }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\ - iterator emplace(const_iterator p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - BOOST_ASSERT(this->priv_in_range_or_end(p));\ - if(p == this->cbegin()){\ - this->emplace_front(BOOST_MOVE_FWD##N);\ - return this->begin();\ - }\ - else if(p == cend()){\ - this->emplace_back(BOOST_MOVE_FWD##N);\ - return (--this->end());\ - }\ - else{\ - typedef container_detail::insert_emplace_proxy_arg##N\ - type;\ - return this->priv_insert_aux_impl(p, 1, type(BOOST_MOVE_FWD##N));\ - }\ - } - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_DEQUE_EMPLACE_CODE) - #undef BOOST_CONTAINER_DEQUE_EMPLACE_CODE - - #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: Inserts a copy of x at the front of the deque. - //! - //! Throws: If memory allocation throws or - //! T's copy constructor throws. - //! - //! Complexity: Amortized constant time. - void push_front(const T &x); - - //! Effects: Constructs a new element in the front of the deque - //! and moves the resources of x to this new element. - //! - //! Throws: If memory allocation throws. - //! - //! Complexity: Amortized constant time. - void push_front(T &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH(push_front, T, void, priv_push_front) - #endif - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: Inserts a copy of x at the end of the deque. - //! - //! Throws: If memory allocation throws or - //! T's copy constructor throws. - //! - //! Complexity: Amortized constant time. - void push_back(const T &x); - - //! Effects: Constructs a new element in the end of the deque - //! and moves the resources of x to this new element. - //! - //! Throws: If memory allocation throws. - //! - //! Complexity: Amortized constant time. - void push_back(T &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH(push_back, T, void, priv_push_back) - #endif - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Insert a copy of x before p. - //! - //! Returns: an iterator to the inserted element. - //! - //! Throws: If memory allocation throws or x's copy constructor throws. - //! - //! Complexity: If p is end(), amortized constant time - //! Linear time otherwise. - iterator insert(const_iterator p, const T &x); - - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Insert a new element before p with x's resources. - //! - //! Returns: an iterator to the inserted element. - //! - //! Throws: If memory allocation throws. - //! - //! Complexity: If p is end(), amortized constant time - //! Linear time otherwise. - iterator insert(const_iterator p, T &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator) - #endif - - //! Requires: pos must be a valid iterator of *this. - //! - //! Effects: Insert n copies of x before pos. - //! - //! Returns: an iterator to the first inserted element or pos if n is 0. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to n. - iterator insert(const_iterator pos, size_type n, const value_type& x) - { - //Range check of p is done by insert() - typedef constant_iterator c_it; - return this->insert(pos, c_it(x, n), c_it()); - } - - //! Requires: pos must be a valid iterator of *this. - //! - //! Effects: Insert a copy of the [first, last) range before pos. - //! - //! Returns: an iterator to the first inserted element or pos if first == last. - //! - //! Throws: If memory allocation throws, T's constructor from a - //! dereferenced InIt throws or T's copy constructor throws. - //! - //! Complexity: Linear to distance [first, last). - template - iterator insert(const_iterator pos, InIt first, InIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::disable_if_or - < void - , container_detail::is_convertible - , container_detail::is_not_input_iterator - >::type * = 0 - #endif - ) - { - BOOST_ASSERT(this->priv_in_range_or_end(pos)); - size_type n = 0; - iterator it(pos.unconst()); - for(;first != last; ++first, ++n){ - it = this->emplace(it, *first); - ++it; - } - it -= n; - return it; - } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Requires: pos must be a valid iterator of *this. - //! - //! Effects: Insert a copy of the [il.begin(), il.end()) range before pos. - //! - //! Returns: an iterator to the first inserted element or pos if il.begin() == il.end(). - //! - //! Throws: If memory allocation throws, T's constructor from a - //! dereferenced std::initializer_list throws or T's copy constructor throws. - //! - //! Complexity: Linear to distance [il.begin(), il.end()). - iterator insert(const_iterator pos, std::initializer_list il) - { - //Range check os pos is done in insert() - return insert(pos, il.begin(), il.end()); - } -#endif - - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - template - iterator insert(const_iterator p, FwdIt first, FwdIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::disable_if_or - < void - , container_detail::is_convertible - , container_detail::is_input_iterator - >::type * = 0 - #endif - ) - { - BOOST_ASSERT(this->priv_in_range_or_end(p)); - container_detail::insert_range_proxy proxy(first); - return priv_insert_aux_impl(p, boost::container::iterator_distance(first, last), proxy); - } - #endif - - //! Effects: Removes the first element from the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant time. - void pop_front() BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - if (this->members_.m_start.m_cur != this->members_.m_start.m_last - 1) { - allocator_traits_type::destroy - ( this->alloc() - , boost::movelib::to_raw_pointer(this->members_.m_start.m_cur) - ); - ++this->members_.m_start.m_cur; - } - else - this->priv_pop_front_aux(); - } - - //! Effects: Removes the last element from the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant time. - void pop_back() BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - if (this->members_.m_finish.m_cur != this->members_.m_finish.m_first) { - --this->members_.m_finish.m_cur; - allocator_traits_type::destroy - ( this->alloc() - , boost::movelib::to_raw_pointer(this->members_.m_finish.m_cur) - ); - } - else - this->priv_pop_back_aux(); - } - - //! Effects: Erases the element at p. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the elements between pos and the - //! last element (if pos is near the end) or the first element - //! if(pos is near the beginning). - //! Constant if pos is the first or the last element. - iterator erase(const_iterator pos) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->priv_in_range(pos)); - iterator next = pos.unconst(); - ++next; - size_type index = pos - this->members_.m_start; - if (index < (this->size()/2)) { - boost::container::move_backward(this->begin(), pos.unconst(), next); - pop_front(); - } - else { - boost::container::move(next, this->end(), pos.unconst()); - pop_back(); - } - return this->members_.m_start + index; - } - - //! Effects: Erases the elements pointed by [first, last). - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the distance between first and - //! last plus the elements between pos and the - //! last element (if pos is near the end) or the first element - //! if(pos is near the beginning). - iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(first == last || - (first < last && this->priv_in_range(first) && this->priv_in_range_or_end(last))); - if (first == this->members_.m_start && last == this->members_.m_finish) { - this->clear(); - return this->members_.m_finish; - } - else { - const size_type n = static_cast(last - first); - const size_type elems_before = static_cast(first - this->members_.m_start); - if (elems_before < (this->size() - n) - elems_before) { - boost::container::move_backward(begin(), first.unconst(), last.unconst()); - iterator new_start = this->members_.m_start + n; - this->priv_destroy_range(this->members_.m_start, new_start); - this->priv_destroy_nodes(this->members_.m_start.m_node, new_start.m_node); - this->members_.m_start = new_start; - } - else { - boost::container::move(last.unconst(), end(), first.unconst()); - iterator new_finish = this->members_.m_finish - n; - this->priv_destroy_range(new_finish, this->members_.m_finish); - this->priv_destroy_nodes(new_finish.m_node + 1, this->members_.m_finish.m_node + 1); - this->members_.m_finish = new_finish; - } - return this->members_.m_start + elems_before; - } - } - - //! Effects: Swaps the contents of *this and x. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - void swap(deque &x) - BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_swap::value - || allocator_traits_type::is_always_equal::value) - { - this->swap_members(x); - container_detail::bool_ flag; - container_detail::swap_alloc(this->alloc(), x.alloc(), flag); - container_detail::swap_alloc(this->ptr_alloc(), x.ptr_alloc(), flag); - } - - //! Effects: Erases all the elements of the deque. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the number of elements in the deque. - void clear() BOOST_NOEXCEPT_OR_NOTHROW - { - for (index_pointer node = this->members_.m_start.m_node + 1; - node < this->members_.m_finish.m_node; - ++node) { - this->priv_destroy_range(*node, *node + this->s_buffer_size()); - this->priv_deallocate_node(*node); - } - - if (this->members_.m_start.m_node != this->members_.m_finish.m_node) { - this->priv_destroy_range(this->members_.m_start.m_cur, this->members_.m_start.m_last); - this->priv_destroy_range(this->members_.m_finish.m_first, this->members_.m_finish.m_cur); - this->priv_deallocate_node(this->members_.m_finish.m_first); - } - else - this->priv_destroy_range(this->members_.m_start.m_cur, this->members_.m_finish.m_cur); - - this->members_.m_finish = this->members_.m_start; - } - - //! Effects: Returns true if x and y are equal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator==(const deque& x, const deque& y) - { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); } - - //! Effects: Returns true if x and y are unequal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator!=(const deque& x, const deque& y) - { return !(x == y); } - - //! Effects: Returns true if x is less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<(const deque& x, const deque& y) - { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } - - //! Effects: Returns true if x is greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>(const deque& x, const deque& y) - { return y < x; } - - //! Effects: Returns true if x is equal or less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<=(const deque& x, const deque& y) - { return !(y < x); } - - //! Effects: Returns true if x is equal or greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>=(const deque& x, const deque& y) - { return !(x < y); } - - //! Effects: x.swap(y) - //! - //! Complexity: Constant. - friend void swap(deque& x, deque& y) - { x.swap(y); } - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - - size_type priv_index_of(const_iterator p) const - { - BOOST_ASSERT(this->cbegin() <= p); - BOOST_ASSERT(p <= this->cend()); - return static_cast(p - this->cbegin()); - } - - void priv_erase_last_n(size_type n) - { - if(n == this->size()) { - this->clear(); - } - else { - iterator new_finish = this->members_.m_finish - n; - this->priv_destroy_range(new_finish, this->members_.m_finish); - this->priv_destroy_nodes(new_finish.m_node + 1, this->members_.m_finish.m_node + 1); - this->members_.m_finish = new_finish; - } - } - - void priv_throw_if_out_of_range(size_type n) const - { - if (n >= this->size()) - throw_out_of_range("deque::at out of range"); - } - - bool priv_in_range(const_iterator pos) const - { - return (this->begin() <= pos) && (pos < this->end()); - } - - bool priv_in_range_or_end(const_iterator pos) const - { - return (this->begin() <= pos) && (pos <= this->end()); - } - - template - iterator priv_insert(const_iterator p, BOOST_FWD_REF(U) x) - { - BOOST_ASSERT(this->priv_in_range_or_end(p)); - if (p == cbegin()){ - this->push_front(::boost::forward(x)); - return begin(); - } - else if (p == cend()){ - this->push_back(::boost::forward(x)); - return --end(); - } - else { - return priv_insert_aux_impl - ( p, (size_type)1 - , container_detail::get_insert_value_proxy(::boost::forward(x))); - } - } - - template - void priv_push_front(BOOST_FWD_REF(U) x) - { - if(this->priv_push_front_simple_available()){ - allocator_traits_type::construct - ( this->alloc(), this->priv_push_front_simple_pos(), ::boost::forward(x)); - this->priv_push_front_simple_commit(); - } - else{ - priv_insert_aux_impl - ( this->cbegin(), (size_type)1 - , container_detail::get_insert_value_proxy(::boost::forward(x))); - } - } - - template - void priv_push_back(BOOST_FWD_REF(U) x) - { - if(this->priv_push_back_simple_available()){ - allocator_traits_type::construct - ( this->alloc(), this->priv_push_back_simple_pos(), ::boost::forward(x)); - this->priv_push_back_simple_commit(); - } - else{ - priv_insert_aux_impl - ( this->cend(), (size_type)1 - , container_detail::get_insert_value_proxy(::boost::forward(x))); - } - } - - bool priv_push_back_simple_available() const - { - return this->members_.m_map && - (this->members_.m_finish.m_cur != (this->members_.m_finish.m_last - 1)); - } - - T *priv_push_back_simple_pos() const - { - return boost::movelib::to_raw_pointer(this->members_.m_finish.m_cur); - } - - void priv_push_back_simple_commit() - { - ++this->members_.m_finish.m_cur; - } - - bool priv_push_front_simple_available() const - { - return this->members_.m_map && - (this->members_.m_start.m_cur != this->members_.m_start.m_first); - } - - T *priv_push_front_simple_pos() const - { return boost::movelib::to_raw_pointer(this->members_.m_start.m_cur) - 1; } - - void priv_push_front_simple_commit() - { --this->members_.m_start.m_cur; } - - void priv_destroy_range(iterator p, iterator p2) - { - if(!Base::traits_t::trivial_dctr){ - for(;p != p2; ++p){ - allocator_traits_type::destroy(this->alloc(), boost::movelib::iterator_to_raw_pointer(p)); - } - } - } - - void priv_destroy_range(pointer p, pointer p2) - { - if(!Base::traits_t::trivial_dctr){ - for(;p != p2; ++p){ - allocator_traits_type::destroy(this->alloc(), boost::movelib::iterator_to_raw_pointer(p)); - } - } - } - - template - iterator priv_insert_aux_impl(const_iterator p, size_type n, InsertProxy proxy) - { - iterator pos(p.unconst()); - const size_type pos_n = p - this->cbegin(); - if(!this->members_.m_map){ - this->priv_initialize_map(0); - pos = this->begin(); - } - - const size_type elemsbefore = static_cast(pos - this->members_.m_start); - const size_type length = this->size(); - if (elemsbefore < length / 2) { - const iterator new_start = this->priv_reserve_elements_at_front(n); - const iterator old_start = this->members_.m_start; - if(!elemsbefore){ - proxy.uninitialized_copy_n_and_update(this->alloc(), new_start, n); - this->members_.m_start = new_start; - } - else{ - pos = this->members_.m_start + elemsbefore; - if (elemsbefore >= n) { - const iterator start_n = this->members_.m_start + n; - ::boost::container::uninitialized_move_alloc - (this->alloc(), this->members_.m_start, start_n, new_start); - this->members_.m_start = new_start; - boost::container::move(start_n, pos, old_start); - proxy.copy_n_and_update(this->alloc(), pos - n, n); - } - else { - const size_type mid_count = n - elemsbefore; - const iterator mid_start = old_start - mid_count; - proxy.uninitialized_copy_n_and_update(this->alloc(), mid_start, mid_count); - this->members_.m_start = mid_start; - ::boost::container::uninitialized_move_alloc - (this->alloc(), old_start, pos, new_start); - this->members_.m_start = new_start; - proxy.copy_n_and_update(this->alloc(), old_start, elemsbefore); - } - } - } - else { - const iterator new_finish = this->priv_reserve_elements_at_back(n); - const iterator old_finish = this->members_.m_finish; - const size_type elemsafter = length - elemsbefore; - if(!elemsafter){ - proxy.uninitialized_copy_n_and_update(this->alloc(), old_finish, n); - this->members_.m_finish = new_finish; - } - else{ - pos = old_finish - elemsafter; - if (elemsafter >= n) { - iterator finish_n = old_finish - difference_type(n); - ::boost::container::uninitialized_move_alloc - (this->alloc(), finish_n, old_finish, old_finish); - this->members_.m_finish = new_finish; - boost::container::move_backward(pos, finish_n, old_finish); - proxy.copy_n_and_update(this->alloc(), pos, n); - } - else { - const size_type raw_gap = n - elemsafter; - ::boost::container::uninitialized_move_alloc - (this->alloc(), pos, old_finish, old_finish + raw_gap); - BOOST_TRY{ - proxy.copy_n_and_update(this->alloc(), pos, elemsafter); - proxy.uninitialized_copy_n_and_update(this->alloc(), old_finish, raw_gap); - } - BOOST_CATCH(...){ - this->priv_destroy_range(old_finish, old_finish + elemsafter); - BOOST_RETHROW - } - BOOST_CATCH_END - this->members_.m_finish = new_finish; - } - } - } - return this->begin() + pos_n; - } - - template - iterator priv_insert_back_aux_impl(size_type n, InsertProxy proxy) - { - if(!this->members_.m_map){ - this->priv_initialize_map(0); - } - - iterator new_finish = this->priv_reserve_elements_at_back(n); - iterator old_finish = this->members_.m_finish; - proxy.uninitialized_copy_n_and_update(this->alloc(), old_finish, n); - this->members_.m_finish = new_finish; - return iterator(this->members_.m_finish - n); - } - - template - iterator priv_insert_front_aux_impl(size_type n, InsertProxy proxy) - { - if(!this->members_.m_map){ - this->priv_initialize_map(0); - } - - iterator new_start = this->priv_reserve_elements_at_front(n); - proxy.uninitialized_copy_n_and_update(this->alloc(), new_start, n); - this->members_.m_start = new_start; - return new_start; - } - - iterator priv_fill_insert(const_iterator pos, size_type n, const value_type& x) - { - typedef constant_iterator c_it; - return this->insert(pos, c_it(x, n), c_it()); - } - - // Precondition: this->members_.m_start and this->members_.m_finish have already been initialized, - // but none of the deque's elements have yet been constructed. - void priv_fill_initialize(const value_type& value) - { - index_pointer cur = this->members_.m_start.m_node; - BOOST_TRY { - for ( ; cur < this->members_.m_finish.m_node; ++cur){ - boost::container::uninitialized_fill_alloc - (this->alloc(), *cur, *cur + this->s_buffer_size(), value); - } - boost::container::uninitialized_fill_alloc - (this->alloc(), this->members_.m_finish.m_first, this->members_.m_finish.m_cur, value); - } - BOOST_CATCH(...){ - this->priv_destroy_range(this->members_.m_start, iterator(*cur, cur)); - BOOST_RETHROW - } - BOOST_CATCH_END - } - - template - void priv_range_initialize(InIt first, InIt last, typename iterator_enable_if_tag::type* =0) - { - this->priv_initialize_map(0); - BOOST_TRY { - for ( ; first != last; ++first) - this->emplace_back(*first); - } - BOOST_CATCH(...){ - this->clear(); - BOOST_RETHROW - } - BOOST_CATCH_END - } - - template - void priv_range_initialize(FwdIt first, FwdIt last, typename iterator_disable_if_tag::type* =0) - { - size_type n = 0; - n = boost::container::iterator_distance(first, last); - this->priv_initialize_map(n); - - index_pointer cur_node = this->members_.m_start.m_node; - BOOST_TRY { - for (; cur_node < this->members_.m_finish.m_node; ++cur_node) { - FwdIt mid = first; - boost::container::iterator_advance(mid, this->s_buffer_size()); - ::boost::container::uninitialized_copy_alloc(this->alloc(), first, mid, *cur_node); - first = mid; - } - ::boost::container::uninitialized_copy_alloc(this->alloc(), first, last, this->members_.m_finish.m_first); - } - BOOST_CATCH(...){ - this->priv_destroy_range(this->members_.m_start, iterator(*cur_node, cur_node)); - BOOST_RETHROW - } - BOOST_CATCH_END - } - - // Called only if this->members_.m_finish.m_cur == this->members_.m_finish.m_first. - void priv_pop_back_aux() BOOST_NOEXCEPT_OR_NOTHROW - { - this->priv_deallocate_node(this->members_.m_finish.m_first); - this->members_.m_finish.priv_set_node(this->members_.m_finish.m_node - 1); - this->members_.m_finish.m_cur = this->members_.m_finish.m_last - 1; - allocator_traits_type::destroy - ( this->alloc() - , boost::movelib::to_raw_pointer(this->members_.m_finish.m_cur) - ); - } - - // Called only if this->members_.m_start.m_cur == this->members_.m_start.m_last - 1. Note that - // if the deque has at least one element (a precondition for this member - // function), and if this->members_.m_start.m_cur == this->members_.m_start.m_last, then the deque - // must have at least two nodes. - void priv_pop_front_aux() BOOST_NOEXCEPT_OR_NOTHROW - { - allocator_traits_type::destroy - ( this->alloc() - , boost::movelib::to_raw_pointer(this->members_.m_start.m_cur) - ); - this->priv_deallocate_node(this->members_.m_start.m_first); - this->members_.m_start.priv_set_node(this->members_.m_start.m_node + 1); - this->members_.m_start.m_cur = this->members_.m_start.m_first; - } - - iterator priv_reserve_elements_at_front(size_type n) - { - size_type vacancies = this->members_.m_start.m_cur - this->members_.m_start.m_first; - if (n > vacancies){ - size_type new_elems = n-vacancies; - size_type new_nodes = (new_elems + this->s_buffer_size() - 1) / - this->s_buffer_size(); - size_type s = (size_type)(this->members_.m_start.m_node - this->members_.m_map); - if (new_nodes > s){ - this->priv_reallocate_map(new_nodes, true); - } - size_type i = 1; - BOOST_TRY { - for (; i <= new_nodes; ++i) - *(this->members_.m_start.m_node - i) = this->priv_allocate_node(); - } - BOOST_CATCH(...) { - for (size_type j = 1; j < i; ++j) - this->priv_deallocate_node(*(this->members_.m_start.m_node - j)); - BOOST_RETHROW - } - BOOST_CATCH_END - } - return this->members_.m_start - difference_type(n); - } - - iterator priv_reserve_elements_at_back(size_type n) - { - size_type vacancies = (this->members_.m_finish.m_last - this->members_.m_finish.m_cur) - 1; - if (n > vacancies){ - size_type new_elems = n - vacancies; - size_type new_nodes = (new_elems + this->s_buffer_size() - 1)/s_buffer_size(); - size_type s = (size_type)(this->members_.m_map_size - (this->members_.m_finish.m_node - this->members_.m_map)); - if (new_nodes + 1 > s){ - this->priv_reallocate_map(new_nodes, false); - } - size_type i = 1; - BOOST_TRY { - for (; i <= new_nodes; ++i) - *(this->members_.m_finish.m_node + i) = this->priv_allocate_node(); - } - BOOST_CATCH(...) { - for (size_type j = 1; j < i; ++j) - this->priv_deallocate_node(*(this->members_.m_finish.m_node + j)); - BOOST_RETHROW - } - BOOST_CATCH_END - } - return this->members_.m_finish + difference_type(n); - } - - void priv_reallocate_map(size_type nodes_to_add, bool add_at_front) - { - size_type old_num_nodes = this->members_.m_finish.m_node - this->members_.m_start.m_node + 1; - size_type new_num_nodes = old_num_nodes + nodes_to_add; - - index_pointer new_nstart; - if (this->members_.m_map_size > 2 * new_num_nodes) { - new_nstart = this->members_.m_map + (this->members_.m_map_size - new_num_nodes) / 2 - + (add_at_front ? nodes_to_add : 0); - if (new_nstart < this->members_.m_start.m_node) - boost::container::move(this->members_.m_start.m_node, this->members_.m_finish.m_node + 1, new_nstart); - else - boost::container::move_backward - (this->members_.m_start.m_node, this->members_.m_finish.m_node + 1, new_nstart + old_num_nodes); - } - else { - size_type new_map_size = - this->members_.m_map_size + container_detail::max_value(this->members_.m_map_size, nodes_to_add) + 2; - - index_pointer new_map = this->priv_allocate_map(new_map_size); - new_nstart = new_map + (new_map_size - new_num_nodes) / 2 - + (add_at_front ? nodes_to_add : 0); - boost::container::move(this->members_.m_start.m_node, this->members_.m_finish.m_node + 1, new_nstart); - this->priv_deallocate_map(this->members_.m_map, this->members_.m_map_size); - - this->members_.m_map = new_map; - this->members_.m_map_size = new_map_size; - } - - this->members_.m_start.priv_set_node(new_nstart); - this->members_.m_finish.priv_set_node(new_nstart + old_num_nodes - 1); - } - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -}; - -}} - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -namespace boost { - -//!has_trivial_destructor_after_move<> == true_type -//!specialization for optimizations -template -struct has_trivial_destructor_after_move > -{ - typedef typename ::boost::container::allocator_traits::pointer pointer; - static const bool value = ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value; -}; - -} - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -#include - -#endif // #ifndef BOOST_CONTAINER_DEQUE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/adaptive_node_pool.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/adaptive_node_pool.hpp deleted file mode 100644 index 20696100f57..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/adaptive_node_pool.hpp +++ /dev/null @@ -1,166 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_ADAPTIVE_NODE_POOL_HPP -#define BOOST_CONTAINER_DETAIL_ADAPTIVE_NODE_POOL_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - - -namespace boost { -namespace container { -namespace container_detail { - -template -struct select_private_adaptive_node_pool_impl -{ - typedef boost::container::container_detail:: - private_adaptive_node_pool_impl - < fake_segment_manager - , unsigned(AlignOnly)*::boost::container::adaptive_pool_flag::align_only - | ::boost::container::adaptive_pool_flag::size_ordered | ::boost::container::adaptive_pool_flag::address_ordered - > type; -}; - -//!Pooled memory allocator using an smart adaptive pool. Includes -//!a reference count but the class does not delete itself, this is -//!responsibility of user classes. Node size (NodeSize) and the number of -//!nodes allocated per block (NodesPerBlock) are known at compile time. -template< std::size_t NodeSize - , std::size_t NodesPerBlock - , std::size_t MaxFreeBlocks - , std::size_t OverheadPercent - > -class private_adaptive_node_pool - : public select_private_adaptive_node_pool_impl<(OverheadPercent == 0)>::type -{ - typedef typename select_private_adaptive_node_pool_impl::type base_t; - //Non-copyable - private_adaptive_node_pool(const private_adaptive_node_pool &); - private_adaptive_node_pool &operator=(const private_adaptive_node_pool &); - - public: - typedef typename base_t::multiallocation_chain multiallocation_chain; - static const std::size_t nodes_per_block = NodesPerBlock; - - //!Constructor. Never throws - private_adaptive_node_pool() - : base_t(0 - , NodeSize - , NodesPerBlock - , MaxFreeBlocks - , (unsigned char)OverheadPercent) - {} -}; - -//!Pooled memory allocator using adaptive pool. Includes -//!a reference count but the class does not delete itself, this is -//!responsibility of user classes. Node size (NodeSize) and the number of -//!nodes allocated per block (NodesPerBlock) are known at compile time -template< std::size_t NodeSize - , std::size_t NodesPerBlock - , std::size_t MaxFreeBlocks - , std::size_t OverheadPercent - > -class shared_adaptive_node_pool - : public private_adaptive_node_pool - -{ - private: - typedef private_adaptive_node_pool - private_node_allocator_t; - public: - typedef typename private_node_allocator_t::multiallocation_chain multiallocation_chain; - - //!Constructor. Never throws - shared_adaptive_node_pool() - : private_node_allocator_t(){} - - //!Destructor. Deallocates all allocated blocks. Never throws - ~shared_adaptive_node_pool() - {} - - //!Allocates array of count elements. Can throw std::bad_alloc - void *allocate_node() - { - //----------------------- - scoped_lock guard(mutex_); - //----------------------- - return private_node_allocator_t::allocate_node(); - } - - //!Deallocates an array pointed by ptr. Never throws - void deallocate_node(void *ptr) - { - //----------------------- - scoped_lock guard(mutex_); - //----------------------- - private_node_allocator_t::deallocate_node(ptr); - } - - //!Allocates a singly linked list of n nodes ending in null pointer. - //!can throw std::bad_alloc - void allocate_nodes(const std::size_t n, multiallocation_chain &chain) - { - //----------------------- - scoped_lock guard(mutex_); - //----------------------- - return private_node_allocator_t::allocate_nodes(n, chain); - } - - void deallocate_nodes(multiallocation_chain &chain) - { - //----------------------- - scoped_lock guard(mutex_); - //----------------------- - private_node_allocator_t::deallocate_nodes(chain); - } - - //!Deallocates all the free blocks of memory. Never throws - void deallocate_free_blocks() - { - //----------------------- - scoped_lock guard(mutex_); - //----------------------- - private_node_allocator_t::deallocate_free_blocks(); - } - - private: - default_mutex mutex_; -}; - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#include - -#endif //#ifndef BOOST_CONTAINER_DETAIL_ADAPTIVE_NODE_POOL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/adaptive_node_pool_impl.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/adaptive_node_pool_impl.hpp deleted file mode 100644 index 54db19dff2b..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/adaptive_node_pool_impl.hpp +++ /dev/null @@ -1,885 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_ADAPTIVE_NODE_POOL_IMPL_HPP -#define BOOST_CONTAINER_DETAIL_ADAPTIVE_NODE_POOL_IMPL_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -// container -#include -#include -// container/detail -#include -#include -#include -#include -#include -#include -#include -// intrusive -#include -#include -#include -#include -// other -#include -#include -#include - -namespace boost { -namespace container { - -namespace adaptive_pool_flag { - -static const unsigned int none = 0u; -static const unsigned int align_only = 1u << 0u; -static const unsigned int size_ordered = 1u << 1u; -static const unsigned int address_ordered = 1u << 2u; - -} //namespace adaptive_pool_flag{ - -namespace container_detail { - -template -struct hdr_offset_holder_t -{ - hdr_offset_holder_t(size_type offset = 0) - : hdr_offset(offset) - {} - size_type hdr_offset; -}; - -template -struct less_func; - -template -struct less_func -{ - static bool less(SizeType, SizeType, const void *, const void *) - { return true; } -}; - -template -struct less_func -{ - static bool less(SizeType ls, SizeType rs, const void *, const void *) - { return ls < rs; } -}; - -template -struct less_func -{ - static bool less(SizeType, SizeType, const void *la, const void *ra) - { return &la < &ra; } -}; - -template -struct less_func -{ - static bool less(SizeType ls, SizeType rs, const void *la, const void *ra) - { return (ls < rs) || ((ls == rs) && (la < ra)); } -}; - -template -struct block_container_traits -{ - typedef typename bi::make_set_base_hook - < bi::void_pointer - , bi::optimize_size - , bi::link_mode >::type hook_t; - - template - struct container - { - typedef typename bi::make_multiset - , bi::size_type >::type type; - }; - - template - static void reinsert_was_used(Container &container, typename Container::reference v, bool) - { - typedef typename Container::const_iterator const_block_iterator; - const const_block_iterator this_block - (Container::s_iterator_to(const_cast(v))); - const_block_iterator next_block(this_block); - if(++next_block != container.cend()){ - if(this_block->free_nodes.size() > next_block->free_nodes.size()){ - container.erase(this_block); - container.insert(v); - } - } - } - - template - static void insert_was_empty(Container &container, typename Container::value_type &v, bool) - { - container.insert(v); - } - - template - static void erase_first(Container &container) - { - container.erase(container.cbegin()); - } - - template - static void erase_last(Container &container) - { - container.erase(--container.cend()); - } -}; - -template -struct block_container_traits -{ - typedef typename bi::make_list_base_hook - < bi::void_pointer - , bi::link_mode >::type hook_t; - - template - struct container - { - typedef typename bi::make_list - , bi::size_type, bi::constant_time_size >::type type; - }; - - template - static void reinsert_was_used(Container &container, typename Container::value_type &v, bool is_full) - { - if(is_full){ - container.erase(Container::s_iterator_to(v)); - container.push_back(v); - } - } - - template - static void insert_was_empty(Container &container, typename Container::value_type &v, bool is_full) - { - if(is_full){ - container.push_back(v); - } - else{ - container.push_front(v); - } - } - - template - static void erase_first(Container &container) - { - container.pop_front(); - } - - template - static void erase_last(Container &container) - { - container.pop_back(); - } -}; - -template -struct adaptive_pool_types -{ - typedef VoidPointer void_pointer; - static const bool ordered = (Flags & (adaptive_pool_flag::size_ordered | adaptive_pool_flag::address_ordered)) != 0; - typedef block_container_traits block_container_traits_t; - typedef typename block_container_traits_t::hook_t hook_t; - typedef hdr_offset_holder_t hdr_offset_holder; - static const unsigned int order_flags = Flags & (adaptive_pool_flag::size_ordered | adaptive_pool_flag::address_ordered); - typedef MultiallocationChain free_nodes_t; - - struct block_info_t - : public hdr_offset_holder, - public hook_t - { - //An intrusive list of free node from this block - free_nodes_t free_nodes; - friend bool operator <(const block_info_t &l, const block_info_t &r) - { - return less_func:: - less(l.free_nodes.size(), r.free_nodes.size(), &l , &r); - } - - friend bool operator ==(const block_info_t &l, const block_info_t &r) - { return &l == &r; } - }; - typedef typename block_container_traits_t:: template container::type block_container_t; -}; - -template -inline size_type calculate_alignment - ( size_type overhead_percent, size_type real_node_size - , size_type hdr_size, size_type hdr_offset_size, size_type payload_per_allocation) -{ - //to-do: handle real_node_size != node_size - const size_type divisor = overhead_percent*real_node_size; - const size_type dividend = hdr_offset_size*100; - size_type elements_per_subblock = (dividend - 1)/divisor + 1; - size_type candidate_power_of_2 = - upper_power_of_2(elements_per_subblock*real_node_size + hdr_offset_size); - bool overhead_satisfied = false; - //Now calculate the wors-case overhead for a subblock - const size_type max_subblock_overhead = hdr_size + payload_per_allocation; - while(!overhead_satisfied){ - elements_per_subblock = (candidate_power_of_2 - max_subblock_overhead)/real_node_size; - const size_type overhead_size = candidate_power_of_2 - elements_per_subblock*real_node_size; - if(overhead_size*100/candidate_power_of_2 < overhead_percent){ - overhead_satisfied = true; - } - else{ - candidate_power_of_2 <<= 1; - } - } - return candidate_power_of_2; -} - -template -inline void calculate_num_subblocks - (size_type alignment, size_type real_node_size, size_type elements_per_block - , size_type &num_subblocks, size_type &real_num_node, size_type overhead_percent - , size_type hdr_size, size_type hdr_offset_size, size_type payload_per_allocation) -{ - const size_type hdr_subblock_elements = (alignment - hdr_size - payload_per_allocation)/real_node_size; - size_type elements_per_subblock = (alignment - hdr_offset_size)/real_node_size; - size_type possible_num_subblock = (elements_per_block - 1)/elements_per_subblock + 1; - while(((possible_num_subblock-1)*elements_per_subblock + hdr_subblock_elements) < elements_per_block){ - ++possible_num_subblock; - } - elements_per_subblock = (alignment - hdr_offset_size)/real_node_size; - bool overhead_satisfied = false; - while(!overhead_satisfied){ - const size_type total_data = (elements_per_subblock*(possible_num_subblock-1) + hdr_subblock_elements)*real_node_size; - const size_type total_size = alignment*possible_num_subblock; - if((total_size - total_data)*100/total_size < overhead_percent){ - overhead_satisfied = true; - } - else{ - ++possible_num_subblock; - } - } - num_subblocks = possible_num_subblock; - real_num_node = (possible_num_subblock-1)*elements_per_subblock + hdr_subblock_elements; -} - -template -class private_adaptive_node_pool_impl -{ - //Non-copyable - private_adaptive_node_pool_impl(); - private_adaptive_node_pool_impl(const private_adaptive_node_pool_impl &); - private_adaptive_node_pool_impl &operator=(const private_adaptive_node_pool_impl &); - typedef private_adaptive_node_pool_impl this_type; - - typedef typename SegmentManagerBase::void_pointer void_pointer; - static const typename SegmentManagerBase:: - size_type PayloadPerAllocation = SegmentManagerBase::PayloadPerAllocation; - //Flags - //align_only - static const bool AlignOnly = (Flags & adaptive_pool_flag::align_only) != 0; - typedef bool_ IsAlignOnly; - typedef true_ AlignOnlyTrue; - typedef false_ AlignOnlyFalse; - //size_ordered - static const bool SizeOrdered = (Flags & adaptive_pool_flag::size_ordered) != 0; - typedef bool_ IsSizeOrdered; - typedef true_ SizeOrderedTrue; - typedef false_ SizeOrderedFalse; - //address_ordered - static const bool AddressOrdered = (Flags & adaptive_pool_flag::address_ordered) != 0; - typedef bool_ IsAddressOrdered; - typedef true_ AddressOrderedTrue; - typedef false_ AddressOrderedFalse; - - public: - typedef typename SegmentManagerBase::multiallocation_chain multiallocation_chain; - typedef typename SegmentManagerBase::size_type size_type; - - private: - typedef adaptive_pool_types - adaptive_pool_types_t; - typedef typename adaptive_pool_types_t::free_nodes_t free_nodes_t; - typedef typename adaptive_pool_types_t::block_info_t block_info_t; - typedef typename adaptive_pool_types_t::block_container_t block_container_t; - typedef typename adaptive_pool_types_t::block_container_traits_t block_container_traits_t; - typedef typename block_container_t::iterator block_iterator; - typedef typename block_container_t::const_iterator const_block_iterator; - typedef typename adaptive_pool_types_t::hdr_offset_holder hdr_offset_holder; - - static const size_type MaxAlign = alignment_of::value; - static const size_type HdrSize = ((sizeof(block_info_t)-1)/MaxAlign+1)*MaxAlign; - static const size_type HdrOffsetSize = ((sizeof(hdr_offset_holder)-1)/MaxAlign+1)*MaxAlign; - - public: - //!Segment manager typedef - typedef SegmentManagerBase segment_manager_base_type; - - //!Constructor from a segment manager. Never throws - private_adaptive_node_pool_impl - ( segment_manager_base_type *segment_mngr_base - , size_type node_size - , size_type nodes_per_block - , size_type max_free_blocks - , unsigned char overhead_percent - ) - : m_max_free_blocks(max_free_blocks) - , m_real_node_size(lcm(node_size, size_type(alignment_of::value))) - //Round the size to a power of two value. - //This is the total memory size (including payload) that we want to - //allocate from the general-purpose allocator - , m_real_block_alignment - (AlignOnly ? - upper_power_of_2(HdrSize + m_real_node_size*nodes_per_block) : - calculate_alignment( (size_type)overhead_percent, m_real_node_size - , HdrSize, HdrOffsetSize, PayloadPerAllocation)) - //This is the real number of nodes per block - , m_num_subblocks(0) - , m_real_num_node(AlignOnly ? (m_real_block_alignment - PayloadPerAllocation - HdrSize)/m_real_node_size : 0) - //General purpose allocator - , mp_segment_mngr_base(segment_mngr_base) - , m_block_container() - , m_totally_free_blocks(0) - { - if(!AlignOnly){ - calculate_num_subblocks - ( m_real_block_alignment - , m_real_node_size - , nodes_per_block - , m_num_subblocks - , m_real_num_node - , (size_type)overhead_percent - , HdrSize - , HdrOffsetSize - , PayloadPerAllocation); - } - } - - //!Destructor. Deallocates all allocated blocks. Never throws - ~private_adaptive_node_pool_impl() - { this->priv_clear(); } - - size_type get_real_num_node() const - { return m_real_num_node; } - - //!Returns the segment manager. Never throws - segment_manager_base_type* get_segment_manager_base()const - { return boost::movelib::to_raw_pointer(mp_segment_mngr_base); } - - //!Allocates array of count elements. Can throw - void *allocate_node() - { - this->priv_invariants(); - //If there are no free nodes we allocate a new block - if(!m_block_container.empty()){ - //We take the first free node the multiset can't be empty - free_nodes_t &free_nodes = m_block_container.begin()->free_nodes; - BOOST_ASSERT(!free_nodes.empty()); - const size_type free_nodes_count = free_nodes.size(); - void *first_node = boost::movelib::to_raw_pointer(free_nodes.pop_front()); - if(free_nodes.empty()){ - block_container_traits_t::erase_first(m_block_container); - } - m_totally_free_blocks -= static_cast(free_nodes_count == m_real_num_node); - this->priv_invariants(); - return first_node; - } - else{ - multiallocation_chain chain; - this->priv_append_from_new_blocks(1, chain, IsAlignOnly()); - return boost::movelib::to_raw_pointer(chain.pop_front()); - } - } - - //!Deallocates an array pointed by ptr. Never throws - void deallocate_node(void *pElem) - { - this->priv_invariants(); - block_info_t &block_info = *this->priv_block_from_node(pElem); - BOOST_ASSERT(block_info.free_nodes.size() < m_real_num_node); - - //We put the node at the beginning of the free node list - block_info.free_nodes.push_back(void_pointer(pElem)); - - //The loop reinserts all blocks except the last one - this->priv_reinsert_block(block_info, block_info.free_nodes.size() == 1); - this->priv_deallocate_free_blocks(m_max_free_blocks); - this->priv_invariants(); - } - - //!Allocates n nodes. - //!Can throw - void allocate_nodes(const size_type n, multiallocation_chain &chain) - { - size_type i = 0; - BOOST_TRY{ - this->priv_invariants(); - while(i != n){ - //If there are no free nodes we allocate all needed blocks - if (m_block_container.empty()){ - this->priv_append_from_new_blocks(n - i, chain, IsAlignOnly()); - BOOST_ASSERT(m_block_container.empty() || (++m_block_container.cbegin() == m_block_container.cend())); - BOOST_ASSERT(chain.size() == n); - break; - } - free_nodes_t &free_nodes = m_block_container.begin()->free_nodes; - const size_type free_nodes_count_before = free_nodes.size(); - m_totally_free_blocks -= static_cast(free_nodes_count_before == m_real_num_node); - const size_type num_left = n-i; - const size_type num_elems = (num_left < free_nodes_count_before) ? num_left : free_nodes_count_before; - typedef typename free_nodes_t::iterator free_nodes_iterator; - - if(num_left < free_nodes_count_before){ - const free_nodes_iterator it_bbeg(free_nodes.before_begin()); - free_nodes_iterator it_bend(it_bbeg); - for(size_type j = 0; j != num_elems; ++j){ - ++it_bend; - } - free_nodes_iterator it_end = it_bend; ++it_end; - free_nodes_iterator it_beg = it_bbeg; ++it_beg; - free_nodes.erase_after(it_bbeg, it_end, num_elems); - chain.incorporate_after(chain.last(), &*it_beg, &*it_bend, num_elems); - //chain.splice_after(chain.last(), free_nodes, it_bbeg, it_bend, num_elems); - BOOST_ASSERT(!free_nodes.empty()); - } - else{ - const free_nodes_iterator it_beg(free_nodes.begin()), it_bend(free_nodes.last()); - free_nodes.clear(); - chain.incorporate_after(chain.last(), &*it_beg, &*it_bend, num_elems); - block_container_traits_t::erase_first(m_block_container); - } - i += num_elems; - } - } - BOOST_CATCH(...){ - this->deallocate_nodes(chain); - BOOST_RETHROW - } - BOOST_CATCH_END - this->priv_invariants(); - } - - //!Deallocates a linked list of nodes. Never throws - void deallocate_nodes(multiallocation_chain &nodes) - { - this->priv_invariants(); - //To take advantage of node locality, wait until two - //nodes belong to different blocks. Only then reinsert - //the block of the first node in the block tree. - //Cache of the previous block - block_info_t *prev_block_info = 0; - - //If block was empty before this call, it's not already - //inserted in the block tree. - bool prev_block_was_empty = false; - typedef typename free_nodes_t::iterator free_nodes_iterator; - { - const free_nodes_iterator itbb(nodes.before_begin()), ite(nodes.end()); - free_nodes_iterator itf(nodes.begin()), itbf(itbb); - size_type splice_node_count = size_type(-1); - while(itf != ite){ - void *pElem = boost::movelib::to_raw_pointer(boost::movelib::iterator_to_raw_pointer(itf)); - block_info_t &block_info = *this->priv_block_from_node(pElem); - BOOST_ASSERT(block_info.free_nodes.size() < m_real_num_node); - ++splice_node_count; - - //If block change is detected calculate the cached block position in the tree - if(&block_info != prev_block_info){ - if(prev_block_info){ //Make sure we skip the initial "dummy" cache - free_nodes_iterator it(itbb); ++it; - nodes.erase_after(itbb, itf, splice_node_count); - prev_block_info->free_nodes.incorporate_after(prev_block_info->free_nodes.last(), &*it, &*itbf, splice_node_count); - this->priv_reinsert_block(*prev_block_info, prev_block_was_empty); - splice_node_count = 0; - } - //Update cache with new data - prev_block_was_empty = block_info.free_nodes.empty(); - prev_block_info = &block_info; - } - itbf = itf; - ++itf; - } - } - if(prev_block_info){ - //The loop reinserts all blocks except the last one - const free_nodes_iterator itfirst(nodes.begin()), itlast(nodes.last()); - const size_type splice_node_count = nodes.size(); - nodes.clear(); - prev_block_info->free_nodes.incorporate_after(prev_block_info->free_nodes.last(), &*itfirst, &*itlast, splice_node_count); - this->priv_reinsert_block(*prev_block_info, prev_block_was_empty); - this->priv_invariants(); - this->priv_deallocate_free_blocks(m_max_free_blocks); - } - } - - void deallocate_free_blocks() - { this->priv_deallocate_free_blocks(0); } - - size_type num_free_nodes() - { - typedef typename block_container_t::const_iterator citerator; - size_type count = 0; - citerator it (m_block_container.begin()), itend(m_block_container.end()); - for(; it != itend; ++it){ - count += it->free_nodes.size(); - } - return count; - } - - void swap(private_adaptive_node_pool_impl &other) - { - BOOST_ASSERT(m_max_free_blocks == other.m_max_free_blocks); - BOOST_ASSERT(m_real_node_size == other.m_real_node_size); - BOOST_ASSERT(m_real_block_alignment == other.m_real_block_alignment); - BOOST_ASSERT(m_real_num_node == other.m_real_num_node); - std::swap(mp_segment_mngr_base, other.mp_segment_mngr_base); - std::swap(m_totally_free_blocks, other.m_totally_free_blocks); - m_block_container.swap(other.m_block_container); - } - - //Deprecated, use deallocate_free_blocks - void deallocate_free_chunks() - { this->priv_deallocate_free_blocks(0); } - - private: - - void priv_deallocate_free_blocks(size_type max_free_blocks) - { //Trampoline function to ease inlining - if(m_totally_free_blocks > max_free_blocks){ - this->priv_deallocate_free_blocks_impl(max_free_blocks); - } - } - - void priv_deallocate_free_blocks_impl(size_type max_free_blocks) - { - this->priv_invariants(); - //Now check if we've reached the free nodes limit - //and check if we have free blocks. If so, deallocate as much - //as we can to stay below the limit - multiallocation_chain chain; - { - const const_block_iterator itend = m_block_container.cend(); - const_block_iterator it = itend; - --it; - size_type totally_free_blocks = m_totally_free_blocks; - - for( ; totally_free_blocks > max_free_blocks; --totally_free_blocks){ - BOOST_ASSERT(it->free_nodes.size() == m_real_num_node); - void *addr = priv_first_subblock_from_block(const_cast(&*it)); - --it; - block_container_traits_t::erase_last(m_block_container); - chain.push_front(void_pointer(addr)); - } - BOOST_ASSERT((m_totally_free_blocks - max_free_blocks) == chain.size()); - m_totally_free_blocks = max_free_blocks; - } - this->mp_segment_mngr_base->deallocate_many(chain); - } - - void priv_reinsert_block(block_info_t &prev_block_info, const bool prev_block_was_empty) - { - //Cache the free nodes from the block - const size_type this_block_free_nodes = prev_block_info.free_nodes.size(); - const bool is_full = this_block_free_nodes == m_real_num_node; - - //Update free block count - m_totally_free_blocks += static_cast(is_full); - if(prev_block_was_empty){ - block_container_traits_t::insert_was_empty(m_block_container, prev_block_info, is_full); - } - else{ - block_container_traits_t::reinsert_was_used(m_block_container, prev_block_info, is_full); - } - } - - class block_destroyer; - friend class block_destroyer; - - class block_destroyer - { - public: - block_destroyer(const this_type *impl, multiallocation_chain &chain) - : mp_impl(impl), m_chain(chain) - {} - - void operator()(typename block_container_t::pointer to_deallocate) - { return this->do_destroy(to_deallocate, IsAlignOnly()); } - - private: - void do_destroy(typename block_container_t::pointer to_deallocate, AlignOnlyTrue) - { - BOOST_ASSERT(to_deallocate->free_nodes.size() == mp_impl->m_real_num_node); - m_chain.push_back(to_deallocate); - } - - void do_destroy(typename block_container_t::pointer to_deallocate, AlignOnlyFalse) - { - BOOST_ASSERT(to_deallocate->free_nodes.size() == mp_impl->m_real_num_node); - BOOST_ASSERT(0 == to_deallocate->hdr_offset); - hdr_offset_holder *hdr_off_holder = - mp_impl->priv_first_subblock_from_block(boost::movelib::to_raw_pointer(to_deallocate)); - m_chain.push_back(hdr_off_holder); - } - - const this_type *mp_impl; - multiallocation_chain &m_chain; - }; - - //This macro will activate invariant checking. Slow, but helpful for debugging the code. - //#define BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS - void priv_invariants() - #ifdef BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS - #undef BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS - { - const const_block_iterator itend(m_block_container.end()); - - { //We iterate through the block tree to free the memory - const_block_iterator it(m_block_container.begin()); - - if(it != itend){ - for(++it; it != itend; ++it){ - const_block_iterator prev(it); - --prev; - BOOST_ASSERT(*prev < *it); - (void)prev; (void)it; - } - } - } - { //Check that the total free nodes are correct - const_block_iterator it(m_block_container.cbegin()); - size_type total_free_nodes = 0; - for(; it != itend; ++it){ - total_free_nodes += it->free_nodes.size(); - } - BOOST_ASSERT(total_free_nodes >= m_totally_free_blocks*m_real_num_node); - } - { //Check that the total totally free blocks are correct - BOOST_ASSERT(m_block_container.size() >= m_totally_free_blocks); - const_block_iterator it = m_block_container.cend(); - size_type total_free_blocks = m_totally_free_blocks; - while(total_free_blocks--){ - BOOST_ASSERT((--it)->free_nodes.size() == m_real_num_node); - } - } - - if(!AlignOnly){ - //Check that header offsets are correct - const_block_iterator it = m_block_container.begin(); - for(; it != itend; ++it){ - hdr_offset_holder *hdr_off_holder = this->priv_first_subblock_from_block(const_cast(&*it)); - for(size_type i = 0, max = m_num_subblocks; i < max; ++i){ - const size_type offset = reinterpret_cast(const_cast(&*it)) - reinterpret_cast(hdr_off_holder); - BOOST_ASSERT(hdr_off_holder->hdr_offset == offset); - BOOST_ASSERT(0 == ((size_type)hdr_off_holder & (m_real_block_alignment - 1))); - BOOST_ASSERT(0 == (hdr_off_holder->hdr_offset & (m_real_block_alignment - 1))); - hdr_off_holder = reinterpret_cast(reinterpret_cast(hdr_off_holder) + m_real_block_alignment); - } - } - } - } - #else - {} //empty - #endif - - //!Deallocates all used memory. Never throws - void priv_clear() - { - #ifndef NDEBUG - block_iterator it = m_block_container.begin(); - block_iterator itend = m_block_container.end(); - size_type n_free_nodes = 0; - for(; it != itend; ++it){ - //Check for memory leak - BOOST_ASSERT(it->free_nodes.size() == m_real_num_node); - ++n_free_nodes; - } - BOOST_ASSERT(n_free_nodes == m_totally_free_blocks); - #endif - //Check for memory leaks - this->priv_invariants(); - multiallocation_chain chain; - m_block_container.clear_and_dispose(block_destroyer(this, chain)); - this->mp_segment_mngr_base->deallocate_many(chain); - m_totally_free_blocks = 0; - } - - block_info_t *priv_block_from_node(void *node, AlignOnlyFalse) const - { - hdr_offset_holder *hdr_off_holder = - reinterpret_cast((std::size_t)node & size_type(~(m_real_block_alignment - 1))); - BOOST_ASSERT(0 == ((std::size_t)hdr_off_holder & (m_real_block_alignment - 1))); - BOOST_ASSERT(0 == (hdr_off_holder->hdr_offset & (m_real_block_alignment - 1))); - block_info_t *block = reinterpret_cast - (reinterpret_cast(hdr_off_holder) + hdr_off_holder->hdr_offset); - BOOST_ASSERT(block->hdr_offset == 0); - return block; - } - - block_info_t *priv_block_from_node(void *node, AlignOnlyTrue) const - { - return (block_info_t *)((std::size_t)node & std::size_t(~(m_real_block_alignment - 1))); - } - - block_info_t *priv_block_from_node(void *node) const - { return this->priv_block_from_node(node, IsAlignOnly()); } - - hdr_offset_holder *priv_first_subblock_from_block(block_info_t *block) const - { return this->priv_first_subblock_from_block(block, IsAlignOnly()); } - - hdr_offset_holder *priv_first_subblock_from_block(block_info_t *block, AlignOnlyFalse) const - { - hdr_offset_holder *const hdr_off_holder = reinterpret_cast - (reinterpret_cast(block) - (m_num_subblocks-1)*m_real_block_alignment); - BOOST_ASSERT(hdr_off_holder->hdr_offset == size_type(reinterpret_cast(block) - reinterpret_cast(hdr_off_holder))); - BOOST_ASSERT(0 == ((std::size_t)hdr_off_holder & (m_real_block_alignment - 1))); - BOOST_ASSERT(0 == (hdr_off_holder->hdr_offset & (m_real_block_alignment - 1))); - return hdr_off_holder; - } - - hdr_offset_holder *priv_first_subblock_from_block(block_info_t *block, AlignOnlyTrue) const - { - return reinterpret_cast(block); - } - - void priv_dispatch_block_chain_or_free - ( multiallocation_chain &chain, block_info_t &c_info, size_type num_node - , char *mem_address, size_type total_elements, bool insert_block_if_free) - { - BOOST_ASSERT(chain.size() <= total_elements); - //First add all possible nodes to the chain - const size_type left = total_elements - chain.size(); - const size_type max_chain = (num_node < left) ? num_node : left; - mem_address = static_cast(boost::movelib::to_raw_pointer - (chain.incorporate_after(chain.last(), void_pointer(mem_address), m_real_node_size, max_chain))); - //Now store remaining nodes in the free list - if(const size_type max_free = num_node - max_chain){ - free_nodes_t & free_nodes = c_info.free_nodes; - free_nodes.incorporate_after(free_nodes.last(), void_pointer(mem_address), m_real_node_size, max_free); - if(insert_block_if_free){ - m_block_container.push_front(c_info); - } - } - } - - //!Allocates a several blocks of nodes. Can throw - void priv_append_from_new_blocks(size_type min_elements, multiallocation_chain &chain, AlignOnlyTrue) - { - BOOST_ASSERT(m_block_container.empty()); - BOOST_ASSERT(min_elements > 0); - const size_type n = (min_elements - 1)/m_real_num_node + 1; - const size_type real_block_size = m_real_block_alignment - PayloadPerAllocation; - const size_type total_elements = chain.size() + min_elements; - for(size_type i = 0; i != n; ++i){ - //We allocate a new NodeBlock and put it the last - //element of the tree - char *mem_address = static_cast - (mp_segment_mngr_base->allocate_aligned(real_block_size, m_real_block_alignment)); - if(!mem_address){ - //In case of error, free memory deallocating all nodes (the new ones allocated - //in this function plus previously stored nodes in chain). - this->deallocate_nodes(chain); - throw_bad_alloc(); - } - block_info_t &c_info = *new(mem_address)block_info_t(); - mem_address += HdrSize; - if(i != (n-1)){ - chain.incorporate_after(chain.last(), void_pointer(mem_address), m_real_node_size, m_real_num_node); - } - else{ - this->priv_dispatch_block_chain_or_free(chain, c_info, m_real_num_node, mem_address, total_elements, true); - } - } - } - - void priv_append_from_new_blocks(size_type min_elements, multiallocation_chain &chain, AlignOnlyFalse) - { - BOOST_ASSERT(m_block_container.empty()); - BOOST_ASSERT(min_elements > 0); - const size_type n = (min_elements - 1)/m_real_num_node + 1; - const size_type real_block_size = m_real_block_alignment*m_num_subblocks - PayloadPerAllocation; - const size_type elements_per_subblock = (m_real_block_alignment - HdrOffsetSize)/m_real_node_size; - const size_type hdr_subblock_elements = (m_real_block_alignment - HdrSize - PayloadPerAllocation)/m_real_node_size; - const size_type total_elements = chain.size() + min_elements; - - for(size_type i = 0; i != n; ++i){ - //We allocate a new NodeBlock and put it the last - //element of the tree - char *mem_address = static_cast - (mp_segment_mngr_base->allocate_aligned(real_block_size, m_real_block_alignment)); - if(!mem_address){ - //In case of error, free memory deallocating all nodes (the new ones allocated - //in this function plus previously stored nodes in chain). - this->deallocate_nodes(chain); - throw_bad_alloc(); - } - //First initialize header information on the last subblock - char *hdr_addr = mem_address + m_real_block_alignment*(m_num_subblocks-1); - block_info_t &c_info = *new(hdr_addr)block_info_t(); - //Some structural checks - BOOST_ASSERT(static_cast(&static_cast(c_info).hdr_offset) == - static_cast(&c_info)); (void)c_info; - if(i != (n-1)){ - for( size_type subblock = 0, maxsubblock = m_num_subblocks - 1 - ; subblock < maxsubblock - ; ++subblock, mem_address += m_real_block_alignment){ - //Initialize header offset mark - new(mem_address) hdr_offset_holder(size_type(hdr_addr - mem_address)); - chain.incorporate_after - (chain.last(), void_pointer(mem_address + HdrOffsetSize), m_real_node_size, elements_per_subblock); - } - chain.incorporate_after(chain.last(), void_pointer(hdr_addr + HdrSize), m_real_node_size, hdr_subblock_elements); - } - else{ - for( size_type subblock = 0, maxsubblock = m_num_subblocks - 1 - ; subblock < maxsubblock - ; ++subblock, mem_address += m_real_block_alignment){ - //Initialize header offset mark - new(mem_address) hdr_offset_holder(size_type(hdr_addr - mem_address)); - this->priv_dispatch_block_chain_or_free - (chain, c_info, elements_per_subblock, mem_address + HdrOffsetSize, total_elements, false); - } - this->priv_dispatch_block_chain_or_free - (chain, c_info, hdr_subblock_elements, hdr_addr + HdrSize, total_elements, true); - } - } - } - - private: - typedef typename boost::intrusive::pointer_traits - ::template rebind_pointer::type segment_mngr_base_ptr_t; - const size_type m_max_free_blocks; - const size_type m_real_node_size; - //Round the size to a power of two value. - //This is the total memory size (including payload) that we want to - //allocate from the general-purpose allocator - const size_type m_real_block_alignment; - size_type m_num_subblocks; - //This is the real number of nodes per block - //const - size_type m_real_num_node; - segment_mngr_base_ptr_t mp_segment_mngr_base; //Segment manager - block_container_t m_block_container; //Intrusive block list - size_type m_totally_free_blocks; //Free blocks -}; - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#include - -#endif //#ifndef BOOST_CONTAINER_DETAIL_ADAPTIVE_NODE_POOL_IMPL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/addressof.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/addressof.hpp deleted file mode 100644 index fedbdb91d15..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/addressof.hpp +++ /dev/null @@ -1,41 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2014-2015. 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_ADDRESSOF_HPP -#define BOOST_CONTAINER_DETAIL_ADDRESSOF_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include - -namespace boost { -namespace container { -namespace container_detail { - -template -BOOST_CONTAINER_FORCEINLINE T* addressof(T& obj) -{ - return static_cast( - static_cast( - const_cast( - &reinterpret_cast(obj) - ))); -} - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DETAIL_ADDRESSOF_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/advanced_insert_int.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/advanced_insert_int.hpp deleted file mode 100644 index 20adb523a6e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/advanced_insert_int.hpp +++ /dev/null @@ -1,477 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2008-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_ADVANCED_INSERT_INT_HPP -#define BOOST_CONTAINER_ADVANCED_INSERT_INT_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -// container -#include -// container/detail -#include -#include -#include -#include -#include -#include -#include -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif -// move -#include -// other -#include -#include - -namespace boost { namespace container { namespace container_detail { - -template -struct move_insert_range_proxy -{ - typedef typename allocator_traits::size_type size_type; - typedef typename allocator_traits::value_type value_type; - - explicit move_insert_range_proxy(FwdIt first) - : first_(first) - {} - - void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) - { - this->first_ = ::boost::container::uninitialized_move_alloc_n_source - (a, this->first_, n, p); - } - - void copy_n_and_update(Allocator &, Iterator p, size_type n) - { - this->first_ = ::boost::container::move_n_source(this->first_, n, p); - } - - FwdIt first_; -}; - - -template -struct insert_range_proxy -{ - typedef typename allocator_traits::size_type size_type; - typedef typename allocator_traits::value_type value_type; - - explicit insert_range_proxy(FwdIt first) - : first_(first) - {} - - void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) - { - this->first_ = ::boost::container::uninitialized_copy_alloc_n_source(a, this->first_, n, p); - } - - void copy_n_and_update(Allocator &, Iterator p, size_type n) - { - this->first_ = ::boost::container::copy_n_source(this->first_, n, p); - } - - FwdIt first_; -}; - - -template -struct insert_n_copies_proxy -{ - typedef typename allocator_traits::size_type size_type; - typedef typename allocator_traits::value_type value_type; - - explicit insert_n_copies_proxy(const value_type &v) - : v_(v) - {} - - void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const - { boost::container::uninitialized_fill_alloc_n(a, v_, n, p); } - - void copy_n_and_update(Allocator &, Iterator p, size_type n) const - { - for (; 0 < n; --n, ++p){ - *p = v_; - } - } - - const value_type &v_; -}; - -template -struct insert_value_initialized_n_proxy -{ - typedef ::boost::container::allocator_traits alloc_traits; - typedef typename allocator_traits::size_type size_type; - typedef typename allocator_traits::value_type value_type; - - void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const - { boost::container::uninitialized_value_init_alloc_n(a, n, p); } - - void copy_n_and_update(Allocator &, Iterator, size_type) const - { BOOST_ASSERT(false); } -}; - -template -struct insert_default_initialized_n_proxy -{ - typedef ::boost::container::allocator_traits alloc_traits; - typedef typename allocator_traits::size_type size_type; - typedef typename allocator_traits::value_type value_type; - - void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const - { boost::container::uninitialized_default_init_alloc_n(a, n, p); } - - void copy_n_and_update(Allocator &, Iterator, size_type) const - { BOOST_ASSERT(false); } -}; - -template -struct insert_copy_proxy -{ - typedef boost::container::allocator_traits alloc_traits; - typedef typename alloc_traits::size_type size_type; - typedef typename alloc_traits::value_type value_type; - - explicit insert_copy_proxy(const value_type &v) - : v_(v) - {} - - void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const - { - BOOST_ASSERT(n == 1); (void)n; - alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), v_); - } - - void copy_n_and_update(Allocator &, Iterator p, size_type n) const - { - BOOST_ASSERT(n == 1); (void)n; - *p =v_; - } - - const value_type &v_; -}; - - -template -struct insert_move_proxy -{ - typedef boost::container::allocator_traits alloc_traits; - typedef typename alloc_traits::size_type size_type; - typedef typename alloc_traits::value_type value_type; - - explicit insert_move_proxy(value_type &v) - : v_(v) - {} - - void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const - { - BOOST_ASSERT(n == 1); (void)n; - alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), ::boost::move(v_) ); - } - - void copy_n_and_update(Allocator &, Iterator p, size_type n) const - { - BOOST_ASSERT(n == 1); (void)n; - *p = ::boost::move(v_); - } - - value_type &v_; -}; - -template -insert_move_proxy get_insert_value_proxy(BOOST_RV_REF(typename boost::container::iterator_traits::value_type) v) -{ - return insert_move_proxy(v); -} - -template -insert_copy_proxy get_insert_value_proxy(const typename boost::container::iterator_traits::value_type &v) -{ - return insert_copy_proxy(v); -} - -}}} //namespace boost { namespace container { namespace container_detail { - -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -#include -#include - -namespace boost { -namespace container { -namespace container_detail { - -template -struct insert_nonmovable_emplace_proxy -{ - typedef boost::container::allocator_traits alloc_traits; - typedef typename alloc_traits::size_type size_type; - typedef typename alloc_traits::value_type value_type; - - typedef typename build_number_seq::type index_tuple_t; - - explicit insert_nonmovable_emplace_proxy(BOOST_FWD_REF(Args)... args) - : args_(args...) - {} - - void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) - { this->priv_uninitialized_copy_some_and_update(a, index_tuple_t(), p, n); } - - private: - template - void priv_uninitialized_copy_some_and_update(Allocator &a, const index_tuple&, Iterator p, size_type n) - { - BOOST_ASSERT(n == 1); (void)n; - alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), ::boost::forward(get(this->args_))... ); - } - - protected: - tuple args_; -}; - -template -struct insert_emplace_proxy - : public insert_nonmovable_emplace_proxy -{ - typedef insert_nonmovable_emplace_proxy base_t; - typedef boost::container::allocator_traits alloc_traits; - typedef typename base_t::value_type value_type; - typedef typename base_t::size_type size_type; - typedef typename base_t::index_tuple_t index_tuple_t; - - explicit insert_emplace_proxy(BOOST_FWD_REF(Args)... args) - : base_t(::boost::forward(args)...) - {} - - void copy_n_and_update(Allocator &a, Iterator p, size_type n) - { this->priv_copy_some_and_update(a, index_tuple_t(), p, n); } - - private: - - template - void priv_copy_some_and_update(Allocator &a, const index_tuple&, Iterator p, size_type n) - { - BOOST_ASSERT(n ==1); (void)n; - typename aligned_storage::value>::type v; - value_type *vp = static_cast(static_cast(&v)); - alloc_traits::construct(a, vp, - ::boost::forward(get(this->args_))...); - BOOST_TRY{ - *p = ::boost::move(*vp); - } - BOOST_CATCH(...){ - alloc_traits::destroy(a, vp); - BOOST_RETHROW - } - BOOST_CATCH_END - alloc_traits::destroy(a, vp); - } -}; - -//Specializations to avoid an unneeded temporary when emplacing from a single argument o type value_type -template -struct insert_emplace_proxy::value_type> - : public insert_move_proxy -{ - explicit insert_emplace_proxy(typename boost::container::allocator_traits::value_type &&v) - : insert_move_proxy(v) - {} -}; - -//We use "add_const" here as adding "const" only confuses MSVC12(and maybe later) provoking -//compiler error C2752 ("more than one partial specialization matches"). -//Any problem is solvable with an extra layer of indirection? ;-) -template -struct insert_emplace_proxy::value_type>::type - > - : public insert_copy_proxy -{ - explicit insert_emplace_proxy(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -template -struct insert_emplace_proxy::value_type &> - : public insert_copy_proxy -{ - explicit insert_emplace_proxy(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -template -struct insert_emplace_proxy::value_type>::type & - > - : public insert_copy_proxy -{ - explicit insert_emplace_proxy(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -}}} //namespace boost { namespace container { namespace container_detail { - -#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -#include - -namespace boost { -namespace container { -namespace container_detail { - -#define BOOST_CONTAINER_ADVANCED_INSERT_INT_CODE(N) \ -template< class Allocator, class Iterator BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\ -struct insert_nonmovable_emplace_proxy##N\ -{\ - typedef boost::container::allocator_traits alloc_traits;\ - typedef typename alloc_traits::size_type size_type;\ - typedef typename alloc_traits::value_type value_type;\ - \ - explicit insert_nonmovable_emplace_proxy##N(BOOST_MOVE_UREF##N)\ - BOOST_MOVE_COLON##N BOOST_MOVE_FWD_INIT##N {}\ - \ - void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n)\ - {\ - BOOST_ASSERT(n == 1); (void)n;\ - alloc_traits::construct(a, boost::movelib::iterator_to_raw_pointer(p) BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\ - }\ - \ - void copy_n_and_update(Allocator &, Iterator, size_type)\ - { BOOST_ASSERT(false); }\ - \ - protected:\ - BOOST_MOVE_MREF##N\ -};\ -\ -template< class Allocator, class Iterator BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\ -struct insert_emplace_proxy_arg##N\ - : insert_nonmovable_emplace_proxy##N< Allocator, Iterator BOOST_MOVE_I##N BOOST_MOVE_TARG##N >\ -{\ - typedef insert_nonmovable_emplace_proxy##N\ - < Allocator, Iterator BOOST_MOVE_I##N BOOST_MOVE_TARG##N > base_t;\ - typedef typename base_t::value_type value_type;\ - typedef typename base_t::size_type size_type;\ - typedef boost::container::allocator_traits alloc_traits;\ - \ - explicit insert_emplace_proxy_arg##N(BOOST_MOVE_UREF##N)\ - : base_t(BOOST_MOVE_FWD##N){}\ - \ - void copy_n_and_update(Allocator &a, Iterator p, size_type n)\ - {\ - BOOST_ASSERT(n == 1); (void)n;\ - typename aligned_storage::value>::type v;\ - BOOST_ASSERT((((size_type)(&v)) % alignment_of::value) == 0);\ - value_type *vp = static_cast(static_cast(&v));\ - alloc_traits::construct(a, vp BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\ - BOOST_TRY{\ - *p = ::boost::move(*vp);\ - }\ - BOOST_CATCH(...){\ - alloc_traits::destroy(a, vp);\ - BOOST_RETHROW\ - }\ - BOOST_CATCH_END\ - alloc_traits::destroy(a, vp);\ - }\ -};\ -// -BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_ADVANCED_INSERT_INT_CODE) -#undef BOOST_CONTAINER_ADVANCED_INSERT_INT_CODE - -#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) - -//Specializations to avoid an unneeded temporary when emplacing from a single argument o type value_type -template -struct insert_emplace_proxy_arg1::value_type> > - : public insert_move_proxy -{ - explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits::value_type &v) - : insert_move_proxy(v) - {} -}; - -template -struct insert_emplace_proxy_arg1::value_type> - : public insert_copy_proxy -{ - explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -#else //e.g. MSVC10 & MSVC11 - -//Specializations to avoid an unneeded temporary when emplacing from a single argument o type value_type -template -struct insert_emplace_proxy_arg1::value_type> - : public insert_move_proxy -{ - explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits::value_type &&v) - : insert_move_proxy(v) - {} -}; - -//We use "add_const" here as adding "const" only confuses MSVC10&11 provoking -//compiler error C2752 ("more than one partial specialization matches"). -//Any problem is solvable with an extra layer of indirection? ;-) -template -struct insert_emplace_proxy_arg1::value_type>::type - > - : public insert_copy_proxy -{ - explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -template -struct insert_emplace_proxy_arg1::value_type &> - : public insert_copy_proxy -{ - explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -template -struct insert_emplace_proxy_arg1::value_type>::type & - > - : public insert_copy_proxy -{ - explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits::value_type &v) - : insert_copy_proxy(v) - {} -}; - -#endif - -}}} //namespace boost { namespace container { namespace container_detail { - -#endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -#include - -#endif //#ifndef BOOST_CONTAINER_ADVANCED_INSERT_INT_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/algorithm.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/algorithm.hpp deleted file mode 100644 index 11844220e1c..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/algorithm.hpp +++ /dev/null @@ -1,157 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2014-2014. -// -// 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_ALGORITHM_HPP -#define BOOST_CONTAINER_DETAIL_ALGORITHM_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include - -namespace boost { -namespace container { - -using boost::intrusive::algo_equal; -using boost::intrusive::algo_lexicographical_compare; - -template -class binder1st -{ - public: - typedef typename Func::second_argument_type argument_type; - typedef typename Func::result_type result_type; - - binder1st(const Func& func, const typename Func::first_argument_type& arg) - : op(func), value(arg) - {} - - result_type operator()(const argument_type& arg) const - { return op(value, arg); } - - result_type operator()(argument_type& arg) const - { return op(value, arg); } - - private: - Func op; - typename Func::first_argument_type value; -}; - -template -inline binder1st bind1st(const Func& func, const T& arg) -{ return boost::container::binder1st(func, arg); } - -template -class binder2nd -{ - public: - typedef typename Func::first_argument_type argument_type; - typedef typename Func::result_type result_type; - - binder2nd(const Func& func, const typename Func::second_argument_type& arg) - : op(func), value(arg) - {} - - result_type operator()(const argument_type& arg) const - { return op(arg, value); } - - result_type operator()(argument_type& arg) const - { return op(arg, value); } - - private: - Func op; - typename Func::second_argument_type value; -}; - -template -inline binder2nd bind2nd(const Func& func, const T& arg) -{ - return (boost::container::binder2nd(func, arg)); -} - -template -class unary_negate -{ - public: - typedef typename Func::argument_type argument_type; - typedef typename Func::result_type result_type; - - explicit unary_negate(const Func& func) - : m_func(func) - {} - - bool operator()(const typename Func::argument_type& arg) const - { return !m_func(arg); } - - private: - Func m_func; -}; - -template inline -unary_negate not1(const Func& func) -{ - return boost::container::unary_negate(func); -} - -template -InputIt find_if(InputIt first, InputIt last, UnaryPredicate p) -{ - for (; first != last; ++first) { - if (p(*first)) { - return first; - } - } - return last; -} - -template -InputIt find_first_of(InputIt first1, InputIt last1, ForwardIt first2, ForwardIt last2, BinaryPredicate p) -{ - for (; first1 != last1; ++first1) { - for (ForwardIt it = first2; it != last2; ++it) { - if (p(*first1, *it)) { - return first1; - } - } - } - return last1; -} - -template -ForwardIt1 search(ForwardIt1 first1, ForwardIt1 last1, - ForwardIt2 first2, ForwardIt2 last2, BinaryPredicate p) -{ - for (; ; ++first1) { - ForwardIt1 it = first1; - for (ForwardIt2 it2 = first2; ; ++it, ++it2) { - if (it2 == last2) { - return first1; - } - if (it == last1) { - return last1; - } - if (!p(*it, *it2)) { - break; - } - } - } -} - -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DETAIL_ALGORITHM_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/alloc_helpers.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/alloc_helpers.hpp deleted file mode 100644 index 656e0c2a5e1..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/alloc_helpers.hpp +++ /dev/null @@ -1,60 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2014-2015. 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_ALLOC_TRAITS_HPP -#define BOOST_CONTAINER_DETAIL_ALLOC_TRAITS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -// move -#include -#include - -namespace boost { -namespace container { -namespace container_detail { - -template -inline void swap_alloc(AllocatorType &, AllocatorType &, container_detail::false_type) - BOOST_NOEXCEPT_OR_NOTHROW -{} - -template -inline void swap_alloc(AllocatorType &l, AllocatorType &r, container_detail::true_type) -{ boost::adl_move_swap(l, r); } - -template -inline void assign_alloc(AllocatorType &, const AllocatorType &, container_detail::false_type) - BOOST_NOEXCEPT_OR_NOTHROW -{} - -template -inline void assign_alloc(AllocatorType &l, const AllocatorType &r, container_detail::true_type) -{ l = r; } - -template -inline void move_alloc(AllocatorType &, AllocatorType &, container_detail::false_type) - BOOST_NOEXCEPT_OR_NOTHROW -{} - -template -inline void move_alloc(AllocatorType &l, AllocatorType &r, container_detail::true_type) -{ l = ::boost::move(r); } - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DETAIL_ALLOC_TRAITS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/alloc_lib.h b/contrib/libboost/boost_1_65_0/boost/container/detail/alloc_lib.h deleted file mode 100644 index 950ff722a52..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/alloc_lib.h +++ /dev/null @@ -1,314 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_ALLOC_LIB_EXT_H -#define BOOST_CONTAINER_ALLOC_LIB_EXT_H - -#include - -#ifdef _MSC_VER -#pragma warning (push) -#pragma warning (disable : 4127) -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/*!An forward iterator to traverse the elements of a memory chain container.*/ -typedef struct multialloc_node_impl -{ - struct multialloc_node_impl *next_node_ptr; -} boost_cont_memchain_node; - - -/*!An forward iterator to traverse the elements of a memory chain container.*/ -typedef struct multialloc_it_impl -{ - boost_cont_memchain_node *node_ptr; -} boost_cont_memchain_it; - -/*!Memory chain: A container holding memory portions allocated by boost_cont_multialloc_nodes - and boost_cont_multialloc_arrays functions.*/ -typedef struct boost_cont_memchain_impl -{ - size_t num_mem; - boost_cont_memchain_node root_node; - boost_cont_memchain_node *last_node_ptr; -} boost_cont_memchain; - -/*!Advances the iterator one position so that it points to the next element in the memory chain*/ -#define BOOST_CONTAINER_MEMIT_NEXT(IT) (IT.node_ptr = IT.node_ptr->next_node_ptr) - -/*!Returns the address of the memory chain currently pointed by the iterator*/ -#define BOOST_CONTAINER_MEMIT_ADDR(IT) ((void*)IT.node_ptr) - -/*!Initializer for an iterator pointing to the position before the first element*/ -#define BOOST_CONTAINER_MEMCHAIN_BEFORE_BEGIN_IT(PMEMCHAIN) { &((PMEMCHAIN)->root_node) } - -/*!Initializer for an iterator pointing to the first element*/ -#define BOOST_CONTAINER_MEMCHAIN_BEGIN_IT(PMEMCHAIN) {(PMEMCHAIN)->root_node.next_node_ptr } - -/*!Initializer for an iterator pointing to the last element*/ -#define BOOST_CONTAINER_MEMCHAIN_LAST_IT(PMEMCHAIN) {(PMEMCHAIN)->last_node_ptr } - -/*!Initializer for an iterator pointing to one past the last element (end iterator)*/ -#define BOOST_CONTAINER_MEMCHAIN_END_IT(PMEMCHAIN) {(boost_cont_memchain_node *)0 } - -/*!True if IT is the end iterator, false otherwise*/ -#define BOOST_CONTAINER_MEMCHAIN_IS_END_IT(PMEMCHAIN, IT) (!(IT).node_ptr) - -/*!The address of the first memory portion hold by the memory chain*/ -#define BOOST_CONTAINER_MEMCHAIN_FIRSTMEM(PMEMCHAIN)((void*)((PMEMCHAIN)->root_node.next_node_ptr)) - -/*!The address of the last memory portion hold by the memory chain*/ -#define BOOST_CONTAINER_MEMCHAIN_LASTMEM(PMEMCHAIN) ((void*)((PMEMCHAIN)->last_node_ptr)) - -/*!The number of memory portions hold by the memory chain*/ -#define BOOST_CONTAINER_MEMCHAIN_SIZE(PMEMCHAIN) ((PMEMCHAIN)->num_mem) - -/*!Initializes the memory chain from the first memory portion, the last memory - portion and number of portions obtained from another memory chain*/ -#define BOOST_CONTAINER_MEMCHAIN_INIT_FROM(PMEMCHAIN, FIRST, LAST, NUM)\ - (PMEMCHAIN)->last_node_ptr = (boost_cont_memchain_node *)(LAST), \ - (PMEMCHAIN)->root_node.next_node_ptr = (boost_cont_memchain_node *)(FIRST), \ - (PMEMCHAIN)->num_mem = (NUM);\ -/**/ - -/*!Default initializes a memory chain. Postconditions: begin iterator is end iterator, - the number of portions is zero.*/ -#define BOOST_CONTAINER_MEMCHAIN_INIT(PMEMCHAIN)\ - ((PMEMCHAIN)->root_node.next_node_ptr = 0, (PMEMCHAIN)->last_node_ptr = &((PMEMCHAIN)->root_node), (PMEMCHAIN)->num_mem = 0)\ -/**/ - -/*!True if the memory chain is empty (holds no memory portions*/ -#define BOOST_CONTAINER_MEMCHAIN_EMPTY(PMEMCHAIN)\ - ((PMEMCHAIN)->num_mem == 0)\ -/**/ - -/*!Inserts a new memory portions in the front of the chain*/ -#define BOOST_CONTAINER_MEMCHAIN_PUSH_BACK(PMEMCHAIN, MEM)\ - do{\ - boost_cont_memchain *____chain____ = (PMEMCHAIN);\ - boost_cont_memchain_node *____tmp_mem____ = (boost_cont_memchain_node *)(MEM);\ - ____chain____->last_node_ptr->next_node_ptr = ____tmp_mem____;\ - ____tmp_mem____->next_node_ptr = 0;\ - ____chain____->last_node_ptr = ____tmp_mem____;\ - ++____chain____->num_mem;\ - }while(0)\ -/**/ - -/*!Inserts a new memory portions in the back of the chain*/ -#define BOOST_CONTAINER_MEMCHAIN_PUSH_FRONT(PMEMCHAIN, MEM)\ - do{\ - boost_cont_memchain *____chain____ = (PMEMCHAIN);\ - boost_cont_memchain_node *____tmp_mem____ = (boost_cont_memchain_node *)(MEM);\ - boost_cont_memchain *____root____ = &((PMEMCHAIN)->root_node);\ - if(!____chain____->root_node.next_node_ptr){\ - ____chain____->last_node_ptr = ____tmp_mem____;\ - }\ - boost_cont_memchain_node *____old_first____ = ____root____->next_node_ptr;\ - ____tmp_mem____->next_node_ptr = ____old_first____;\ - ____root____->next_node_ptr = ____tmp_mem____;\ - ++____chain____->num_mem;\ - }while(0)\ -/**/ - -/*!Erases the memory portion after the portion pointed by BEFORE_IT from the memory chain*/ -/*!Precondition: BEFORE_IT must be a valid iterator of the memory chain and it can't be the end iterator*/ -#define BOOST_CONTAINER_MEMCHAIN_ERASE_AFTER(PMEMCHAIN, BEFORE_IT)\ - do{\ - boost_cont_memchain *____chain____ = (PMEMCHAIN);\ - boost_cont_memchain_node *____prev_node____ = (BEFORE_IT).node_ptr;\ - boost_cont_memchain_node *____erase_node____ = ____prev_node____->next_node_ptr;\ - if(____chain____->last_node_ptr == ____erase_node____){\ - ____chain____->last_node_ptr = &____chain____->root_node;\ - }\ - ____prev_node____->next_node_ptr = ____erase_node____->next_node_ptr;\ - --____chain____->num_mem;\ - }while(0)\ -/**/ - -/*!Erases the first portion from the memory chain. - Precondition: the memory chain must not be empty*/ -#define BOOST_CONTAINER_MEMCHAIN_POP_FRONT(PMEMCHAIN)\ - do{\ - boost_cont_memchain *____chain____ = (PMEMCHAIN);\ - boost_cont_memchain_node *____prev_node____ = &____chain____->root_node;\ - boost_cont_memchain_node *____erase_node____ = ____prev_node____->next_node_ptr;\ - if(____chain____->last_node_ptr == ____erase_node____){\ - ____chain____->last_node_ptr = &____chain____->root_node;\ - }\ - ____prev_node____->next_node_ptr = ____erase_node____->next_node_ptr;\ - --____chain____->num_mem;\ - }while(0)\ -/**/ - -/*!Joins two memory chains inserting the portions of the second chain at the back of the first chain*/ -/* -#define BOOST_CONTAINER_MEMCHAIN_SPLICE_BACK(PMEMCHAIN, PMEMCHAIN2)\ - do{\ - boost_cont_memchain *____chain____ = (PMEMCHAIN);\ - boost_cont_memchain *____chain2____ = (PMEMCHAIN2);\ - if(!____chain2____->root_node.next_node_ptr){\ - break;\ - }\ - else if(!____chain____->first_mem){\ - ____chain____->first_mem = ____chain2____->first_mem;\ - ____chain____->last_node_ptr = ____chain2____->last_node_ptr;\ - ____chain____->num_mem = ____chain2____->num_mem;\ - BOOST_CONTAINER_MEMCHAIN_INIT(*____chain2____);\ - }\ - else{\ - ____chain____->last_node_ptr->next_node_ptr = ____chain2____->first_mem;\ - ____chain____->last_node_ptr = ____chain2____->last_node_ptr;\ - ____chain____->num_mem += ____chain2____->num_mem;\ - }\ - }while(0)\*/ -/**/ - -/*!Joins two memory chains inserting the portions of the second chain at the back of the first chain*/ -#define BOOST_CONTAINER_MEMCHAIN_INCORPORATE_AFTER(PMEMCHAIN, BEFORE_IT, FIRST, BEFORELAST, NUM)\ - do{\ - boost_cont_memchain *____chain____ = (PMEMCHAIN);\ - boost_cont_memchain_node *____pnode____ = (BEFORE_IT).node_ptr;\ - boost_cont_memchain_node *____next____ = ____pnode____->next_node_ptr;\ - boost_cont_memchain_node *____first____ = (boost_cont_memchain_node *)(FIRST);\ - boost_cont_memchain_node *____blast____ = (boost_cont_memchain_node *)(BEFORELAST);\ - size_t ____num____ = (NUM);\ - if(!____num____){\ - break;\ - }\ - if(____pnode____ == ____chain____->last_node_ptr){\ - ____chain____->last_node_ptr = ____blast____;\ - }\ - ____pnode____->next_node_ptr = ____first____;\ - ____blast____->next_node_ptr = ____next____;\ - ____chain____->num_mem += ____num____;\ - }while(0)\ -/**/ - -/*!Indicates the all elements allocated by boost_cont_multialloc_nodes or boost_cont_multialloc_arrays - must be contiguous.*/ -#define DL_MULTIALLOC_ALL_CONTIGUOUS ((size_t)(-1)) - -/*!Indicates the number of contiguous elements allocated by boost_cont_multialloc_nodes or boost_cont_multialloc_arrays - should be selected by those functions.*/ -#define DL_MULTIALLOC_DEFAULT_CONTIGUOUS ((size_t)(0)) - -typedef struct boost_cont_malloc_stats_impl -{ - size_t max_system_bytes; - size_t system_bytes; - size_t in_use_bytes; -} boost_cont_malloc_stats_t; - -typedef unsigned int allocation_type; - -enum -{ - // constants for allocation commands - BOOST_CONTAINER_ALLOCATE_NEW = 0X01, - BOOST_CONTAINER_EXPAND_FWD = 0X02, - BOOST_CONTAINER_EXPAND_BWD = 0X04, - BOOST_CONTAINER_SHRINK_IN_PLACE = 0X08, - BOOST_CONTAINER_NOTHROW_ALLOCATION = 0X10, -// BOOST_CONTAINER_ZERO_MEMORY = 0X20, - BOOST_CONTAINER_TRY_SHRINK_IN_PLACE = 0X40, - BOOST_CONTAINER_EXPAND_BOTH = BOOST_CONTAINER_EXPAND_FWD | BOOST_CONTAINER_EXPAND_BWD, - BOOST_CONTAINER_EXPAND_OR_NEW = BOOST_CONTAINER_ALLOCATE_NEW | BOOST_CONTAINER_EXPAND_BOTH -}; - -//#define BOOST_CONTAINERDLMALLOC__FOOTERS -#ifndef BOOST_CONTAINERDLMALLOC__FOOTERS -enum { BOOST_CONTAINER_ALLOCATION_PAYLOAD = sizeof(size_t) }; -#else -enum { BOOST_CONTAINER_ALLOCATION_PAYLOAD = sizeof(size_t)*2 }; -#endif - -typedef struct boost_cont_command_ret_impl -{ - void *first; - int second; -}boost_cont_command_ret_t; - -size_t boost_cont_size(const void *p); - -void* boost_cont_malloc(size_t bytes); - -void boost_cont_free(void* mem); - -void* boost_cont_memalign(size_t bytes, size_t alignment); - -int boost_cont_multialloc_nodes - (size_t n_elements, size_t elem_size, size_t contiguous_elements, boost_cont_memchain *pchain); - -int boost_cont_multialloc_arrays - (size_t n_elements, const size_t *sizes, size_t sizeof_element, size_t contiguous_elements, boost_cont_memchain *pchain); - -void boost_cont_multidealloc(boost_cont_memchain *pchain); - -size_t boost_cont_footprint(); - -size_t boost_cont_allocated_memory(); - -size_t boost_cont_chunksize(const void *p); - -int boost_cont_all_deallocated(); - -boost_cont_malloc_stats_t boost_cont_malloc_stats(); - -size_t boost_cont_in_use_memory(); - -int boost_cont_trim(size_t pad); - -int boost_cont_mallopt(int parameter_number, int parameter_value); - -int boost_cont_grow - (void* oldmem, size_t minbytes, size_t maxbytes, size_t *received); - -int boost_cont_shrink - (void* oldmem, size_t minbytes, size_t maxbytes, size_t *received, int do_commit); - -void* boost_cont_alloc - (size_t minbytes, size_t preferred_bytes, size_t *received_bytes); - -int boost_cont_malloc_check(); - -boost_cont_command_ret_t boost_cont_allocation_command - ( allocation_type command - , size_t sizeof_object - , size_t limit_objects - , size_t preferred_objects - , size_t *received_objects - , void *reuse_ptr - ); - -void *boost_cont_sync_create(); - -void boost_cont_sync_destroy(void *sync); - -int boost_cont_sync_lock(void *sync); - -void boost_cont_sync_unlock(void *sync); - -int boost_cont_global_sync_lock(); - -void boost_cont_global_sync_unlock(); - -#ifdef __cplusplus -} //extern "C" { -#endif - -#ifdef _MSC_VER -#pragma warning (pop) -#endif - - -#endif //#define BOOST_CONTAINERDLMALLOC__EXT_H diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/allocation_type.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/allocation_type.hpp deleted file mode 100644 index 1e8aa673108..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/allocation_type.hpp +++ /dev/null @@ -1,58 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_ALLOCATION_TYPE_HPP -#define BOOST_CONTAINER_ALLOCATION_TYPE_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -enum allocation_type_v -{ - // constants for allocation commands - allocate_new_v = 0x01, - expand_fwd_v = 0x02, - expand_bwd_v = 0x04, -// expand_both = expand_fwd | expand_bwd, -// expand_or_new = allocate_new | expand_both, - shrink_in_place_v = 0x08, - nothrow_allocation_v = 0x10, - zero_memory_v = 0x20, - try_shrink_in_place_v = 0x40 -}; - -typedef unsigned int allocation_type; -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -static const allocation_type allocate_new = (allocation_type)allocate_new_v; -static const allocation_type expand_fwd = (allocation_type)expand_fwd_v; -static const allocation_type expand_bwd = (allocation_type)expand_bwd_v; -static const allocation_type shrink_in_place = (allocation_type)shrink_in_place_v; -static const allocation_type try_shrink_in_place= (allocation_type)try_shrink_in_place_v; -static const allocation_type nothrow_allocation = (allocation_type)nothrow_allocation_v; -static const allocation_type zero_memory = (allocation_type)zero_memory_v; - -} //namespace container { -} //namespace boost { - -#include - -#endif //BOOST_CONTAINER_ALLOCATION_TYPE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/allocator_version_traits.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/allocator_version_traits.hpp deleted file mode 100644 index 62492da0919..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/allocator_version_traits.hpp +++ /dev/null @@ -1,162 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2012-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_ALLOCATOR_VERSION_TRAITS_HPP -#define BOOST_CONTAINER_DETAIL_ALLOCATOR_VERSION_TRAITS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -#include //allocator_traits -#include -#include //multiallocation_chain -#include //version_type -#include //allocation_type -#include //integral_constant -#include //pointer_traits -#include //BOOST_TRY - -namespace boost { -namespace container { -namespace container_detail { - -template::value> -struct allocator_version_traits -{ - typedef ::boost::container::container_detail::integral_constant - alloc_version; - - typedef typename Allocator::multiallocation_chain multiallocation_chain; - - typedef typename boost::container::allocator_traits::pointer pointer; - typedef typename boost::container::allocator_traits::size_type size_type; - - //Node allocation interface - static pointer allocate_one(Allocator &a) - { return a.allocate_one(); } - - static void deallocate_one(Allocator &a, const pointer &p) - { a.deallocate_one(p); } - - static void allocate_individual(Allocator &a, size_type n, multiallocation_chain &m) - { return a.allocate_individual(n, m); } - - static void deallocate_individual(Allocator &a, multiallocation_chain &holder) - { a.deallocate_individual(holder); } - - static pointer allocation_command(Allocator &a, allocation_type command, - size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse) - { return a.allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse); } -}; - -template -struct allocator_version_traits -{ - typedef ::boost::container::container_detail::integral_constant - alloc_version; - - typedef typename boost::container::allocator_traits::pointer pointer; - typedef typename boost::container::allocator_traits::size_type size_type; - typedef typename boost::container::allocator_traits::value_type value_type; - - typedef typename boost::intrusive::pointer_traits:: - template rebind_pointer::type void_ptr; - typedef container_detail::basic_multiallocation_chain - multialloc_cached_counted; - typedef boost::container::container_detail:: - transform_multiallocation_chain - < multialloc_cached_counted, value_type> multiallocation_chain; - - //Node allocation interface - static pointer allocate_one(Allocator &a) - { return a.allocate(1); } - - static void deallocate_one(Allocator &a, const pointer &p) - { a.deallocate(p, 1); } - - static void deallocate_individual(Allocator &a, multiallocation_chain &holder) - { - size_type n = holder.size(); - typename multiallocation_chain::iterator it = holder.begin(); - while(n--){ - pointer p = boost::intrusive::pointer_traits::pointer_to(*it); - ++it; - a.deallocate(p, 1); - } - } - - struct allocate_individual_rollback - { - allocate_individual_rollback(Allocator &a, multiallocation_chain &chain) - : mr_a(a), mp_chain(&chain) - {} - - ~allocate_individual_rollback() - { - if(mp_chain) - allocator_version_traits::deallocate_individual(mr_a, *mp_chain); - } - - void release() - { - mp_chain = 0; - } - - Allocator &mr_a; - multiallocation_chain * mp_chain; - }; - - static void allocate_individual(Allocator &a, size_type n, multiallocation_chain &m) - { - allocate_individual_rollback rollback(a, m); - while(n--){ - m.push_front(a.allocate(1)); - } - rollback.release(); - } - - static pointer allocation_command(Allocator &a, allocation_type command, - size_type, size_type &prefer_in_recvd_out_size, pointer &reuse) - { - pointer ret = pointer(); - if(BOOST_UNLIKELY(!(command & allocate_new) && !(command & nothrow_allocation))){ - throw_logic_error("version 1 allocator without allocate_new flag"); - } - else{ - BOOST_TRY{ - ret = a.allocate(prefer_in_recvd_out_size); - } - BOOST_CATCH(...){ - if(!(command & nothrow_allocation)){ - BOOST_RETHROW - } - } - BOOST_CATCH_END - reuse = pointer(); - } - return ret; - } -}; - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#include - -#endif // ! defined(BOOST_CONTAINER_DETAIL_ALLOCATOR_VERSION_TRAITS_HPP) diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/auto_link.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/auto_link.hpp deleted file mode 100644 index 264b1ba1120..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/auto_link.hpp +++ /dev/null @@ -1,51 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2007-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_DETAIL_AUTO_LINK_HPP_INCLUDED -#define BOOST_CONTAINER_DETAIL_AUTO_LINK_HPP_INCLUDED - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -//Define BOOST_CONTAINER_DYNAMIC_LINKING which is independent from BOOST_*_NO_LIB -//and is needed is some tests that need to disable some checks (like operator new replacements) -//that don't work across DLL boundaries -#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CONTAINER_DYN_LINK) -# define BOOST_CONTAINER_DYNAMIC_LINKING -#endif - -// -// Automatically link to the correct build variant where possible. -// -#if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_CONTAINER_NO_LIB) && !defined(BOOST_CONTAINER_SOURCE) -// -// Set the name of our library, this will get undef'ed by auto_link.hpp -// once it's done with it: -// -#define BOOST_LIB_NAME boost_container - -// -// If we're importing code from a dll, then tell auto_link.hpp about it: -// -#if defined(BOOST_CONTAINER_DYNAMIC_LINKING) -# define BOOST_DYN_LINK -#endif - -// -// And include the header that does the work: -// -#include -#endif // auto-linking disabled - -#endif //#ifndef BOOST_CONTAINER_DETAIL_AUTO_LINK_HPP_INCLUDED diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/block_list.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/block_list.hpp deleted file mode 100644 index 1a6057cb4a7..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/block_list.hpp +++ /dev/null @@ -1,139 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_BLOCK_LIST_HEADER -#define BOOST_CONTAINER_DETAIL_BLOCK_LIST_HEADER - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace container { -namespace pmr { - -struct list_node -{ - list_node *next; - list_node *previous; -}; - -struct list_node_traits -{ - typedef list_node node; - typedef list_node* node_ptr; - typedef const list_node* const_node_ptr; - - static node_ptr get_next(const_node_ptr n) - { return n->next; } - - static node_ptr get_previous(const_node_ptr n) - { return n->previous; } - - static void set_next(const node_ptr & n, const node_ptr & next) - { n->next = next; } - - static void set_previous(const node_ptr & n, const node_ptr & previous) - { n->previous = previous; } -}; - -struct block_list_header - : public list_node -{ - std::size_t size; -}; - -typedef bi::circular_list_algorithms list_algo; - - -template -class block_list_base -{ - list_node m_list; - - static const std::size_t MaxAlignMinus1 = memory_resource::max_align-1u; - - public: - - static const std::size_t header_size = std::size_t(sizeof(DerivedFromBlockListHeader) + MaxAlignMinus1) & std::size_t(~MaxAlignMinus1); - - explicit block_list_base() - { list_algo::init_header(&m_list); } - - #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - block_list_base(const block_list_base&) = delete; - block_list_base operator=(const block_list_base&) = delete; - #else - private: - block_list_base (const block_list_base&); - block_list_base operator=(const block_list_base&); - public: - #endif - - ~block_list_base() - {} - - void *allocate(std::size_t size, memory_resource &mr) - { - if((size_t(-1) - header_size) < size) - throw_bad_alloc(); - void *p = mr.allocate(size+header_size); - block_list_header &mb = *::new((void*)p) DerivedFromBlockListHeader; - mb.size = size+header_size; - list_algo::link_after(&m_list, &mb); - return (char *)p + header_size; - } - - void deallocate(void *p, memory_resource &mr) BOOST_NOEXCEPT - { - DerivedFromBlockListHeader *pheader = static_cast - (static_cast((char*)p - header_size)); - list_algo::unlink(pheader); - const std::size_t size = pheader->size; - static_cast(pheader)->~DerivedFromBlockListHeader(); - mr.deallocate(pheader, size, memory_resource::max_align); - } - - void release(memory_resource &mr) BOOST_NOEXCEPT - { - list_node *n = list_algo::node_traits::get_next(&m_list); - while(n != &m_list){ - DerivedFromBlockListHeader &d = static_cast(*n); - n = list_algo::node_traits::get_next(n); - std::size_t size = d.size; - d.~DerivedFromBlockListHeader(); - mr.deallocate(reinterpret_cast(&d), size, memory_resource::max_align); - } - list_algo::init_header(&m_list); - } -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#include - -#endif //BOOST_CONTAINER_DETAIL_BLOCK_LIST_HEADER diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/block_slist.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/block_slist.hpp deleted file mode 100644 index 278e6414a74..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/block_slist.hpp +++ /dev/null @@ -1,157 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_BLOCK_SLIST_HEADER -#define BOOST_CONTAINER_DETAIL_BLOCK_SLIST_HEADER - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -namespace boost { -namespace container { -namespace pmr { - -struct slist_node -{ - slist_node *next; -}; - -struct slist_node_traits -{ - typedef slist_node node; - typedef slist_node* node_ptr; - typedef const slist_node* const_node_ptr; - - static node_ptr get_next(const_node_ptr n) - { return n->next; } - - static void set_next(const node_ptr & n, const node_ptr & next) - { n->next = next; } -}; - -struct block_slist_header - : public slist_node -{ - std::size_t size; -}; - -typedef bi::linear_slist_algorithms slist_algo; - -template -class block_slist_base -{ - slist_node m_slist; - - static const std::size_t MaxAlignMinus1 = memory_resource::max_align-1u; - - public: - - static const std::size_t header_size = std::size_t(sizeof(DerivedFromBlockSlistHeader) + MaxAlignMinus1) & std::size_t(~MaxAlignMinus1); - - explicit block_slist_base() - { slist_algo::init_header(&m_slist); } - - #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - block_slist_base(const block_slist_base&) = delete; - block_slist_base operator=(const block_slist_base&) = delete; - #else - private: - block_slist_base (const block_slist_base&); - block_slist_base operator=(const block_slist_base&); - public: - #endif - - ~block_slist_base() - {} - - void *allocate(std::size_t size, memory_resource &mr) - { - if((size_t(-1) - header_size) < size) - throw_bad_alloc(); - void *p = mr.allocate(size+header_size); - block_slist_header &mb = *::new((void*)p) DerivedFromBlockSlistHeader; - mb.size = size+header_size; - slist_algo::link_after(&m_slist, &mb); - return (char *)p + header_size; - } - - void release(memory_resource &mr) BOOST_NOEXCEPT - { - slist_node *n = slist_algo::node_traits::get_next(&m_slist); - while(n){ - DerivedFromBlockSlistHeader &d = static_cast(*n); - n = slist_algo::node_traits::get_next(n); - std::size_t size = d.block_slist_header::size; - d.~DerivedFromBlockSlistHeader(); - mr.deallocate(reinterpret_cast(&d), size, memory_resource::max_align); - } - slist_algo::init_header(&m_slist); - } -}; - -class block_slist - : public block_slist_base<> -{ - memory_resource &m_upstream_rsrc; - - public: - - explicit block_slist(memory_resource &upstream_rsrc) - : block_slist_base<>(), m_upstream_rsrc(upstream_rsrc) - {} - - #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - block_slist(const block_slist&) = delete; - block_slist operator=(const block_slist&) = delete; - #else - private: - block_slist (const block_slist&); - block_slist operator=(const block_slist&); - public: - #endif - - ~block_slist() - { this->release(); } - - void *allocate(std::size_t size) - { return this->block_slist_base<>::allocate(size, m_upstream_rsrc); } - - void release() BOOST_NOEXCEPT - { return this->block_slist_base<>::release(m_upstream_rsrc); } - - memory_resource& upstream_resource() const BOOST_NOEXCEPT - { return m_upstream_rsrc; } -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#include - -#endif //BOOST_CONTAINER_DETAIL_BLOCK_SLIST_HEADER diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/compare_functors.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/compare_functors.hpp deleted file mode 100644 index 28f9093b9a4..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/compare_functors.hpp +++ /dev/null @@ -1,74 +0,0 @@ -/////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2014-2014. 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_COMPARE_FUNCTORS_HPP -#define BOOST_CONTAINER_DETAIL_COMPARE_FUNCTORS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -namespace boost { -namespace container { - -template -class equal_to_value -{ - typedef typename Allocator::value_type value_type; - const value_type &t_; - - public: - explicit equal_to_value(const value_type &t) - : t_(t) - {} - - bool operator()(const value_type &t)const - { return t_ == t; } -}; - -template -struct value_to_node_compare - : Pred -{ - typedef Pred predicate_type; - typedef Node node_type; - - value_to_node_compare() - : Pred() - {} - - explicit value_to_node_compare(Pred pred) - : Pred(pred) - {} - - bool operator()(const Node &a, const Node &b) const - { return static_cast(*this)(a.get_data(), b.get_data()); } - - bool operator()(const Node &a) const - { return static_cast(*this)(a.get_data()); } - - bool operator()(const Node &a, const Node &b) - { return static_cast(*this)(a.get_data(), b.get_data()); } - - bool operator()(const Node &a) - { return static_cast(*this)(a.get_data()); } - - predicate_type & predicate() { return static_cast(*this); } - const predicate_type & predicate() const { return static_cast(*this); } -}; - -} //namespace container { -} //namespace boost { - -#endif //BOOST_CONTAINER_DETAIL_COMPARE_FUNCTORS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/config_begin.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/config_begin.hpp deleted file mode 100644 index 4df9e35d8bc..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/config_begin.hpp +++ /dev/null @@ -1,53 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_CONFIG_INCLUDED -#define BOOST_CONTAINER_CONTAINER_DETAIL_CONFIG_INCLUDED -#ifndef BOOST_CONFIG_HPP -#include -#endif - -#endif //BOOST_CONTAINER_CONTAINER_DETAIL_CONFIG_INCLUDED - -#ifdef BOOST_MSVC - #pragma warning (push) - #pragma warning (disable : 4127) // conditional expression is constant - #pragma warning (disable : 4146) // unary minus operator applied to unsigned type, result still unsigned - #pragma warning (disable : 4197) // top-level volatile in cast is ignored - #pragma warning (disable : 4244) // possible loss of data - #pragma warning (disable : 4251) // "identifier" : class "type" needs to have dll-interface to be used by clients of class "type2" - #pragma warning (disable : 4267) // conversion from "X" to "Y", possible loss of data - #pragma warning (disable : 4275) // non DLL-interface classkey "identifier" used as base for DLL-interface classkey "identifier" - #pragma warning (disable : 4284) // odd return type for operator-> - #pragma warning (disable : 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow) - #pragma warning (disable : 4324) // structure was padded due to __declspec(align( - #pragma warning (disable : 4345) // behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized - #pragma warning (disable : 4355) // "this" : used in base member initializer list - #pragma warning (disable : 4503) // "identifier" : decorated name length exceeded, name was truncated - #pragma warning (disable : 4510) // default constructor could not be generated - #pragma warning (disable : 4511) // copy constructor could not be generated - #pragma warning (disable : 4512) // assignment operator could not be generated - #pragma warning (disable : 4514) // unreferenced inline removed - #pragma warning (disable : 4521) // Disable "multiple copy constructors specified" - #pragma warning (disable : 4522) // "class" : multiple assignment operators specified - #pragma warning (disable : 4541) // 'typeid' used on polymorphic type '' with /GR-; unpredictable behavior may result - #pragma warning (disable : 4584) // X is already a base-class of Y - #pragma warning (disable : 4610) // struct can never be instantiated - user defined constructor required - #pragma warning (disable : 4671) // the copy constructor is inaccessible - #pragma warning (disable : 4673) // throwing '' the following types will not be considered at the catch site - #pragma warning (disable : 4675) // "method" should be declared "static" and have exactly one parameter - #pragma warning (disable : 4702) // unreachable code - #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 - #pragma warning (disable : 4711) // function selected for automatic inline expansion - #pragma warning (disable : 4786) // identifier truncated in debug info - #pragma warning (disable : 4996) // "function": was declared deprecated - -#endif //BOOST_MSVC diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/config_end.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/config_end.hpp deleted file mode 100644 index f93c8f6f79b..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/config_end.hpp +++ /dev/null @@ -1,13 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#if defined BOOST_MSVC - #pragma warning (pop) -#endif - diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/construct_in_place.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/construct_in_place.hpp deleted file mode 100644 index 9fecd24a8fd..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/construct_in_place.hpp +++ /dev/null @@ -1,96 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2014-2014. -// -// 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_CONSTRUCT_IN_PLACE_HPP -#define BOOST_CONTAINER_DETAIL_CONSTRUCT_IN_PLACE_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include - -namespace boost { -namespace container { - -//In place construction - -template -BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T* dest, InpIt source) -{ boost::container::allocator_traits::construct(a, dest, *source); } - -template -BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, value_init_construct_iterator) -{ - boost::container::allocator_traits::construct(a, dest); -} - -template -class default_init_construct_iterator; - -template -BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, default_init_construct_iterator) -{ - boost::container::allocator_traits::construct(a, dest, default_init); -} - -template -class emplace_iterator; - -template -BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, emplace_iterator ei) -{ - ei.construct_in_place(a, dest); -} - -//Assignment - -template -BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, InpIt source) -{ *dest = *source; } - -template -BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, value_init_construct_iterator) -{ - container_detail::value_init val; - *dest = boost::move(val.get()); -} - -template -class default_init_construct_iterator; - -template -BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, default_init_construct_iterator) -{ - U u; - *dest = boost::move(u); -} - -template -class emplace_iterator; - -template -BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, emplace_iterator ei) -{ - ei.assign_in_place(dest); -} - -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DETAIL_CONSTRUCT_IN_PLACE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/copy_move_algo.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/copy_move_algo.hpp deleted file mode 100644 index 9044960e79e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/copy_move_algo.hpp +++ /dev/null @@ -1,1160 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_DETAIL_COPY_MOVE_ALGO_HPP -#define BOOST_CONTAINER_DETAIL_COPY_MOVE_ALGO_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -// container -#include -// container/detail -#include -#include -#include -#include -#include - -// move -#include -#include -#include -// other -#include -// std -#include //for emmove/memcpy - -namespace boost { -namespace container { -namespace container_detail { - -template -struct are_elements_contiguous -{ - static const bool value = false; -}; - -///////////////////////// -// raw pointers -///////////////////////// - -template -struct are_elements_contiguous -{ - static const bool value = true; -}; - -///////////////////////// -// move iterators -///////////////////////// - -template -struct are_elements_contiguous< ::boost::move_iterator > - : are_elements_contiguous -{}; - -///////////////////////// -// predeclarations -///////////////////////// - -#ifndef BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER - -template -class vector_iterator; - -template -class vector_const_iterator; - -#endif //BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER - -} //namespace container_detail { -} //namespace container { - -namespace interprocess { - -template -class offset_ptr; - -} //namespace interprocess { - -namespace container { - -namespace container_detail { - -///////////////////////// -//vector_[const_]iterator -///////////////////////// - -#ifndef BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER - -template -struct are_elements_contiguous > -{ - static const bool value = true; -}; - -template -struct are_elements_contiguous > -{ - static const bool value = true; -}; - -#endif //BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER - -///////////////////////// -// offset_ptr -///////////////////////// - -template -struct are_elements_contiguous< ::boost::interprocess::offset_ptr > -{ - static const bool value = true; -}; - -template -struct are_contiguous_and_same - : boost::move_detail::and_ - < are_elements_contiguous - , are_elements_contiguous - , is_same< typename remove_const< typename ::boost::container::iterator_traits::value_type >::type - , typename ::boost::container::iterator_traits::value_type - > - > -{}; - -template -struct is_memtransfer_copy_assignable - : boost::move_detail::and_ - < are_contiguous_and_same - , container_detail::is_trivially_copy_assignable< typename ::boost::container::iterator_traits::value_type > - > -{}; - -template -struct is_memtransfer_copy_constructible - : boost::move_detail::and_ - < are_contiguous_and_same - , container_detail::is_trivially_copy_constructible< typename ::boost::container::iterator_traits::value_type > - > -{}; - -template -struct enable_if_memtransfer_copy_constructible - : enable_if, R> -{}; - -template -struct disable_if_memtransfer_copy_constructible - : disable_if, R> -{}; - -template -struct enable_if_memtransfer_copy_assignable - : enable_if, R> -{}; - -template -struct disable_if_memtransfer_copy_assignable - : disable_if, R> -{}; - -template - // F models ForwardIterator -inline F memmove(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW -{ - typedef typename boost::container::iterator_traits::value_type value_type; - typename boost::container::iterator_traits::difference_type n = boost::container::iterator_distance(f, l); - if(n){ - std::memmove(boost::movelib::iterator_to_raw_pointer(r), boost::movelib::iterator_to_raw_pointer(f), sizeof(value_type)*n); - boost::container::iterator_advance(r, n); - } - return r; -} - -template - // F models ForwardIterator -F memmove_n(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW -{ - typedef typename boost::container::iterator_traits::value_type value_type; - if(n){ - std::memmove(boost::movelib::iterator_to_raw_pointer(r), boost::movelib::iterator_to_raw_pointer(f), sizeof(value_type)*n); - boost::container::iterator_advance(r, n); - } - return r; -} - -template - // F models ForwardIterator -I memmove_n_source(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW -{ - if(n){ - typedef typename boost::container::iterator_traits::value_type value_type; - std::memmove(boost::movelib::iterator_to_raw_pointer(r), boost::movelib::iterator_to_raw_pointer(f), sizeof(value_type)*n); - boost::container::iterator_advance(f, n); - } - return f; -} - -template - // F models ForwardIterator -I memmove_n_source_dest(I f, U n, F &r) BOOST_NOEXCEPT_OR_NOTHROW -{ - typedef typename boost::container::iterator_traits::value_type value_type; - if(n){ - std::memmove(boost::movelib::iterator_to_raw_pointer(r), boost::movelib::iterator_to_raw_pointer(f), sizeof(value_type)*n); - boost::container::iterator_advance(f, n); - boost::container::iterator_advance(r, n); - } - return f; -} - -template -struct is_memzero_initializable -{ - typedef typename ::boost::container::iterator_traits::value_type value_type; - static const bool value = are_elements_contiguous::value && - ( container_detail::is_integral::value || container_detail::is_enum::value - #if defined(BOOST_CONTAINER_MEMZEROED_POINTER_IS_NULL) - || container_detail::is_pointer::value - #endif - #if defined(BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_ZERO) - || container_detail::is_floating_point::value - #endif - #if defined(BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_ZERO) && defined(BOOST_CONTAINER_MEMZEROED_POINTER_IS_NULL) - || container_detail::is_pod::value - #endif - ); -}; - -template -struct enable_if_memzero_initializable - : enable_if_c::value, R> -{}; - -template -struct disable_if_memzero_initializable - : enable_if_c::value, R> -{}; - -template -struct enable_if_trivially_destructible - : enable_if_c < container_detail::is_trivially_destructible - ::value_type>::value - , R> -{}; - -template -struct disable_if_trivially_destructible - : enable_if_c ::value_type>::value - , R> -{}; - -} //namespace container_detail { - -////////////////////////////////////////////////////////////////////////////// -// -// uninitialized_move_alloc -// -////////////////////////////////////////////////////////////////////////////// - - -//! Effects: -//! \code -//! for (; f != l; ++r, ++f) -//! allocator_traits::construct(a, &*r, boost::move(*f)); -//! \endcode -//! -//! Returns: r -template - // F models ForwardIterator -inline typename container_detail::disable_if_memtransfer_copy_constructible::type - uninitialized_move_alloc(Allocator &a, I f, I l, F r) -{ - F back = r; - BOOST_TRY{ - while (f != l) { - allocator_traits::construct(a, boost::movelib::iterator_to_raw_pointer(r), boost::move(*f)); - ++f; ++r; - } - } - BOOST_CATCH(...){ - for (; back != r; ++back){ - allocator_traits::destroy(a, boost::movelib::iterator_to_raw_pointer(back)); - } - BOOST_RETHROW; - } - BOOST_CATCH_END - return r; -} - -template - // F models ForwardIterator -inline typename container_detail::enable_if_memtransfer_copy_constructible::type - uninitialized_move_alloc(Allocator &, I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW -{ return container_detail::memmove(f, l, r); } - -////////////////////////////////////////////////////////////////////////////// -// -// uninitialized_move_alloc_n -// -////////////////////////////////////////////////////////////////////////////// - -//! Effects: -//! \code -//! for (; n--; ++r, ++f) -//! allocator_traits::construct(a, &*r, boost::move(*f)); -//! \endcode -//! -//! Returns: r -template - // F models ForwardIterator -inline typename container_detail::disable_if_memtransfer_copy_constructible::type - uninitialized_move_alloc_n(Allocator &a, I f, typename boost::container::allocator_traits::size_type n, F r) -{ - F back = r; - BOOST_TRY{ - while (n--) { - allocator_traits::construct(a, boost::movelib::iterator_to_raw_pointer(r), boost::move(*f)); - ++f; ++r; - } - } - BOOST_CATCH(...){ - for (; back != r; ++back){ - allocator_traits::destroy(a, boost::movelib::iterator_to_raw_pointer(back)); - } - BOOST_RETHROW; - } - BOOST_CATCH_END - return r; -} - -template - // F models ForwardIterator -inline typename container_detail::enable_if_memtransfer_copy_constructible::type - uninitialized_move_alloc_n(Allocator &, I f, typename boost::container::allocator_traits::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW -{ return container_detail::memmove_n(f, n, r); } - -////////////////////////////////////////////////////////////////////////////// -// -// uninitialized_move_alloc_n_source -// -////////////////////////////////////////////////////////////////////////////// - -//! Effects: -//! \code -//! for (; n--; ++r, ++f) -//! allocator_traits::construct(a, &*r, boost::move(*f)); -//! \endcode -//! -//! Returns: f (after incremented) -template - // F models ForwardIterator -inline typename container_detail::disable_if_memtransfer_copy_constructible::type - uninitialized_move_alloc_n_source(Allocator &a, I f, typename boost::container::allocator_traits::size_type n, F r) -{ - F back = r; - BOOST_TRY{ - while (n--) { - allocator_traits::construct(a, boost::movelib::iterator_to_raw_pointer(r), boost::move(*f)); - ++f; ++r; - } - } - BOOST_CATCH(...){ - for (; back != r; ++back){ - allocator_traits::destroy(a, boost::movelib::iterator_to_raw_pointer(back)); - } - BOOST_RETHROW; - } - BOOST_CATCH_END - return f; -} - -template - // F models ForwardIterator -inline typename container_detail::enable_if_memtransfer_copy_constructible::type - uninitialized_move_alloc_n_source(Allocator &, I f, typename boost::container::allocator_traits::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW -{ return container_detail::memmove_n_source(f, n, r); } - -////////////////////////////////////////////////////////////////////////////// -// -// uninitialized_copy_alloc -// -////////////////////////////////////////////////////////////////////////////// - -//! Effects: -//! \code -//! for (; f != l; ++r, ++f) -//! allocator_traits::construct(a, &*r, *f); -//! \endcode -//! -//! Returns: r -template - // F models ForwardIterator -inline typename container_detail::disable_if_memtransfer_copy_constructible::type - uninitialized_copy_alloc(Allocator &a, I f, I l, F r) -{ - F back = r; - BOOST_TRY{ - while (f != l) { - allocator_traits::construct(a, boost::movelib::iterator_to_raw_pointer(r), *f); - ++f; ++r; - } - } - BOOST_CATCH(...){ - for (; back != r; ++back){ - allocator_traits::destroy(a, boost::movelib::iterator_to_raw_pointer(back)); - } - BOOST_RETHROW; - } - BOOST_CATCH_END - return r; -} - -template - // F models ForwardIterator -inline typename container_detail::enable_if_memtransfer_copy_constructible::type - uninitialized_copy_alloc(Allocator &, I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW -{ return container_detail::memmove(f, l, r); } - -////////////////////////////////////////////////////////////////////////////// -// -// uninitialized_copy_alloc_n -// -////////////////////////////////////////////////////////////////////////////// - -//! Effects: -//! \code -//! for (; n--; ++r, ++f) -//! allocator_traits::construct(a, &*r, *f); -//! \endcode -//! -//! Returns: r -template - // F models ForwardIterator -inline typename container_detail::disable_if_memtransfer_copy_constructible::type - uninitialized_copy_alloc_n(Allocator &a, I f, typename boost::container::allocator_traits::size_type n, F r) -{ - F back = r; - BOOST_TRY{ - while (n--) { - allocator_traits::construct(a, boost::movelib::iterator_to_raw_pointer(r), *f); - ++f; ++r; - } - } - BOOST_CATCH(...){ - for (; back != r; ++back){ - allocator_traits::destroy(a, boost::movelib::iterator_to_raw_pointer(back)); - } - BOOST_RETHROW; - } - BOOST_CATCH_END - return r; -} - -template - // F models ForwardIterator -inline typename container_detail::enable_if_memtransfer_copy_constructible::type - uninitialized_copy_alloc_n(Allocator &, I f, typename boost::container::allocator_traits::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW -{ return container_detail::memmove_n(f, n, r); } - -////////////////////////////////////////////////////////////////////////////// -// -// uninitialized_copy_alloc_n_source -// -////////////////////////////////////////////////////////////////////////////// - -//! Effects: -//! \code -//! for (; n--; ++r, ++f) -//! allocator_traits::construct(a, &*r, *f); -//! \endcode -//! -//! Returns: f (after incremented) -template - // F models ForwardIterator -inline typename container_detail::disable_if_memtransfer_copy_constructible::type - uninitialized_copy_alloc_n_source(Allocator &a, I f, typename boost::container::allocator_traits::size_type n, F r) -{ - F back = r; - BOOST_TRY{ - while (n--) { - boost::container::construct_in_place(a, boost::movelib::iterator_to_raw_pointer(r), f); - ++f; ++r; - } - } - BOOST_CATCH(...){ - for (; back != r; ++back){ - allocator_traits::destroy(a, boost::movelib::iterator_to_raw_pointer(back)); - } - BOOST_RETHROW; - } - BOOST_CATCH_END - return f; -} - -template - // F models ForwardIterator -inline typename container_detail::enable_if_memtransfer_copy_constructible::type - uninitialized_copy_alloc_n_source(Allocator &, I f, typename boost::container::allocator_traits::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW -{ return container_detail::memmove_n_source(f, n, r); } - -////////////////////////////////////////////////////////////////////////////// -// -// uninitialized_value_init_alloc_n -// -////////////////////////////////////////////////////////////////////////////// - -//! Effects: -//! \code -//! for (; n--; ++r, ++f) -//! allocator_traits::construct(a, &*r); -//! \endcode -//! -//! Returns: r -template - // F models ForwardIterator -inline typename container_detail::disable_if_memzero_initializable::type - uninitialized_value_init_alloc_n(Allocator &a, typename boost::container::allocator_traits::size_type n, F r) -{ - F back = r; - BOOST_TRY{ - while (n--) { - allocator_traits::construct(a, boost::movelib::iterator_to_raw_pointer(r)); - ++r; - } - } - BOOST_CATCH(...){ - for (; back != r; ++back){ - allocator_traits::destroy(a, boost::movelib::iterator_to_raw_pointer(back)); - } - BOOST_RETHROW; - } - BOOST_CATCH_END - return r; -} - -template - // F models ForwardIterator -inline typename container_detail::enable_if_memzero_initializable::type - uninitialized_value_init_alloc_n(Allocator &, typename boost::container::allocator_traits::size_type n, F r) -{ - typedef typename boost::container::iterator_traits::value_type value_type; - std::memset((void*)boost::movelib::iterator_to_raw_pointer(r), 0, sizeof(value_type)*n); - boost::container::iterator_advance(r, n); - return r; -} - -////////////////////////////////////////////////////////////////////////////// -// -// uninitialized_default_init_alloc_n -// -////////////////////////////////////////////////////////////////////////////// - -//! Effects: -//! \code -//! for (; n--; ++r, ++f) -//! allocator_traits::construct(a, &*r); -//! \endcode -//! -//! Returns: r -template - // F models ForwardIterator -inline F uninitialized_default_init_alloc_n(Allocator &a, typename boost::container::allocator_traits::size_type n, F r) -{ - F back = r; - BOOST_TRY{ - while (n--) { - allocator_traits::construct(a, boost::movelib::iterator_to_raw_pointer(r), default_init); - ++r; - } - } - BOOST_CATCH(...){ - for (; back != r; ++back){ - allocator_traits::destroy(a, boost::movelib::iterator_to_raw_pointer(back)); - } - BOOST_RETHROW; - } - BOOST_CATCH_END - return r; -} - -////////////////////////////////////////////////////////////////////////////// -// -// uninitialized_fill_alloc -// -////////////////////////////////////////////////////////////////////////////// - -//! Effects: -//! \code -//! for (; f != l; ++r, ++f) -//! allocator_traits::construct(a, &*r, *f); -//! \endcode -//! -//! Returns: r -template - -inline void uninitialized_fill_alloc(Allocator &a, F f, F l, const T &t) -{ - F back = f; - BOOST_TRY{ - while (f != l) { - allocator_traits::construct(a, boost::movelib::iterator_to_raw_pointer(f), t); - ++f; - } - } - BOOST_CATCH(...){ - for (; back != l; ++back){ - allocator_traits::destroy(a, boost::movelib::iterator_to_raw_pointer(back)); - } - BOOST_RETHROW; - } - BOOST_CATCH_END -} - - -////////////////////////////////////////////////////////////////////////////// -// -// uninitialized_fill_alloc_n -// -////////////////////////////////////////////////////////////////////////////// - -//! Effects: -//! \code -//! for (; n--; ++r, ++f) -//! allocator_traits::construct(a, &*r, v); -//! \endcode -//! -//! Returns: r -template - // F models ForwardIterator -inline F uninitialized_fill_alloc_n(Allocator &a, const T &v, typename boost::container::allocator_traits::size_type n, F r) -{ - F back = r; - BOOST_TRY{ - while (n--) { - allocator_traits::construct(a, boost::movelib::iterator_to_raw_pointer(r), v); - ++r; - } - } - BOOST_CATCH(...){ - for (; back != r; ++back){ - allocator_traits::destroy(a, boost::movelib::iterator_to_raw_pointer(back)); - } - BOOST_RETHROW; - } - BOOST_CATCH_END - return r; -} - -////////////////////////////////////////////////////////////////////////////// -// -// copy -// -////////////////////////////////////////////////////////////////////////////// - -template - // F models ForwardIterator -inline typename container_detail::disable_if_memtransfer_copy_assignable::type - copy(I f, I l, F r) -{ - while (f != l) { - *r = *f; - ++f; ++r; - } - return r; -} - -template - // F models ForwardIterator -inline typename container_detail::enable_if_memtransfer_copy_assignable::type - copy(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW -{ return container_detail::memmove(f, l, r); } - -////////////////////////////////////////////////////////////////////////////// -// -// copy_n -// -////////////////////////////////////////////////////////////////////////////// - -template - // F models ForwardIterator -inline typename container_detail::disable_if_memtransfer_copy_assignable::type - copy_n(I f, U n, F r) -{ - while (n--) { - *r = *f; - ++f; ++r; - } - return r; -} - -template - // F models ForwardIterator -inline typename container_detail::enable_if_memtransfer_copy_assignable::type - copy_n(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW -{ return container_detail::memmove_n(f, n, r); } - -////////////////////////////////////////////////////////////////////////////// -// -// copy_n_source -// -////////////////////////////////////////////////////////////////////////////// - -template - // F models ForwardIterator -inline typename container_detail::disable_if_memtransfer_copy_assignable::type - copy_n_source(I f, U n, F r) -{ - while (n--) { - boost::container::assign_in_place(r, f); - ++f; ++r; - } - return f; -} - -template - // F models ForwardIterator -inline typename container_detail::enable_if_memtransfer_copy_assignable::type - copy_n_source(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW -{ return container_detail::memmove_n_source(f, n, r); } - -////////////////////////////////////////////////////////////////////////////// -// -// copy_n_source_dest -// -////////////////////////////////////////////////////////////////////////////// - -template - // F models ForwardIterator -inline typename container_detail::disable_if_memtransfer_copy_assignable::type - copy_n_source_dest(I f, U n, F &r) -{ - while (n--) { - *r = *f; - ++f; ++r; - } - return f; -} - -template - // F models ForwardIterator -inline typename container_detail::enable_if_memtransfer_copy_assignable::type - copy_n_source_dest(I f, U n, F &r) BOOST_NOEXCEPT_OR_NOTHROW -{ return container_detail::memmove_n_source_dest(f, n, r); } - -////////////////////////////////////////////////////////////////////////////// -// -// move -// -////////////////////////////////////////////////////////////////////////////// - -template - // F models ForwardIterator -inline typename container_detail::disable_if_memtransfer_copy_assignable::type - move(I f, I l, F r) -{ - while (f != l) { - *r = ::boost::move(*f); - ++f; ++r; - } - return r; -} - -template - // F models ForwardIterator -inline typename container_detail::enable_if_memtransfer_copy_assignable::type - move(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW -{ return container_detail::memmove(f, l, r); } - -////////////////////////////////////////////////////////////////////////////// -// -// move_n -// -////////////////////////////////////////////////////////////////////////////// - -template - // F models ForwardIterator -inline typename container_detail::disable_if_memtransfer_copy_assignable::type - move_n(I f, U n, F r) -{ - while (n--) { - *r = ::boost::move(*f); - ++f; ++r; - } - return r; -} - -template - // F models ForwardIterator -inline typename container_detail::enable_if_memtransfer_copy_assignable::type - move_n(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW -{ return container_detail::memmove_n(f, n, r); } - - -////////////////////////////////////////////////////////////////////////////// -// -// move_backward -// -////////////////////////////////////////////////////////////////////////////// - -template - // F models ForwardIterator -inline typename container_detail::disable_if_memtransfer_copy_assignable::type - move_backward(I f, I l, F r) -{ - while (f != l) { - --l; --r; - *r = ::boost::move(*l); - } - return r; -} - -template - // F models ForwardIterator -inline typename container_detail::enable_if_memtransfer_copy_assignable::type - move_backward(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW -{ - typedef typename boost::container::iterator_traits::value_type value_type; - const typename boost::container::iterator_traits::difference_type n = boost::container::iterator_distance(f, l); - r -= n; - std::memmove((boost::movelib::iterator_to_raw_pointer)(r), (boost::movelib::iterator_to_raw_pointer)(f), sizeof(value_type)*n); - return r; -} - -////////////////////////////////////////////////////////////////////////////// -// -// move_n_source_dest -// -////////////////////////////////////////////////////////////////////////////// - -template - // F models ForwardIterator -inline typename container_detail::disable_if_memtransfer_copy_assignable::type - move_n_source_dest(I f, U n, F &r) -{ - while (n--) { - *r = ::boost::move(*f); - ++f; ++r; - } - return f; -} - -template - // F models ForwardIterator -inline typename container_detail::enable_if_memtransfer_copy_assignable::type - move_n_source_dest(I f, U n, F &r) BOOST_NOEXCEPT_OR_NOTHROW -{ return container_detail::memmove_n_source_dest(f, n, r); } - -////////////////////////////////////////////////////////////////////////////// -// -// move_n_source -// -////////////////////////////////////////////////////////////////////////////// - -template - // F models ForwardIterator -inline typename container_detail::disable_if_memtransfer_copy_assignable::type - move_n_source(I f, U n, F r) -{ - while (n--) { - *r = ::boost::move(*f); - ++f; ++r; - } - return f; -} - -template - // F models ForwardIterator -inline typename container_detail::enable_if_memtransfer_copy_assignable::type - move_n_source(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW -{ return container_detail::memmove_n_source(f, n, r); } - -////////////////////////////////////////////////////////////////////////////// -// -// destroy_alloc_n -// -////////////////////////////////////////////////////////////////////////////// - -template - // U models unsigned integral constant -inline typename container_detail::disable_if_trivially_destructible::type - destroy_alloc_n(Allocator &a, I f, U n) -{ - while(n){ - --n; - allocator_traits::destroy(a, boost::movelib::iterator_to_raw_pointer(f)); - ++f; - } -} - -template - // U models unsigned integral constant -inline typename container_detail::enable_if_trivially_destructible::type - destroy_alloc_n(Allocator &, I, U) -{} - -////////////////////////////////////////////////////////////////////////////// -// -// deep_swap_alloc_n -// -////////////////////////////////////////////////////////////////////////////// - -template - -inline typename container_detail::disable_if_memtransfer_copy_assignable::type - deep_swap_alloc_n( Allocator &a, F short_range_f, typename allocator_traits::size_type n_i - , G large_range_f, typename allocator_traits::size_type n_j) -{ - typename allocator_traits::size_type n = 0; - for (; n != n_i ; ++short_range_f, ++large_range_f, ++n){ - boost::adl_move_swap(*short_range_f, *large_range_f); - } - boost::container::uninitialized_move_alloc_n(a, large_range_f, n_j - n_i, short_range_f); // may throw - boost::container::destroy_alloc_n(a, large_range_f, n_j - n_i); -} - -static const std::size_t DeepSwapAllocNMaxStorage = std::size_t(1) << std::size_t(11); //2K bytes - -template - -inline typename container_detail::enable_if_c - < container_detail::is_memtransfer_copy_assignable::value && (MaxTmpBytes <= DeepSwapAllocNMaxStorage) && false - , void>::type - deep_swap_alloc_n( Allocator &a, F short_range_f, typename allocator_traits::size_type n_i - , G large_range_f, typename allocator_traits::size_type n_j) -{ - typedef typename allocator_traits::value_type value_type; - typedef typename container_detail::aligned_storage - ::value>::type storage_type; - storage_type storage; - - const std::size_t n_i_bytes = sizeof(value_type)*n_i; - void *const large_ptr = static_cast(boost::movelib::iterator_to_raw_pointer(large_range_f)); - void *const short_ptr = static_cast(boost::movelib::iterator_to_raw_pointer(short_range_f)); - void *const stora_ptr = static_cast(boost::movelib::iterator_to_raw_pointer(storage)); - std::memcpy(stora_ptr, large_ptr, n_i_bytes); - std::memcpy(large_ptr, short_ptr, n_i_bytes); - std::memcpy(short_ptr, stora_ptr, n_i_bytes); - boost::container::iterator_advance(large_range_f, n_i); - boost::container::iterator_advance(short_range_f, n_i); - boost::container::uninitialized_move_alloc_n(a, large_range_f, n_j - n_i, short_range_f); // may throw - boost::container::destroy_alloc_n(a, large_range_f, n_j - n_i); -} - -template - -inline typename container_detail::enable_if_c - < container_detail::is_memtransfer_copy_assignable::value && true//(MaxTmpBytes > DeepSwapAllocNMaxStorage) - , void>::type - deep_swap_alloc_n( Allocator &a, F short_range_f, typename allocator_traits::size_type n_i - , G large_range_f, typename allocator_traits::size_type n_j) -{ - typedef typename allocator_traits::value_type value_type; - typedef typename container_detail::aligned_storage - ::value>::type storage_type; - storage_type storage; - const std::size_t sizeof_storage = sizeof(storage); - - std::size_t n_i_bytes = sizeof(value_type)*n_i; - char *large_ptr = static_cast(static_cast(boost::movelib::iterator_to_raw_pointer(large_range_f))); - char *short_ptr = static_cast(static_cast(boost::movelib::iterator_to_raw_pointer(short_range_f))); - char *stora_ptr = static_cast(static_cast(&storage)); - - std::size_t szt_times = n_i_bytes/sizeof_storage; - const std::size_t szt_rem = n_i_bytes%sizeof_storage; - - //Loop unrolling using Duff's device, as it seems it helps on some architectures - const std::size_t Unroll = 4; - std::size_t n = (szt_times + (Unroll-1))/Unroll; - const std::size_t branch_number = (!szt_times)*Unroll + (szt_times % Unroll); - switch(branch_number){ - case 4: - break; - case 0: do{ - std::memcpy(stora_ptr, large_ptr, sizeof_storage); - std::memcpy(large_ptr, short_ptr, sizeof_storage); - std::memcpy(short_ptr, stora_ptr, sizeof_storage); - large_ptr += sizeof_storage; - short_ptr += sizeof_storage; - BOOST_CONTAINER_FALLTHOUGH - case 3: - std::memcpy(stora_ptr, large_ptr, sizeof_storage); - std::memcpy(large_ptr, short_ptr, sizeof_storage); - std::memcpy(short_ptr, stora_ptr, sizeof_storage); - large_ptr += sizeof_storage; - short_ptr += sizeof_storage; - BOOST_CONTAINER_FALLTHOUGH - case 2: - std::memcpy(stora_ptr, large_ptr, sizeof_storage); - std::memcpy(large_ptr, short_ptr, sizeof_storage); - std::memcpy(short_ptr, stora_ptr, sizeof_storage); - large_ptr += sizeof_storage; - short_ptr += sizeof_storage; - BOOST_CONTAINER_FALLTHOUGH - case 1: - std::memcpy(stora_ptr, large_ptr, sizeof_storage); - std::memcpy(large_ptr, short_ptr, sizeof_storage); - std::memcpy(short_ptr, stora_ptr, sizeof_storage); - large_ptr += sizeof_storage; - short_ptr += sizeof_storage; - } while(--n); - } - std::memcpy(stora_ptr, large_ptr, szt_rem); - std::memcpy(large_ptr, short_ptr, szt_rem); - std::memcpy(short_ptr, stora_ptr, szt_rem); - boost::container::iterator_advance(large_range_f, n_i); - boost::container::iterator_advance(short_range_f, n_i); - boost::container::uninitialized_move_alloc_n(a, large_range_f, n_j - n_i, short_range_f); // may throw - boost::container::destroy_alloc_n(a, large_range_f, n_j - n_i); -} - - -////////////////////////////////////////////////////////////////////////////// -// -// copy_assign_range_alloc_n -// -////////////////////////////////////////////////////////////////////////////// - -template - -void copy_assign_range_alloc_n( Allocator &a, I inp_start, typename allocator_traits::size_type n_i - , O out_start, typename allocator_traits::size_type n_o ) -{ - if (n_o < n_i){ - inp_start = boost::container::copy_n_source_dest(inp_start, n_o, out_start); // may throw - boost::container::uninitialized_copy_alloc_n(a, inp_start, n_i - n_o, out_start);// may throw - } - else{ - out_start = boost::container::copy_n(inp_start, n_i, out_start); // may throw - boost::container::destroy_alloc_n(a, out_start, n_o - n_i); - } -} - -////////////////////////////////////////////////////////////////////////////// -// -// move_assign_range_alloc_n -// -////////////////////////////////////////////////////////////////////////////// - -template - -void move_assign_range_alloc_n( Allocator &a, I inp_start, typename allocator_traits::size_type n_i - , O out_start, typename allocator_traits::size_type n_o ) -{ - if (n_o < n_i){ - inp_start = boost::container::move_n_source_dest(inp_start, n_o, out_start); // may throw - boost::container::uninitialized_move_alloc_n(a, inp_start, n_i - n_o, out_start); // may throw - } - else{ - out_start = boost::container::move_n(inp_start, n_i, out_start); // may throw - boost::container::destroy_alloc_n(a, out_start, n_o - n_i); - } -} - -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DETAIL_COPY_MOVE_ALGO_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/destroyers.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/destroyers.hpp deleted file mode 100644 index b110561a4a2..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/destroyers.hpp +++ /dev/null @@ -1,378 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DESTROYERS_HPP -#define BOOST_CONTAINER_DESTROYERS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -#include -#include -#include - -namespace boost { -namespace container { -namespace container_detail { - -//!A deleter for scoped_ptr that deallocates the memory -//!allocated for an object using a STL allocator. -template -struct scoped_deallocator -{ - typedef allocator_traits allocator_traits_type; - typedef typename allocator_traits_type::pointer pointer; - typedef container_detail::integral_constant::value> alloc_version; - - private: - void priv_deallocate(version_1) - { m_alloc.deallocate(m_ptr, 1); } - - void priv_deallocate(version_2) - { m_alloc.deallocate_one(m_ptr); } - - BOOST_MOVABLE_BUT_NOT_COPYABLE(scoped_deallocator) - - public: - - pointer m_ptr; - Allocator& m_alloc; - - scoped_deallocator(pointer p, Allocator& a) - : m_ptr(p), m_alloc(a) - {} - - ~scoped_deallocator() - { if (m_ptr)priv_deallocate(alloc_version()); } - - scoped_deallocator(BOOST_RV_REF(scoped_deallocator) o) - : m_ptr(o.m_ptr), m_alloc(o.m_alloc) - { o.release(); } - - pointer get() const - { return m_ptr; } - - void set(const pointer &p) - { m_ptr = p; } - - void release() - { m_ptr = 0; } -}; - -template -struct null_scoped_deallocator -{ - typedef boost::container::allocator_traits AllocTraits; - typedef typename AllocTraits::pointer pointer; - typedef typename AllocTraits::size_type size_type; - - null_scoped_deallocator(pointer, Allocator&, size_type) - {} - - void release() - {} - - pointer get() const - { return pointer(); } - - void set(const pointer &) - {} -}; - -//!A deleter for scoped_ptr that deallocates the memory -//!allocated for an array of objects using a STL allocator. -template -struct scoped_array_deallocator -{ - typedef boost::container::allocator_traits AllocTraits; - typedef typename AllocTraits::pointer pointer; - typedef typename AllocTraits::size_type size_type; - - scoped_array_deallocator(pointer p, Allocator& a, size_type length) - : m_ptr(p), m_alloc(a), m_length(length) {} - - ~scoped_array_deallocator() - { if (m_ptr) m_alloc.deallocate(m_ptr, m_length); } - - void release() - { m_ptr = 0; } - - private: - pointer m_ptr; - Allocator& m_alloc; - size_type m_length; -}; - -template -struct null_scoped_array_deallocator -{ - typedef boost::container::allocator_traits AllocTraits; - typedef typename AllocTraits::pointer pointer; - typedef typename AllocTraits::size_type size_type; - - null_scoped_array_deallocator(pointer, Allocator&, size_type) - {} - - void release() - {} -}; - -template -struct scoped_destroy_deallocator -{ - typedef boost::container::allocator_traits AllocTraits; - typedef typename AllocTraits::pointer pointer; - typedef typename AllocTraits::size_type size_type; - typedef container_detail::integral_constant::value> alloc_version; - - scoped_destroy_deallocator(pointer p, Allocator& a) - : m_ptr(p), m_alloc(a) {} - - ~scoped_destroy_deallocator() - { - if(m_ptr){ - AllocTraits::destroy(m_alloc, boost::movelib::to_raw_pointer(m_ptr)); - priv_deallocate(m_ptr, alloc_version()); - } - } - - void release() - { m_ptr = 0; } - - private: - - void priv_deallocate(const pointer &p, version_1) - { AllocTraits::deallocate(m_alloc, p, 1); } - - void priv_deallocate(const pointer &p, version_2) - { m_alloc.deallocate_one(p); } - - pointer m_ptr; - Allocator& m_alloc; -}; - - -//!A deleter for scoped_ptr that destroys -//!an object using a STL allocator. -template -struct scoped_destructor_n -{ - typedef boost::container::allocator_traits AllocTraits; - typedef typename AllocTraits::pointer pointer; - typedef typename AllocTraits::value_type value_type; - typedef typename AllocTraits::size_type size_type; - - scoped_destructor_n(pointer p, Allocator& a, size_type n) - : m_p(p), m_a(a), m_n(n) - {} - - void release() - { m_p = 0; } - - void increment_size(size_type inc) - { m_n += inc; } - - void increment_size_backwards(size_type inc) - { m_n += inc; m_p -= inc; } - - void shrink_forward(size_type inc) - { m_n -= inc; m_p += inc; } - - ~scoped_destructor_n() - { - if(!m_p) return; - value_type *raw_ptr = boost::movelib::to_raw_pointer(m_p); - while(m_n--){ - AllocTraits::destroy(m_a, raw_ptr++); - } - } - - private: - pointer m_p; - Allocator & m_a; - size_type m_n; -}; - -//!A deleter for scoped_ptr that destroys -//!an object using a STL allocator. -template -struct null_scoped_destructor_n -{ - typedef boost::container::allocator_traits AllocTraits; - typedef typename AllocTraits::pointer pointer; - typedef typename AllocTraits::size_type size_type; - - null_scoped_destructor_n(pointer, Allocator&, size_type) - {} - - void increment_size(size_type) - {} - - void increment_size_backwards(size_type) - {} - - void shrink_forward(size_type) - {} - - void release() - {} -}; - -template -class scoped_destructor -{ - typedef boost::container::allocator_traits AllocTraits; - public: - typedef typename Allocator::value_type value_type; - scoped_destructor(Allocator &a, value_type *pv) - : pv_(pv), a_(a) - {} - - ~scoped_destructor() - { - if(pv_){ - AllocTraits::destroy(a_, pv_); - } - } - - void release() - { pv_ = 0; } - - - void set(value_type *ptr) { pv_ = ptr; } - - value_type *get() const { return pv_; } - - private: - value_type *pv_; - Allocator &a_; -}; - - -template -class value_destructor -{ - typedef boost::container::allocator_traits AllocTraits; - public: - typedef typename Allocator::value_type value_type; - value_destructor(Allocator &a, value_type &rv) - : rv_(rv), a_(a) - {} - - ~value_destructor() - { - AllocTraits::destroy(a_, &rv_); - } - - private: - value_type &rv_; - Allocator &a_; -}; - -template -class allocator_destroyer -{ - typedef boost::container::allocator_traits AllocTraits; - typedef typename AllocTraits::value_type value_type; - typedef typename AllocTraits::pointer pointer; - typedef container_detail::integral_constant::value> alloc_version; - - private: - Allocator & a_; - - private: - void priv_deallocate(const pointer &p, version_1) - { AllocTraits::deallocate(a_,p, 1); } - - void priv_deallocate(const pointer &p, version_2) - { a_.deallocate_one(p); } - - public: - explicit allocator_destroyer(Allocator &a) - : a_(a) - {} - - void operator()(const pointer &p) - { - AllocTraits::destroy(a_, boost::movelib::to_raw_pointer(p)); - this->priv_deallocate(p, alloc_version()); - } -}; - -template -class allocator_destroyer_and_chain_builder -{ - typedef allocator_traits allocator_traits_type; - typedef typename allocator_traits_type::value_type value_type; - typedef typename Allocator::multiallocation_chain multiallocation_chain; - - Allocator & a_; - multiallocation_chain &c_; - - public: - allocator_destroyer_and_chain_builder(Allocator &a, multiallocation_chain &c) - : a_(a), c_(c) - {} - - void operator()(const typename Allocator::pointer &p) - { - allocator_traits::destroy(a_, boost::movelib::to_raw_pointer(p)); - c_.push_back(p); - } -}; - -template -class allocator_multialloc_chain_node_deallocator -{ - typedef allocator_traits allocator_traits_type; - typedef typename allocator_traits_type::value_type value_type; - typedef typename Allocator::multiallocation_chain multiallocation_chain; - typedef allocator_destroyer_and_chain_builder chain_builder; - - Allocator & a_; - multiallocation_chain c_; - - public: - allocator_multialloc_chain_node_deallocator(Allocator &a) - : a_(a), c_() - {} - - chain_builder get_chain_builder() - { return chain_builder(a_, c_); } - - ~allocator_multialloc_chain_node_deallocator() - { - a_.deallocate_individual(c_); - } -}; - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#include - -#endif //#ifndef BOOST_CONTAINER_DESTROYERS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/dispatch_uses_allocator.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/dispatch_uses_allocator.hpp deleted file mode 100644 index 946fdf615bb..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/dispatch_uses_allocator.hpp +++ /dev/null @@ -1,461 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_DISPATCH_USES_ALLOCATOR_HPP -#define BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include - -#include -#include - -#include -#include -#include -#include - -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif -#include - -#include - -namespace boost { namespace container { - -namespace container_detail { - - -// Check if we can detect is_convertible using advanced SFINAE expressions -#if !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - //! Code inspired by Mathias Gaunard's is_convertible.cpp found in the Boost mailing list - //! http://boost.2283326.n4.nabble.com/type-traits-is-constructible-when-decltype-is-supported-td3575452.html - //! Thanks Mathias! - - //With variadic templates, we need a single class to implement the trait - template - struct is_constructible - { - typedef char yes_type; - struct no_type - { char padding[2]; }; - - template - struct dummy; - - template - static decltype(X(boost::move_detail::declval()...), true_type()) test(int); - - template - static no_type test(...); - - static const bool value = sizeof(test(0)) == sizeof(yes_type); - }; - - template - struct is_constructible_with_allocator_prefix - : is_constructible - {}; - -#else // #if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - //Without advanced SFINAE expressions, we can't use is_constructible - //so backup to constructible_with_allocator_xxx - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - template - struct is_constructible_with_allocator_prefix - : constructible_with_allocator_prefix - {}; - - template - struct is_constructible_with_allocator_suffix - : constructible_with_allocator_suffix - {}; - - #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - template - struct is_constructible_with_allocator_prefix - : constructible_with_allocator_prefix - {}; - - template - struct is_constructible_with_allocator_suffix - : constructible_with_allocator_suffix - {}; - - #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -#endif // #if !defined(BOOST_NO_SFINAE_EXPR) - -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -template < typename ConstructAlloc - , typename ArgAlloc - , typename T - , class ...Args - > -inline typename container_detail::enable_if_and - < void - , container_detail::is_not_pair - , container_detail::not_< uses_allocator > - >::type dispatch_uses_allocator - ( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p, BOOST_FWD_REF(Args)...args) -{ - (void)arg_alloc; - allocator_traits::construct(construct_alloc, p, ::boost::forward(args)...); -} - -// allocator_arg_t -template < typename ConstructAlloc - , typename ArgAlloc - , typename T - , class ...Args - > -inline typename container_detail::enable_if_and - < void - , container_detail::is_not_pair - , uses_allocator - , is_constructible_with_allocator_prefix - >::type dispatch_uses_allocator - ( ConstructAlloc& construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p, BOOST_FWD_REF(Args) ...args) -{ - allocator_traits::construct - ( construct_alloc, p, allocator_arg - , ::boost::forward(arg_alloc), ::boost::forward(args)...); -} - -// allocator suffix -template < typename ConstructAlloc - , typename ArgAlloc - , typename T - , class ...Args - > -inline typename container_detail::enable_if_and - < void - , container_detail::is_not_pair - , uses_allocator - , container_detail::not_ > - >::type dispatch_uses_allocator - ( ConstructAlloc& construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p, BOOST_FWD_REF(Args)...args) -{ - allocator_traits::construct - (construct_alloc, p, ::boost::forward(args)..., ::boost::forward(arg_alloc)); -} - -#else //#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -#define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \ - template \ - inline typename container_detail::enable_if_and\ - < void\ - , container_detail::is_not_pair\ - , container_detail::not_ >\ - >::type\ - dispatch_uses_allocator\ - (ConstructAlloc &construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - (void)arg_alloc;\ - allocator_traits::construct(construct_alloc, p BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ - }\ -// -BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE) -#undef BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE - -#define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \ - template < typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\ - inline typename container_detail::enable_if_and\ - < void\ - , container_detail::is_not_pair\ - , uses_allocator\ - , is_constructible_with_allocator_prefix\ - >::type\ - dispatch_uses_allocator\ - (ConstructAlloc& construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - allocator_traits::construct\ - (construct_alloc, p, allocator_arg, ::boost::forward(arg_alloc) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ - }\ -// -BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE) -#undef BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE - -#define BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE(N) \ - template < typename ConstructAlloc, typename ArgAlloc, typename T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\ - inline typename container_detail::enable_if_and\ - < void\ - , container_detail::is_not_pair\ - , uses_allocator\ - , container_detail::not_ >\ - >::type\ - dispatch_uses_allocator\ - (ConstructAlloc& construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, T* p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - allocator_traits::construct\ - (construct_alloc, p BOOST_MOVE_I##N BOOST_MOVE_FWD##N, ::boost::forward(arg_alloc));\ - }\ -// -BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE) -#undef BOOST_CONTAINER_SCOPED_ALLOCATOR_DISPATCH_USES_ALLOCATOR_CODE - -#endif //#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -template < typename ConstructAlloc - , typename ArgAlloc - , typename Pair - > inline -BOOST_CONTAINER_DOC1ST(void, typename container_detail::enable_if >::type) - dispatch_uses_allocator - ( ConstructAlloc & construct_alloc - , BOOST_FWD_REF(ArgAlloc) arg_alloc - , Pair* p) -{ - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->first)); - BOOST_TRY{ - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->second)); - } - BOOST_CATCH(...) { - allocator_traits::destroy(construct_alloc, container_detail::addressof(p->first)); - BOOST_RETHROW - } - BOOST_CATCH_END -} - - -template < typename ConstructAlloc - , typename ArgAlloc - , class Pair, class U, class V> -BOOST_CONTAINER_DOC1ST(void, typename container_detail::enable_if >::type) - dispatch_uses_allocator - ( ConstructAlloc & construct_alloc - , BOOST_FWD_REF(ArgAlloc) arg_alloc - , Pair* p, BOOST_FWD_REF(U) x, BOOST_FWD_REF(V) y) -{ - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->first), ::boost::forward(x)); - BOOST_TRY{ - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->second), ::boost::forward(y)); - } - BOOST_CATCH(...){ - allocator_traits::destroy(construct_alloc, container_detail::addressof(p->first)); - BOOST_RETHROW - } - BOOST_CATCH_END -} - -template < typename ConstructAlloc - , typename ArgAlloc - , class Pair, class Pair2> -BOOST_CONTAINER_DOC1ST(void, typename container_detail::enable_if< container_detail::is_pair >::type) - dispatch_uses_allocator - (ConstructAlloc & construct_alloc - , BOOST_FWD_REF(ArgAlloc) arg_alloc - , Pair* p, Pair2& x) -{ (dispatch_uses_allocator)(construct_alloc, arg_alloc, p, x.first, x.second); } - -template < typename ConstructAlloc - , typename ArgAlloc - , class Pair, class Pair2> -typename container_detail::enable_if_and - < void - , container_detail::is_pair - , container_detail::not_ > >::type //This is needed for MSVC10 and ambiguous overloads - dispatch_uses_allocator - (ConstructAlloc & construct_alloc - , BOOST_FWD_REF(ArgAlloc) arg_alloc - , Pair* p, BOOST_RV_REF_BEG Pair2 BOOST_RV_REF_END x) -{ (dispatch_uses_allocator)(construct_alloc, arg_alloc, p, ::boost::move(x.first), ::boost::move(x.second)); } - - -//piecewise construction from boost::tuple -#define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE(N,M)\ -template< typename ConstructAlloc, typename ArgAlloc, class Pair \ - , template class BoostTuple \ - BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \ -typename container_detail::enable_if< container_detail::is_pair >::type\ - dispatch_uses_allocator( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair, piecewise_construct_t\ - , BoostTuple p\ - , BoostTuple q)\ -{\ - (void)p; (void)q;\ - (dispatch_uses_allocator)\ - (construct_alloc, arg_alloc, container_detail::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_TMPL_GET##N);\ - BOOST_TRY{\ - (dispatch_uses_allocator)\ - (construct_alloc, arg_alloc, container_detail::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_TMPL_GETQ##M);\ - }\ - BOOST_CATCH(...) {\ - allocator_traits::destroy(construct_alloc, container_detail::addressof(pair->first));\ - BOOST_RETHROW\ - }\ - BOOST_CATCH_END\ -}\ -// -BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE) -#undef BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE - -//piecewise construction from Std Tuple -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - template< typename ConstructAlloc, typename ArgAlloc, class Pair - , template class Tuple, class... Args1, class... Args2, size_t... Indexes1, size_t... Indexes2> - void dispatch_uses_allocator_index( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair - , Tuple& t1, Tuple& t2, index_tuple, index_tuple) - { - (void)t1; (void)t2; - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(pair->first), ::boost::forward(get(t1))...); - BOOST_TRY{ - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(pair->second), ::boost::forward(get(t2))...); - } - BOOST_CATCH(...){ - allocator_traits::destroy(construct_alloc, container_detail::addressof(pair->first)); - BOOST_RETHROW - } - BOOST_CATCH_END - } - - template< typename ConstructAlloc, typename ArgAlloc, class Pair - , template class Tuple, class... Args1, class... Args2> - typename container_detail::enable_if< container_detail::is_pair >::type - dispatch_uses_allocator( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair, piecewise_construct_t - , Tuple t1, Tuple t2) - { - (dispatch_uses_allocator_index)( construct_alloc, arg_alloc, pair, t1, t2 - , typename build_number_seq::type() - , typename build_number_seq::type()); - } - -#elif defined(BOOST_MSVC) && (_CPPLIB_VER == 520) - - //MSVC 2010 tuple implementation - #define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE(N,M)\ - template< typename ConstructAlloc, typename ArgAlloc, class Pair\ - , template class StdTuple\ - BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \ - typename container_detail::enable_if< container_detail::is_pair >::type\ - dispatch_uses_allocator(ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair, piecewise_construct_t\ - , StdTuple p\ - , StdTuple q)\ - {\ - (void)p; (void)q;\ - (dispatch_uses_allocator)\ - (construct_alloc, arg_alloc, container_detail::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_GET_IDX##N);\ - BOOST_TRY{\ - (dispatch_uses_allocator)\ - (construct_alloc, arg_alloc, container_detail::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_GET_IDXQ##M);\ - }\ - BOOST_CATCH(...) {\ - allocator_traits::destroy(construct_alloc, container_detail::addressof(pair->first));\ - BOOST_RETHROW\ - }\ - BOOST_CATCH_END\ - }\ - // - BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE) - #undef BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE - -#elif defined(BOOST_MSVC) && (_CPPLIB_VER == 540) - #if _VARIADIC_MAX >= 9 - #define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT 9 - #else - #define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT BOOST_MOVE_ADD(_VARIADIC_MAX, 1) - #endif - - //MSVC 2012 tuple implementation - #define BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE(N,M)\ - template< typename ConstructAlloc, typename ArgAlloc, class Pair\ - , template class StdTuple \ - BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \ - typename container_detail::enable_if< container_detail::is_pair >::type\ - dispatch_uses_allocator\ - ( ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* pair, piecewise_construct_t\ - , StdTuple p\ - , StdTuple q)\ - {\ - (void)p; (void)q;\ - (dispatch_uses_allocator)\ - (construct_alloc, arg_alloc, container_detail::addressof(pair->first) BOOST_MOVE_I_IF(N) BOOST_MOVE_GET_IDX##N);\ - BOOST_TRY{\ - (dispatch_uses_allocator)\ - (construct_alloc, arg_alloc, container_detail::addressof(pair->second) BOOST_MOVE_I_IF(M) BOOST_MOVE_GET_IDXQ##M);\ - }\ - BOOST_CATCH(...) {\ - allocator_traits::destroy(construct_alloc, container_detail::addressof(pair->first));\ - BOOST_RETHROW\ - }\ - BOOST_CATCH_END\ - }\ - // - BOOST_MOVE_ITER2D_0TOMAX(BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT, BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE) - #undef BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE - #undef BOOST_DISPATCH_USES_ALLOCATOR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT - -#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -template < typename ConstructAlloc - , typename ArgAlloc - , class Pair, class KeyType, class ... Args> -typename container_detail::enable_if< container_detail::is_pair, void >::type - dispatch_uses_allocator - (ConstructAlloc & construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* p, try_emplace_t, BOOST_FWD_REF(KeyType) k, BOOST_FWD_REF(Args) ...args) -{ - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->first), ::boost::forward(k)); - BOOST_TRY{ - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->second), ::boost::forward(args)...); - } - BOOST_CATCH(...) { - allocator_traits::destroy(construct_alloc, container_detail::addressof(p->first)); - BOOST_RETHROW - } - BOOST_CATCH_END -} - -#else - -#define BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_PAIR_TRY_EMPLACE_CODE(N) \ - template \ - inline typename container_detail::enable_if\ - < container_detail::is_pair, void >::type\ - dispatch_uses_allocator\ - (ConstructAlloc &construct_alloc, BOOST_FWD_REF(ArgAlloc) arg_alloc, Pair* p, try_emplace_t, \ - BOOST_FWD_REF(KeyType) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->first), ::boost::forward(k));\ - BOOST_TRY{\ - (dispatch_uses_allocator)(construct_alloc, arg_alloc, container_detail::addressof(p->second) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ - }\ - BOOST_CATCH(...) {\ - allocator_traits::destroy(construct_alloc, container_detail::addressof(p->first));\ - BOOST_RETHROW\ - }\ - BOOST_CATCH_END\ - }\ -// -BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_PAIR_TRY_EMPLACE_CODE) -#undef BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_PAIR_TRY_EMPLACE_CODE - -#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -} //namespace container_detail - -}} // namespace boost { namespace container { - -#include - -#endif // BOOST_CONTAINER_DISPATCH_USES_ALLOCATOR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/dlmalloc.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/dlmalloc.hpp deleted file mode 100644 index 15086c399fa..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/dlmalloc.hpp +++ /dev/null @@ -1,103 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_ALLOC_LIB_HPP -#define BOOST_CONTAINER_DETAIL_ALLOC_LIB_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include - -#include - -namespace boost{ -namespace container{ - -typedef boost_cont_command_ret_t dlmalloc_command_ret_t; -typedef boost_cont_memchain dlmalloc_memchain; -typedef boost_cont_memchain_it dlmalloc_memchain_it; -typedef boost_cont_malloc_stats_t dlmalloc_malloc_stats_t; - -BOOST_CONTAINER_DECL size_t dlmalloc_size(const void *p); - -BOOST_CONTAINER_DECL void* dlmalloc_malloc(size_t bytes); - -BOOST_CONTAINER_DECL void dlmalloc_free(void* mem); - -BOOST_CONTAINER_DECL void* dlmalloc_memalign(size_t bytes, size_t alignment); - -BOOST_CONTAINER_DECL int dlmalloc_multialloc_nodes - (size_t n_elements, size_t elem_size, size_t contiguous_elements, boost_cont_memchain *pchain); - -BOOST_CONTAINER_DECL int dlmalloc_multialloc_arrays - (size_t n_elements, const size_t *sizes, size_t sizeof_element, size_t contiguous_elements, boost_cont_memchain *pchain); - -BOOST_CONTAINER_DECL void dlmalloc_multidealloc(boost_cont_memchain *pchain); - -BOOST_CONTAINER_DECL size_t dlmalloc_footprint(); - -BOOST_CONTAINER_DECL size_t dlmalloc_allocated_memory(); - -BOOST_CONTAINER_DECL size_t dlmalloc_chunksize(const void *p); - -BOOST_CONTAINER_DECL int dlmalloc_all_deallocated(); - -BOOST_CONTAINER_DECL boost_cont_malloc_stats_t dlmalloc_malloc_stats(); - -BOOST_CONTAINER_DECL size_t dlmalloc_in_use_memory(); - -BOOST_CONTAINER_DECL int dlmalloc_trim(size_t pad); - -BOOST_CONTAINER_DECL int dlmalloc_mallopt(int parameter_number, int parameter_value); - -BOOST_CONTAINER_DECL int dlmalloc_grow(void* oldmem, size_t minbytes, size_t maxbytes, size_t *received); - -BOOST_CONTAINER_DECL int dlmalloc_shrink(void* oldmem, size_t minbytes, size_t maxbytes, size_t *received, int do_commit); - -BOOST_CONTAINER_DECL void* dlmalloc_alloc(size_t minbytes, size_t preferred_bytes, size_t *received_bytes); - -BOOST_CONTAINER_DECL int dlmalloc_malloc_check(); - -BOOST_CONTAINER_DECL boost_cont_command_ret_t dlmalloc_allocation_command - ( allocation_type command - , size_t sizeof_object - , size_t limit_objects - , size_t preferred_objects - , size_t *received_objects - , void *reuse_ptr - ); - -BOOST_CONTAINER_DECL int dlmalloc_mallopt(int param_number, int value); - -BOOST_CONTAINER_DECL void *dlmalloc_sync_create(); - -BOOST_CONTAINER_DECL void dlmalloc_sync_destroy(void *sync); - -BOOST_CONTAINER_DECL bool dlmalloc_sync_lock(void *sync); - -BOOST_CONTAINER_DECL void dlmalloc_sync_unlock(void *sync); - -BOOST_CONTAINER_DECL bool dlmalloc_global_sync_lock(); - -BOOST_CONTAINER_DECL void dlmalloc_global_sync_unlock(); - -} //namespace container{ -} //namespace boost{ - -#include - -#endif //BOOST_CONTAINER_DETAIL_ALLOC_LIB_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/flat_tree.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/flat_tree.hpp deleted file mode 100644 index 9aab87308a9..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/flat_tree.hpp +++ /dev/null @@ -1,1231 +0,0 @@ -//////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-2015. 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_FLAT_TREE_HPP -#define BOOST_CONTAINER_FLAT_TREE_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -#include - -#include - -#include -#include -#include - -#include -#include -#include //algo_equal(), algo_lexicographical_compare -#include -#include -#include -#include - -#ifdef BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER -#include -#endif -#include //pair - -#include -#include -#include -#include - -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif - - -namespace boost { -namespace container { -namespace container_detail { - -template -class flat_tree_value_compare - : private Compare -{ - typedef Value first_argument_type; - typedef Value second_argument_type; - typedef bool return_type; - public: - flat_tree_value_compare() - : Compare() - {} - - flat_tree_value_compare(const Compare &pred) - : Compare(pred) - {} - - bool operator()(const Value& lhs, const Value& rhs) const - { - KeyOfValue key_extract; - return Compare::operator()(key_extract(lhs), key_extract(rhs)); - } - - const Compare &get_comp() const - { return *this; } - - Compare &get_comp() - { return *this; } -}; - -template -struct get_flat_tree_iterators -{ - #ifdef BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER - typedef Pointer iterator; - typedef typename boost::intrusive:: - pointer_traits::element_type iterator_element_type; - typedef typename boost::intrusive:: - pointer_traits:: template - rebind_pointer::type const_iterator; - #else //BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER - typedef typename boost::container::container_detail:: - vec_iterator iterator; - typedef typename boost::container::container_detail:: - vec_iterator const_iterator; - #endif //BOOST_CONTAINER_VECTOR_ITERATOR_IS_POINTER - typedef boost::container::reverse_iterator reverse_iterator; - typedef boost::container::reverse_iterator const_reverse_iterator; -}; - -template -class flat_tree -{ - public: - typedef boost::container::vector sequence_type; - - private: - typedef Allocator allocator_t; - typedef allocator_traits allocator_traits_type; - - public: - typedef flat_tree_value_compare value_compare; - - private: - struct Data - //Inherit from value_compare to do EBO - : public value_compare - { - BOOST_COPYABLE_AND_MOVABLE(Data) - - public: - Data() - : value_compare(), m_seq() - {} - - explicit Data(const allocator_t &alloc) - : value_compare(), m_seq(alloc) - {} - - explicit Data(const Compare &comp) - : value_compare(comp), m_seq() - {} - - Data(const Compare &comp, const allocator_t &alloc) - : value_compare(comp), m_seq(alloc) - {} - - explicit Data(const Data &d) - : value_compare(static_cast(d)), m_seq(d.m_seq) - {} - - Data(BOOST_RV_REF(Data) d) - : value_compare(boost::move(static_cast(d))), m_seq(boost::move(d.m_seq)) - {} - - Data(const Data &d, const Allocator &a) - : value_compare(static_cast(d)), m_seq(d.m_seq, a) - {} - - Data(BOOST_RV_REF(Data) d, const Allocator &a) - : value_compare(boost::move(static_cast(d))), m_seq(boost::move(d.m_seq), a) - {} - - Data& operator=(BOOST_COPY_ASSIGN_REF(Data) d) - { - this->value_compare::operator=(d); - m_seq = d.m_seq; - return *this; - } - - Data& operator=(BOOST_RV_REF(Data) d) - { - this->value_compare::operator=(boost::move(static_cast(d))); - m_seq = boost::move(d.m_seq); - return *this; - } - - void swap(Data &d) - { - value_compare& mycomp = *this, & othercomp = d; - boost::adl_move_swap(mycomp, othercomp); - this->m_seq.swap(d.m_seq); - } - - sequence_type m_seq; - }; - - Data m_data; - BOOST_COPYABLE_AND_MOVABLE(flat_tree) - - public: - - typedef typename sequence_type::value_type value_type; - typedef typename sequence_type::pointer pointer; - typedef typename sequence_type::const_pointer const_pointer; - typedef typename sequence_type::reference reference; - typedef typename sequence_type::const_reference const_reference; - typedef typename KeyOfValue::type key_type; - typedef Compare key_compare; - typedef typename sequence_type::allocator_type allocator_type; - typedef typename sequence_type::size_type size_type; - typedef typename sequence_type::difference_type difference_type; - typedef typename sequence_type::iterator iterator; - typedef typename sequence_type::const_iterator const_iterator; - typedef typename sequence_type::reverse_iterator reverse_iterator; - typedef typename sequence_type::const_reverse_iterator const_reverse_iterator; - - //!Standard extension - typedef allocator_type stored_allocator_type; - - private: - typedef allocator_traits stored_allocator_traits; - - public: - BOOST_CONTAINER_FORCEINLINE flat_tree() - : m_data() - { } - - BOOST_CONTAINER_FORCEINLINE explicit flat_tree(const Compare& comp) - : m_data(comp) - { } - - BOOST_CONTAINER_FORCEINLINE explicit flat_tree(const allocator_type& a) - : m_data(a) - { } - - BOOST_CONTAINER_FORCEINLINE flat_tree(const Compare& comp, const allocator_type& a) - : m_data(comp, a) - { } - - BOOST_CONTAINER_FORCEINLINE flat_tree(const flat_tree& x) - : m_data(x.m_data) - { } - - BOOST_CONTAINER_FORCEINLINE flat_tree(BOOST_RV_REF(flat_tree) x) - BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible::value) - : m_data(boost::move(x.m_data)) - { } - - BOOST_CONTAINER_FORCEINLINE flat_tree(const flat_tree& x, const allocator_type &a) - : m_data(x.m_data, a) - { } - - BOOST_CONTAINER_FORCEINLINE flat_tree(BOOST_RV_REF(flat_tree) x, const allocator_type &a) - : m_data(boost::move(x.m_data), a) - { } - - template - BOOST_CONTAINER_FORCEINLINE - flat_tree( ordered_range_t, InputIterator first, InputIterator last) - : m_data() - { - this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last); - BOOST_ASSERT((is_sorted)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp())); - } - - template - BOOST_CONTAINER_FORCEINLINE - flat_tree( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp) - : m_data(comp) - { - this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last); - BOOST_ASSERT((is_sorted)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp())); - } - - template - BOOST_CONTAINER_FORCEINLINE - flat_tree( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) - : m_data(comp, a) - { - this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last); - BOOST_ASSERT((is_sorted)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp())); - } - - template - BOOST_CONTAINER_FORCEINLINE - flat_tree( ordered_unique_range_t, InputIterator first, InputIterator last) - : m_data() - { - this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last); - BOOST_ASSERT((is_sorted_and_unique)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp())); - } - - template - BOOST_CONTAINER_FORCEINLINE - flat_tree( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp) - : m_data(comp) - { - this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last); - BOOST_ASSERT((is_sorted_and_unique)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp())); - } - - template - BOOST_CONTAINER_FORCEINLINE - flat_tree( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) - : m_data(comp, a) - { - this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last); - BOOST_ASSERT((is_sorted_and_unique)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp())); - } - - template - BOOST_CONTAINER_FORCEINLINE - flat_tree( bool unique_insertion, InputIterator first, InputIterator last) - : m_data() - { - this->priv_range_insertion_construct(unique_insertion, first, last); - } - - template - BOOST_CONTAINER_FORCEINLINE - flat_tree( bool unique_insertion, InputIterator first, InputIterator last - , const Compare& comp) - : m_data(comp) - { - this->priv_range_insertion_construct(unique_insertion, first, last); - } - - template - BOOST_CONTAINER_FORCEINLINE - flat_tree( bool unique_insertion, InputIterator first, InputIterator last - , const allocator_type& a) - : m_data(a) - { - this->priv_range_insertion_construct(unique_insertion, first, last); - } - - template - BOOST_CONTAINER_FORCEINLINE - flat_tree( bool unique_insertion, InputIterator first, InputIterator last - , const Compare& comp, const allocator_type& a) - : m_data(comp, a) - { - this->priv_range_insertion_construct(unique_insertion, first, last); - } - - BOOST_CONTAINER_FORCEINLINE ~flat_tree() - {} - - BOOST_CONTAINER_FORCEINLINE flat_tree& operator=(BOOST_COPY_ASSIGN_REF(flat_tree) x) - { m_data = x.m_data; return *this; } - - BOOST_CONTAINER_FORCEINLINE flat_tree& operator=(BOOST_RV_REF(flat_tree) x) - BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || - allocator_traits_type::is_always_equal::value) && - boost::container::container_detail::is_nothrow_move_assignable::value) - { m_data = boost::move(x.m_data); return *this; } - - BOOST_CONTAINER_FORCEINLINE const value_compare &priv_value_comp() const - { return static_cast(this->m_data); } - - BOOST_CONTAINER_FORCEINLINE value_compare &priv_value_comp() - { return static_cast(this->m_data); } - - BOOST_CONTAINER_FORCEINLINE const key_compare &priv_key_comp() const - { return this->priv_value_comp().get_comp(); } - - BOOST_CONTAINER_FORCEINLINE key_compare &priv_key_comp() - { return this->priv_value_comp().get_comp(); } - - public: - // accessors: - BOOST_CONTAINER_FORCEINLINE Compare key_comp() const - { return this->m_data.get_comp(); } - - BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const - { return this->m_data; } - - BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const - { return this->m_data.m_seq.get_allocator(); } - - BOOST_CONTAINER_FORCEINLINE const stored_allocator_type &get_stored_allocator() const - { return this->m_data.m_seq.get_stored_allocator(); } - - BOOST_CONTAINER_FORCEINLINE stored_allocator_type &get_stored_allocator() - { return this->m_data.m_seq.get_stored_allocator(); } - - BOOST_CONTAINER_FORCEINLINE iterator begin() - { return this->m_data.m_seq.begin(); } - - BOOST_CONTAINER_FORCEINLINE const_iterator begin() const - { return this->cbegin(); } - - BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const - { return this->m_data.m_seq.begin(); } - - BOOST_CONTAINER_FORCEINLINE iterator end() - { return this->m_data.m_seq.end(); } - - BOOST_CONTAINER_FORCEINLINE const_iterator end() const - { return this->cend(); } - - BOOST_CONTAINER_FORCEINLINE const_iterator cend() const - { return this->m_data.m_seq.end(); } - - BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin() - { return reverse_iterator(this->end()); } - - BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const - { return this->crbegin(); } - - BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const - { return const_reverse_iterator(this->cend()); } - - BOOST_CONTAINER_FORCEINLINE reverse_iterator rend() - { return reverse_iterator(this->begin()); } - - BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const - { return this->crend(); } - - BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const - { return const_reverse_iterator(this->cbegin()); } - - BOOST_CONTAINER_FORCEINLINE bool empty() const - { return this->m_data.m_seq.empty(); } - - BOOST_CONTAINER_FORCEINLINE size_type size() const - { return this->m_data.m_seq.size(); } - - BOOST_CONTAINER_FORCEINLINE size_type max_size() const - { return this->m_data.m_seq.max_size(); } - - BOOST_CONTAINER_FORCEINLINE void swap(flat_tree& other) - BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value - && boost::container::container_detail::is_nothrow_swappable::value ) - { this->m_data.swap(other.m_data); } - - public: - // insert/erase - std::pair insert_unique(const value_type& val) - { - std::pair ret; - insert_commit_data data; - ret.second = this->priv_insert_unique_prepare(KeyOfValue()(val), data); - ret.first = ret.second ? this->priv_insert_commit(data, val) - : iterator(vector_iterator_get_ptr(data.position)); - return ret; - } - - std::pair insert_unique(BOOST_RV_REF(value_type) val) - { - std::pair ret; - insert_commit_data data; - ret.second = this->priv_insert_unique_prepare(KeyOfValue()(val), data); - ret.first = ret.second ? this->priv_insert_commit(data, boost::move(val)) - : iterator(vector_iterator_get_ptr(data.position)); - return ret; - } - - iterator insert_equal(const value_type& val) - { - iterator i = this->upper_bound(KeyOfValue()(val)); - i = this->m_data.m_seq.insert(i, val); - return i; - } - - iterator insert_equal(BOOST_RV_REF(value_type) mval) - { - iterator i = this->upper_bound(KeyOfValue()(mval)); - i = this->m_data.m_seq.insert(i, boost::move(mval)); - return i; - } - - iterator insert_unique(const_iterator hint, const value_type& val) - { - BOOST_ASSERT(this->priv_in_range_or_end(hint)); - insert_commit_data data; - return this->priv_insert_unique_prepare(hint, KeyOfValue()(val), data) - ? this->priv_insert_commit(data, val) - : iterator(vector_iterator_get_ptr(data.position)); - } - - iterator insert_unique(const_iterator hint, BOOST_RV_REF(value_type) val) - { - BOOST_ASSERT(this->priv_in_range_or_end(hint)); - insert_commit_data data; - return this->priv_insert_unique_prepare(hint, KeyOfValue()(val), data) - ? this->priv_insert_commit(data, boost::move(val)) - : iterator(vector_iterator_get_ptr(data.position)); - } - - iterator insert_equal(const_iterator hint, const value_type& val) - { - BOOST_ASSERT(this->priv_in_range_or_end(hint)); - insert_commit_data data; - this->priv_insert_equal_prepare(hint, val, data); - return this->priv_insert_commit(data, val); - } - - iterator insert_equal(const_iterator hint, BOOST_RV_REF(value_type) mval) - { - BOOST_ASSERT(this->priv_in_range_or_end(hint)); - insert_commit_data data; - this->priv_insert_equal_prepare(hint, mval, data); - return this->priv_insert_commit(data, boost::move(mval)); - } - - template - void insert_unique(InIt first, InIt last) - { - for ( ; first != last; ++first){ - this->insert_unique(*first); - } - } - - template - void insert_equal(InIt first, InIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::enable_if_c - < container_detail::is_input_iterator::value - >::type * = 0 - #endif - ) - { this->priv_insert_equal_loop(first, last); } - - template - void insert_equal(InIt first, InIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::enable_if_c - < !container_detail::is_input_iterator::value - >::type * = 0 - #endif - ) - { - const size_type len = static_cast(boost::container::iterator_distance(first, last)); - this->reserve(this->size()+len); - this->priv_insert_equal_loop(first, last); - } - - //Ordered - - template - void insert_equal(ordered_range_t, InIt first, InIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::enable_if_c - < container_detail::is_input_iterator::value - >::type * = 0 - #endif - ) - { this->priv_insert_equal_loop_ordered(first, last); } - - template - void insert_equal(ordered_range_t, FwdIt first, FwdIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::enable_if_c - < !container_detail::is_input_iterator::value && - container_detail::is_forward_iterator::value - >::type * = 0 - #endif - ) - { - const size_type len = static_cast(boost::container::iterator_distance(first, last)); - this->reserve(this->size()+len); - this->priv_insert_equal_loop_ordered(first, last); - } - - template - void insert_equal(ordered_range_t, BidirIt first, BidirIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::disable_if_or - < void - , container_detail::is_input_iterator - , container_detail::is_forward_iterator - >::type * = 0 - #endif - ) - { this->m_data.m_seq.merge(first, last, static_cast(this->m_data)); } - - template - void insert_unique(ordered_unique_range_t, InIt first, InIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::enable_if_or - < void - , container_detail::is_input_iterator - , container_detail::is_forward_iterator - >::type * = 0 - #endif - ) - { - const_iterator pos(this->cend()); - for ( ; first != last; ++first){ - pos = this->insert_unique(pos, *first); - ++pos; - } - } - - template - void insert_unique(ordered_unique_range_t, BidirIt first, BidirIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::enable_if_c - < !(container_detail::is_input_iterator::value || - container_detail::is_forward_iterator::value) - >::type * = 0 - #endif - ) - { this->m_data.m_seq.merge_unique(first, last, static_cast(this->m_data)); } - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - template - std::pair emplace_unique(BOOST_FWD_REF(Args)... args) - { - typename aligned_storage::value>::type v; - value_type &val = *static_cast(static_cast(&v)); - stored_allocator_type &a = this->get_stored_allocator(); - stored_allocator_traits::construct(a, &val, ::boost::forward(args)... ); - value_destructor d(a, val); - return this->insert_unique(::boost::move(val)); - } - - template - iterator emplace_hint_unique(const_iterator hint, BOOST_FWD_REF(Args)... args) - { - //hint checked in insert_unique - typename aligned_storage::value>::type v; - value_type &val = *static_cast(static_cast(&v)); - stored_allocator_type &a = this->get_stored_allocator(); - stored_allocator_traits::construct(a, &val, ::boost::forward(args)... ); - value_destructor d(a, val); - return this->insert_unique(hint, ::boost::move(val)); - } - - template - iterator emplace_equal(BOOST_FWD_REF(Args)... args) - { - typename aligned_storage::value>::type v; - value_type &val = *static_cast(static_cast(&v)); - stored_allocator_type &a = this->get_stored_allocator(); - stored_allocator_traits::construct(a, &val, ::boost::forward(args)... ); - value_destructor d(a, val); - return this->insert_equal(::boost::move(val)); - } - - template - iterator emplace_hint_equal(const_iterator hint, BOOST_FWD_REF(Args)... args) - { - //hint checked in insert_equal - typename aligned_storage::value>::type v; - value_type &val = *static_cast(static_cast(&v)); - stored_allocator_type &a = this->get_stored_allocator(); - stored_allocator_traits::construct(a, &val, ::boost::forward(args)... ); - value_destructor d(a, val); - return this->insert_equal(hint, ::boost::move(val)); - } - - template - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace - (const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(Args)... args) - { - std::pair ret; - insert_commit_data data; - const key_type & k = key; - ret.second = hint == const_iterator() - ? this->priv_insert_unique_prepare(k, data) - : this->priv_insert_unique_prepare(hint, k, data); - - if(!ret.second){ - ret.first = this->nth(data.position - this->cbegin()); - } - else{ - typedef typename emplace_functor_type::type func_t; - typedef emplace_iterator it_t; - func_t func(try_emplace_t(), ::boost::forward(key), ::boost::forward(args)...); - ret.first = this->m_data.m_seq.insert(data.position, it_t(func), it_t()); - } - return ret; - } - - #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #define BOOST_CONTAINER_FLAT_TREE_EMPLACE_CODE(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - std::pair emplace_unique(BOOST_MOVE_UREF##N)\ - {\ - typename aligned_storage::value>::type v;\ - value_type &val = *static_cast(static_cast(&v));\ - stored_allocator_type &a = this->get_stored_allocator();\ - stored_allocator_traits::construct(a, &val BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ - value_destructor d(a, val);\ - return this->insert_unique(::boost::move(val));\ - }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - iterator emplace_hint_unique(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - typename aligned_storage::value>::type v;\ - value_type &val = *static_cast(static_cast(&v));\ - stored_allocator_type &a = this->get_stored_allocator();\ - stored_allocator_traits::construct(a, &val BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ - value_destructor d(a, val);\ - return this->insert_unique(hint, ::boost::move(val));\ - }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - iterator emplace_equal(BOOST_MOVE_UREF##N)\ - {\ - typename aligned_storage::value>::type v;\ - value_type &val = *static_cast(static_cast(&v));\ - stored_allocator_type &a = this->get_stored_allocator();\ - stored_allocator_traits::construct(a, &val BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ - value_destructor d(a, val);\ - return this->insert_equal(::boost::move(val));\ - }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - iterator emplace_hint_equal(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - typename aligned_storage ::value>::type v;\ - value_type &val = *static_cast(static_cast(&v));\ - stored_allocator_type &a = this->get_stored_allocator();\ - stored_allocator_traits::construct(a, &val BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ - value_destructor d(a, val);\ - return this->insert_equal(hint, ::boost::move(val));\ - }\ - template \ - BOOST_CONTAINER_FORCEINLINE std::pair\ - try_emplace(const_iterator hint, BOOST_FWD_REF(KeyType) key BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - std::pair ret;\ - insert_commit_data data;\ - const key_type & k = key;\ - ret.second = hint == const_iterator()\ - ? this->priv_insert_unique_prepare(k, data)\ - : this->priv_insert_unique_prepare(hint, k, data);\ - \ - if(!ret.second){\ - ret.first = this->nth(data.position - this->cbegin());\ - }\ - else{\ - typedef typename emplace_functor_type::type func_t;\ - typedef emplace_iterator it_t;\ - func_t func(try_emplace_t(), ::boost::forward(key) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ - ret.first = this->m_data.m_seq.insert(data.position, it_t(func), it_t());\ - }\ - return ret;\ - }\ - // - BOOST_MOVE_ITERATE_0TO7(BOOST_CONTAINER_FLAT_TREE_EMPLACE_CODE) - #undef BOOST_CONTAINER_FLAT_TREE_EMPLACE_CODE - - #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - template - std::pair insert_or_assign(const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(M) obj) - { - const key_type& k = key; - std::pair ret; - insert_commit_data data; - ret.second = hint == const_iterator() - ? this->priv_insert_unique_prepare(k, data) - : this->priv_insert_unique_prepare(hint, k, data); - if(!ret.second){ - ret.first = this->nth(data.position - this->cbegin()); - ret.first->second = boost::forward(obj); - } - else{ - typedef typename emplace_functor_type::type func_t; - typedef emplace_iterator it_t; - func_t func(boost::forward(key), boost::forward(obj)); - ret.first = this->m_data.m_seq.insert(data.position, it_t(func), it_t()); - } - return ret; - } - - BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator position) - { return this->m_data.m_seq.erase(position); } - - size_type erase(const key_type& k) - { - std::pair itp = this->equal_range(k); - size_type ret = static_cast(itp.second-itp.first); - if (ret){ - this->m_data.m_seq.erase(itp.first, itp.second); - } - return ret; - } - - BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator first, const_iterator last) - { return this->m_data.m_seq.erase(first, last); } - - BOOST_CONTAINER_FORCEINLINE void clear() - { this->m_data.m_seq.clear(); } - - //! Effects: Tries to deallocate the excess of memory created - // with previous allocations. The size of the vector is unchanged - //! - //! Throws: If memory allocation throws, or T's copy constructor throws. - //! - //! Complexity: Linear to size(). - BOOST_CONTAINER_FORCEINLINE void shrink_to_fit() - { this->m_data.m_seq.shrink_to_fit(); } - - BOOST_CONTAINER_FORCEINLINE iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW - { return this->m_data.m_seq.nth(n); } - - BOOST_CONTAINER_FORCEINLINE const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW - { return this->m_data.m_seq.nth(n); } - - BOOST_CONTAINER_FORCEINLINE size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW - { return this->m_data.m_seq.index_of(p); } - - BOOST_CONTAINER_FORCEINLINE size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW - { return this->m_data.m_seq.index_of(p); } - - // set operations: - iterator find(const key_type& k) - { - iterator i = this->lower_bound(k); - iterator end_it = this->end(); - if (i != end_it && this->m_data.get_comp()(k, KeyOfValue()(*i))){ - i = end_it; - } - return i; - } - - const_iterator find(const key_type& k) const - { - const_iterator i = this->lower_bound(k); - - const_iterator end_it = this->cend(); - if (i != end_it && this->m_data.get_comp()(k, KeyOfValue()(*i))){ - i = end_it; - } - return i; - } - - // set operations: - size_type count(const key_type& k) const - { - std::pair p = this->equal_range(k); - size_type n = p.second - p.first; - return n; - } - - template - void merge_unique(flat_tree& source) - { - this->insert( boost::make_move_iterator(source.begin()) - , boost::make_move_iterator(source.end())); - } - - template - void merge_equal(flat_tree& source) - { - this->insert( boost::make_move_iterator(source.begin()) - , boost::make_move_iterator(source.end())); - } - - void merge_unique(flat_tree& source) - { - this->m_data.m_seq.merge_unique - ( boost::make_move_iterator(source.begin()) - , boost::make_move_iterator(source.end()) - , static_cast(this->m_data)); - } - - void merge_equal(flat_tree& source) - { - this->m_data.m_seq.merge - ( boost::make_move_iterator(source.begin()) - , boost::make_move_iterator(source.end()) - , static_cast(this->m_data)); - } - - BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& k) - { return this->priv_lower_bound(this->begin(), this->end(), k); } - - BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& k) const - { return this->priv_lower_bound(this->cbegin(), this->cend(), k); } - - BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& k) - { return this->priv_upper_bound(this->begin(), this->end(), k); } - - BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& k) const - { return this->priv_upper_bound(this->cbegin(), this->cend(), k); } - - BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const key_type& k) - { return this->priv_equal_range(this->begin(), this->end(), k); } - - BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const key_type& k) const - { return this->priv_equal_range(this->cbegin(), this->cend(), k); } - - BOOST_CONTAINER_FORCEINLINE std::pair lower_bound_range(const key_type& k) - { return this->priv_lower_bound_range(this->begin(), this->end(), k); } - - BOOST_CONTAINER_FORCEINLINE std::pair lower_bound_range(const key_type& k) const - { return this->priv_lower_bound_range(this->cbegin(), this->cend(), k); } - - BOOST_CONTAINER_FORCEINLINE size_type capacity() const - { return this->m_data.m_seq.capacity(); } - - BOOST_CONTAINER_FORCEINLINE void reserve(size_type cnt) - { this->m_data.m_seq.reserve(cnt); } - - BOOST_CONTAINER_FORCEINLINE sequence_type extract_sequence() - { - return boost::move(m_data.m_seq); - } - - BOOST_CONTAINER_FORCEINLINE sequence_type &get_sequence_ref() - { - return m_data.m_seq; - } - - void adopt_sequence_equal(BOOST_RV_REF(sequence_type) seq) - { - sequence_type &tseq = m_data.m_seq; - boost::movelib::adaptive_sort - ( boost::movelib::iterator_to_raw_pointer(seq.begin()) - , boost::movelib::iterator_to_raw_pointer(seq.end()) - , this->priv_value_comp() - , boost::movelib::iterator_to_raw_pointer(tseq.begin() + tseq.size()) - , tseq.capacity() - tseq.size()); - tseq = boost::move(seq); - } - - void adopt_sequence_equal(ordered_range_t, BOOST_RV_REF(sequence_type) seq) - { - BOOST_ASSERT((is_sorted)(seq.cbegin(), seq.cend(), this->priv_value_comp())); - sequence_type &tseq = m_data.m_seq; - tseq = boost::move(seq); - } - - void adopt_sequence_unique(BOOST_RV_REF(sequence_type) seq) - { - sequence_type &tseq = m_data.m_seq; - boost::movelib::adaptive_sort - ( boost::movelib::iterator_to_raw_pointer(seq.begin()) - , boost::movelib::iterator_to_raw_pointer(seq.end()) - , this->priv_value_comp() - , boost::movelib::iterator_to_raw_pointer(tseq.begin() + tseq.size()) - , tseq.capacity() - tseq.size()); - seq.erase( boost::movelib::unique - (seq.begin(), seq.end(), boost::movelib::negate(this->m_data.get_comp())) - , seq.cend()); - tseq = boost::move(seq); - } - - void adopt_sequence_unique(ordered_unique_range_t, BOOST_RV_REF(sequence_type) seq) - { - BOOST_ASSERT((is_sorted_and_unique)(seq.cbegin(), seq.cend(), this->priv_value_comp())); - sequence_type &tseq = m_data.m_seq; - tseq = boost::move(seq); - } - - BOOST_CONTAINER_FORCEINLINE friend bool operator==(const flat_tree& x, const flat_tree& y) - { - return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); - } - - BOOST_CONTAINER_FORCEINLINE friend bool operator<(const flat_tree& x, const flat_tree& y) - { - return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); - } - - BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const flat_tree& x, const flat_tree& y) - { return !(x == y); } - - BOOST_CONTAINER_FORCEINLINE friend bool operator>(const flat_tree& x, const flat_tree& y) - { return y < x; } - - BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const flat_tree& x, const flat_tree& y) - { return !(y < x); } - - BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const flat_tree& x, const flat_tree& y) - { return !(x < y); } - - BOOST_CONTAINER_FORCEINLINE friend void swap(flat_tree& x, flat_tree& y) - { x.swap(y); } - - private: - - template - void priv_range_insertion_construct( bool unique_insertion, InputIterator first, InputIterator last) - { - //Use cend() as hint to achieve linear time for - //ordered ranges as required by the standard - //for the constructor - //Call end() every iteration as reallocation might have invalidated iterators - if(unique_insertion){ - for ( ; first != last; ++first){ - this->insert_unique(this->cend(), *first); - } - } - else{ - for ( ; first != last; ++first){ - this->insert_equal(this->cend(), *first); - } - } - } - - BOOST_CONTAINER_FORCEINLINE bool priv_in_range_or_end(const_iterator pos) const - { - return (this->begin() <= pos) && (pos <= this->end()); - } - - struct insert_commit_data - { - const_iterator position; - }; - - // insert/erase - void priv_insert_equal_prepare - (const_iterator pos, const value_type& val, insert_commit_data &data) - { - // N1780 - // To insert val at pos: - // if pos == end || val <= *pos - // if pos == begin || val >= *(pos-1) - // insert val before pos - // else - // insert val before upper_bound(val) - // else - // insert val before lower_bound(val) - const value_compare &val_cmp = this->m_data; - - if(pos == this->cend() || !val_cmp(*pos, val)){ - if (pos == this->cbegin() || !val_cmp(val, pos[-1])){ - data.position = pos; - } - else{ - data.position = - this->priv_upper_bound(this->cbegin(), pos, KeyOfValue()(val)); - } - } - else{ - data.position = - this->priv_lower_bound(pos, this->cend(), KeyOfValue()(val)); - } - } - - bool priv_insert_unique_prepare - (const_iterator b, const_iterator e, const key_type& k, insert_commit_data &commit_data) - { - const key_compare &key_cmp = this->priv_key_comp(); - commit_data.position = this->priv_lower_bound(b, e, k); - return commit_data.position == e || key_cmp(k, KeyOfValue()(*commit_data.position)); - } - - BOOST_CONTAINER_FORCEINLINE bool priv_insert_unique_prepare - (const key_type& k, insert_commit_data &commit_data) - { return this->priv_insert_unique_prepare(this->cbegin(), this->cend(), k, commit_data); } - - bool priv_insert_unique_prepare - (const_iterator pos, const key_type& k, insert_commit_data &commit_data) - { - //N1780. Props to Howard Hinnant! - //To insert k at pos: - //if pos == end || k <= *pos - // if pos == begin || k >= *(pos-1) - // insert k before pos - // else - // insert k before upper_bound(k) - //else if pos+1 == end || k <= *(pos+1) - // insert k after pos - //else - // insert k before lower_bound(k) - const key_compare &key_cmp = this->priv_key_comp(); - const const_iterator cend_it = this->cend(); - if(pos == cend_it || key_cmp(k, KeyOfValue()(*pos))){ //Check if k should go before end - const const_iterator cbeg = this->cbegin(); - commit_data.position = pos; - if(pos == cbeg){ //If container is empty then insert it in the beginning - return true; - } - const_iterator prev(pos); - --prev; - if(key_cmp(KeyOfValue()(*prev), k)){ //If previous element was less, then it should go between prev and pos - return true; - } - else if(!key_cmp(k, KeyOfValue()(*prev))){ //If previous was equal then insertion should fail - commit_data.position = prev; - return false; - } - else{ //Previous was bigger so insertion hint was pointless, dispatch to hintless insertion - //but reduce the search between beg and prev as prev is bigger than k - return this->priv_insert_unique_prepare(cbeg, prev, k, commit_data); - } - } - else{ - //The hint is before the insertion position, so insert it - //in the remaining range [pos, end) - return this->priv_insert_unique_prepare(pos, cend_it, k, commit_data); - } - } - - template - BOOST_CONTAINER_FORCEINLINE iterator priv_insert_commit - (insert_commit_data &commit_data, BOOST_FWD_REF(Convertible) convertible) - { - return this->m_data.m_seq.insert - ( commit_data.position - , boost::forward(convertible)); - } - - template - RanIt priv_lower_bound(RanIt first, const RanIt last, - const key_type & key) const - { - const Compare &key_cmp = this->m_data.get_comp(); - KeyOfValue key_extract; - size_type len = static_cast(last - first); - RanIt middle; - - while (len) { - size_type step = len >> 1; - middle = first; - middle += step; - - if (key_cmp(key_extract(*middle), key)) { - first = ++middle; - len -= step + 1; - } - else{ - len = step; - } - } - return first; - } - - template - RanIt priv_upper_bound - (RanIt first, const RanIt last,const key_type & key) const - { - const Compare &key_cmp = this->m_data.get_comp(); - KeyOfValue key_extract; - size_type len = static_cast(last - first); - RanIt middle; - - while (len) { - size_type step = len >> 1; - middle = first; - middle += step; - - if (key_cmp(key, key_extract(*middle))) { - len = step; - } - else{ - first = ++middle; - len -= step + 1; - } - } - return first; - } - - template - std::pair - priv_equal_range(RanIt first, RanIt last, const key_type& key) const - { - const Compare &key_cmp = this->m_data.get_comp(); - KeyOfValue key_extract; - size_type len = static_cast(last - first); - RanIt middle; - - while (len) { - size_type step = len >> 1; - middle = first; - middle += step; - - if (key_cmp(key_extract(*middle), key)){ - first = ++middle; - len -= step + 1; - } - else if (key_cmp(key, key_extract(*middle))){ - len = step; - } - else { - //Middle is equal to key - last = first; - last += len; - RanIt const first_ret = this->priv_lower_bound(first, middle, key); - return std::pair - ( first_ret, this->priv_upper_bound(++middle, last, key)); - } - } - return std::pair(first, first); - } - - template - std::pair priv_lower_bound_range(RanIt first, RanIt last, const key_type& k) const - { - const Compare &key_cmp = this->m_data.get_comp(); - KeyOfValue key_extract; - RanIt lb(this->priv_lower_bound(first, last, k)), ub(lb); - if(lb != last && static_cast(!key_cmp(k, key_extract(*lb)))){ - ++ub; - } - return std::pair(lb, ub); - } - - template - void priv_insert_equal_loop(InIt first, InIt last) - { - for ( ; first != last; ++first){ - this->insert_equal(*first); - } - } - - template - void priv_insert_equal_loop_ordered(InIt first, InIt last) - { - const_iterator pos(this->cend()); - for ( ; first != last; ++first){ - //If ordered, then try hint version - //to achieve constant-time complexity per insertion - //in some cases - pos = this->insert_equal(pos, *first); - ++pos; - } - } -}; - -} //namespace container_detail { - -} //namespace container { - -//!has_trivial_destructor_after_move<> == true_type -//!specialization for optimizations -template -struct has_trivial_destructor_after_move > -{ - typedef typename ::boost::container::allocator_traits::pointer pointer; - static const bool value = ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value; -}; - -} //namespace boost { - -#include - -#endif // BOOST_CONTAINER_FLAT_TREE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/function_detector.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/function_detector.hpp deleted file mode 100644 index 00caced5ba5..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/function_detector.hpp +++ /dev/null @@ -1,96 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2009-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/container for documentation. -// -///////////////////////////////////////////////////////////////////////////// -// This code was modified from the code posted by Alexandre Courpron in his -// article "Interface Detection" in The Code Project: -// http://www.codeproject.com/KB/architecture/Detector.aspx -/////////////////////////////////////////////////////////////////////////////// -// Copyright 2007 Alexandre Courpron -// -// Permission to use, copy, modify, redistribute and sell this software, -// provided that this copyright notice appears on all copies of the software. -/////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_FUNCTION_DETECTOR_HPP -#define BOOST_CONTAINER_DETAIL_FUNCTION_DETECTOR_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include - -namespace boost { -namespace container { -namespace function_detector { - - typedef char NotFoundType; - struct StaticFunctionType { NotFoundType x [2]; }; - struct NonStaticFunctionType { NotFoundType x [3]; }; - - enum - { NotFound = 0, - StaticFunction = sizeof( StaticFunctionType ) - sizeof( NotFoundType ), - NonStaticFunction = sizeof( NonStaticFunctionType ) - sizeof( NotFoundType ) - }; - -} //namespace boost { -} //namespace container { -} //namespace function_detector { - -#define BOOST_CONTAINER_CREATE_FUNCTION_DETECTOR(Identifier, InstantiationKey) \ - namespace boost { \ - namespace container { \ - namespace function_detector { \ - template < class T, \ - class NonStaticType, \ - class NonStaticConstType, \ - class StaticType > \ - class DetectMember_##InstantiationKey_##Identifier { \ - template < NonStaticType > \ - struct TestNonStaticNonConst ; \ - \ - template < NonStaticConstType > \ - struct TestNonStaticConst ; \ - \ - template < StaticType > \ - struct TestStatic ; \ - \ - template \ - static NonStaticFunctionType Test( TestNonStaticNonConst<&U::Identifier>*, int ); \ - \ - template \ - static NonStaticFunctionType Test( TestNonStaticConst<&U::Identifier>*, int ); \ - \ - template \ - static StaticFunctionType Test( TestStatic<&U::Identifier>*, int ); \ - \ - template \ - static NotFoundType Test( ... ); \ - public : \ - static const int check = NotFound + (sizeof(Test(0, 0)) - sizeof(NotFoundType));\ - };\ -}}} //namespace boost::container::function_detector { - -#define BOOST_CONTAINER_DETECT_FUNCTION(Class, InstantiationKey, ReturnType, Identifier, Params) \ - ::boost::container::function_detector::DetectMember_##InstantiationKey_##Identifier< Class,\ - ReturnType (Class::*)Params,\ - ReturnType (Class::*)Params const,\ - ReturnType (*)Params \ - >::check - -#include - -#endif //@ifndef BOOST_CONTAINER_DETAIL_FUNCTION_DETECTOR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/is_sorted.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/is_sorted.hpp deleted file mode 100644 index b8c223bb7bd..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/is_sorted.hpp +++ /dev/null @@ -1,57 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2016-2016. 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_IS_SORTED_HPP -#define BOOST_CONTAINER_DETAIL_IS_SORTED_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -namespace boost { -namespace container { -namespace container_detail { - -template -bool is_sorted (ForwardIterator first, ForwardIterator last, Pred pred) -{ - if(first != last){ - ForwardIterator next = first; - while (++next != last){ - if(pred(*next, *first)) - return false; - ++first; - } - } - return true; -} - -template -bool is_sorted_and_unique (ForwardIterator first, ForwardIterator last, Pred pred) -{ - if(first != last){ - ForwardIterator next = first; - while (++next != last){ - if(!pred(*first, *next)) - return false; - ++first; - } - } - return true; -} - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DETAIL_IS_SORTED_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/iterator.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/iterator.hpp deleted file mode 100644 index 8538acc161f..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/iterator.hpp +++ /dev/null @@ -1,40 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2014-2014. -// -// 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_ITERATOR_HPP -#define BOOST_CONTAINER_DETAIL_ITERATOR_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include - -namespace boost { -namespace container { - -using ::boost::intrusive::iterator_traits; -using ::boost::intrusive::iterator_distance; -using ::boost::intrusive::iterator_advance; -using ::boost::intrusive::iterator; -using ::boost::intrusive::iterator_enable_if_tag; -using ::boost::intrusive::iterator_disable_if_tag; -using ::boost::intrusive::iterator_arrow_result; - -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DETAIL_ITERATORS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/iterator_to_raw_pointer.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/iterator_to_raw_pointer.hpp deleted file mode 100644 index 8c7c8800357..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/iterator_to_raw_pointer.hpp +++ /dev/null @@ -1,33 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2014-2015. 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_ITERATOR_TO_RAW_POINTER_HPP -#define BOOST_CONTAINER_DETAIL_ITERATOR_TO_RAW_POINTER_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include - -namespace boost { -namespace container { -namespace container_detail { - -using ::boost::movelib::iterator_to_raw_pointer; - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DETAIL_ITERATOR_TO_RAW_POINTER_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/iterators.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/iterators.hpp deleted file mode 100644 index 11ffaae65e8..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/iterators.hpp +++ /dev/null @@ -1,875 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-2013. -// (C) Copyright Gennaro Prota 2003 - 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/libs/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_ITERATORS_HPP -#define BOOST_CONTAINER_DETAIL_ITERATORS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#else -#include -#endif -#include - -namespace boost { -namespace container { - -template -class constant_iterator - : public ::boost::container::iterator - -{ - typedef constant_iterator this_type; - - public: - explicit constant_iterator(const T &ref, Difference range_size) - : m_ptr(&ref), m_num(range_size){} - - //Constructors - constant_iterator() - : m_ptr(0), m_num(0){} - - constant_iterator& operator++() - { increment(); return *this; } - - constant_iterator operator++(int) - { - constant_iterator result (*this); - increment(); - return result; - } - - constant_iterator& operator--() - { decrement(); return *this; } - - constant_iterator operator--(int) - { - constant_iterator result (*this); - decrement(); - return result; - } - - friend bool operator== (const constant_iterator& i, const constant_iterator& i2) - { return i.equal(i2); } - - friend bool operator!= (const constant_iterator& i, const constant_iterator& i2) - { return !(i == i2); } - - friend bool operator< (const constant_iterator& i, const constant_iterator& i2) - { return i.less(i2); } - - friend bool operator> (const constant_iterator& i, const constant_iterator& i2) - { return i2 < i; } - - friend bool operator<= (const constant_iterator& i, const constant_iterator& i2) - { return !(i > i2); } - - friend bool operator>= (const constant_iterator& i, const constant_iterator& i2) - { return !(i < i2); } - - friend Difference operator- (const constant_iterator& i, const constant_iterator& i2) - { return i2.distance_to(i); } - - //Arithmetic - constant_iterator& operator+=(Difference off) - { this->advance(off); return *this; } - - constant_iterator operator+(Difference off) const - { - constant_iterator other(*this); - other.advance(off); - return other; - } - - friend constant_iterator operator+(Difference off, const constant_iterator& right) - { return right + off; } - - constant_iterator& operator-=(Difference off) - { this->advance(-off); return *this; } - - constant_iterator operator-(Difference off) const - { return *this + (-off); } - - const T& operator*() const - { return dereference(); } - - const T& operator[] (Difference ) const - { return dereference(); } - - const T* operator->() const - { return &(dereference()); } - - private: - const T * m_ptr; - Difference m_num; - - void increment() - { --m_num; } - - void decrement() - { ++m_num; } - - bool equal(const this_type &other) const - { return m_num == other.m_num; } - - bool less(const this_type &other) const - { return other.m_num < m_num; } - - const T & dereference() const - { return *m_ptr; } - - void advance(Difference n) - { m_num -= n; } - - Difference distance_to(const this_type &other)const - { return m_num - other.m_num; } -}; - -template -class value_init_construct_iterator - : public ::boost::container::iterator - -{ - typedef value_init_construct_iterator this_type; - - public: - explicit value_init_construct_iterator(Difference range_size) - : m_num(range_size){} - - //Constructors - value_init_construct_iterator() - : m_num(0){} - - value_init_construct_iterator& operator++() - { increment(); return *this; } - - value_init_construct_iterator operator++(int) - { - value_init_construct_iterator result (*this); - increment(); - return result; - } - - value_init_construct_iterator& operator--() - { decrement(); return *this; } - - value_init_construct_iterator operator--(int) - { - value_init_construct_iterator result (*this); - decrement(); - return result; - } - - friend bool operator== (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) - { return i.equal(i2); } - - friend bool operator!= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) - { return !(i == i2); } - - friend bool operator< (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) - { return i.less(i2); } - - friend bool operator> (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) - { return i2 < i; } - - friend bool operator<= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) - { return !(i > i2); } - - friend bool operator>= (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) - { return !(i < i2); } - - friend Difference operator- (const value_init_construct_iterator& i, const value_init_construct_iterator& i2) - { return i2.distance_to(i); } - - //Arithmetic - value_init_construct_iterator& operator+=(Difference off) - { this->advance(off); return *this; } - - value_init_construct_iterator operator+(Difference off) const - { - value_init_construct_iterator other(*this); - other.advance(off); - return other; - } - - friend value_init_construct_iterator operator+(Difference off, const value_init_construct_iterator& right) - { return right + off; } - - value_init_construct_iterator& operator-=(Difference off) - { this->advance(-off); return *this; } - - value_init_construct_iterator operator-(Difference off) const - { return *this + (-off); } - - //This pseudo-iterator's dereference operations have no sense since value is not - //constructed until ::boost::container::construct_in_place is called. - //So comment them to catch bad uses - //const T& operator*() const; - //const T& operator[](difference_type) const; - //const T* operator->() const; - - private: - Difference m_num; - - void increment() - { --m_num; } - - void decrement() - { ++m_num; } - - bool equal(const this_type &other) const - { return m_num == other.m_num; } - - bool less(const this_type &other) const - { return other.m_num < m_num; } - - const T & dereference() const - { - static T dummy; - return dummy; - } - - void advance(Difference n) - { m_num -= n; } - - Difference distance_to(const this_type &other)const - { return m_num - other.m_num; } -}; - -template -class default_init_construct_iterator - : public ::boost::container::iterator - -{ - typedef default_init_construct_iterator this_type; - - public: - explicit default_init_construct_iterator(Difference range_size) - : m_num(range_size){} - - //Constructors - default_init_construct_iterator() - : m_num(0){} - - default_init_construct_iterator& operator++() - { increment(); return *this; } - - default_init_construct_iterator operator++(int) - { - default_init_construct_iterator result (*this); - increment(); - return result; - } - - default_init_construct_iterator& operator--() - { decrement(); return *this; } - - default_init_construct_iterator operator--(int) - { - default_init_construct_iterator result (*this); - decrement(); - return result; - } - - friend bool operator== (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) - { return i.equal(i2); } - - friend bool operator!= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) - { return !(i == i2); } - - friend bool operator< (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) - { return i.less(i2); } - - friend bool operator> (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) - { return i2 < i; } - - friend bool operator<= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) - { return !(i > i2); } - - friend bool operator>= (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) - { return !(i < i2); } - - friend Difference operator- (const default_init_construct_iterator& i, const default_init_construct_iterator& i2) - { return i2.distance_to(i); } - - //Arithmetic - default_init_construct_iterator& operator+=(Difference off) - { this->advance(off); return *this; } - - default_init_construct_iterator operator+(Difference off) const - { - default_init_construct_iterator other(*this); - other.advance(off); - return other; - } - - friend default_init_construct_iterator operator+(Difference off, const default_init_construct_iterator& right) - { return right + off; } - - default_init_construct_iterator& operator-=(Difference off) - { this->advance(-off); return *this; } - - default_init_construct_iterator operator-(Difference off) const - { return *this + (-off); } - - //This pseudo-iterator's dereference operations have no sense since value is not - //constructed until ::boost::container::construct_in_place is called. - //So comment them to catch bad uses - //const T& operator*() const; - //const T& operator[](difference_type) const; - //const T* operator->() const; - - private: - Difference m_num; - - void increment() - { --m_num; } - - void decrement() - { ++m_num; } - - bool equal(const this_type &other) const - { return m_num == other.m_num; } - - bool less(const this_type &other) const - { return other.m_num < m_num; } - - const T & dereference() const - { - static T dummy; - return dummy; - } - - void advance(Difference n) - { m_num -= n; } - - Difference distance_to(const this_type &other)const - { return m_num - other.m_num; } -}; - - -template -class repeat_iterator - : public ::boost::container::iterator - -{ - typedef repeat_iterator this_type; - public: - explicit repeat_iterator(T &ref, Difference range_size) - : m_ptr(&ref), m_num(range_size){} - - //Constructors - repeat_iterator() - : m_ptr(0), m_num(0){} - - this_type& operator++() - { increment(); return *this; } - - this_type operator++(int) - { - this_type result (*this); - increment(); - return result; - } - - this_type& operator--() - { increment(); return *this; } - - this_type operator--(int) - { - this_type result (*this); - increment(); - return result; - } - - friend bool operator== (const this_type& i, const this_type& i2) - { return i.equal(i2); } - - friend bool operator!= (const this_type& i, const this_type& i2) - { return !(i == i2); } - - friend bool operator< (const this_type& i, const this_type& i2) - { return i.less(i2); } - - friend bool operator> (const this_type& i, const this_type& i2) - { return i2 < i; } - - friend bool operator<= (const this_type& i, const this_type& i2) - { return !(i > i2); } - - friend bool operator>= (const this_type& i, const this_type& i2) - { return !(i < i2); } - - friend Difference operator- (const this_type& i, const this_type& i2) - { return i2.distance_to(i); } - - //Arithmetic - this_type& operator+=(Difference off) - { this->advance(off); return *this; } - - this_type operator+(Difference off) const - { - this_type other(*this); - other.advance(off); - return other; - } - - friend this_type operator+(Difference off, const this_type& right) - { return right + off; } - - this_type& operator-=(Difference off) - { this->advance(-off); return *this; } - - this_type operator-(Difference off) const - { return *this + (-off); } - - T& operator*() const - { return dereference(); } - - T& operator[] (Difference ) const - { return dereference(); } - - T *operator->() const - { return &(dereference()); } - - private: - T * m_ptr; - Difference m_num; - - void increment() - { --m_num; } - - void decrement() - { ++m_num; } - - bool equal(const this_type &other) const - { return m_num == other.m_num; } - - bool less(const this_type &other) const - { return other.m_num < m_num; } - - T & dereference() const - { return *m_ptr; } - - void advance(Difference n) - { m_num -= n; } - - Difference distance_to(const this_type &other)const - { return m_num - other.m_num; } -}; - -template -class emplace_iterator - : public ::boost::container::iterator - -{ - typedef emplace_iterator this_type; - - public: - typedef Difference difference_type; - BOOST_CONTAINER_FORCEINLINE explicit emplace_iterator(EmplaceFunctor&e) - : m_num(1), m_pe(&e){} - - BOOST_CONTAINER_FORCEINLINE emplace_iterator() - : m_num(0), m_pe(0){} - - BOOST_CONTAINER_FORCEINLINE this_type& operator++() - { increment(); return *this; } - - this_type operator++(int) - { - this_type result (*this); - increment(); - return result; - } - - BOOST_CONTAINER_FORCEINLINE this_type& operator--() - { decrement(); return *this; } - - this_type operator--(int) - { - this_type result (*this); - decrement(); - return result; - } - - BOOST_CONTAINER_FORCEINLINE friend bool operator== (const this_type& i, const this_type& i2) - { return i.equal(i2); } - - BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const this_type& i, const this_type& i2) - { return !(i == i2); } - - BOOST_CONTAINER_FORCEINLINE friend bool operator< (const this_type& i, const this_type& i2) - { return i.less(i2); } - - BOOST_CONTAINER_FORCEINLINE friend bool operator> (const this_type& i, const this_type& i2) - { return i2 < i; } - - BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const this_type& i, const this_type& i2) - { return !(i > i2); } - - BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const this_type& i, const this_type& i2) - { return !(i < i2); } - - BOOST_CONTAINER_FORCEINLINE friend difference_type operator- (const this_type& i, const this_type& i2) - { return i2.distance_to(i); } - - //Arithmetic - BOOST_CONTAINER_FORCEINLINE this_type& operator+=(difference_type off) - { this->advance(off); return *this; } - - this_type operator+(difference_type off) const - { - this_type other(*this); - other.advance(off); - return other; - } - - BOOST_CONTAINER_FORCEINLINE friend this_type operator+(difference_type off, const this_type& right) - { return right + off; } - - BOOST_CONTAINER_FORCEINLINE this_type& operator-=(difference_type off) - { this->advance(-off); return *this; } - - BOOST_CONTAINER_FORCEINLINE this_type operator-(difference_type off) const - { return *this + (-off); } - - private: - //This pseudo-iterator's dereference operations have no sense since value is not - //constructed until ::boost::container::construct_in_place is called. - //So comment them to catch bad uses - const T& operator*() const; - const T& operator[](difference_type) const; - const T* operator->() const; - - public: - template - void construct_in_place(Allocator &a, T* ptr) - { (*m_pe)(a, ptr); } - - template - void assign_in_place(DestIt dest) - { (*m_pe)(dest); } - - private: - difference_type m_num; - EmplaceFunctor * m_pe; - - BOOST_CONTAINER_FORCEINLINE void increment() - { --m_num; } - - BOOST_CONTAINER_FORCEINLINE void decrement() - { ++m_num; } - - BOOST_CONTAINER_FORCEINLINE bool equal(const this_type &other) const - { return m_num == other.m_num; } - - BOOST_CONTAINER_FORCEINLINE bool less(const this_type &other) const - { return other.m_num < m_num; } - - BOOST_CONTAINER_FORCEINLINE const T & dereference() const - { - static T dummy; - return dummy; - } - - BOOST_CONTAINER_FORCEINLINE void advance(difference_type n) - { m_num -= n; } - - BOOST_CONTAINER_FORCEINLINE difference_type distance_to(const this_type &other)const - { return difference_type(m_num - other.m_num); } -}; - -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -template -struct emplace_functor -{ - typedef typename container_detail::build_number_seq::type index_tuple_t; - - emplace_functor(BOOST_FWD_REF(Args)... args) - : args_(args...) - {} - - template - BOOST_CONTAINER_FORCEINLINE void operator()(Allocator &a, T *ptr) - { emplace_functor::inplace_impl(a, ptr, index_tuple_t()); } - - template - BOOST_CONTAINER_FORCEINLINE void operator()(DestIt dest) - { emplace_functor::inplace_impl(dest, index_tuple_t()); } - - private: - template - BOOST_CONTAINER_FORCEINLINE void inplace_impl(Allocator &a, T* ptr, const container_detail::index_tuple&) - { - allocator_traits::construct - (a, ptr, ::boost::forward(container_detail::get(args_))...); - } - - template - BOOST_CONTAINER_FORCEINLINE void inplace_impl(DestIt dest, const container_detail::index_tuple&) - { - typedef typename boost::container::iterator_traits::value_type value_type; - value_type && tmp= value_type(::boost::forward(container_detail::get(args_))...); - *dest = ::boost::move(tmp); - } - - container_detail::tuple args_; -}; - -template -struct emplace_functor_type -{ - typedef emplace_functor type; -}; - -#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -//Partial specializations cannot match argument list for primary template, so add an extra argument -template -struct emplace_functor_type; - -#define BOOST_MOVE_ITERATOR_EMPLACE_FUNCTOR_CODE(N) \ -BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ -struct emplace_functor##N\ -{\ - explicit emplace_functor##N( BOOST_MOVE_UREF##N )\ - BOOST_MOVE_COLON##N BOOST_MOVE_FWD_INIT##N{}\ - \ - template\ - void operator()(Allocator &a, T *ptr)\ - { allocator_traits::construct(a, ptr BOOST_MOVE_I##N BOOST_MOVE_MFWD##N); }\ - \ - template\ - void operator()(DestIt dest)\ - {\ - typedef typename boost::container::iterator_traits::value_type value_type;\ - BOOST_MOVE_IF(N, value_type tmp(BOOST_MOVE_MFWD##N), container_detail::value_init tmp) ;\ - *dest = ::boost::move(const_cast(BOOST_MOVE_IF(N, tmp, tmp.get())));\ - }\ - \ - BOOST_MOVE_MREF##N\ -};\ -\ -template \ -struct emplace_functor_type\ -{\ - typedef emplace_functor##N BOOST_MOVE_LT##N BOOST_MOVE_TARG##N BOOST_MOVE_GT##N type;\ -};\ -// - -BOOST_MOVE_ITERATE_0TO9(BOOST_MOVE_ITERATOR_EMPLACE_FUNCTOR_CODE) - -#undef BOOST_MOVE_ITERATOR_EMPLACE_FUNCTOR_CODE - -#endif - -namespace container_detail { - -template -struct has_iterator_category -{ - struct two { char _[2]; }; - - template - static char test(int, typename X::iterator_category*); - - template - static two test(int, ...); - - static const bool value = (1 == sizeof(test(0, 0))); -}; - - -template::value > -struct is_input_iterator -{ - static const bool value = is_same::value; -}; - -template -struct is_input_iterator -{ - static const bool value = false; -}; - -template -struct is_not_input_iterator -{ - static const bool value = !is_input_iterator::value; -}; - -template::value > -struct is_forward_iterator -{ - static const bool value = is_same::value; -}; - -template -struct is_forward_iterator -{ - static const bool value = false; -}; - -template::value > -struct is_bidirectional_iterator -{ - static const bool value = is_same::value; -}; - -template -struct is_bidirectional_iterator -{ - static const bool value = false; -}; - -template -struct iiterator_node_value_type { - typedef typename IINodeType::value_type type; -}; - -template -struct iiterator_types -{ - typedef typename IIterator::value_type it_value_type; - typedef typename iiterator_node_value_type::type value_type; - typedef typename boost::container::iterator_traits::pointer it_pointer; - typedef typename boost::container::iterator_traits::difference_type difference_type; - typedef typename ::boost::intrusive::pointer_traits:: - template rebind_pointer::type pointer; - typedef typename ::boost::intrusive::pointer_traits:: - template rebind_pointer::type const_pointer; - typedef typename ::boost::intrusive:: - pointer_traits::reference reference; - typedef typename ::boost::intrusive:: - pointer_traits::reference const_reference; - typedef typename IIterator::iterator_category iterator_category; -}; - -template -struct iterator_types -{ - typedef typename ::boost::container::iterator - < typename iiterator_types::iterator_category - , typename iiterator_types::value_type - , typename iiterator_types::difference_type - , typename iiterator_types::const_pointer - , typename iiterator_types::const_reference> type; -}; - -template -struct iterator_types -{ - typedef typename ::boost::container::iterator - < typename iiterator_types::iterator_category - , typename iiterator_types::value_type - , typename iiterator_types::difference_type - , typename iiterator_types::pointer - , typename iiterator_types::reference> type; -}; - -template -class iterator_from_iiterator -{ - typedef typename iterator_types::type types_t; - - public: - typedef typename types_t::pointer pointer; - typedef typename types_t::reference reference; - typedef typename types_t::difference_type difference_type; - typedef typename types_t::iterator_category iterator_category; - typedef typename types_t::value_type value_type; - - BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator() - : m_iit() - {} - - BOOST_CONTAINER_FORCEINLINE explicit iterator_from_iiterator(IIterator iit) BOOST_NOEXCEPT_OR_NOTHROW - : m_iit(iit) - {} - - BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator(iterator_from_iiterator const& other) BOOST_NOEXCEPT_OR_NOTHROW - : m_iit(other.get()) - {} - - BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW - { ++this->m_iit; return *this; } - - BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW - { - iterator_from_iiterator result (*this); - ++this->m_iit; - return result; - } - - BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW - { - //If the iterator_from_iiterator is not a bidirectional iterator, operator-- should not exist - BOOST_STATIC_ASSERT((is_bidirectional_iterator::value)); - --this->m_iit; return *this; - } - - BOOST_CONTAINER_FORCEINLINE iterator_from_iiterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW - { - iterator_from_iiterator result (*this); - --this->m_iit; - return result; - } - - BOOST_CONTAINER_FORCEINLINE friend bool operator== (const iterator_from_iiterator& l, const iterator_from_iiterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return l.m_iit == r.m_iit; } - - BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const iterator_from_iiterator& l, const iterator_from_iiterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return !(l == r); } - - BOOST_CONTAINER_FORCEINLINE reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->m_iit->get_data(); } - - BOOST_CONTAINER_FORCEINLINE pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW - { return ::boost::intrusive::pointer_traits::pointer_to(this->operator*()); } - - BOOST_CONTAINER_FORCEINLINE const IIterator &get() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->m_iit; } - - private: - IIterator m_iit; -}; - -} //namespace container_detail { - -using ::boost::intrusive::reverse_iterator; - -} //namespace container { -} //namespace boost { - -#include - -#endif //#ifndef BOOST_CONTAINER_DETAIL_ITERATORS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/math_functions.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/math_functions.hpp deleted file mode 100644 index e499f633ecc..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/math_functions.hpp +++ /dev/null @@ -1,123 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Stephen Cleary 2000. -// (C) Copyright Ion Gaztanaga 2007-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/container for documentation. -// -// This file is a slightly modified file from Boost.Pool -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_MATH_FUNCTIONS_HPP -#define BOOST_CONTAINER_DETAIL_MATH_FUNCTIONS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -#include -#include - -namespace boost { -namespace container { -namespace container_detail { - -// Greatest common divisor and least common multiple - -// -// gcd is an algorithm that calculates the greatest common divisor of two -// integers, using Euclid's algorithm. -// -// Pre: A > 0 && B > 0 -// Recommended: A > B -template -inline Integer gcd(Integer A, Integer B) -{ - do - { - const Integer tmp(B); - B = A % B; - A = tmp; - } while (B != 0); - - return A; -} - -// -// lcm is an algorithm that calculates the least common multiple of two -// integers. -// -// Pre: A > 0 && B > 0 -// Recommended: A > B -template -inline Integer lcm(const Integer & A, const Integer & B) -{ - Integer ret = A; - ret /= gcd(A, B); - ret *= B; - return ret; -} - -template -inline Integer log2_ceil(const Integer & A) -{ - Integer i = 0; - Integer power_of_2 = 1; - - while(power_of_2 < A){ - power_of_2 <<= 1; - ++i; - } - return i; -} - -template -inline Integer upper_power_of_2(const Integer & A) -{ - Integer power_of_2 = 1; - - while(power_of_2 < A){ - power_of_2 <<= 1; - } - return power_of_2; -} - -//This function uses binary search to discover the -//highest set bit of the integer -inline std::size_t floor_log2 (std::size_t x) -{ - const std::size_t Bits = sizeof(std::size_t)*CHAR_BIT; - const bool Size_t_Bits_Power_2= !(Bits & (Bits-1)); - BOOST_STATIC_ASSERT(((Size_t_Bits_Power_2)== true)); - - std::size_t n = x; - std::size_t log2 = 0; - - for(std::size_t shift = Bits >> 1; shift; shift >>= 1){ - std::size_t tmp = n >> shift; - if (tmp) - log2 += shift, n = tmp; - } - - return log2; -} - -} // namespace container_detail -} // namespace container -} // namespace boost - -#include - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/min_max.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/min_max.hpp deleted file mode 100644 index 7486db7d055..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/min_max.hpp +++ /dev/null @@ -1,37 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_DETAIL_MIN_MAX_HPP -#define BOOST_CONTAINER_DETAIL_MIN_MAX_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -namespace boost { -namespace container { -namespace container_detail { - -template -const T &max_value(const T &a, const T &b) -{ return a > b ? a : b; } - -template -const T &min_value(const T &a, const T &b) -{ return a < b ? a : b; } - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DETAIL_MIN_MAX_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/minimal_char_traits_header.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/minimal_char_traits_header.hpp deleted file mode 100644 index a92a31a2b41..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/minimal_char_traits_header.hpp +++ /dev/null @@ -1,32 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2014-2015 -// -// 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_MINIMAL_CHAR_TRAITS_HEADER_HPP -#define BOOST_CONTAINER_DETAIL_MINIMAL_CHAR_TRAITS_HEADER_HPP -# -#ifndef BOOST_CONFIG_HPP -# include -#endif -# -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif -# -#//Try to avoid including , as it's quite big -#if defined(_MSC_VER) && defined(BOOST_DINKUMWARE_STDLIB) - #include //Dinkum libraries for MSVC define std::char_traits there -#elif defined(BOOST_GNU_STDLIB) - #include -#else - #include //Fallback -#endif - -#endif //BOOST_CONTAINER_DETAIL_MINIMAL_CHAR_TRAITS_HEADER_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/mpl.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/mpl.hpp deleted file mode 100644 index 82fcc7036db..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/mpl.hpp +++ /dev/null @@ -1,86 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP -#define BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include -#include - -#include - -namespace boost { -namespace container { -namespace container_detail { - -using boost::move_detail::integral_constant; -using boost::move_detail::true_type; -using boost::move_detail::false_type; -using boost::move_detail::enable_if_c; -using boost::move_detail::enable_if; -using boost::move_detail::enable_if_convertible; -using boost::move_detail::disable_if_c; -using boost::move_detail::disable_if; -using boost::move_detail::disable_if_convertible; -using boost::move_detail::is_convertible; -using boost::move_detail::if_c; -using boost::move_detail::if_; -using boost::move_detail::identity; -using boost::move_detail::bool_; -using boost::move_detail::true_; -using boost::move_detail::false_; -using boost::move_detail::yes_type; -using boost::move_detail::no_type; -using boost::move_detail::bool_; -using boost::move_detail::true_; -using boost::move_detail::false_; -using boost::move_detail::unvoid_ref; -using boost::move_detail::and_; -using boost::move_detail::or_; -using boost::move_detail::not_; -using boost::move_detail::enable_if_and; -using boost::move_detail::disable_if_and; -using boost::move_detail::enable_if_or; -using boost::move_detail::disable_if_or; - -template -struct select1st -{ - typedef FirstType type; - - template - const type& operator()(const T& x) const - { return x.first; } - - template - type& operator()(T& x) - { return const_cast(x.first); } -}; - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#include - -#endif //#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP - diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/multiallocation_chain.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/multiallocation_chain.hpp deleted file mode 100644 index bce1b8651f6..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/multiallocation_chain.hpp +++ /dev/null @@ -1,298 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_MULTIALLOCATION_CHAIN_HPP -#define BOOST_CONTAINER_DETAIL_MULTIALLOCATION_CHAIN_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -// container -#include -// container/detail -#include -#include -#include -// intrusive -#include -#include -// move -#include - -namespace boost { -namespace container { -namespace container_detail { - -template -class basic_multiallocation_chain -{ - private: - typedef bi::slist_base_hook - ,bi::link_mode - > node; - - typedef typename boost::intrusive::pointer_traits - ::template rebind_pointer::type char_ptr; - typedef typename boost::intrusive:: - pointer_traits::difference_type difference_type; - - typedef bi::slist< node - , bi::linear - , bi::cache_last - , bi::size_type::type> - > slist_impl_t; - slist_impl_t slist_impl_; - - typedef typename boost::intrusive::pointer_traits - ::template rebind_pointer::type node_ptr; - typedef typename boost::intrusive:: - pointer_traits node_ptr_traits; - - static node & to_node(const VoidPointer &p) - { return *static_cast(static_cast(boost::movelib::to_raw_pointer(p))); } - - static VoidPointer from_node(node &n) - { return node_ptr_traits::pointer_to(n); } - - static node_ptr to_node_ptr(const VoidPointer &p) - { return node_ptr_traits::static_cast_from(p); } - - BOOST_MOVABLE_BUT_NOT_COPYABLE(basic_multiallocation_chain) - - public: - - typedef VoidPointer void_pointer; - typedef typename slist_impl_t::iterator iterator; - typedef typename slist_impl_t::size_type size_type; - - basic_multiallocation_chain() - : slist_impl_() - {} - - basic_multiallocation_chain(const void_pointer &b, const void_pointer &before_e, size_type n) - : slist_impl_(to_node_ptr(b), to_node_ptr(before_e), n) - {} - - basic_multiallocation_chain(BOOST_RV_REF(basic_multiallocation_chain) other) - : slist_impl_(::boost::move(other.slist_impl_)) - {} - - basic_multiallocation_chain& operator=(BOOST_RV_REF(basic_multiallocation_chain) other) - { - slist_impl_ = ::boost::move(other.slist_impl_); - return *this; - } - - bool empty() const - { return slist_impl_.empty(); } - - size_type size() const - { return slist_impl_.size(); } - - iterator before_begin() - { return slist_impl_.before_begin(); } - - iterator begin() - { return slist_impl_.begin(); } - - iterator end() - { return slist_impl_.end(); } - - iterator last() - { return slist_impl_.last(); } - - void clear() - { slist_impl_.clear(); } - - iterator insert_after(iterator it, void_pointer m) - { return slist_impl_.insert_after(it, to_node(m)); } - - void push_front(const void_pointer &m) - { return slist_impl_.push_front(to_node(m)); } - - void push_back(const void_pointer &m) - { return slist_impl_.push_back(to_node(m)); } - - void_pointer pop_front() - { - node & n = slist_impl_.front(); - void_pointer ret = from_node(n); - slist_impl_.pop_front(); - return ret; - } - - void splice_after(iterator after_this, basic_multiallocation_chain &x, iterator before_b, iterator before_e, size_type n) - { slist_impl_.splice_after(after_this, x.slist_impl_, before_b, before_e, n); } - - void splice_after(iterator after_this, basic_multiallocation_chain &x) - { slist_impl_.splice_after(after_this, x.slist_impl_); } - - void erase_after(iterator before_b, iterator e, size_type n) - { slist_impl_.erase_after(before_b, e, n); } - - void_pointer incorporate_after(iterator after_this, const void_pointer &b, size_type unit_bytes, size_type num_units) - { - typedef typename boost::intrusive::pointer_traits char_pointer_traits; - char_ptr elem = char_pointer_traits::static_cast_from(b); - if(num_units){ - char_ptr prev_elem = elem; - elem += unit_bytes; - for(size_type i = 0; i != num_units-1; ++i, elem += unit_bytes){ - ::new (boost::movelib::to_raw_pointer(prev_elem)) void_pointer(elem); - prev_elem = elem; - } - slist_impl_.incorporate_after(after_this, to_node_ptr(b), to_node_ptr(prev_elem), num_units); - } - return elem; - } - - void incorporate_after(iterator after_this, void_pointer b, void_pointer before_e, size_type n) - { slist_impl_.incorporate_after(after_this, to_node_ptr(b), to_node_ptr(before_e), n); } - - void swap(basic_multiallocation_chain &x) - { slist_impl_.swap(x.slist_impl_); } - - static iterator iterator_to(const void_pointer &p) - { return slist_impl_t::s_iterator_to(to_node(p)); } - - std::pair extract_data() - { - std::pair ret - (slist_impl_.begin().operator->() - ,slist_impl_.last().operator->()); - slist_impl_.clear(); - return ret; - } -}; - -template -struct cast_functor -{ - typedef typename container_detail::add_reference::type result_type; - template - result_type operator()(U &ptr) const - { return *static_cast(static_cast(&ptr)); } -}; - -template -class transform_multiallocation_chain - : public MultiallocationChain -{ - private: - BOOST_MOVABLE_BUT_NOT_COPYABLE(transform_multiallocation_chain) - //transform_multiallocation_chain(const transform_multiallocation_chain &); - //transform_multiallocation_chain & operator=(const transform_multiallocation_chain &); - - typedef typename MultiallocationChain::void_pointer void_pointer; - typedef typename boost::intrusive::pointer_traits - void_pointer_traits; - typedef typename void_pointer_traits::template - rebind_pointer::type pointer; - typedef typename boost::intrusive::pointer_traits - pointer_traits; - - static pointer cast(const void_pointer &p) - { return pointer_traits::static_cast_from(p); } - - public: - typedef transform_iterator - < typename MultiallocationChain::iterator - , container_detail::cast_functor > iterator; - typedef typename MultiallocationChain::size_type size_type; - - transform_multiallocation_chain() - : MultiallocationChain() - {} - - transform_multiallocation_chain(BOOST_RV_REF(transform_multiallocation_chain) other) - : MultiallocationChain(::boost::move(static_cast(other))) - {} - - transform_multiallocation_chain(BOOST_RV_REF(MultiallocationChain) other) - : MultiallocationChain(::boost::move(static_cast(other))) - {} - - transform_multiallocation_chain& operator=(BOOST_RV_REF(transform_multiallocation_chain) other) - { - return static_cast - (this->MultiallocationChain::operator=(::boost::move(static_cast(other)))); - } -/* - void push_front(const pointer &mem) - { holder_.push_front(mem); } - - void push_back(const pointer &mem) - { return holder_.push_back(mem); } - - void swap(transform_multiallocation_chain &other_chain) - { holder_.swap(other_chain.holder_); } - - void splice_after(iterator after_this, transform_multiallocation_chain &x, iterator before_b, iterator before_e, size_type n) - { holder_.splice_after(after_this.base(), x.holder_, before_b.base(), before_e.base(), n); } - - void incorporate_after(iterator after_this, pointer b, pointer before_e, size_type n) - { holder_.incorporate_after(after_this.base(), b, before_e, n); } -*/ - pointer pop_front() - { return cast(this->MultiallocationChain::pop_front()); } -/* - bool empty() const - { return holder_.empty(); } - - iterator before_begin() - { return iterator(holder_.before_begin()); } -*/ - iterator begin() - { return iterator(this->MultiallocationChain::begin()); } -/* - iterator end() - { return iterator(holder_.end()); } - - iterator last() - { return iterator(holder_.last()); } - - size_type size() const - { return holder_.size(); } - - void clear() - { holder_.clear(); } -*/ - iterator insert_after(iterator it, pointer m) - { return iterator(this->MultiallocationChain::insert_after(it.base(), m)); } - - static iterator iterator_to(const pointer &p) - { return iterator(MultiallocationChain::iterator_to(p)); } - - std::pair extract_data() - { - std::pair data(this->MultiallocationChain::extract_data()); - return std::pair(cast(data.first), cast(data.second)); - } -/* - MultiallocationChain &extract_multiallocation_chain() - { return holder_; }*/ -}; - -}}} - -// namespace container_detail { -// namespace container { -// namespace boost { - -#include - -#endif //BOOST_CONTAINER_DETAIL_MULTIALLOCATION_CHAIN_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/mutex.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/mutex.hpp deleted file mode 100644 index 9743614c233..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/mutex.hpp +++ /dev/null @@ -1,283 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Stephen Cleary 2000 -// (C) Copyright Ion Gaztanaga 2015-2017. -// -// 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_MUTEX_HPP -#define BOOST_CONTAINER_MUTEX_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -//#define BOOST_CONTAINER_NO_MT -//#define BOOST_CONTAINER_NO_SPINLOCKS - -#include -#include - -// Extremely Light-Weight wrapper classes for OS thread synchronization - -#define BOOST_MUTEX_HELPER_NONE 0 -#define BOOST_MUTEX_HELPER_WIN32 1 -#define BOOST_MUTEX_HELPER_PTHREAD 2 -#define BOOST_MUTEX_HELPER_SPINLOCKS 3 - -#if !defined(BOOST_HAS_THREADS) && !defined(BOOST_NO_MT) -# define BOOST_NO_MT -#endif - -#if defined(BOOST_NO_MT) || defined(BOOST_CONTAINER_NO_MT) - // No multithreading -> make locks into no-ops - #define BOOST_MUTEX_HELPER BOOST_MUTEX_HELPER_NONE -#else - //Taken from dlmalloc - #if !defined(BOOST_CONTAINER_NO_SPINLOCKS) && \ - ((defined(__GNUC__) && \ - ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) || \ - defined(__i386__) || defined(__x86_64__))) || \ - (defined(_MSC_VER) && _MSC_VER>=1310)) - #define BOOST_MUTEX_HELPER BOOST_MUTEX_HELPER_SPINLOCKS - #endif - - #if defined(BOOST_WINDOWS) - #include - #ifndef BOOST_MUTEX_HELPER - #define BOOST_MUTEX_HELPER BOOST_MUTEX_HELPER_WIN32 - #endif - #elif defined(BOOST_HAS_UNISTD_H) - #include - #if !defined(BOOST_MUTEX_HELPER) && (defined(_POSIX_THREADS) || defined(BOOST_HAS_PTHREADS)) - #define BOOST_MUTEX_HELPER BOOST_MUTEX_HELPER_PTHREAD - #endif - #endif -#endif - -#ifndef BOOST_MUTEX_HELPER - #error Unable to determine platform mutex type; #define BOOST_NO_MT to assume single-threaded -#endif - -#if BOOST_MUTEX_HELPER == BOOST_MUTEX_HELPER_NONE - //... -#elif BOOST_MUTEX_HELPER == BOOST_MUTEX_HELPER_SPINLOCKS - #if defined(_MSC_VER) - #ifndef _M_AMD64 - /* These are already defined on AMD64 builds */ - #ifdef __cplusplus - extern "C" { - #endif /* __cplusplus */ - long __cdecl _InterlockedCompareExchange(long volatile *Dest, long Exchange, long Comp); - long __cdecl _InterlockedExchange(long volatile *Target, long Value); - #ifdef __cplusplus - } - #endif /* __cplusplus */ - #endif /* _M_AMD64 */ - #pragma intrinsic (_InterlockedCompareExchange) - #pragma intrinsic (_InterlockedExchange) - #define interlockedcompareexchange _InterlockedCompareExchange - #define interlockedexchange _InterlockedExchange - #elif defined(WIN32) && defined(__GNUC__) - #define interlockedcompareexchange(a, b, c) __sync_val_compare_and_swap(a, c, b) - #define interlockedexchange __sync_lock_test_and_set - #endif /* Win32 */ - - /* First, define CAS_LOCK and CLEAR_LOCK on ints */ - /* Note CAS_LOCK defined to return 0 on success */ - - #if defined(__GNUC__)&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) - #define BOOST_CONTAINER_CAS_LOCK(sl) __sync_lock_test_and_set(sl, 1) - #define BOOST_CONTAINER_CLEAR_LOCK(sl) __sync_lock_release(sl) - - #elif (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))) - /* Custom spin locks for older gcc on x86 */ - static inline int boost_container_x86_cas_lock(int *sl) { - int ret; - int val = 1; - int cmp = 0; - __asm__ __volatile__ ("lock; cmpxchgl %1, %2" - : "=a" (ret) - : "r" (val), "m" (*(sl)), "0"(cmp) - : "memory", "cc"); - return ret; - } - - static inline void boost_container_x86_clear_lock(int* sl) { - assert(*sl != 0); - int prev = 0; - int ret; - __asm__ __volatile__ ("lock; xchgl %0, %1" - : "=r" (ret) - : "m" (*(sl)), "0"(prev) - : "memory"); - } - - #define BOOST_CONTAINER_CAS_LOCK(sl) boost_container_x86_cas_lock(sl) - #define BOOST_CONTAINER_CLEAR_LOCK(sl) boost_container_x86_clear_lock(sl) - - #else /* Win32 MSC */ - #define BOOST_CONTAINER_CAS_LOCK(sl) interlockedexchange((long volatile*)sl, (long)1) - #define BOOST_CONTAINER_CLEAR_LOCK(sl) interlockedexchange((long volatile*)sl, (long)0) - #endif - - /* How to yield for a spin lock */ - #define SPINS_PER_YIELD 63 - #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) - #define SLEEP_EX_DURATION 50 /* delay for yield/sleep */ - #define SPIN_LOCK_YIELD SleepEx(SLEEP_EX_DURATION, FALSE) - #elif defined (__SVR4) && defined (__sun) /* solaris */ - #include - #define SPIN_LOCK_YIELD thr_yield(); - #elif !defined(LACKS_SCHED_H) - #include - #define SPIN_LOCK_YIELD sched_yield(); - #else - #define SPIN_LOCK_YIELD - #endif /* ... yield ... */ - - #define BOOST_CONTAINER_SPINS_PER_YIELD 63 - inline int boost_interprocess_spin_acquire_lock(int *sl) { - int spins = 0; - while (*(volatile int *)sl != 0 || - BOOST_CONTAINER_CAS_LOCK(sl)) { - if ((++spins & BOOST_CONTAINER_SPINS_PER_YIELD) == 0) { - SPIN_LOCK_YIELD; - } - } - return 0; - } - #define BOOST_CONTAINER_MLOCK_T int - #define BOOST_CONTAINER_TRY_LOCK(sl) !BOOST_CONTAINER_CAS_LOCK(sl) - #define BOOST_CONTAINER_RELEASE_LOCK(sl) BOOST_CONTAINER_CLEAR_LOCK(sl) - #define BOOST_CONTAINER_ACQUIRE_LOCK(sl) (BOOST_CONTAINER_CAS_LOCK(sl)? boost_interprocess_spin_acquire_lock(sl) : 0) - #define BOOST_MOVE_INITIAL_LOCK(sl) (*sl = 0) - #define BOOST_CONTAINER_DESTROY_LOCK(sl) (0) -#elif BOOST_MUTEX_HELPER == BOOST_MUTEX_HELPER_WIN32 - // -#elif BOOST_MUTEX_HELPER == BOOST_MUTEX_HELPER_PTHREAD - #include -#endif - -namespace boost { -namespace container { -namespace container_detail { - -#if BOOST_MUTEX_HELPER == BOOST_MUTEX_HELPER_NONE - class null_mutex - { - private: - null_mutex(const null_mutex &); - void operator=(const null_mutex &); - - public: - null_mutex() { } - - static void lock() { } - static void unlock() { } - }; - - typedef null_mutex default_mutex; -#elif BOOST_MUTEX_HELPER == BOOST_MUTEX_HELPER_SPINLOCKS - - class spin_mutex - { - private: - BOOST_CONTAINER_MLOCK_T sl; - spin_mutex(const spin_mutex &); - void operator=(const spin_mutex &); - - public: - spin_mutex() { BOOST_MOVE_INITIAL_LOCK(&sl); } - - void lock() { BOOST_CONTAINER_ACQUIRE_LOCK(&sl); } - void unlock() { BOOST_CONTAINER_RELEASE_LOCK(&sl); } - }; - typedef spin_mutex default_mutex; -#elif BOOST_MUTEX_HELPER == BOOST_MUTEX_HELPER_WIN32 - class mutex - { - private: - CRITICAL_SECTION mtx; - - mutex(const mutex &); - void operator=(const mutex &); - - public: - mutex() - { InitializeCriticalSection(&mtx); } - - ~mutex() - { DeleteCriticalSection(&mtx); } - - void lock() - { EnterCriticalSection(&mtx); } - - void unlock() - { LeaveCriticalSection(&mtx); } - }; - - typedef mutex default_mutex; -#elif BOOST_MUTEX_HELPER == BOOST_MUTEX_HELPER_PTHREAD - class mutex - { - private: - pthread_mutex_t mtx; - - mutex(const mutex &); - void operator=(const mutex &); - - public: - mutex() - { pthread_mutex_init(&mtx, 0); } - - ~mutex() - { pthread_mutex_destroy(&mtx); } - - void lock() - { pthread_mutex_lock(&mtx); } - - void unlock() - { pthread_mutex_unlock(&mtx); } - }; - - typedef mutex default_mutex; -#endif - -template -class scoped_lock -{ - public: - scoped_lock(Mutex &m) - : m_(m) - { m_.lock(); } - ~scoped_lock() - { m_.unlock(); } - - private: - Mutex &m_; -}; - -} // namespace container_detail -} // namespace container -} // namespace boost - -#undef BOOST_MUTEX_HELPER_WIN32 -#undef BOOST_MUTEX_HELPER_PTHREAD -#undef BOOST_MUTEX_HELPER_NONE -#undef BOOST_MUTEX_HELPER -#undef BOOST_MUTEX_HELPER_SPINLOCKS - -#include - -#endif diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/next_capacity.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/next_capacity.hpp deleted file mode 100644 index 3bc98a3c914..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/next_capacity.hpp +++ /dev/null @@ -1,75 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2014-2015. 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_NEXT_CAPACITY_HPP -#define BOOST_CONTAINER_DETAIL_NEXT_CAPACITY_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -// container -#include -// container/detail -#include - -namespace boost { -namespace container { -namespace container_detail { - -enum NextCapacityOption { NextCapacityDouble, NextCapacity60Percent }; - -template -struct next_capacity_calculator; - -template -struct next_capacity_calculator -{ - static SizeType get(const SizeType max_size - ,const SizeType capacity - ,const SizeType n) - { - const SizeType remaining = max_size - capacity; - if ( remaining < n ) - boost::container::throw_length_error("get_next_capacity, allocator's max_size reached"); - const SizeType additional = max_value(n, capacity); - return ( remaining < additional ) ? max_size : ( capacity + additional ); - } -}; - -template -struct next_capacity_calculator -{ - static SizeType get(const SizeType max_size - ,const SizeType capacity - ,const SizeType n) - { - const SizeType remaining = max_size - capacity; - if ( remaining < n ) - boost::container::throw_length_error("get_next_capacity, allocator's max_size reached"); - const SizeType m3 = max_size/3; - - if (capacity < m3) - return capacity + max_value(3*(capacity+1)/5, n); - - if (capacity < m3*2) - return capacity + max_value((capacity+1)/2, n); - return max_size; - } -}; - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DETAIL_NEXT_CAPACITY_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/node_alloc_holder.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/node_alloc_holder.hpp deleted file mode 100644 index b6e602e8841..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/node_alloc_holder.hpp +++ /dev/null @@ -1,419 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_NODE_ALLOC_HPP_ -#define BOOST_CONTAINER_DETAIL_NODE_ALLOC_HPP_ - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -// container -#include -// container/detail -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -// intrusive -#include -#include -// move -#include -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif -// other -#include - - -namespace boost { -namespace container { -namespace container_detail { - -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(value_compare) -BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(predicate_type) - -template -struct node_alloc_holder -{ - //If the intrusive container is an associative container, obtain the predicate, which will - //be of type node_compare<>. If not an associative container value_compare will be a "nat" type. - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT - ( boost::container::container_detail:: - , ICont, value_compare, container_detail::nat) intrusive_value_compare; - //In that case obtain the value predicate from the node predicate via predicate_type - //if intrusive_value_compare is node_compare<>, nat otherwise - typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT - ( boost::container::container_detail:: - , intrusive_value_compare - , predicate_type, container_detail::nat) value_compare; - - typedef allocator_traits allocator_traits_type; - typedef typename allocator_traits_type::value_type value_type; - typedef ICont intrusive_container; - typedef typename ICont::value_type Node; - typedef typename allocator_traits_type::template - portable_rebind_alloc::type NodeAlloc; - typedef allocator_traits node_allocator_traits_type; - typedef container_detail::allocator_version_traits node_allocator_version_traits_type; - typedef Allocator ValAlloc; - typedef typename node_allocator_traits_type::pointer NodePtr; - typedef container_detail::scoped_deallocator Deallocator; - typedef typename node_allocator_traits_type::size_type size_type; - typedef typename node_allocator_traits_type::difference_type difference_type; - typedef container_detail::integral_constant::value> alloc_version; - typedef typename ICont::iterator icont_iterator; - typedef typename ICont::const_iterator icont_citerator; - typedef allocator_destroyer Destroyer; - typedef allocator_traits NodeAllocTraits; - typedef allocator_version_traits AllocVersionTraits; - - private: - BOOST_COPYABLE_AND_MOVABLE(node_alloc_holder) - - public: - - //Constructors for sequence containers - node_alloc_holder() - : members_() - {} - - explicit node_alloc_holder(const ValAlloc &a) - : members_(a) - {} - - //Constructors for associative containers - node_alloc_holder(const value_compare &c, const ValAlloc &a) - : members_(a, c) - {} - - explicit node_alloc_holder(const node_alloc_holder &x) - : members_(NodeAllocTraits::select_on_container_copy_construction(x.node_alloc())) - {} - - node_alloc_holder(const node_alloc_holder &x, const value_compare &c) - : members_(NodeAllocTraits::select_on_container_copy_construction(x.node_alloc()), c) - {} - - explicit node_alloc_holder(BOOST_RV_REF(node_alloc_holder) x) - : members_(boost::move(x.node_alloc())) - { this->icont().swap(x.icont()); } - - explicit node_alloc_holder(const value_compare &c) - : members_(c) - {} - - //helpers for move assignments - explicit node_alloc_holder(BOOST_RV_REF(node_alloc_holder) x, const value_compare &c) - : members_(boost::move(x.node_alloc()), c) - { this->icont().swap(x.icont()); } - - void copy_assign_alloc(const node_alloc_holder &x) - { - container_detail::bool_ flag; - container_detail::assign_alloc( static_cast(this->members_) - , static_cast(x.members_), flag); - } - - void move_assign_alloc( node_alloc_holder &x) - { - container_detail::bool_ flag; - container_detail::move_alloc( static_cast(this->members_) - , static_cast(x.members_), flag); - } - - ~node_alloc_holder() - { this->clear(alloc_version()); } - - size_type max_size() const - { return allocator_traits_type::max_size(this->node_alloc()); } - - NodePtr allocate_one() - { return AllocVersionTraits::allocate_one(this->node_alloc()); } - - void deallocate_one(const NodePtr &p) - { AllocVersionTraits::deallocate_one(this->node_alloc(), p); } - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - template - NodePtr create_node(Args &&...args) - { - NodePtr p = this->allocate_one(); - Deallocator node_deallocator(p, this->node_alloc()); - allocator_traits::construct - ( this->node_alloc() - , container_detail::addressof(p->m_data), boost::forward(args)...); - node_deallocator.release(); - //This does not throw - typedef typename Node::hook_type hook_type; - ::new(static_cast(boost::movelib::to_raw_pointer(p)), boost_container_new_t()) hook_type; - return (p); - } - - #else //defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #define BOOST_CONTAINER_NODE_ALLOC_HOLDER_CONSTRUCT_IMPL(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - NodePtr create_node(BOOST_MOVE_UREF##N)\ - {\ - NodePtr p = this->allocate_one();\ - Deallocator node_deallocator(p, this->node_alloc());\ - allocator_traits::construct\ - ( this->node_alloc()\ - , container_detail::addressof(p->m_data)\ - BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ - node_deallocator.release();\ - typedef typename Node::hook_type hook_type;\ - ::new(static_cast(boost::movelib::to_raw_pointer(p)), boost_container_new_t()) hook_type;\ - return (p);\ - }\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_NODE_ALLOC_HOLDER_CONSTRUCT_IMPL) - #undef BOOST_CONTAINER_NODE_ALLOC_HOLDER_CONSTRUCT_IMPL - - #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - template - NodePtr create_node_from_it(const It &it) - { - NodePtr p = this->allocate_one(); - Deallocator node_deallocator(p, this->node_alloc()); - ::boost::container::construct_in_place(this->node_alloc(), container_detail::addressof(p->m_data), it); - node_deallocator.release(); - //This does not throw - typedef typename Node::hook_type hook_type; - ::new(static_cast(boost::movelib::to_raw_pointer(p)), boost_container_new_t()) hook_type; - return (p); - } - - template - NodePtr create_node_from_key(BOOST_FWD_REF(KeyConvertible) key) - { - NodePtr p = this->allocate_one(); - NodeAlloc &na = this->node_alloc(); - Deallocator node_deallocator(p, this->node_alloc()); - node_allocator_traits_type::construct - (na, container_detail::addressof(p->m_data.first), boost::forward(key)); - BOOST_TRY{ - node_allocator_traits_type::construct(na, container_detail::addressof(p->m_data.second)); - } - BOOST_CATCH(...){ - node_allocator_traits_type::destroy(na, container_detail::addressof(p->m_data.first)); - BOOST_RETHROW; - } - BOOST_CATCH_END - node_deallocator.release(); - //This does not throw - typedef typename Node::hook_type hook_type; - ::new(static_cast(boost::movelib::to_raw_pointer(p)), boost_container_new_t()) hook_type; - return (p); - } - - void destroy_node(const NodePtr &nodep) - { - allocator_traits::destroy(this->node_alloc(), boost::movelib::to_raw_pointer(nodep)); - this->deallocate_one(nodep); - } - - void swap(node_alloc_holder &x) - { - this->icont().swap(x.icont()); - container_detail::bool_ flag; - container_detail::swap_alloc(this->node_alloc(), x.node_alloc(), flag); - } - - template - void allocate_many_and_construct - (FwdIterator beg, difference_type n, Inserter inserter) - { - if(n){ - typedef typename node_allocator_version_traits_type::multiallocation_chain multiallocation_chain; - - //Try to allocate memory in a single block - typedef typename multiallocation_chain::iterator multialloc_iterator; - multiallocation_chain mem; - NodeAlloc &nalloc = this->node_alloc(); - node_allocator_version_traits_type::allocate_individual(nalloc, n, mem); - multialloc_iterator itbeg(mem.begin()), itlast(mem.last()); - mem.clear(); - Node *p = 0; - BOOST_TRY{ - Deallocator node_deallocator(NodePtr(), nalloc); - container_detail::scoped_destructor sdestructor(nalloc, 0); - while(n--){ - p = boost::movelib::iterator_to_raw_pointer(itbeg); - node_deallocator.set(p); - ++itbeg; - //This can throw - boost::container::construct_in_place(nalloc, container_detail::addressof(p->m_data), beg); - sdestructor.set(p); - ++beg; - //This does not throw - typedef typename Node::hook_type hook_type; - ::new(static_cast(p), boost_container_new_t()) hook_type; - //This can throw in some containers (predicate might throw). - //(sdestructor will destruct the node and node_deallocator will deallocate it in case of exception) - inserter(*p); - sdestructor.set(0); - } - sdestructor.release(); - node_deallocator.release(); - } - BOOST_CATCH(...){ - mem.incorporate_after(mem.last(), &*itbeg, &*itlast, n); - node_allocator_version_traits_type::deallocate_individual(this->node_alloc(), mem); - BOOST_RETHROW - } - BOOST_CATCH_END - } - } - - void clear(version_1) - { this->icont().clear_and_dispose(Destroyer(this->node_alloc())); } - - void clear(version_2) - { - typename NodeAlloc::multiallocation_chain chain; - allocator_destroyer_and_chain_builder builder(this->node_alloc(), chain); - this->icont().clear_and_dispose(builder); - //BOOST_STATIC_ASSERT((::boost::has_move_emulation_enabled::value == true)); - if(!chain.empty()) - this->node_alloc().deallocate_individual(chain); - } - - icont_iterator erase_range(const icont_iterator &first, const icont_iterator &last, version_1) - { return this->icont().erase_and_dispose(first, last, Destroyer(this->node_alloc())); } - - icont_iterator erase_range(const icont_iterator &first, const icont_iterator &last, version_2) - { - typedef typename NodeAlloc::multiallocation_chain multiallocation_chain; - NodeAlloc & nalloc = this->node_alloc(); - multiallocation_chain chain; - allocator_destroyer_and_chain_builder chain_builder(nalloc, chain); - icont_iterator ret_it = this->icont().erase_and_dispose(first, last, chain_builder); - nalloc.deallocate_individual(chain); - return ret_it; - } - - template - size_type erase_key(const Key& k, const Comparator &comp, version_1) - { return this->icont().erase_and_dispose(k, comp, Destroyer(this->node_alloc())); } - - template - size_type erase_key(const Key& k, const Comparator &comp, version_2) - { - allocator_multialloc_chain_node_deallocator chain_holder(this->node_alloc()); - return this->icont().erase_and_dispose(k, comp, chain_holder.get_chain_builder()); - } - - protected: - struct cloner - { - explicit cloner(node_alloc_holder &holder) - : m_holder(holder) - {} - - NodePtr operator()(const Node &other) const - { return m_holder.create_node(other.m_data); } - - node_alloc_holder &m_holder; - }; - - struct move_cloner - { - move_cloner(node_alloc_holder &holder) - : m_holder(holder) - {} - - NodePtr operator()(Node &other) - { //Use m_data instead of get_data to allow moving const key in [multi]map - return m_holder.create_node(::boost::move(other.m_data)); - } - - node_alloc_holder &m_holder; - }; - - struct members_holder - : public NodeAlloc - { - private: - members_holder(const members_holder&); - members_holder & operator=(const members_holder&); - - public: - members_holder() - : NodeAlloc(), m_icont() - {} - - template - explicit members_holder(BOOST_FWD_REF(ConvertibleToAlloc) c2alloc) - : NodeAlloc(boost::forward(c2alloc)) - , m_icont() - {} - - template - members_holder(BOOST_FWD_REF(ConvertibleToAlloc) c2alloc, const value_compare &c) - : NodeAlloc(boost::forward(c2alloc)) - , m_icont(typename ICont::key_compare(c)) - {} - - explicit members_holder(const value_compare &c) - : NodeAlloc() - , m_icont(typename ICont::key_compare(c)) - {} - - //The intrusive container - ICont m_icont; - }; - - ICont &non_const_icont() const - { return const_cast(this->members_.m_icont); } - - NodeAlloc &node_alloc() - { return static_cast(this->members_); } - - const NodeAlloc &node_alloc() const - { return static_cast(this->members_); } - - members_holder members_; - - public: - ICont &icont() - { return this->members_.m_icont; } - - const ICont &icont() const - { return this->members_.m_icont; } -}; - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#include - -#endif // BOOST_CONTAINER_DETAIL_NODE_ALLOC_HPP_ diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/node_pool.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/node_pool.hpp deleted file mode 100644 index 00e35dfa8dc..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/node_pool.hpp +++ /dev/null @@ -1,157 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_NODE_POOL_HPP -#define BOOST_CONTAINER_DETAIL_NODE_POOL_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -namespace boost { -namespace container { -namespace container_detail { - -//!Pooled memory allocator using single segregated storage. Includes -//!a reference count but the class does not delete itself, this is -//!responsibility of user classes. Node size (NodeSize) and the number of -//!nodes allocated per block (NodesPerBlock) are known at compile time -template< std::size_t NodeSize, std::size_t NodesPerBlock > -class private_node_pool - //Inherit from the implementation to avoid template bloat - : public boost::container::container_detail:: - private_node_pool_impl -{ - typedef boost::container::container_detail:: - private_node_pool_impl base_t; - //Non-copyable - private_node_pool(const private_node_pool &); - private_node_pool &operator=(const private_node_pool &); - - public: - typedef typename base_t::multiallocation_chain multiallocation_chain; - static const std::size_t nodes_per_block = NodesPerBlock; - - //!Constructor from a segment manager. Never throws - private_node_pool() - : base_t(0, NodeSize, NodesPerBlock) - {} - -}; - -template< std::size_t NodeSize - , std::size_t NodesPerBlock - > -class shared_node_pool - : public private_node_pool -{ - private: - typedef private_node_pool private_node_allocator_t; - - public: - typedef typename private_node_allocator_t::free_nodes_t free_nodes_t; - typedef typename private_node_allocator_t::multiallocation_chain multiallocation_chain; - - //!Constructor from a segment manager. Never throws - shared_node_pool() - : private_node_allocator_t(){} - - //!Destructor. Deallocates all allocated blocks. Never throws - ~shared_node_pool() - {} - - //!Allocates array of count elements. Can throw std::bad_alloc - void *allocate_node() - { - //----------------------- - scoped_lock guard(mutex_); - //----------------------- - return private_node_allocator_t::allocate_node(); - } - - //!Deallocates an array pointed by ptr. Never throws - void deallocate_node(void *ptr) - { - //----------------------- - scoped_lock guard(mutex_); - //----------------------- - private_node_allocator_t::deallocate_node(ptr); - } - - //!Allocates a singly linked list of n nodes ending in null pointer. - //!can throw std::bad_alloc - void allocate_nodes(const std::size_t n, multiallocation_chain &chain) - { - //----------------------- - scoped_lock guard(mutex_); - //----------------------- - return private_node_allocator_t::allocate_nodes(n, chain); - } - - void deallocate_nodes(multiallocation_chain &chain) - { - //----------------------- - scoped_lock guard(mutex_); - //----------------------- - private_node_allocator_t::deallocate_nodes(chain); - } - - //!Deallocates all the free blocks of memory. Never throws - void deallocate_free_blocks() - { - //----------------------- - scoped_lock guard(mutex_); - //----------------------- - private_node_allocator_t::deallocate_free_blocks(); - } - - //!Deallocates all blocks. Never throws - void purge_blocks() - { - //----------------------- - scoped_lock guard(mutex_); - //----------------------- - private_node_allocator_t::purge_blocks(); - } - - std::size_t num_free_nodes() - { - //----------------------- - scoped_lock guard(mutex_); - //----------------------- - return private_node_allocator_t::num_free_nodes(); - } - - private: - default_mutex mutex_; -}; - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#include - -#endif //#ifndef BOOST_CONTAINER_DETAIL_NODE_POOL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/node_pool_impl.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/node_pool_impl.hpp deleted file mode 100644 index 024bf306c5f..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/node_pool_impl.hpp +++ /dev/null @@ -1,375 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_DETAIL_NODE_POOL_IMPL_HPP -#define BOOST_CONTAINER_DETAIL_NODE_POOL_IMPL_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include - -namespace boost { -namespace container { -namespace container_detail { - -template -class private_node_pool_impl -{ - //Non-copyable - private_node_pool_impl(); - private_node_pool_impl(const private_node_pool_impl &); - private_node_pool_impl &operator=(const private_node_pool_impl &); - - //A node object will hold node_t when it's not allocated - public: - typedef typename SegmentManagerBase::void_pointer void_pointer; - typedef typename node_slist::slist_hook_t slist_hook_t; - typedef typename node_slist::node_t node_t; - typedef typename node_slist::node_slist_t free_nodes_t; - typedef typename SegmentManagerBase::multiallocation_chain multiallocation_chain; - typedef typename SegmentManagerBase::size_type size_type; - - private: - typedef typename bi::make_slist - < node_t, bi::base_hook - , bi::linear - , bi::constant_time_size >::type blockslist_t; - - static size_type get_rounded_size(size_type orig_size, size_type round_to) - { return ((orig_size-1)/round_to+1)*round_to; } - - public: - - //!Segment manager typedef - typedef SegmentManagerBase segment_manager_base_type; - - //!Constructor from a segment manager. Never throws - private_node_pool_impl(segment_manager_base_type *segment_mngr_base, size_type node_size, size_type nodes_per_block) - : m_nodes_per_block(nodes_per_block) - , m_real_node_size(lcm(node_size, size_type(alignment_of::value))) - //General purpose allocator - , mp_segment_mngr_base(segment_mngr_base) - , m_blocklist() - , m_freelist() - //Debug node count - , m_allocated(0) - {} - - //!Destructor. Deallocates all allocated blocks. Never throws - ~private_node_pool_impl() - { this->purge_blocks(); } - - size_type get_real_num_node() const - { return m_nodes_per_block; } - - //!Returns the segment manager. Never throws - segment_manager_base_type* get_segment_manager_base()const - { return boost::movelib::to_raw_pointer(mp_segment_mngr_base); } - - void *allocate_node() - { return this->priv_alloc_node(); } - - //!Deallocates an array pointed by ptr. Never throws - void deallocate_node(void *ptr) - { this->priv_dealloc_node(ptr); } - - //!Allocates a singly linked list of n nodes ending in null pointer. - void allocate_nodes(const size_type n, multiallocation_chain &chain) - { - //Preallocate all needed blocks to fulfill the request - size_type cur_nodes = m_freelist.size(); - if(cur_nodes < n){ - this->priv_alloc_block(((n - cur_nodes) - 1)/m_nodes_per_block + 1); - } - - //We just iterate the needed nodes to get the last we'll erase - typedef typename free_nodes_t::iterator free_iterator; - free_iterator before_last_new_it = m_freelist.before_begin(); - for(size_type j = 0; j != n; ++j){ - ++before_last_new_it; - } - - //Cache the first node of the allocated range before erasing - free_iterator first_node(m_freelist.begin()); - free_iterator last_node (before_last_new_it); - - //Erase the range. Since we already have the distance, this is O(1) - m_freelist.erase_after( m_freelist.before_begin() - , ++free_iterator(before_last_new_it) - , n); - - //Now take the last erased node and just splice it in the end - //of the intrusive list that will be traversed by the multialloc iterator. - chain.incorporate_after(chain.before_begin(), &*first_node, &*last_node, n); - m_allocated += n; - } - - void deallocate_nodes(multiallocation_chain &chain) - { - typedef typename multiallocation_chain::iterator iterator; - iterator it(chain.begin()), itend(chain.end()); - while(it != itend){ - void *pElem = &*it; - ++it; - this->priv_dealloc_node(pElem); - } - } - - //!Deallocates all the free blocks of memory. Never throws - void deallocate_free_blocks() - { - typedef typename free_nodes_t::iterator nodelist_iterator; - typename blockslist_t::iterator bit(m_blocklist.before_begin()), - it(m_blocklist.begin()), - itend(m_blocklist.end()); - free_nodes_t backup_list; - nodelist_iterator backup_list_last = backup_list.before_begin(); - - //Execute the algorithm and get an iterator to the last value - size_type blocksize = (get_rounded_size) - (m_real_node_size*m_nodes_per_block, (size_type) alignment_of::value); - - while(it != itend){ - //Collect all the nodes from the block pointed by it - //and push them in the list - free_nodes_t free_nodes; - nodelist_iterator last_it = free_nodes.before_begin(); - const void *addr = get_block_from_hook(&*it, blocksize); - - m_freelist.remove_and_dispose_if - (is_between(addr, blocksize), push_in_list(free_nodes, last_it)); - - //If the number of nodes is equal to m_nodes_per_block - //this means that the block can be deallocated - if(free_nodes.size() == m_nodes_per_block){ - //Unlink the nodes - free_nodes.clear(); - it = m_blocklist.erase_after(bit); - mp_segment_mngr_base->deallocate((void*)addr); - } - //Otherwise, insert them in the backup list, since the - //next "remove_if" does not need to check them again. - else{ - //Assign the iterator to the last value if necessary - if(backup_list.empty() && !m_freelist.empty()){ - backup_list_last = last_it; - } - //Transfer nodes. This is constant time. - backup_list.splice_after - ( backup_list.before_begin() - , free_nodes - , free_nodes.before_begin() - , last_it - , free_nodes.size()); - bit = it; - ++it; - } - } - //We should have removed all the nodes from the free list - BOOST_ASSERT(m_freelist.empty()); - - //Now pass all the node to the free list again - m_freelist.splice_after - ( m_freelist.before_begin() - , backup_list - , backup_list.before_begin() - , backup_list_last - , backup_list.size()); - } - - size_type num_free_nodes() - { return m_freelist.size(); } - - //!Deallocates all used memory. Precondition: all nodes allocated from this pool should - //!already be deallocated. Otherwise, undefined behaviour. Never throws - void purge_blocks() - { - //check for memory leaks - BOOST_ASSERT(m_allocated==0); - size_type blocksize = (get_rounded_size) - (m_real_node_size*m_nodes_per_block, (size_type)alignment_of::value); - - //We iterate though the NodeBlock list to free the memory - while(!m_blocklist.empty()){ - void *addr = get_block_from_hook(&m_blocklist.front(), blocksize); - m_blocklist.pop_front(); - mp_segment_mngr_base->deallocate((void*)addr); - } - //Just clear free node list - m_freelist.clear(); - } - - void swap(private_node_pool_impl &other) - { - BOOST_ASSERT(m_nodes_per_block == other.m_nodes_per_block); - BOOST_ASSERT(m_real_node_size == other.m_real_node_size); - std::swap(mp_segment_mngr_base, other.mp_segment_mngr_base); - m_blocklist.swap(other.m_blocklist); - m_freelist.swap(other.m_freelist); - std::swap(m_allocated, other.m_allocated); - } - - private: - - struct push_in_list - { - push_in_list(free_nodes_t &l, typename free_nodes_t::iterator &it) - : slist_(l), last_it_(it) - {} - - void operator()(typename free_nodes_t::pointer p) const - { - slist_.push_front(*p); - if(slist_.size() == 1){ //Cache last element - ++last_it_ = slist_.begin(); - } - } - - private: - free_nodes_t &slist_; - typename free_nodes_t::iterator &last_it_; - }; - - struct is_between - { - typedef typename free_nodes_t::value_type argument_type; - typedef bool result_type; - - is_between(const void *addr, std::size_t size) - : beg_(static_cast(addr)), end_(beg_+size) - {} - - bool operator()(typename free_nodes_t::const_reference v) const - { - return (beg_ <= reinterpret_cast(&v) && - end_ > reinterpret_cast(&v)); - } - private: - const char * beg_; - const char * end_; - }; - - //!Allocates one node, using single segregated storage algorithm. - //!Never throws - node_t *priv_alloc_node() - { - //If there are no free nodes we allocate a new block - if (m_freelist.empty()) - this->priv_alloc_block(1); - //We take the first free node - node_t *n = (node_t*)&m_freelist.front(); - m_freelist.pop_front(); - ++m_allocated; - return n; - } - - //!Deallocates one node, using single segregated storage algorithm. - //!Never throws - void priv_dealloc_node(void *pElem) - { - //We put the node at the beginning of the free node list - node_t * to_deallocate = static_cast(pElem); - m_freelist.push_front(*to_deallocate); - BOOST_ASSERT(m_allocated>0); - --m_allocated; - } - - //!Allocates several blocks of nodes. Can throw - void priv_alloc_block(size_type num_blocks) - { - BOOST_ASSERT(num_blocks > 0); - size_type blocksize = - (get_rounded_size)(m_real_node_size*m_nodes_per_block, (size_type)alignment_of::value); - - BOOST_TRY{ - for(size_type i = 0; i != num_blocks; ++i){ - //We allocate a new NodeBlock and put it as first - //element in the free Node list - char *pNode = reinterpret_cast - (mp_segment_mngr_base->allocate(blocksize + sizeof(node_t))); - char *pBlock = pNode; - m_blocklist.push_front(get_block_hook(pBlock, blocksize)); - - //We initialize all Nodes in Node Block to insert - //them in the free Node list - for(size_type j = 0; j < m_nodes_per_block; ++j, pNode += m_real_node_size){ - m_freelist.push_front(*new (pNode) node_t); - } - } - } - BOOST_CATCH(...){ - //to-do: if possible, an efficient way to deallocate allocated blocks - BOOST_RETHROW - } - BOOST_CATCH_END - } - - //!Deprecated, use deallocate_free_blocks - void deallocate_free_chunks() - { this->deallocate_free_blocks(); } - - //!Deprecated, use purge_blocks - void purge_chunks() - { this->purge_blocks(); } - - private: - //!Returns a reference to the block hook placed in the end of the block - static node_t & get_block_hook (void *block, size_type blocksize) - { - return *reinterpret_cast(reinterpret_cast(block) + blocksize); - } - - //!Returns the starting address of the block reference to the block hook placed in the end of the block - void *get_block_from_hook (node_t *hook, size_type blocksize) - { - return (reinterpret_cast(hook) - blocksize); - } - - private: - typedef typename boost::intrusive::pointer_traits - ::template rebind_pointer::type segment_mngr_base_ptr_t; - - const size_type m_nodes_per_block; - const size_type m_real_node_size; - segment_mngr_base_ptr_t mp_segment_mngr_base; //Segment manager - blockslist_t m_blocklist; //Intrusive container of blocks - free_nodes_t m_freelist; //Intrusive container of free nods - size_type m_allocated; //Used nodes for debugging -}; - - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#include - -#endif //#ifndef BOOST_CONTAINER_DETAIL_ADAPTIVE_NODE_POOL_IMPL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/pair.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/pair.hpp deleted file mode 100644 index 4755e569b21..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/pair.hpp +++ /dev/null @@ -1,559 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_PAIR_HPP -#define BOOST_CONTAINER_CONTAINER_DETAIL_PAIR_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -#include -#include -#include -#include -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -# include -#endif -#include //swap - -#include //pair -#include -#include - -namespace boost { -namespace tuples { - -struct null_type; - -template < - class T0, class T1, class T2, - class T3, class T4, class T5, - class T6, class T7, class T8, - class T9> -class tuple; - -} //namespace tuples { -} //namespace boost { - -namespace boost { -namespace container { -namespace pair_impl { - -template -struct is_boost_tuple -{ - static const bool value = false; -}; - -template < - class T0, class T1, class T2, - class T3, class T4, class T5, - class T6, class T7, class T8, - class T9> -struct is_boost_tuple< boost::tuples::tuple > -{ - static const bool value = true; -}; - -template -struct disable_if_boost_tuple - : boost::container::container_detail::disable_if< is_boost_tuple > -{}; - -template -struct is_tuple_null -{ - static const bool value = false; -}; - -template<> -struct is_tuple_null -{ - static const bool value = true; -}; - -}}} - -#if defined(BOOST_MSVC) && (_CPPLIB_VER == 520) -//MSVC 2010 tuple marker -namespace std { namespace tr1 { struct _Nil; }} -#elif defined(BOOST_MSVC) && (_CPPLIB_VER == 540) -//MSVC 2012 tuple marker -namespace std { struct _Nil; } -#endif - - -namespace boost { -namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - template - struct std_piecewise_construct_holder - { - static ::std::piecewise_construct_t *dummy; - }; - - template - ::std::piecewise_construct_t *std_piecewise_construct_holder::dummy = - reinterpret_cast< ::std::piecewise_construct_t *>(0x01234); //Avoid sanitizer errors on references to null pointers - -typedef const std::piecewise_construct_t & piecewise_construct_t; - -struct try_emplace_t{}; - -#else - -//! The piecewise_construct_t struct is an empty structure type used as a unique type to -//! disambiguate used to disambiguate between different functions that take two tuple arguments. -typedef unspecified piecewise_construct_t; - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! A instance of type -//! piecewise_construct_t -static piecewise_construct_t piecewise_construct = BOOST_CONTAINER_DOC1ST(unspecified, *std_piecewise_construct_holder<>::dummy); - -///@cond - -namespace container_detail { - -struct piecewise_construct_use -{ - //Avoid warnings of unused "piecewise_construct" - piecewise_construct_use() - { (void)&::boost::container::piecewise_construct; } -}; - -template -struct pair; - -template -struct is_pair -{ - static const bool value = false; -}; - -template -struct is_pair< pair > -{ - static const bool value = true; -}; - -template -struct is_pair< std::pair > -{ - static const bool value = true; -}; - -template -struct is_not_pair -{ - static const bool value = !is_pair::value; -}; - -template -struct is_std_pair -{ - static const bool value = false; -}; - -template -struct is_std_pair< std::pair > -{ - static const bool value = true; -}; - -struct pair_nat; - -template -void get(T); //to enable ADL - -///@endcond - -template -struct pair -{ - private: - BOOST_COPYABLE_AND_MOVABLE(pair) - - public: - typedef T1 first_type; - typedef T2 second_type; - - T1 first; - T2 second; - - //Default constructor - pair() - : first(), second() - {} - - //pair copy assignment - pair(const pair& x) - : first(x.first), second(x.second) - {} - - //pair move constructor - pair(BOOST_RV_REF(pair) p) - : first(::boost::move(p.first)), second(::boost::move(p.second)) - {} - - template - pair(const pair &p) - : first(p.first), second(p.second) - {} - - template - pair(BOOST_RV_REF_BEG pair BOOST_RV_REF_END p) - : first(::boost::move(p.first)), second(::boost::move(p.second)) - {} - - //pair from two values - pair(const T1 &t1, const T2 &t2) - : first(t1) - , second(t2) - {} - - template - pair(BOOST_FWD_REF(U) u, BOOST_FWD_REF(V) v) - : first(::boost::forward(u)) - , second(::boost::forward(v)) - {} - - //And now compatibility with std::pair - pair(const std::pair& x) - : first(x.first), second(x.second) - {} - - template - pair(const std::pair& p) - : first(p.first), second(p.second) - {} - - pair(BOOST_RV_REF_BEG std::pair BOOST_RV_REF_END p) - : first(::boost::move(p.first)), second(::boost::move(p.second)) - {} - - template - pair(BOOST_RV_REF_BEG std::pair BOOST_RV_REF_END p) - : first(::boost::move(p.first)), second(::boost::move(p.second)) - {} - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - template< class KeyType, class ...Args> - pair(try_emplace_t, BOOST_FWD_REF(KeyType) k, Args && ...args) - : first(boost::forward(k)), second(::boost::forward(args)...)\ - {} - #else - - //piecewise construction from boost::tuple - #define BOOST_PAIR_TRY_EMPLACE_CONSTRUCT_CODE(N)\ - template< class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N > \ - pair( try_emplace_t, BOOST_FWD_REF(KeyType) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N )\ - : first(boost::forward(k)), second(BOOST_MOVE_FWD##N)\ - {}\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_PAIR_TRY_EMPLACE_CONSTRUCT_CODE) - #undef BOOST_PAIR_TRY_EMPLACE_CONSTRUCT_CODE - - #endif //BOOST_NO_CXX11_VARIADIC_TEMPLATES - - //piecewise construction from boost::tuple - #define BOOST_PAIR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE(N,M)\ - template< template class BoostTuple \ - BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \ - pair( piecewise_construct_t\ - , BoostTuple p\ - , BoostTuple q\ - , typename container_detail::enable_if_c\ - < pair_impl::is_boost_tuple< BoostTuple >::value &&\ - !(pair_impl::is_tuple_null::value || pair_impl::is_tuple_null::value) \ - >::type* = 0\ - )\ - : first(BOOST_MOVE_TMPL_GET##N), second(BOOST_MOVE_TMPL_GETQ##M)\ - { (void)p; (void)q; }\ - // - BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_PAIR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE) - #undef BOOST_PAIR_PIECEWISE_CONSTRUCT_BOOST_TUPLE_CODE - - //piecewise construction from variadic tuple (with delegating constructors) - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - # if !defined(BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS) - private: - template class Tuple, class... Args1, class... Args2, size_t... Indexes1, size_t... Indexes2> - pair(Tuple& t1, Tuple& t2, index_tuple, index_tuple) - : first (::boost::forward(get(t1))...) - , second(::boost::forward(get(t2))...) - { (void) t1; (void)t2; } - - public: - template< template class Tuple, class... Args1, class... Args2 - , class = typename pair_impl::disable_if_boost_tuple< Tuple >::type> - pair(piecewise_construct_t, Tuple t1, Tuple t2) - : pair(t1, t2, typename build_number_seq::type(), typename build_number_seq::type()) - {} - # else - //piecewise construction from variadic tuple (suboptimal, without delegating constructors) - private: - template class Tuple, typename... Args> - static T build_from_args(Tuple&& t) - { return do_build_from_args(::boost::move(t), typename build_number_seq::type()); } - - template class Tuple, typename... Args, std::size_t... Indexes> - static T do_build_from_args(Tuple && t, const index_tuple&) - { (void)t; return T(::boost::forward(get(t))...); } - - public: - template< template class Tuple, class... Args1, class... Args2 - , class = typename pair_impl::disable_if_boost_tuple< Tuple >::type> - pair(piecewise_construct_t, Tuple t1, Tuple t2) - : first (build_from_args (::boost::move(t1))) - , second (build_from_args(::boost::move(t2))) - {} - # endif //BOOST_NO_CXX11_VARIADIC_TEMPLATES - #elif defined(BOOST_MSVC) && (_CPPLIB_VER == 520) - //MSVC 2010 tuple implementation - #define BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE(N,M)\ - template< template class StdTuple \ - BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \ - pair( piecewise_construct_t\ - , StdTuple p\ - , StdTuple q)\ - : first(BOOST_MOVE_GET_IDX##N), second(BOOST_MOVE_GET_IDXQ##M)\ - { (void)p; (void)q; }\ - // - BOOST_MOVE_ITER2D_0TOMAX(9, BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE) - #undef BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE - #elif defined(BOOST_MSVC) && (_CPPLIB_VER == 540) - #if _VARIADIC_MAX >= 9 - #define BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT 9 - #else - #define BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT BOOST_MOVE_ADD(_VARIADIC_MAX, 1) - #endif - - //MSVC 2012 tuple implementation - #define BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE(N,M)\ - template< template class StdTuple \ - BOOST_MOVE_I_IF(BOOST_MOVE_OR(N,M)) BOOST_MOVE_CLASS##N BOOST_MOVE_I_IF(BOOST_MOVE_AND(N,M)) BOOST_MOVE_CLASSQ##M > \ - pair( piecewise_construct_t\ - , StdTuple p\ - , StdTuple q)\ - : first(BOOST_MOVE_GET_IDX##N), second(BOOST_MOVE_GET_IDXQ##M)\ - { (void)p; (void)q; }\ - // - BOOST_MOVE_ITER2D_0TOMAX(BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT, BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_CODE) - #undef BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2010_TUPLE_CODE - #undef BOOST_PAIR_PIECEWISE_CONSTRUCT_MSVC2012_TUPLE_MAX_IT - #endif - - //pair copy assignment - pair& operator=(BOOST_COPY_ASSIGN_REF(pair) p) - { - first = p.first; - second = p.second; - return *this; - } - - //pair move assignment - pair& operator=(BOOST_RV_REF(pair) p) - { - first = ::boost::move(p.first); - second = ::boost::move(p.second); - return *this; - } - - template - typename ::boost::container::container_detail::disable_if_or - < pair & - , ::boost::container::container_detail::is_same - , ::boost::container::container_detail::is_same - >::type - operator=(const pair&p) - { - first = p.first; - second = p.second; - return *this; - } - - template - typename ::boost::container::container_detail::disable_if_or - < pair & - , ::boost::container::container_detail::is_same - , ::boost::container::container_detail::is_same - >::type - operator=(BOOST_RV_REF_BEG pair BOOST_RV_REF_END p) - { - first = ::boost::move(p.first); - second = ::boost::move(p.second); - return *this; - } -//std::pair copy assignment - pair& operator=(const std::pair &p) - { - first = p.first; - second = p.second; - return *this; - } - - template - pair& operator=(const std::pair &p) - { - first = ::boost::move(p.first); - second = ::boost::move(p.second); - return *this; - } - - //std::pair move assignment - pair& operator=(BOOST_RV_REF_BEG std::pair BOOST_RV_REF_END p) - { - first = ::boost::move(p.first); - second = ::boost::move(p.second); - return *this; - } - - template - pair& operator=(BOOST_RV_REF_BEG std::pair BOOST_RV_REF_END p) - { - first = ::boost::move(p.first); - second = ::boost::move(p.second); - return *this; - } - - //swap - void swap(pair& p) - { - ::boost::adl_move_swap(this->first, p.first); - ::boost::adl_move_swap(this->second, p.second); - } -}; - -template -inline bool operator==(const pair& x, const pair& y) -{ return static_cast(x.first == y.first && x.second == y.second); } - -template -inline bool operator< (const pair& x, const pair& y) -{ return static_cast(x.first < y.first || - (!(y.first < x.first) && x.second < y.second)); } - -template -inline bool operator!=(const pair& x, const pair& y) -{ return static_cast(!(x == y)); } - -template -inline bool operator> (const pair& x, const pair& y) -{ return y < x; } - -template -inline bool operator>=(const pair& x, const pair& y) -{ return static_cast(!(x < y)); } - -template -inline bool operator<=(const pair& x, const pair& y) -{ return static_cast(!(y < x)); } - -template -inline pair make_pair(T1 x, T2 y) -{ return pair(x, y); } - -template -inline void swap(pair& x, pair& y) -{ x.swap(y); } - -} //namespace container_detail { -} //namespace container { - -#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES - -template -struct has_move_emulation_enabled< ::boost::container::container_detail::pair > -{ - static const bool value = true; -}; - -#endif - -namespace move_detail{ - -template -struct is_class_or_union; - -template -struct is_class_or_union< ::boost::container::container_detail::pair > -//This specialization is needed to avoid instantiation of pair in -//is_class, and allow recursive maps. -{ - static const bool value = true; -}; - -template -struct is_class_or_union< std::pair > -//This specialization is needed to avoid instantiation of pair in -//is_class, and allow recursive maps. -{ - static const bool value = true; -}; - -template -struct is_union; - -template -struct is_union< ::boost::container::container_detail::pair > -//This specialization is needed to avoid instantiation of pair in -//is_class, and allow recursive maps. -{ - static const bool value = false; -}; - -template -struct is_union< std::pair > -//This specialization is needed to avoid instantiation of pair in -//is_class, and allow recursive maps. -{ - static const bool value = false; -}; - -template -struct is_class; - -template -struct is_class< ::boost::container::container_detail::pair > -//This specialization is needed to avoid instantiation of pair in -//is_class, and allow recursive maps. -{ - static const bool value = true; -}; - -template -struct is_class< std::pair > -//This specialization is needed to avoid instantiation of pair in -//is_class, and allow recursive maps. -{ - static const bool value = true; -}; - -} //namespace move_detail{ - -} //namespace boost { - -#include - -#endif //#ifndef BOOST_CONTAINER_DETAIL_PAIR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/pair_key_mapped_of_value.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/pair_key_mapped_of_value.hpp deleted file mode 100644 index 6112b87826c..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/pair_key_mapped_of_value.hpp +++ /dev/null @@ -1,55 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_PAIR_KEY_MAPPED_OF_VALUE_HPP -#define BOOST_CONTAINER_PAIR_KEY_MAPPED_OF_VALUE_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { - -template -struct pair_key_mapped_of_value -{ - typedef Key key_type; - typedef Mapped mapped_type; - - template - const key_type & key_of_value(const Pair &p) const - { return p.first; } - - template - const mapped_type & mapped_of_value(const Pair &p) const - { return p.second; } - - template - key_type & key_of_value(Pair &p) const - { return const_cast(p.first); } - - template - mapped_type & mapped_of_value(Pair &p) const - { return p.second; } - -}; - -}} - -#include - -#endif // BOOST_CONTAINER_PAIR_KEY_MAPPED_OF_VALUE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/placement_new.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/placement_new.hpp deleted file mode 100644 index c50981f6858..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/placement_new.hpp +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef BOOST_CONTAINER_DETAIL_PLACEMENT_NEW_HPP -#define BOOST_CONTAINER_DETAIL_PLACEMENT_NEW_HPP -/////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2014-2015. 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_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -struct boost_container_new_t{}; - -//avoid including -inline void *operator new(std::size_t, void *p, boost_container_new_t) -{ return p; } - -inline void operator delete(void *, void *, boost_container_new_t) -{} - -#endif //BOOST_CONTAINER_DETAIL_PLACEMENT_NEW_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/pool_common.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/pool_common.hpp deleted file mode 100644 index 61d0612ed19..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/pool_common.hpp +++ /dev/null @@ -1,57 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_POOL_COMMON_HPP -#define BOOST_CONTAINER_DETAIL_POOL_COMMON_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -#include - -namespace boost { -namespace container { -namespace container_detail { - -template -struct node_slist -{ - //This hook will be used to chain the individual nodes - typedef typename bi::make_slist_base_hook - , bi::link_mode >::type slist_hook_t; - - //A node object will hold node_t when it's not allocated - typedef slist_hook_t node_t; - - typedef typename bi::make_slist - , bi::cache_last, bi::base_hook >::type node_slist_t; -}; - -template -struct is_stateless_segment_manager -{ - static const bool value = false; -}; - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#include - -#endif //#ifndef BOOST_CONTAINER_DETAIL_ADAPTIVE_NODE_POOL_IMPL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/pool_common_alloc.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/pool_common_alloc.hpp deleted file mode 100644 index 3a3c80a78f6..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/pool_common_alloc.hpp +++ /dev/null @@ -1,102 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_POOL_COMMON_ALLOC_HPP -#define BOOST_CONTAINER_DETAIL_POOL_COMMON_ALLOC_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include - -#include -#include -#include -#include - -namespace boost{ -namespace container{ -namespace container_detail{ - -struct node_slist_helper - : public boost::container::container_detail::node_slist -{}; - -struct fake_segment_manager -{ - typedef void * void_pointer; - static const std::size_t PayloadPerAllocation = BOOST_CONTAINER_ALLOCATION_PAYLOAD; - - typedef boost::container::container_detail:: - basic_multiallocation_chain multiallocation_chain; - static void deallocate(void_pointer p) - { dlmalloc_free(p); } - - static void deallocate_many(multiallocation_chain &chain) - { - std::size_t size = chain.size(); - std::pair ptrs = chain.extract_data(); - dlmalloc_memchain dlchain; - BOOST_CONTAINER_MEMCHAIN_INIT_FROM(&dlchain, ptrs.first, ptrs.second, size); - dlmalloc_multidealloc(&dlchain); - } - - typedef std::ptrdiff_t difference_type; - typedef std::size_t size_type; - - static void *allocate_aligned(std::size_t nbytes, std::size_t alignment) - { - void *ret = dlmalloc_memalign(nbytes, alignment); - if(!ret) - boost::container::throw_bad_alloc(); - return ret; - } - - static void *allocate(std::size_t nbytes) - { - void *ret = dlmalloc_malloc(nbytes); - if(!ret) - boost::container::throw_bad_alloc(); - return ret; - } -}; - -} //namespace boost{ -} //namespace container{ -} //namespace container_detail{ - -namespace boost { -namespace container { -namespace container_detail { - -template -struct is_stateless_segment_manager; - -template<> -struct is_stateless_segment_manager - -{ - static const bool value = true; -}; - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#include - -#endif //BOOST_CONTAINER_DETAIL_POOL_COMMON_ALLOC_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/pool_resource.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/pool_resource.hpp deleted file mode 100644 index e5f59f51869..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/pool_resource.hpp +++ /dev/null @@ -1,191 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_POOL_RESOURCE_HPP -#define BOOST_CONTAINER_POOL_RESOURCE_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace container { -namespace pmr { - -#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - -class pool_data_t; - -static const std::size_t pool_options_minimum_max_blocks_per_chunk = 1u; -static const std::size_t pool_options_default_max_blocks_per_chunk = 32u; -static const std::size_t pool_options_minimum_largest_required_pool_block = - memory_resource::max_align > 2*sizeof(void*) ? memory_resource::max_align : 2*sizeof(void*); -static const std::size_t pool_options_default_largest_required_pool_block = - pool_options_minimum_largest_required_pool_block > 4096u - ? pool_options_minimum_largest_required_pool_block : 4096u; - -#endif //BOOST_CONTAINER_DOXYGEN_INVOKED - -class pool_resource -{ - typedef block_list_base<> block_list_base_t; - - pool_options m_options; - memory_resource& m_upstream; - block_list_base_t m_oversized_list; - pool_data_t *m_pool_data; - std::size_t m_pool_count; - - static void priv_limit_option(std::size_t &val, std::size_t min, std::size_t max); - static std::size_t priv_pool_index(std::size_t block_size); - static std::size_t priv_pool_block(std::size_t index); - - void priv_fix_options(); - void priv_init_pools(); - void priv_constructor_body(); - - public: - - //! Requires: `upstream` is the address of a valid memory resource. - //! - //! Effects: Constructs a pool resource object that will obtain memory - //! from upstream whenever the pool resource is unable to satisfy a memory - //! request from its own internal data structures. The resulting object will hold - //! a copy of upstream, but will not own the resource to which upstream points. - //! [ Note: The intention is that calls to upstream->allocate() will be - //! substantially fewer than calls to this->allocate() in most cases. - end note - //! The behavior of the pooling mechanism is tuned according to the value of - //! the opts argument. - //! - //! Throws: Nothing unless upstream->allocate() throws. It is unspecified if - //! or under what conditions this constructor calls upstream->allocate(). - pool_resource(const pool_options& opts, memory_resource* upstream) BOOST_NOEXCEPT; - - //! Effects: Same as - //! `pool_resource(pool_options(), get_default_resource())`. - pool_resource() BOOST_NOEXCEPT; - - //! Effects: Same as - //! `pool_resource(pool_options(), upstream)`. - explicit pool_resource(memory_resource* upstream) BOOST_NOEXCEPT; - - //! Effects: Same as - //! `pool_resource(opts, get_default_resource())`. - explicit pool_resource(const pool_options& opts) BOOST_NOEXCEPT; - - #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - pool_resource(const pool_resource&) = delete; - pool_resource operator=(const pool_resource&) = delete; - #else - private: - pool_resource (const pool_resource&); - pool_resource operator=(const pool_resource&); - public: - #endif - - //! Effects: Calls - //! `this->release()`. - virtual ~pool_resource(); - - //! Effects: Calls Calls `upstream_resource()->deallocate()` as necessary - //! to release all allocated memory. [ Note: memory is released back to - //! `upstream_resource()` even if deallocate has not been called for some - //! of the allocated blocks. - end note ] - void release(); - - //! Returns: The value of the upstream argument provided to the - //! constructor of this object. - memory_resource* upstream_resource() const; - - //! Returns: The options that control the pooling behavior of this resource. - //! The values in the returned struct may differ from those supplied to the pool - //! resource constructor in that values of zero will be replaced with - //! implementation-defined defaults and sizes may be rounded to unspecified granularity. - pool_options options() const; - - public: //public so that [un]synchronized_pool_resource can use them - - //! Returns: A pointer to allocated storage with a size of at least `bytes`. - //! The size and alignment of the allocated memory shall meet the requirements for - //! a class derived from `memory_resource`. - //! - //! Effects: If the pool selected for a block of size bytes is unable to - //! satisfy the memory request from its own internal data structures, it will call - //! `upstream_resource()->allocate()` to obtain more memory. If `bytes` is larger - //! than that which the largest pool can handle, then memory will be allocated - //! using `upstream_resource()->allocate()`. - //! - //! Throws: Nothing unless `upstream_resource()->allocate()` throws. - virtual void* do_allocate(std::size_t bytes, std::size_t alignment); - - //! Effects: Return the memory at p to the pool. It is unspecified if or under - //! what circumstances this operation will result in a call to - //! `upstream_resource()->deallocate()`. - //! - //! Throws: Nothing. - virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment); - - //! Returns: - //! `this == dynamic_cast(&other)`. - virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT; - - //Non-standard observers - public: - //! Returns: The number of pools that will be used in the pool resource. - //! - //! Note: Non-standard extension. - std::size_t pool_count() const; - - //! Returns: The index of the pool that will be used to serve the allocation of `bytes`. - //! from the pool specified by `pool_index`. Returns `pool_count()` if `bytes` is bigger - //! than `options().largest_required_pool_block` (no pool will be used to serve this). - //! - //! Note: Non-standard extension. - std::size_t pool_index(std::size_t bytes) const; - - //! Requires: `pool_idx < pool_index()` - //! - //! Returns: The number blocks that will be allocated in the next chunk - //! from the pool specified by `pool_idx`. - //! - //! Note: Non-standard extension. - std::size_t pool_next_blocks_per_chunk(std::size_t pool_idx) const; - - //! Requires: `pool_idx < pool_index()` - //! - //! Returns: The number of bytes of the block that the specified `pool_idx` pool manages. - //! - //! Note: Non-standard extension. - std::size_t pool_block(std::size_t pool_idx) const; - - //! Requires: `pool_idx < pool_index()` - //! - //! Returns: The number of blocks that the specified `pool_idx` pool has cached - //! and will be served without calling the upstream_allocator. - //! - //! Note: Non-standard extension. - std::size_t pool_cached_blocks(std::size_t pool_idx) const; -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#include - -#endif //BOOST_CONTAINER_POOL_RESOURCE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/singleton.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/singleton.hpp deleted file mode 100644 index 6fd6a54f30a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/singleton.hpp +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (C) 2000 Stephen Cleary -// Copyright (C) 2008 Ion Gaztanaga -// -// 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. -// -// This file is a modified file from Boost.Pool - -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2007-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_SINGLETON_DETAIL_HPP -#define BOOST_CONTAINER_DETAIL_SINGLETON_DETAIL_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -// -// The following helper classes are placeholders for a generic "singleton" -// class. The classes below support usage of singletons, including use in -// program startup/shutdown code, AS LONG AS there is only one thread -// running before main() begins, and only one thread running after main() -// exits. -// -// This class is also limited in that it can only provide singleton usage for -// classes with default constructors. -// - -// The design of this class is somewhat twisted, but can be followed by the -// calling inheritance. Let us assume that there is some user code that -// calls "singleton_default::instance()". The following (convoluted) -// sequence ensures that the same function will be called before main(): -// instance() contains a call to create_object.do_nothing() -// Thus, object_creator is implicitly instantiated, and create_object -// must exist. -// Since create_object is a static member, its constructor must be -// called before main(). -// The constructor contains a call to instance(), thus ensuring that -// instance() will be called before main(). -// The first time instance() is called (i.e., before main()) is the -// latest point in program execution where the object of type T -// can be created. -// Thus, any call to instance() will auto-magically result in a call to -// instance() before main(), unless already present. -// Furthermore, since the instance() function contains the object, instead -// of the singleton_default class containing a static instance of the -// object, that object is guaranteed to be constructed (at the latest) in -// the first call to instance(). This permits calls to instance() from -// static code, even if that code is called before the file-scope objects -// in this file have been initialized. - -namespace boost { -namespace container { -namespace container_detail { - -// T must be: no-throw default constructible and no-throw destructible -template -struct singleton_default -{ - private: - struct object_creator - { - // This constructor does nothing more than ensure that instance() - // is called before main() begins, thus creating the static - // T object before multithreading race issues can come up. - object_creator() { singleton_default::instance(); } - inline void do_nothing() const { } - }; - static object_creator create_object; - - singleton_default(); - - public: - typedef T object_type; - - // If, at any point (in user code), singleton_default::instance() - // is called, then the following function is instantiated. - static object_type & instance() - { - // This is the object that we return a reference to. - // It is guaranteed to be created before main() begins because of - // the next line. - static object_type obj; - - // The following line does nothing else than force the instantiation - // of singleton_default::create_object, whose constructor is - // called before main() begins. - create_object.do_nothing(); - - return obj; - } -}; -template -typename singleton_default::object_creator -singleton_default::create_object; - -} // namespace container_detail -} // namespace container -} // namespace boost - -#include - -#endif //BOOST_CONTAINER_DETAIL_SINGLETON_DETAIL_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/std_fwd.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/std_fwd.hpp deleted file mode 100644 index 09678123ff7..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/std_fwd.hpp +++ /dev/null @@ -1,56 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2014-2014. 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_STD_FWD_HPP -#define BOOST_CONTAINER_DETAIL_STD_FWD_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -////////////////////////////////////////////////////////////////////////////// -// Standard predeclarations -////////////////////////////////////////////////////////////////////////////// - -#include -BOOST_MOVE_STD_NS_BEG - -template -class allocator; - -template -struct less; - -template -struct pair; - -template -struct char_traits; - -struct input_iterator_tag; -struct forward_iterator_tag; -struct bidirectional_iterator_tag; -struct random_access_iterator_tag; - -template -class insert_iterator; - -struct allocator_arg_t; - -struct piecewise_construct_t; - -BOOST_MOVE_STD_NS_END -#include - -#endif //#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/transform_iterator.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/transform_iterator.hpp deleted file mode 100644 index ba64c7de79f..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/transform_iterator.hpp +++ /dev/null @@ -1,180 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-2013. -// (C) Copyright Gennaro Prota 2003 - 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/libs/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_TRANSFORM_ITERATORS_HPP -#define BOOST_CONTAINER_DETAIL_TRANSFORM_ITERATORS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include -#include - -namespace boost { -namespace container { - -template -struct operator_arrow_proxy -{ - operator_arrow_proxy(const PseudoReference &px) - : m_value(px) - {} - - typedef PseudoReference element_type; - - PseudoReference* operator->() const { return &m_value; } - - mutable PseudoReference m_value; -}; - -template -struct operator_arrow_proxy -{ - operator_arrow_proxy(T &px) - : m_value(px) - {} - - typedef T element_type; - - T* operator->() const { return const_cast(&m_value); } - - T &m_value; -}; - -template -class transform_iterator - : public UnaryFunction - , public boost::container::iterator - < typename Iterator::iterator_category - , typename container_detail::remove_reference::type - , typename Iterator::difference_type - , operator_arrow_proxy - , typename UnaryFunction::result_type> -{ - public: - explicit transform_iterator(const Iterator &it, const UnaryFunction &f = UnaryFunction()) - : UnaryFunction(f), m_it(it) - {} - - explicit transform_iterator() - : UnaryFunction(), m_it() - {} - - //Constructors - transform_iterator& operator++() - { increment(); return *this; } - - transform_iterator operator++(int) - { - transform_iterator result (*this); - increment(); - return result; - } - - friend bool operator== (const transform_iterator& i, const transform_iterator& i2) - { return i.equal(i2); } - - friend bool operator!= (const transform_iterator& i, const transform_iterator& i2) - { return !(i == i2); } - -/* - friend bool operator> (const transform_iterator& i, const transform_iterator& i2) - { return i2 < i; } - - friend bool operator<= (const transform_iterator& i, const transform_iterator& i2) - { return !(i > i2); } - - friend bool operator>= (const transform_iterator& i, const transform_iterator& i2) - { return !(i < i2); } -*/ - friend typename Iterator::difference_type operator- (const transform_iterator& i, const transform_iterator& i2) - { return i2.distance_to(i); } - - //Arithmetic - transform_iterator& operator+=(typename Iterator::difference_type off) - { this->advance(off); return *this; } - - transform_iterator operator+(typename Iterator::difference_type off) const - { - transform_iterator other(*this); - other.advance(off); - return other; - } - - friend transform_iterator operator+(typename Iterator::difference_type off, const transform_iterator& right) - { return right + off; } - - transform_iterator& operator-=(typename Iterator::difference_type off) - { this->advance(-off); return *this; } - - transform_iterator operator-(typename Iterator::difference_type off) const - { return *this + (-off); } - - typename UnaryFunction::result_type operator*() const - { return dereference(); } - - operator_arrow_proxy - operator->() const - { return operator_arrow_proxy(dereference()); } - - Iterator & base() - { return m_it; } - - const Iterator & base() const - { return m_it; } - - private: - Iterator m_it; - - void increment() - { ++m_it; } - - void decrement() - { --m_it; } - - bool equal(const transform_iterator &other) const - { return m_it == other.m_it; } - - bool less(const transform_iterator &other) const - { return other.m_it < m_it; } - - typename UnaryFunction::result_type dereference() const - { return UnaryFunction::operator()(*m_it); } - - void advance(typename Iterator::difference_type n) - { boost::container::iterator_advance(m_it, n); } - - typename Iterator::difference_type distance_to(const transform_iterator &other)const - { return boost::container::iterator_distance(other.m_it, m_it); } -}; - -template -transform_iterator -make_transform_iterator(Iterator it, UnaryFunc fun) -{ - return transform_iterator(it, fun); -} - -} //namespace container { -} //namespace boost { - -#include - -#endif //#ifndef BOOST_CONTAINER_DETAIL_TRANSFORM_ITERATORS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/tree.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/tree.hpp deleted file mode 100644 index 99baf3a2573..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/tree.hpp +++ /dev/null @@ -1,1343 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-2015. 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_TREE_HPP -#define BOOST_CONTAINER_TREE_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -// container -#include -#include -#include -#include - -// container/detail -#include //algo_equal(), algo_lexicographical_compare -#include -#include -#include -#include -#include -#include -#include -// intrusive -#include -#include -#include -#include -#include -// intrusive/detail -#include //pair -#include //tree_value_compare -// move -#include -// move/detail -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif -#include -// other -#include - - - -#include - -namespace boost { -namespace container { -namespace container_detail { - -using boost::intrusive::tree_value_compare; - -template -struct intrusive_tree_hook; - -template -struct intrusive_tree_hook -{ - typedef typename container_detail::bi::make_set_base_hook - < container_detail::bi::void_pointer - , container_detail::bi::link_mode - , container_detail::bi::optimize_size - >::type type; -}; - -template -struct intrusive_tree_hook -{ - typedef typename container_detail::bi::make_avl_set_base_hook - < container_detail::bi::void_pointer - , container_detail::bi::link_mode - , container_detail::bi::optimize_size - >::type type; -}; - -template -struct intrusive_tree_hook -{ - typedef typename container_detail::bi::make_bs_set_base_hook - < container_detail::bi::void_pointer - , container_detail::bi::link_mode - >::type type; -}; - -template -struct intrusive_tree_hook -{ - typedef typename container_detail::bi::make_bs_set_base_hook - < container_detail::bi::void_pointer - , container_detail::bi::link_mode - >::type type; -}; - -//This trait is used to type-pun std::pair because in C++03 -//compilers std::pair is useless for C++11 features -template -struct tree_internal_data_type -{ - typedef T type; -}; - -template -struct tree_internal_data_type< std::pair > -{ - typedef pair::type, T2> type; -}; - -//The node to be store in the tree -template -struct tree_node - : public intrusive_tree_hook::type -{ - private: - //BOOST_COPYABLE_AND_MOVABLE(tree_node) - tree_node(); - - public: - typedef typename intrusive_tree_hook - ::type hook_type; - typedef T value_type; - typedef typename tree_internal_data_type::type internal_type; - - typedef tree_node< T, VoidPointer - , tree_type_value, OptimizeSize> node_t; - - BOOST_CONTAINER_FORCEINLINE T &get_data() - { - T* ptr = reinterpret_cast(&this->m_data); - return *ptr; - } - - BOOST_CONTAINER_FORCEINLINE const T &get_data() const - { - const T* ptr = reinterpret_cast(&this->m_data); - return *ptr; - } - - internal_type m_data; - - template - BOOST_CONTAINER_FORCEINLINE void do_assign(const std::pair &p) - { - const_cast(m_data.first) = p.first; - m_data.second = p.second; - } - - template - BOOST_CONTAINER_FORCEINLINE void do_assign(const pair &p) - { - const_cast(m_data.first) = p.first; - m_data.second = p.second; - } - - template - BOOST_CONTAINER_FORCEINLINE void do_assign(const V &v) - { m_data = v; } - - template - BOOST_CONTAINER_FORCEINLINE void do_move_assign(std::pair &p) - { - const_cast(m_data.first) = ::boost::move(p.first); - m_data.second = ::boost::move(p.second); - } - - template - BOOST_CONTAINER_FORCEINLINE void do_move_assign(pair &p) - { - const_cast(m_data.first) = ::boost::move(p.first); - m_data.second = ::boost::move(p.second); - } - - template - BOOST_CONTAINER_FORCEINLINE void do_move_assign(V &v) - { m_data = ::boost::move(v); } -}; - -template -struct iiterator_node_value_type< tree_node > { - typedef T type; -}; - -template -class insert_equal_end_hint_functor -{ - Icont &icont_; - - public: - BOOST_CONTAINER_FORCEINLINE insert_equal_end_hint_functor(Icont &icont) - : icont_(icont) - {} - - BOOST_CONTAINER_FORCEINLINE void operator()(Node &n) - { this->icont_.insert_equal(this->icont_.cend(), n); } -}; - -template -class push_back_functor -{ - Icont &icont_; - - public: - BOOST_CONTAINER_FORCEINLINE push_back_functor(Icont &icont) - : icont_(icont) - {} - - BOOST_CONTAINER_FORCEINLINE void operator()(Node &n) - { this->icont_.push_back(n); } -}; - -}//namespace container_detail { - -namespace container_detail { - -template< class NodeType, class NodeCompareType - , class SizeType, class HookType - , boost::container::tree_type_enum tree_type_value> -struct intrusive_tree_dispatch; - -template -struct intrusive_tree_dispatch - -{ - typedef typename container_detail::bi::make_rbtree - - ,container_detail::bi::base_hook - ,container_detail::bi::constant_time_size - ,container_detail::bi::size_type - >::type type; -}; - -template -struct intrusive_tree_dispatch - -{ - typedef typename container_detail::bi::make_avltree - - ,container_detail::bi::base_hook - ,container_detail::bi::constant_time_size - ,container_detail::bi::size_type - >::type type; -}; - -template -struct intrusive_tree_dispatch - -{ - typedef typename container_detail::bi::make_sgtree - - ,container_detail::bi::base_hook - ,container_detail::bi::floating_point - ,container_detail::bi::size_type - >::type type; -}; - -template -struct intrusive_tree_dispatch - -{ - typedef typename container_detail::bi::make_splaytree - - ,container_detail::bi::base_hook - ,container_detail::bi::constant_time_size - ,container_detail::bi::size_type - >::type type; -}; - -template -struct intrusive_tree_type -{ - private: - typedef typename boost::container:: - allocator_traits::value_type value_type; - typedef typename boost::container:: - allocator_traits::void_pointer void_pointer; - typedef typename boost::container:: - allocator_traits::size_type size_type; - typedef typename container_detail::tree_node - < value_type, void_pointer - , tree_type_value, OptimizeSize> node_t; - typedef value_to_node_compare - node_compare_type; - //Deducing the hook type from node_t (e.g. node_t::hook_type) would - //provoke an early instantiation of node_t that could ruin recursive - //tree definitions, so retype the complete type to avoid any problem. - typedef typename intrusive_tree_hook - ::type hook_type; - public: - typedef typename intrusive_tree_dispatch - < node_t, node_compare_type - , size_type, hook_type - , tree_type_value>::type type; -}; - -//Trait to detect manually rebalanceable tree types -template -struct is_manually_balanceable -{ static const bool value = true; }; - -template<> struct is_manually_balanceable -{ static const bool value = false; }; - -template<> struct is_manually_balanceable -{ static const bool value = false; }; - -//Proxy traits to implement different operations depending on the -//is_manually_balanceable<>::value -template< boost::container::tree_type_enum tree_type_value - , bool IsManuallyRebalanceable = is_manually_balanceable::value> -struct intrusive_tree_proxy -{ - template - BOOST_CONTAINER_FORCEINLINE static void rebalance(Icont &) {} -}; - -template -struct intrusive_tree_proxy -{ - template - BOOST_CONTAINER_FORCEINLINE static void rebalance(Icont &c) - { c.rebalance(); } -}; - -} //namespace container_detail { - -namespace container_detail { - -//This functor will be used with Intrusive clone functions to obtain -//already allocated nodes from a intrusive container instead of -//allocating new ones. When the intrusive container runs out of nodes -//the node holder is used instead. -template -class RecyclingCloner -{ - typedef typename AllocHolder::intrusive_container intrusive_container; - typedef typename AllocHolder::Node node_t; - typedef typename AllocHolder::NodePtr node_ptr_type; - - public: - RecyclingCloner(AllocHolder &holder, intrusive_container &itree) - : m_holder(holder), m_icont(itree) - {} - - BOOST_CONTAINER_FORCEINLINE static void do_assign(node_ptr_type &p, const node_t &other, bool_) - { p->do_move_assign(const_cast(other).m_data); } - - BOOST_CONTAINER_FORCEINLINE static void do_assign(node_ptr_type &p, const node_t &other, bool_) - { p->do_assign(other.m_data); } - - node_ptr_type operator()(const node_t &other) const - { - if(node_ptr_type p = m_icont.unlink_leftmost_without_rebalance()){ - //First recycle a node (this can't throw) - BOOST_TRY{ - //This can throw - this->do_assign(p, other, bool_()); - return p; - } - BOOST_CATCH(...){ - //If there is an exception destroy the whole source - m_holder.destroy_node(p); - while((p = m_icont.unlink_leftmost_without_rebalance())){ - m_holder.destroy_node(p); - } - BOOST_RETHROW - } - BOOST_CATCH_END - } - else{ - return m_holder.create_node(other.m_data); - } - } - - AllocHolder &m_holder; - intrusive_container &m_icont; -}; - -template -struct key_node_compare - : public boost::intrusive::detail::ebo_functor_holder -{ - BOOST_CONTAINER_FORCEINLINE explicit key_node_compare(const KeyCompare &comp) - : base_t(comp) - {} - - typedef boost::intrusive::detail::ebo_functor_holder base_t; - typedef KeyCompare key_compare; - typedef KeyOfValue key_of_value; - typedef typename KeyOfValue::type key_type; - - BOOST_CONTAINER_FORCEINLINE const key_compare &key_comp() const - { return static_cast(*this); } - - BOOST_CONTAINER_FORCEINLINE key_compare &key_comp() - { return static_cast(*this); } - - BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const key_type &key2) const - { return this->key_comp()(key1, key2); } - - template - BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const U &nonkey2) const - { return this->key_comp()(key1, key_of_value()(nonkey2.get_data())); } - - template - BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const key_type &key2) const - { return this->key_comp()(key_of_value()(nonkey1.get_data()), key2); } - - template - BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const V &nonkey2) const - { return this->key_comp()(key_of_value()(nonkey1.get_data()), key_of_value()(nonkey2.get_data())); } -}; - -template -class tree - : public container_detail::node_alloc_holder - < Allocator - , typename container_detail::intrusive_tree_type - < Allocator, tree_value_compare - ::pointer, Compare, KeyOfValue> - , Options::tree_type, Options::optimize_size>::type - > -{ - typedef tree_value_compare - < typename allocator_traits::pointer - , Compare, KeyOfValue> ValComp; - typedef typename container_detail::intrusive_tree_type - < Allocator, ValComp, Options::tree_type - , Options::optimize_size>::type Icont; - typedef container_detail::node_alloc_holder - AllocHolder; - typedef typename AllocHolder::NodePtr NodePtr; - typedef tree < T, KeyOfValue - , Compare, Allocator, Options> ThisType; - typedef typename AllocHolder::NodeAlloc NodeAlloc; - typedef boost::container:: - allocator_traits allocator_traits_type; - typedef typename AllocHolder::ValAlloc ValAlloc; - typedef typename AllocHolder::Node Node; - typedef typename Icont::iterator iiterator; - typedef typename Icont::const_iterator iconst_iterator; - typedef container_detail::allocator_destroyer Destroyer; - typedef typename AllocHolder::alloc_version alloc_version; - typedef intrusive_tree_proxy intrusive_tree_proxy_t; - - BOOST_COPYABLE_AND_MOVABLE(tree) - - public: - - typedef typename KeyOfValue::type key_type; - typedef T value_type; - typedef Allocator allocator_type; - typedef Compare key_compare; - typedef ValComp value_compare; - typedef typename boost::container:: - allocator_traits::pointer pointer; - typedef typename boost::container:: - allocator_traits::const_pointer const_pointer; - typedef typename boost::container:: - allocator_traits::reference reference; - typedef typename boost::container:: - allocator_traits::const_reference const_reference; - typedef typename boost::container:: - allocator_traits::size_type size_type; - typedef typename boost::container:: - allocator_traits::difference_type difference_type; - typedef container_detail::iterator_from_iiterator - iterator; - typedef container_detail::iterator_from_iiterator - const_iterator; - typedef boost::container::reverse_iterator - reverse_iterator; - typedef boost::container::reverse_iterator - const_reverse_iterator; - typedef node_handle - < NodeAlloc, void> node_type; - typedef insert_return_type_base - insert_return_type; - - typedef NodeAlloc stored_allocator_type; - - private: - - typedef key_node_compare KeyNodeCompare; - - public: - - BOOST_CONTAINER_FORCEINLINE tree() - : AllocHolder() - {} - - BOOST_CONTAINER_FORCEINLINE explicit tree(const key_compare& comp) - : AllocHolder(ValComp(comp)) - {} - - BOOST_CONTAINER_FORCEINLINE explicit tree(const key_compare& comp, const allocator_type& a) - : AllocHolder(ValComp(comp), a) - {} - - BOOST_CONTAINER_FORCEINLINE explicit tree(const allocator_type& a) - : AllocHolder(a) - {} - - template - tree(bool unique_insertion, InputIterator first, InputIterator last) - : AllocHolder(value_compare(key_compare())) - { - this->tree_construct(unique_insertion, first, last); - //AllocHolder clears in case of exception - } - - template - tree(bool unique_insertion, InputIterator first, InputIterator last, const key_compare& comp) - : AllocHolder(value_compare(comp)) - { - this->tree_construct(unique_insertion, first, last); - //AllocHolder clears in case of exception - } - - template - tree(bool unique_insertion, InputIterator first, InputIterator last, const key_compare& comp, const allocator_type& a) - : AllocHolder(value_compare(comp), a) - { - this->tree_construct(unique_insertion, first, last); - //AllocHolder clears in case of exception - } - - //construct with ordered range - template - tree( ordered_range_t, InputIterator first, InputIterator last) - : AllocHolder(value_compare(key_compare())) - { - this->tree_construct(ordered_range_t(), first, last); - } - - template - tree( ordered_range_t, InputIterator first, InputIterator last, const key_compare& comp) - : AllocHolder(value_compare(comp)) - { - this->tree_construct(ordered_range_t(), first, last); - } - - template - tree( ordered_range_t, InputIterator first, InputIterator last - , const key_compare& comp, const allocator_type& a) - : AllocHolder(value_compare(comp), a) - { - this->tree_construct(ordered_range_t(), first, last); - } - - private: - - template - void tree_construct(bool unique_insertion, InputIterator first, InputIterator last) - { - //Use cend() as hint to achieve linear time for - //ordered ranges as required by the standard - //for the constructor - if(unique_insertion){ - const const_iterator end_it(this->cend()); - for ( ; first != last; ++first){ - this->insert_unique_convertible(end_it, *first); - } - } - else{ - this->tree_construct_non_unique(first, last); - } - } - - template - void tree_construct_non_unique(InputIterator first, InputIterator last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::enable_if_or - < void - , container_detail::is_same - , container_detail::is_input_iterator - >::type * = 0 - #endif - ) - { - //Use cend() as hint to achieve linear time for - //ordered ranges as required by the standard - //for the constructor - const const_iterator end_it(this->cend()); - for ( ; first != last; ++first){ - this->insert_equal_convertible(end_it, *first); - } - } - - template - void tree_construct_non_unique(InputIterator first, InputIterator last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::disable_if_or - < void - , container_detail::is_same - , container_detail::is_input_iterator - >::type * = 0 - #endif - ) - { - //Optimized allocation and construction - this->allocate_many_and_construct - ( first, boost::container::iterator_distance(first, last) - , insert_equal_end_hint_functor(this->icont())); - } - - template - void tree_construct( ordered_range_t, InputIterator first, InputIterator last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::disable_if_or - < void - , container_detail::is_same - , container_detail::is_input_iterator - >::type * = 0 - #endif - ) - { - //Optimized allocation and construction - this->allocate_many_and_construct - ( first, boost::container::iterator_distance(first, last) - , container_detail::push_back_functor(this->icont())); - //AllocHolder clears in case of exception - } - - template - void tree_construct( ordered_range_t, InputIterator first, InputIterator last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::enable_if_or - < void - , container_detail::is_same - , container_detail::is_input_iterator - >::type * = 0 - #endif - ) - { - for ( ; first != last; ++first){ - this->push_back_impl(*first); - } - } - - public: - - BOOST_CONTAINER_FORCEINLINE tree(const tree& x) - : AllocHolder(x, x.value_comp()) - { - this->icont().clone_from - (x.icont(), typename AllocHolder::cloner(*this), Destroyer(this->node_alloc())); - } - - BOOST_CONTAINER_FORCEINLINE tree(BOOST_RV_REF(tree) x) - BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible::value) - : AllocHolder(BOOST_MOVE_BASE(AllocHolder, x), x.value_comp()) - {} - - BOOST_CONTAINER_FORCEINLINE tree(const tree& x, const allocator_type &a) - : AllocHolder(x.value_comp(), a) - { - this->icont().clone_from - (x.icont(), typename AllocHolder::cloner(*this), Destroyer(this->node_alloc())); - //AllocHolder clears in case of exception - } - - tree(BOOST_RV_REF(tree) x, const allocator_type &a) - : AllocHolder(x.value_comp(), a) - { - if(this->node_alloc() == x.node_alloc()){ - this->icont().swap(x.icont()); - } - else{ - this->icont().clone_from - (boost::move(x.icont()), typename AllocHolder::move_cloner(*this), Destroyer(this->node_alloc())); - } - //AllocHolder clears in case of exception - } - - BOOST_CONTAINER_FORCEINLINE ~tree() - {} //AllocHolder clears the tree - - tree& operator=(BOOST_COPY_ASSIGN_REF(tree) x) - { - if (&x != this){ - NodeAlloc &this_alloc = this->get_stored_allocator(); - const NodeAlloc &x_alloc = x.get_stored_allocator(); - container_detail::bool_:: - propagate_on_container_copy_assignment::value> flag; - if(flag && this_alloc != x_alloc){ - this->clear(); - } - this->AllocHolder::copy_assign_alloc(x); - //Transfer all the nodes to a temporary tree - //If anything goes wrong, all the nodes will be destroyed - //automatically - Icont other_tree(::boost::move(this->icont())); - - //Now recreate the source tree reusing nodes stored by other_tree - this->icont().clone_from - (x.icont() - , RecyclingCloner(*this, other_tree) - , Destroyer(this->node_alloc())); - - //If there are remaining nodes, destroy them - NodePtr p; - while((p = other_tree.unlink_leftmost_without_rebalance())){ - AllocHolder::destroy_node(p); - } - } - return *this; - } - - tree& operator=(BOOST_RV_REF(tree) x) - BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || - allocator_traits_type::is_always_equal::value) && - boost::container::container_detail::is_nothrow_move_assignable::value) - { - BOOST_ASSERT(this != &x); - NodeAlloc &this_alloc = this->node_alloc(); - NodeAlloc &x_alloc = x.node_alloc(); - const bool propagate_alloc = allocator_traits:: - propagate_on_container_move_assignment::value; - const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal; - //Resources can be transferred if both allocators are - //going to be equal after this function (either propagated or already equal) - if(propagate_alloc || allocators_equal){ - //Destroy - this->clear(); - //Move allocator if needed - this->AllocHolder::move_assign_alloc(x); - //Obtain resources - this->icont() = boost::move(x.icont()); - } - //Else do a one by one move - else{ - //Transfer all the nodes to a temporary tree - //If anything goes wrong, all the nodes will be destroyed - //automatically - Icont other_tree(::boost::move(this->icont())); - - //Now recreate the source tree reusing nodes stored by other_tree - this->icont().clone_from - (::boost::move(x.icont()) - , RecyclingCloner(*this, other_tree) - , Destroyer(this->node_alloc())); - - //If there are remaining nodes, destroy them - NodePtr p; - while((p = other_tree.unlink_leftmost_without_rebalance())){ - AllocHolder::destroy_node(p); - } - } - return *this; - } - - public: - // accessors: - BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const - { return this->icont().value_comp().predicate(); } - - BOOST_CONTAINER_FORCEINLINE key_compare key_comp() const - { return this->icont().value_comp().predicate().key_comp(); } - - BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const - { return allocator_type(this->node_alloc()); } - - BOOST_CONTAINER_FORCEINLINE const stored_allocator_type &get_stored_allocator() const - { return this->node_alloc(); } - - BOOST_CONTAINER_FORCEINLINE stored_allocator_type &get_stored_allocator() - { return this->node_alloc(); } - - BOOST_CONTAINER_FORCEINLINE iterator begin() - { return iterator(this->icont().begin()); } - - BOOST_CONTAINER_FORCEINLINE const_iterator begin() const - { return this->cbegin(); } - - BOOST_CONTAINER_FORCEINLINE iterator end() - { return iterator(this->icont().end()); } - - BOOST_CONTAINER_FORCEINLINE const_iterator end() const - { return this->cend(); } - - BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin() - { return reverse_iterator(end()); } - - BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const - { return this->crbegin(); } - - BOOST_CONTAINER_FORCEINLINE reverse_iterator rend() - { return reverse_iterator(begin()); } - - BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const - { return this->crend(); } - - //! Effects: Returns a const_iterator to the first element contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const - { return const_iterator(this->non_const_icont().begin()); } - - //! Effects: Returns a const_iterator to the end of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE const_iterator cend() const - { return const_iterator(this->non_const_icont().end()); } - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const - { return const_reverse_iterator(cend()); } - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const - { return const_reverse_iterator(cbegin()); } - - BOOST_CONTAINER_FORCEINLINE bool empty() const - { return !this->size(); } - - BOOST_CONTAINER_FORCEINLINE size_type size() const - { return this->icont().size(); } - - BOOST_CONTAINER_FORCEINLINE size_type max_size() const - { return AllocHolder::max_size(); } - - BOOST_CONTAINER_FORCEINLINE void swap(ThisType& x) - BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value - && boost::container::container_detail::is_nothrow_swappable::value ) - { AllocHolder::swap(x); } - - public: - - typedef typename Icont::insert_commit_data insert_commit_data; - - // insert/erase - std::pair insert_unique_check - (const key_type& key, insert_commit_data &data) - { - std::pair ret = - this->icont().insert_unique_check(key, KeyNodeCompare(key_comp()), data); - return std::pair(iterator(ret.first), ret.second); - } - - std::pair insert_unique_check - (const_iterator hint, const key_type& key, insert_commit_data &data) - { - BOOST_ASSERT((priv_is_linked)(hint)); - std::pair ret = - this->icont().insert_unique_check(hint.get(), key, KeyNodeCompare(key_comp()), data); - return std::pair(iterator(ret.first), ret.second); - } - - template - iterator insert_unique_commit - (BOOST_FWD_REF(MovableConvertible) v, insert_commit_data &data) - { - NodePtr tmp = AllocHolder::create_node(boost::forward(v)); - scoped_destroy_deallocator destroy_deallocator(tmp, this->node_alloc()); - iterator ret(this->icont().insert_unique_commit(*tmp, data)); - destroy_deallocator.release(); - return ret; - } - - template - std::pair insert_unique(BOOST_FWD_REF(MovableConvertible) v) - { - insert_commit_data data; - std::pair ret = - this->insert_unique_check(KeyOfValue()(v), data); - if(ret.second){ - ret.first = this->insert_unique_commit(boost::forward(v), data); - } - return ret; - } - - private: - - template - iiterator priv_insert_or_assign_commit - (BOOST_FWD_REF(KeyConvertible) key, BOOST_FWD_REF(M) obj, insert_commit_data &data) - { - NodePtr tmp = AllocHolder::create_node(boost::forward(key), boost::forward(obj)); - scoped_destroy_deallocator destroy_deallocator(tmp, this->node_alloc()); - iiterator ret(this->icont().insert_unique_commit(*tmp, data)); - destroy_deallocator.release(); - return ret; - } - - bool priv_is_linked(const_iterator const position) const - { - iiterator const cur(position.get()); - return cur == this->icont().end() || - cur == this->icont().root() || - iiterator(cur).go_parent().go_left() == cur || - iiterator(cur).go_parent().go_right() == cur; - } - - template - void push_back_impl(BOOST_FWD_REF(MovableConvertible) v) - { - NodePtr tmp(AllocHolder::create_node(boost::forward(v))); - //push_back has no-throw guarantee so avoid any deallocator/destroyer - this->icont().push_back(*tmp); - } - - std::pair emplace_unique_impl(NodePtr p) - { - value_type &v = p->get_data(); - insert_commit_data data; - scoped_destroy_deallocator destroy_deallocator(p, this->node_alloc()); - std::pair ret = - this->insert_unique_check(KeyOfValue()(v), data); - if(!ret.second){ - return ret; - } - //No throw insertion part, release rollback - destroy_deallocator.release(); - return std::pair - ( iterator(this->icont().insert_unique_commit(*p, data)) - , true ); - } - - iterator emplace_unique_hint_impl(const_iterator hint, NodePtr p) - { - BOOST_ASSERT((priv_is_linked)(hint)); - value_type &v = p->get_data(); - insert_commit_data data; - std::pair ret = - this->insert_unique_check(hint, KeyOfValue()(v), data); - if(!ret.second){ - Destroyer(this->node_alloc())(p); - return ret.first; - } - return iterator(this->icont().insert_unique_commit(*p, data)); - } - - public: - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - template - BOOST_CONTAINER_FORCEINLINE std::pair emplace_unique(BOOST_FWD_REF(Args)... args) - { return this->emplace_unique_impl(AllocHolder::create_node(boost::forward(args)...)); } - - template - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint_unique(const_iterator hint, BOOST_FWD_REF(Args)... args) - { return this->emplace_unique_hint_impl(hint, AllocHolder::create_node(boost::forward(args)...)); } - - template - iterator emplace_equal(BOOST_FWD_REF(Args)... args) - { - NodePtr tmp(AllocHolder::create_node(boost::forward(args)...)); - scoped_destroy_deallocator destroy_deallocator(tmp, this->node_alloc()); - iterator ret(this->icont().insert_equal(this->icont().end(), *tmp)); - destroy_deallocator.release(); - return ret; - } - - template - iterator emplace_hint_equal(const_iterator hint, BOOST_FWD_REF(Args)... args) - { - BOOST_ASSERT((priv_is_linked)(hint)); - NodePtr tmp(AllocHolder::create_node(boost::forward(args)...)); - scoped_destroy_deallocator destroy_deallocator(tmp, this->node_alloc()); - iterator ret(this->icont().insert_equal(hint.get(), *tmp)); - destroy_deallocator.release(); - return ret; - } - - template - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace - (const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(Args)... args) - { - insert_commit_data data; - const key_type & k = key; //Support emulated rvalue references - std::pair ret = - hint == const_iterator() ? this->icont().insert_unique_check( k, KeyNodeCompare(key_comp()), data) - : this->icont().insert_unique_check(hint.get(), k, KeyNodeCompare(key_comp()), data); - if(ret.second){ - ret.first = this->icont().insert_unique_commit - (*AllocHolder::create_node(try_emplace_t(), boost::forward(key), boost::forward(args)...), data); - } - return std::pair(iterator(ret.first), ret.second); - } - - #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #define BOOST_CONTAINER_TREE_EMPLACE_CODE(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - std::pair emplace_unique(BOOST_MOVE_UREF##N)\ - { return this->emplace_unique_impl(AllocHolder::create_node(BOOST_MOVE_FWD##N)); }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - iterator emplace_hint_unique(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - { return this->emplace_unique_hint_impl(hint, AllocHolder::create_node(BOOST_MOVE_FWD##N)); }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - iterator emplace_equal(BOOST_MOVE_UREF##N)\ - {\ - NodePtr tmp(AllocHolder::create_node(BOOST_MOVE_FWD##N));\ - scoped_destroy_deallocator destroy_deallocator(tmp, this->node_alloc());\ - iterator ret(this->icont().insert_equal(this->icont().end(), *tmp));\ - destroy_deallocator.release();\ - return ret;\ - }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - iterator emplace_hint_equal(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - BOOST_ASSERT((priv_is_linked)(hint));\ - NodePtr tmp(AllocHolder::create_node(BOOST_MOVE_FWD##N));\ - scoped_destroy_deallocator destroy_deallocator(tmp, this->node_alloc());\ - iterator ret(this->icont().insert_equal(hint.get(), *tmp));\ - destroy_deallocator.release();\ - return ret;\ - }\ - \ - template \ - BOOST_CONTAINER_FORCEINLINE std::pair\ - try_emplace(const_iterator hint, BOOST_FWD_REF(KeyType) key BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - insert_commit_data data;\ - const key_type & k = key;\ - std::pair ret =\ - hint == const_iterator() ? this->icont().insert_unique_check( k, KeyNodeCompare(key_comp()), data)\ - : this->icont().insert_unique_check(hint.get(), k, KeyNodeCompare(key_comp()), data);\ - if(ret.second){\ - ret.first = this->icont().insert_unique_commit\ - (*AllocHolder::create_node(try_emplace_t(), boost::forward(key) BOOST_MOVE_I##N BOOST_MOVE_FWD##N), data);\ - }\ - return std::pair(iterator(ret.first), ret.second);\ - }\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_TREE_EMPLACE_CODE) - #undef BOOST_CONTAINER_TREE_EMPLACE_CODE - - #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - template - iterator insert_unique_convertible(const_iterator hint, BOOST_FWD_REF(MovableConvertible) v) - { - BOOST_ASSERT((priv_is_linked)(hint)); - insert_commit_data data; - std::pair ret = - this->insert_unique_check(hint, KeyOfValue()(v), data); - if(!ret.second) - return ret.first; - return this->insert_unique_commit(boost::forward(v), data); - } - - BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert_unique, value_type, iterator, this->insert_unique_convertible, const_iterator, const_iterator) - - template - void insert_unique(InputIterator first, InputIterator last) - { - for( ; first != last; ++first) - this->insert_unique(*first); - } - - iterator insert_equal(const value_type& v) - { - NodePtr tmp(AllocHolder::create_node(v)); - scoped_destroy_deallocator destroy_deallocator(tmp, this->node_alloc()); - iterator ret(this->icont().insert_equal(this->icont().end(), *tmp)); - destroy_deallocator.release(); - return ret; - } - - template - iterator insert_equal(BOOST_FWD_REF(MovableConvertible) v) - { - NodePtr tmp(AllocHolder::create_node(boost::forward(v))); - scoped_destroy_deallocator destroy_deallocator(tmp, this->node_alloc()); - iterator ret(this->icont().insert_equal(this->icont().end(), *tmp)); - destroy_deallocator.release(); - return ret; - } - - template - iterator insert_equal_convertible(const_iterator hint, BOOST_FWD_REF(MovableConvertible) v) - { - BOOST_ASSERT((priv_is_linked)(hint)); - NodePtr tmp(AllocHolder::create_node(boost::forward(v))); - scoped_destroy_deallocator destroy_deallocator(tmp, this->node_alloc()); - iterator ret(this->icont().insert_equal(hint.get(), *tmp)); - destroy_deallocator.release(); - return ret; - } - - BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert_equal, value_type, iterator, this->insert_equal_convertible, const_iterator, const_iterator) - - template - void insert_equal(InputIterator first, InputIterator last) - { - for( ; first != last; ++first) - this->insert_equal(*first); - } - - template - std::pair insert_or_assign(const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(M) obj) - { - insert_commit_data data; - const key_type & k = key; //Support emulated rvalue references - std::pair ret = - hint == const_iterator() ? this->icont().insert_unique_check(k, KeyNodeCompare(key_comp()), data) - : this->icont().insert_unique_check(hint.get(), k, KeyNodeCompare(key_comp()), data); - if(ret.second){ - ret.first = this->priv_insert_or_assign_commit(boost::forward(key), boost::forward(obj), data); - } - else{ - ret.first->get_data().second = boost::forward(obj); - } - return std::pair(iterator(ret.first), ret.second); - } - - iterator erase(const_iterator position) - { - BOOST_ASSERT(position != this->cend() && (priv_is_linked)(position)); - return iterator(this->icont().erase_and_dispose(position.get(), Destroyer(this->node_alloc()))); - } - - BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& k) - { return AllocHolder::erase_key(k, KeyNodeCompare(key_comp()), alloc_version()); } - - iterator erase(const_iterator first, const_iterator last) - { - BOOST_ASSERT(first == last || (first != this->cend() && (priv_is_linked)(first))); - BOOST_ASSERT(first == last || (priv_is_linked)(last)); - return iterator(AllocHolder::erase_range(first.get(), last.get(), alloc_version())); - } - - node_type extract(const key_type& k) - { - iterator const it = this->find(k); - if(this->end() != it){ - return this->extract(it); - } - return node_type(); - } - - node_type extract(const_iterator position) - { - BOOST_ASSERT(position != this->cend() && (priv_is_linked)(position)); - iiterator const iit(position.get()); - this->icont().erase(iit); - return node_type(iit.operator->(), this->node_alloc()); - } - - insert_return_type insert_unique_node(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) - { - return this->insert_unique_node(this->end(), boost::move(nh)); - } - - insert_return_type insert_unique_node(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) - { - insert_return_type irt; //inserted == false, node.empty() - if(!nh.empty()){ - insert_commit_data data; - std::pair ret = - this->insert_unique_check(hint, KeyOfValue()(nh.value()), data); - if(ret.second){ - irt.inserted = true; - irt.position = iterator(this->icont().insert_unique_commit(*nh.get(), data)); - nh.release(); - } - else{ - irt.position = ret.first; - irt.node = boost::move(nh); - } - } - else{ - irt.position = this->end(); - } - return BOOST_MOVE_RET(insert_return_type, irt); - } - - iterator insert_equal_node(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) - { - if(nh.empty()){ - return this->end(); - } - else{ - NodePtr const p(nh.release()); - return iterator(this->icont().insert_equal(*p)); - } - } - - iterator insert_equal_node(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) - { - if(nh.empty()){ - return this->end(); - } - else{ - NodePtr const p(nh.release()); - return iterator(this->icont().insert_equal(hint.get(), *p)); - } - } - - template - BOOST_CONTAINER_FORCEINLINE void merge_unique(tree& source) - { return this->icont().merge_unique(source.icont()); } - - template - BOOST_CONTAINER_FORCEINLINE void merge_equal(tree& source) - { return this->icont().merge_equal(source.icont()); } - BOOST_CONTAINER_FORCEINLINE void clear() - { AllocHolder::clear(alloc_version()); } - - // search operations. Const and non-const overloads even if no iterator is returned - // so splay implementations can to their rebalancing when searching in non-const versions - BOOST_CONTAINER_FORCEINLINE iterator find(const key_type& k) - { return iterator(this->icont().find(k, KeyNodeCompare(key_comp()))); } - - BOOST_CONTAINER_FORCEINLINE const_iterator find(const key_type& k) const - { return const_iterator(this->non_const_icont().find(k, KeyNodeCompare(key_comp()))); } - - BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& k) const - { return size_type(this->icont().count(k, KeyNodeCompare(key_comp()))); } - - BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& k) - { return iterator(this->icont().lower_bound(k, KeyNodeCompare(key_comp()))); } - - BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& k) const - { return const_iterator(this->non_const_icont().lower_bound(k, KeyNodeCompare(key_comp()))); } - - BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& k) - { return iterator(this->icont().upper_bound(k, KeyNodeCompare(key_comp()))); } - - BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& k) const - { return const_iterator(this->non_const_icont().upper_bound(k, KeyNodeCompare(key_comp()))); } - - std::pair equal_range(const key_type& k) - { - std::pair ret = - this->icont().equal_range(k, KeyNodeCompare(key_comp())); - return std::pair(iterator(ret.first), iterator(ret.second)); - } - - std::pair equal_range(const key_type& k) const - { - std::pair ret = - this->non_const_icont().equal_range(k, KeyNodeCompare(key_comp())); - return std::pair - (const_iterator(ret.first), const_iterator(ret.second)); - } - - std::pair lower_bound_range(const key_type& k) - { - std::pair ret = - this->icont().lower_bound_range(k, KeyNodeCompare(key_comp())); - return std::pair(iterator(ret.first), iterator(ret.second)); - } - - std::pair lower_bound_range(const key_type& k) const - { - std::pair ret = - this->non_const_icont().lower_bound_range(k, KeyNodeCompare(key_comp())); - return std::pair - (const_iterator(ret.first), const_iterator(ret.second)); - } - - BOOST_CONTAINER_FORCEINLINE void rebalance() - { intrusive_tree_proxy_t::rebalance(this->icont()); } - - BOOST_CONTAINER_FORCEINLINE friend bool operator==(const tree& x, const tree& y) - { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); } - - BOOST_CONTAINER_FORCEINLINE friend bool operator<(const tree& x, const tree& y) - { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } - - BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const tree& x, const tree& y) - { return !(x == y); } - - BOOST_CONTAINER_FORCEINLINE friend bool operator>(const tree& x, const tree& y) - { return y < x; } - - BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const tree& x, const tree& y) - { return !(y < x); } - - BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const tree& x, const tree& y) - { return !(x < y); } - - BOOST_CONTAINER_FORCEINLINE friend void swap(tree& x, tree& y) - { x.swap(y); } -}; - -} //namespace container_detail { -} //namespace container { - -template -struct has_trivial_destructor_after_move; - -//!has_trivial_destructor_after_move<> == true_type -//!specialization for optimizations -template -struct has_trivial_destructor_after_move - < - ::boost::container::container_detail::tree - - > -{ - typedef typename ::boost::container::allocator_traits::pointer pointer; - static const bool value = ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value; -}; - -} //namespace boost { - -#include - -#endif //BOOST_CONTAINER_TREE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/type_traits.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/type_traits.hpp deleted file mode 100644 index e1453a6594a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/type_traits.hpp +++ /dev/null @@ -1,70 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// (C) Copyright John Maddock 2000. -// (C) Copyright Ion Gaztanaga 2005-2015. -// -// 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. -// -// The alignment and Type traits implementation comes from -// John Maddock's TypeTraits library. -// -// Some other tricks come from Howard Hinnant's papers and StackOverflow replies -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_TYPE_TRAITS_HPP -#define BOOST_CONTAINER_CONTAINER_DETAIL_TYPE_TRAITS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include - -namespace boost { -namespace container { -namespace container_detail { - -using ::boost::move_detail::enable_if; -using ::boost::move_detail::enable_if_and; -using ::boost::move_detail::is_same; -using ::boost::move_detail::is_different; -using ::boost::move_detail::is_pointer; -using ::boost::move_detail::add_reference; -using ::boost::move_detail::add_const; -using ::boost::move_detail::add_const_reference; -using ::boost::move_detail::remove_const; -using ::boost::move_detail::remove_reference; -using ::boost::move_detail::make_unsigned; -using ::boost::move_detail::is_floating_point; -using ::boost::move_detail::is_integral; -using ::boost::move_detail::is_enum; -using ::boost::move_detail::is_pod; -using ::boost::move_detail::is_empty; -using ::boost::move_detail::is_trivially_destructible; -using ::boost::move_detail::is_trivially_default_constructible; -using ::boost::move_detail::is_trivially_copy_constructible; -using ::boost::move_detail::is_trivially_move_constructible; -using ::boost::move_detail::is_trivially_copy_assignable; -using ::boost::move_detail::is_trivially_move_assignable; -using ::boost::move_detail::is_nothrow_default_constructible; -using ::boost::move_detail::is_nothrow_copy_constructible; -using ::boost::move_detail::is_nothrow_move_constructible; -using ::boost::move_detail::is_nothrow_copy_assignable; -using ::boost::move_detail::is_nothrow_move_assignable; -using ::boost::move_detail::is_nothrow_swappable; -using ::boost::move_detail::alignment_of; -using ::boost::move_detail::aligned_storage; -using ::boost::move_detail::nat; -using ::boost::move_detail::max_align_t; - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_TYPE_TRAITS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/value_init.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/value_init.hpp deleted file mode 100644 index faba70ee145..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/value_init.hpp +++ /dev/null @@ -1,51 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_VALUE_INIT_HPP -#define BOOST_CONTAINER_DETAIL_VALUE_INIT_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { -namespace container_detail { - -template -struct value_init -{ - value_init() - : m_t() - {} - - operator T &() { return m_t; } - - T &get() { return m_t; } - - T m_t; -}; - -} //namespace container_detail { -} //namespace container { -} //namespace boost { - -#include - -#endif //#ifndef BOOST_CONTAINER_DETAIL_VALUE_INIT_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/variadic_templates_tools.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/variadic_templates_tools.hpp deleted file mode 100644 index e9fa9cd15aa..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/variadic_templates_tools.hpp +++ /dev/null @@ -1,163 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2008-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_VARIADIC_TEMPLATES_TOOLS_HPP -#define BOOST_CONTAINER_DETAIL_VARIADIC_TEMPLATES_TOOLS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include - -#include -#include //std::size_t - -namespace boost { -namespace container { -namespace container_detail { - -template -class tuple; - -template<> class tuple<> -{}; - -template -class tuple - : private tuple -{ - typedef tuple inherited; - - public: - tuple() - : inherited(), m_head() - {} - - template - tuple(U &&u, Args && ...args) - : inherited(::boost::forward(args)...), m_head(::boost::forward(u)) - {} - - // Construct tuple from another tuple. - template - tuple(const tuple& other) - : inherited(other.tail()), m_head(other.head()) - {} - - template - tuple& operator=(const tuple& other) - { - m_head = other.head(); - tail() = other.tail(); - return this; - } - - typename add_reference::type head() { return m_head; } - typename add_reference::type head() const { return m_head; } - - inherited& tail() { return *this; } - const inherited& tail() const { return *this; } - - protected: - Head m_head; -}; - - -template -tuple forward_as_tuple(Values&&... values) -{ return tuple(::boost::forward(values)...); } - -template -struct tuple_element; - -template -struct tuple_element > -{ - typedef typename tuple_element >::type type; -}; - -template -struct tuple_element<0, tuple > -{ - typedef Head type; -}; - -template -class get_impl; - -template -class get_impl > -{ - typedef typename tuple_element >::type Element; - typedef get_impl > Next; - - public: - typedef typename add_reference::type type; - typedef typename add_const_reference::type const_type; - static type get(tuple& t) { return Next::get(t.tail()); } - static const_type get(const tuple& t) { return Next::get(t.tail()); } -}; - -template -class get_impl<0, tuple > -{ - public: - typedef typename add_reference::type type; - typedef typename add_const_reference::type const_type; - static type get(tuple& t) { return t.head(); } - static const_type get(const tuple& t){ return t.head(); } -}; - -template -typename get_impl >::type get(tuple& t) -{ return get_impl >::get(t); } - -template -typename get_impl >::const_type get(const tuple& t) -{ return get_impl >::get(t); } - -//////////////////////////////////////////////////// -// Builds an index_tuple<0, 1, 2, ..., Num-1>, that will -// be used to "unpack" into comma-separated values -// in a function call. -//////////////////////////////////////////////////// - -template struct index_tuple{ typedef index_tuple type; }; - -template struct concat_index_tuple; - -template -struct concat_index_tuple, index_tuple> - : index_tuple{}; - -template struct build_number_seq; - -template -struct build_number_seq - : concat_index_tuple::type - ,typename build_number_seq::type - >::type -{}; - -template<> struct build_number_seq<0> : index_tuple<>{}; -template<> struct build_number_seq<1> : index_tuple<0>{}; - -}}} //namespace boost { namespace container { namespace container_detail { - -#include - -#endif //#ifndef BOOST_CONTAINER_DETAIL_VARIADIC_TEMPLATES_TOOLS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/version_type.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/version_type.hpp deleted file mode 100644 index a20b3eedaa8..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/version_type.hpp +++ /dev/null @@ -1,110 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -// -// This code comes from N1953 document by Howard E. Hinnant -// -////////////////////////////////////////////////////////////////////////////// - - -#ifndef BOOST_CONTAINER_DETAIL_VERSION_TYPE_HPP -#define BOOST_CONTAINER_DETAIL_VERSION_TYPE_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -#include -#include - -namespace boost{ -namespace container { -namespace container_detail { - -template -struct version_type - : public container_detail::integral_constant -{ - typedef T type; - - version_type(const version_type&); -}; - -namespace impl{ - -template , typename T::version>::value> -struct extract_version -{ - static const unsigned value = 1; -}; - -template -struct extract_version -{ - static const unsigned value = T::version::value; -}; - -template -struct has_version -{ - private: - struct two {char _[2];}; - template static two test(...); - template static char test(const typename U::version*); - public: - static const bool value = sizeof(test(0)) == 1; - void dummy(){} -}; - -template ::value> -struct version -{ - static const unsigned value = 1; -}; - -template -struct version -{ - static const unsigned value = extract_version::value; -}; - -} //namespace impl - -template -struct version - : public container_detail::integral_constant::value> -{}; - -template -struct is_version -{ - static const bool value = - is_same< typename version::type, integral_constant >::value; -}; - -} //namespace container_detail { - -typedef container_detail::integral_constant version_0; -typedef container_detail::integral_constant version_1; -typedef container_detail::integral_constant version_2; - -} //namespace container { -} //namespace boost{ - -#include - -#endif //#define BOOST_CONTAINER_DETAIL_VERSION_TYPE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/detail/workaround.hpp b/contrib/libboost/boost_1_65_0/boost/container/detail/workaround.hpp deleted file mode 100644 index 816d3cc84de..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/detail/workaround.hpp +++ /dev/null @@ -1,117 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP -#define BOOST_CONTAINER_DETAIL_WORKAROUND_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)\ - && !defined(BOOST_INTERPROCESS_DISABLE_VARIADIC_TMPL) - #define BOOST_CONTAINER_PERFECT_FORWARDING -#endif - -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && defined(__GXX_EXPERIMENTAL_CXX0X__)\ - && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40700) - #define BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST -#endif - -#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_FALLTHOUGH) - #define BOOST_CONTAINER_FALLTHOUGH -#else - #define BOOST_CONTAINER_FALLTHOUGH BOOST_FALLTHOUGH; -#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 -#define BOOST_CONTAINER_IMPDEF(TYPE) TYPE -#define BOOST_CONTAINER_SEEDOC(TYPE) TYPE - -//Macros for memset optimization. In most platforms -//memsetting pointers and floatings is safe and faster. -// -//If your platform does not offer these guarantees -//define these to value zero. -#ifndef BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_NOT_ZERO -#define BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_ZERO 1 -#endif - -#ifndef BOOST_CONTAINER_MEMZEROED_POINTER_IS_NOT_NULL -#define BOOST_CONTAINER_MEMZEROED_POINTER_IS_NULL -#endif - -#define BOOST_CONTAINER_DOC1ST(TYPE1, TYPE2) TYPE2 -#define BOOST_CONTAINER_I , -#define BOOST_CONTAINER_DOCIGN(T) T -#define BOOST_CONTAINER_DOCONLY(T) - -/* - we need to import/export our code only if the user has specifically - asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost - libraries to be dynamically linked, or BOOST_CONTAINER_DYN_LINK - if they want just this one to be dynamically liked: -*/ -#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CONTAINER_DYN_LINK) - - /* export if this is our own source, otherwise import: */ - #ifdef BOOST_CONTAINER_SOURCE - # define BOOST_CONTAINER_DECL BOOST_SYMBOL_EXPORT - #else - # define BOOST_CONTAINER_DECL BOOST_SYMBOL_IMPORT - - #endif /* BOOST_CONTAINER_SOURCE */ -#else - #define BOOST_CONTAINER_DECL -#endif /* DYN_LINK */ - -//#define BOOST_CONTAINER_DISABLE_FORCEINLINE - -#if defined(BOOST_CONTAINER_DISABLE_FORCEINLINE) - #define BOOST_CONTAINER_FORCEINLINE inline -#elif defined(BOOST_CONTAINER_FORCEINLINE_IS_BOOST_FORCELINE) - #define BOOST_CONTAINER_FORCEINLINE BOOST_FORCEINLINE -#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 - -#endif //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/flat_map.hpp b/contrib/libboost/boost_1_65_0/boost/container/flat_map.hpp deleted file mode 100644 index 56f12ecbe84..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/flat_map.hpp +++ /dev/null @@ -1,2530 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_FLAT_MAP_HPP -#define BOOST_CONTAINER_FLAT_MAP_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -// container -#include -#include -#include //new_allocator -#include -// container/detail -#include -#include -#include -#include //equal() -// move -#include -#include -// move/detail -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif -#include -// intrusive -#include //pair -#include //less, equal -//others -#include - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) -#include -#endif - -namespace boost { -namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -template -class flat_multimap; - -namespace container_detail{ - -template -BOOST_CONTAINER_FORCEINLINE static D &force(S &s) -{ return *reinterpret_cast(&s); } - -template -BOOST_CONTAINER_FORCEINLINE static D force_copy(const S &s) -{ - const D *const vp = reinterpret_cast(&s); - D ret_val(*vp); - return ret_val; -} - -} //namespace container_detail{ - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! A flat_map is a kind of associative container that supports unique keys (contains at -//! most one of each key value) and provides for fast retrieval of values of another -//! type T based on the keys. The flat_map class supports random-access iterators. -//! -//! A flat_map satisfies all of the requirements of a container and of a reversible -//! container and of an associative container. A flat_map also provides -//! most operations described for unique keys. For a -//! flat_map the key_type is Key and the value_type is std::pair -//! (unlike std::map which value_type is std::pair<const Key, T>). -//! -//! Compare is the ordering function for Keys (e.g. std::less). -//! -//! Allocator is the allocator to allocate the value_types -//! (e.g. allocator< std::pair >). -//! -//! flat_map is similar to std::map but it's implemented like an ordered vector. -//! This means that inserting a new element into a flat_map invalidates -//! previous iterators and references -//! -//! Erasing an element invalidates iterators and references -//! pointing to elements that come after (their keys are bigger) the erased element. -//! -//! This container provides random-access iterators. -//! -//! \tparam Key is the key_type of the map -//! \tparam Value is the mapped_type -//! \tparam Compare is the ordering function for Keys (e.g. std::less). -//! \tparam Allocator is the allocator to allocate the value_types -//! (e.g. allocator< std::pair > ). -#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED -template , class Allocator = new_allocator< std::pair< Key, T> > > -#else -template -#endif -class flat_map -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - BOOST_COPYABLE_AND_MOVABLE(flat_map) - //This is the tree that we should store if pair was movable - typedef container_detail::flat_tree< - std::pair, - container_detail::select1st, - Compare, - Allocator> tree_t; - - //This is the real tree stored here. It's based on a movable pair - typedef container_detail::flat_tree< - container_detail::pair, - container_detail::select1st, - Compare, - typename allocator_traits::template portable_rebind_alloc - >::type> impl_tree_t; - impl_tree_t m_flat_tree; // flat tree representing flat_map - - typedef typename impl_tree_t::value_type impl_value_type; - typedef typename impl_tree_t::const_iterator impl_const_iterator; - typedef typename impl_tree_t::iterator impl_iterator; - typedef typename impl_tree_t::allocator_type impl_allocator_type; - typedef container_detail::flat_tree_value_compare - < Compare - , container_detail::select1st - , std::pair > value_compare_impl; - typedef typename container_detail::get_flat_tree_iterators - ::pointer>::iterator iterator_impl; - typedef typename container_detail::get_flat_tree_iterators - ::pointer>::const_iterator const_iterator_impl; - typedef typename container_detail::get_flat_tree_iterators - ::pointer>::reverse_iterator reverse_iterator_impl; - typedef typename container_detail::get_flat_tree_iterators - ::pointer>::const_reverse_iterator const_reverse_iterator_impl; - - public: - typedef typename impl_tree_t::stored_allocator_type impl_stored_allocator_type; - typedef typename impl_tree_t::sequence_type impl_sequence_type; - - BOOST_CONTAINER_FORCEINLINE impl_tree_t &tree() - { return m_flat_tree; } - - BOOST_CONTAINER_FORCEINLINE const impl_tree_t &tree() const - { return m_flat_tree; } - - private: - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - - ////////////////////////////////////////////// - // - // types - // - ////////////////////////////////////////////// - typedef Key key_type; - typedef T mapped_type; - typedef std::pair value_type; - typedef ::boost::container::allocator_traits allocator_traits_type; - typedef typename boost::container::allocator_traits::pointer pointer; - typedef typename boost::container::allocator_traits::const_pointer const_pointer; - typedef typename boost::container::allocator_traits::reference reference; - typedef typename boost::container::allocator_traits::const_reference const_reference; - typedef typename boost::container::allocator_traits::size_type size_type; - typedef typename boost::container::allocator_traits::difference_type difference_type; - typedef Allocator allocator_type; - typedef BOOST_CONTAINER_IMPDEF(Allocator) stored_allocator_type; - typedef BOOST_CONTAINER_IMPDEF(value_compare_impl) value_compare; - typedef Compare key_compare; - typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator; - typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator; - typedef BOOST_CONTAINER_IMPDEF(reverse_iterator_impl) reverse_iterator; - typedef BOOST_CONTAINER_IMPDEF(const_reverse_iterator_impl) const_reverse_iterator; - typedef BOOST_CONTAINER_IMPDEF(impl_value_type) movable_value_type; - typedef typename BOOST_CONTAINER_IMPDEF(tree_t::sequence_type) sequence_type; - - //Allocator::value_type must be std::pair - BOOST_STATIC_ASSERT((container_detail::is_same, typename Allocator::value_type>::value)); - - ////////////////////////////////////////////// - // - // construct/copy/destroy - // - ////////////////////////////////////////////// - - //! Effects: Default constructs an empty flat_map. - //! - //! Complexity: Constant. - flat_map() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible::value && - container_detail::is_nothrow_default_constructible::value) - : m_flat_tree() - {} - - //! Effects: Constructs an empty flat_map using the specified allocator. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit flat_map(const allocator_type& a) - : m_flat_tree(container_detail::force(a)) - {} - - //! Effects: Constructs an empty flat_map using the specified - //! comparison object. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit flat_map(const Compare& comp) - : m_flat_tree(comp) - {} - - //! Effects: Constructs an empty flat_map using the specified - //! comparison object and allocator. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE flat_map(const Compare& comp, const allocator_type& a) - : m_flat_tree(comp, container_detail::force(a)) - {} - - //! Effects: Constructs an empty flat_map and - //! and inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last) - : m_flat_tree(true, first, last) - {} - - //! Effects: Constructs an empty flat_map using the specified - //! allocator, and inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last, const allocator_type& a) - : m_flat_tree(true, first, last, container_detail::force(a)) - {} - - //! Effects: Constructs an empty flat_map using the specified comparison object and - //! and inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last, const Compare& comp) - : m_flat_tree(true, first, last, comp) - {} - - //! Effects: Constructs an empty flat_map using the specified comparison object and - //! allocator, and inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) - : m_flat_tree(true, first, last, comp, container_detail::force(a)) - {} - - //! Effects: Constructs an empty flat_map - //! and inserts elements from the ordered range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE - flat_map(ordered_unique_range_t, InputIterator first, InputIterator last) - : m_flat_tree(ordered_range, first, last) - {} - - //! Effects: Constructs an empty flat_map using the specified comparison object and - //! inserts elements from the ordered range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE - flat_map(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp) - : m_flat_tree(ordered_range, first, last, comp) - {} - - //! Effects: Constructs an empty flat_map using the specified comparison object and - //! allocator, and inserts elements from the ordered range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE - flat_map(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) - : m_flat_tree(ordered_range, first, last, comp, a) - {} - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Constructs an empty flat_map and - //! inserts elements from the range [il.begin() ,il.end()). - //! - //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list il) - : m_flat_tree(true, il.begin(), il.end()) - {} - - //! Effects: Constructs an empty flat_map using the specified - //! allocator, and inserts elements from the range [il.begin() ,il.end()). - //! - //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list il, const allocator_type& a) - : m_flat_tree(true, il.begin(), il.end(), container_detail::force(a)) - {} - - //! Effects: Constructs an empty flat_map using the specified comparison object and - //! inserts elements from the range [il.begin() ,il.end()). - //! - //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list il, const Compare& comp) - : m_flat_tree(true, il.begin(), il.end(), comp) - {} - - //! Effects: Constructs an empty flat_map using the specified comparison object and - //! allocator, and inserts elements from the range [il.begin() ,il.end()). - //! - //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list il, const Compare& comp, const allocator_type& a) - : m_flat_tree(true, il.begin(), il.end(), comp, container_detail::force(a)) - {} - - //! Effects: Constructs an empty flat_map using and - //! inserts elements from the ordered unique range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_map(ordered_unique_range_t, std::initializer_list il) - : m_flat_tree(ordered_unique_range, il.begin(), il.end()) - {} - - //! Effects: Constructs an empty flat_map using the specified comparison object and - //! inserts elements from the ordered unique range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_map(ordered_unique_range_t, std::initializer_list il, const Compare& comp) - : m_flat_tree(ordered_unique_range, il.begin(), il.end(), comp) - {} - - //! Effects: Constructs an empty flat_map using the specified comparison object and - //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_map(ordered_unique_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) - : m_flat_tree(ordered_unique_range, il.begin(), il.end(), comp, a) - {} -#endif - - //! Effects: Copy constructs a flat_map. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE flat_map(const flat_map& x) - : m_flat_tree(x.m_flat_tree) - {} - - //! Effects: Move constructs a flat_map. - //! Constructs *this using x's resources. - //! - //! Complexity: Constant. - //! - //! Postcondition: x is emptied. - BOOST_CONTAINER_FORCEINLINE flat_map(BOOST_RV_REF(flat_map) x) - BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible::value) - : m_flat_tree(boost::move(x.m_flat_tree)) - {} - - //! Effects: Copy constructs a flat_map using the specified allocator. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE flat_map(const flat_map& x, const allocator_type &a) - : m_flat_tree(x.m_flat_tree, a) - {} - - //! Effects: Move constructs a flat_map using the specified allocator. - //! Constructs *this using x's resources. - //! - //! Complexity: Constant if x.get_allocator() == a, linear otherwise. - BOOST_CONTAINER_FORCEINLINE flat_map(BOOST_RV_REF(flat_map) x, const allocator_type &a) - : m_flat_tree(boost::move(x.m_flat_tree), a) - {} - - //! Effects: Makes *this a copy of x. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE flat_map& operator=(BOOST_COPY_ASSIGN_REF(flat_map) x) - { m_flat_tree = x.m_flat_tree; return *this; } - - //! Effects: Move constructs a flat_map. - //! Constructs *this using x's resources. - //! - //! Throws: If allocator_traits_type::propagate_on_container_move_assignment - //! is false and (allocation throws or value_type's move constructor throws) - //! - //! Complexity: Constant if allocator_traits_type:: - //! propagate_on_container_move_assignment is true or - //! this->get>allocator() == x.get_allocator(). Linear otherwise. - BOOST_CONTAINER_FORCEINLINE flat_map& operator=(BOOST_RV_REF(flat_map) x) - BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || - allocator_traits_type::is_always_equal::value) && - boost::container::container_detail::is_nothrow_move_assignable::value) - { m_flat_tree = boost::move(x.m_flat_tree); return *this; } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Assign elements from il to *this - flat_map& operator=(std::initializer_list il) - { - this->clear(); - this->insert(il.begin(), il.end()); - return *this; - } -#endif - - //! Effects: Returns a copy of the allocator that - //! was passed to the object's constructor. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.get_allocator()); } - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force(m_flat_tree.get_stored_allocator()); } - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force(m_flat_tree.get_stored_allocator()); } - - ////////////////////////////////////////////// - // - // iterators - // - ////////////////////////////////////////////// - - //! Effects: Returns an iterator to the first element contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE iterator begin() BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.begin()); } - - //! Effects: Returns a const_iterator to the first element contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.begin()); } - - //! Effects: Returns an iterator to the end of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE iterator end() BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.end()); } - - //! Effects: Returns a const_iterator to the end of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.end()); } - - //! Effects: Returns a reverse_iterator pointing to the beginning - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.rbegin()); } - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.rbegin()); } - - //! Effects: Returns a reverse_iterator pointing to the end - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.rend()); } - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.rend()); } - - //! Effects: Returns a const_iterator to the first element contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.cbegin()); } - - //! Effects: Returns a const_iterator to the end of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.cend()); } - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.crbegin()); } - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.crend()); } - - ////////////////////////////////////////////// - // - // capacity - // - ////////////////////////////////////////////// - - //! Effects: Returns true if the container contains no elements. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE bool empty() const BOOST_NOEXCEPT_OR_NOTHROW - { return m_flat_tree.empty(); } - - //! Effects: Returns the number of the elements contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE size_type size() const BOOST_NOEXCEPT_OR_NOTHROW - { return m_flat_tree.size(); } - - //! Effects: Returns the largest possible size of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW - { return m_flat_tree.max_size(); } - - //! Effects: Number of elements for which memory has been allocated. - //! capacity() is always greater than or equal to size(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW - { return m_flat_tree.capacity(); } - - //! Effects: If n is less than or equal to capacity(), this call has no - //! effect. Otherwise, it is a request for allocation of additional memory. - //! If the request is successful, then capacity() is greater than or equal to - //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged. - //! - //! Throws: If memory allocation allocation throws or T's copy constructor throws. - //! - //! Note: If capacity() is less than "cnt", iterators and references to - //! to values might be invalidated. - BOOST_CONTAINER_FORCEINLINE void reserve(size_type cnt) - { m_flat_tree.reserve(cnt); } - - //! Effects: Tries to deallocate the excess of memory created - // with previous allocations. The size of the vector is unchanged - //! - //! Throws: If memory allocation throws, or T's copy constructor throws. - //! - //! Complexity: Linear to size(). - BOOST_CONTAINER_FORCEINLINE void shrink_to_fit() - { m_flat_tree.shrink_to_fit(); } - - ////////////////////////////////////////////// - // - // element access - // - ////////////////////////////////////////////// - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: If there is no key equivalent to x in the flat_map, inserts - //! value_type(x, T()) into the flat_map. - //! - //! Returns: A reference to the mapped_type corresponding to x in *this. - //! - //! Complexity: Logarithmic. - mapped_type &operator[](const key_type& k); - - //! Effects: If there is no key equivalent to x in the flat_map, inserts - //! value_type(move(x), T()) into the flat_map (the key is move-constructed) - //! - //! Returns: A reference to the mapped_type corresponding to x in *this. - //! - //! Complexity: Logarithmic. - mapped_type &operator[](key_type &&k) ; - #elif defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN) - //in compilers like GCC 3.4, we can't catch temporaries - BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); } - BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](BOOST_RV_REF(key_type) k) { return this->priv_subscript(::boost::move(k)); } - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH( operator[] , key_type, mapped_type&, this->priv_subscript) - #endif - - //! Effects: If a key equivalent to k already exists in the container, assigns forward(obj) - //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value - //! as if by insert, constructing it from value_type(k, forward(obj)). - //! - //! No iterators or references are invalidated. If the insertion is successful, pointers and references - //! to the element obtained while it is held in the node handle are invalidated, and pointers and - //! references obtained to that element before it was extracted become valid. - //! - //! Returns: The bool component is true if the insertion took place and false if the assignment - //! took place. The iterator component is pointing at the element that was inserted or updated. - //! - //! Complexity: Logarithmic in the size of the container. - template - BOOST_CONTAINER_FORCEINLINE std::pair insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj) - { - return container_detail::force_copy< std::pair > - (this->m_flat_tree.insert_or_assign - ( impl_const_iterator(), k, ::boost::forward(obj)) - ); - } - - //! Effects: If a key equivalent to k already exists in the container, assigns forward(obj) - //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value - //! as if by insert, constructing it from value_type(k, move(obj)). - //! - //! No iterators or references are invalidated. If the insertion is successful, pointers and references - //! to the element obtained while it is held in the node handle are invalidated, and pointers and - //! references obtained to that element before it was extracted become valid. - //! - //! Returns: The bool component is true if the insertion took place and false if the assignment - //! took place. The iterator component is pointing at the element that was inserted or updated. - //! - //! Complexity: Logarithmic in the size of the container. - template - BOOST_CONTAINER_FORCEINLINE std::pair insert_or_assign(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj) - { - return container_detail::force_copy< std::pair > - (this->m_flat_tree.insert_or_assign - ( impl_const_iterator(), ::boost::move(k), ::boost::forward(obj)) - ); - } - - //! Effects: If a key equivalent to k already exists in the container, assigns forward(obj) - //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value - //! as if by insert, constructing it from value_type(k, forward(obj)) and the new element - //! to the container as close as possible to the position just before hint. - //! - //! No iterators or references are invalidated. If the insertion is successful, pointers and references - //! to the element obtained while it is held in the node handle are invalidated, and pointers and - //! references obtained to that element before it was extracted become valid. - //! - //! Returns: The bool component is true if the insertion took place and false if the assignment - //! took place. The iterator component is pointing at the element that was inserted or updated. - //! - //! Complexity: Logarithmic in the size of the container in general, but amortized constant if - //! the new element is inserted just before hint. - template - BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, const key_type& k, BOOST_FWD_REF(M) obj) - { - return container_detail::force_copy< std::pair > - (this->m_flat_tree.insert_or_assign - ( container_detail::force_copy(hint) - , k, ::boost::forward(obj)) - ); - } - - //! Effects: If a key equivalent to k already exists in the container, assigns forward(obj) - //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value - //! as if by insert, constructing it from value_type(k, move(obj)) and the new element - //! to the container as close as possible to the position just before hint. - //! - //! No iterators or references are invalidated. If the insertion is successful, pointers and references - //! to the element obtained while it is held in the node handle are invalidated, and pointers and - //! references obtained to that element before it was extracted become valid. - //! - //! Returns: The bool component is true if the insertion took place and false if the assignment - //! took place. The iterator component is pointing at the element that was inserted or updated. - //! - //! Complexity: Logarithmic in the size of the container in general, but amortized constant if - //! the new element is inserted just before hint. - template - BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj) - { - return container_detail::force_copy< std::pair > - (this->m_flat_tree.insert_or_assign - ( container_detail::force_copy(hint) - , ::boost::move(k), ::boost::forward(obj)) - ); - } - - //! @copydoc ::boost::container::flat_set::nth(size_type) - BOOST_CONTAINER_FORCEINLINE iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.nth(n)); } - - //! @copydoc ::boost::container::flat_set::nth(size_type) const - BOOST_CONTAINER_FORCEINLINE const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.nth(n)); } - - //! @copydoc ::boost::container::flat_set::index_of(iterator) - BOOST_CONTAINER_FORCEINLINE size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW - { return m_flat_tree.index_of(container_detail::force_copy(p)); } - - //! @copydoc ::boost::container::flat_set::index_of(const_iterator) const - BOOST_CONTAINER_FORCEINLINE size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW - { return m_flat_tree.index_of(container_detail::force_copy(p)); } - - //! Returns: A reference to the element whose key is equivalent to x. - //! - //! Throws: An exception object of type out_of_range if no such element is present. - //! - //! Complexity: logarithmic. - T& at(const key_type& k) - { - iterator i = this->find(k); - if(i == this->end()){ - throw_out_of_range("flat_map::at key not found"); - } - return i->second; - } - - //! Returns: A reference to the element whose key is equivalent to x. - //! - //! Throws: An exception object of type out_of_range if no such element is present. - //! - //! Complexity: logarithmic. - const T& at(const key_type& k) const - { - const_iterator i = this->find(k); - if(i == this->end()){ - throw_out_of_range("flat_map::at key not found"); - } - return i->second; - } - - ////////////////////////////////////////////// - // - // modifiers - // - ////////////////////////////////////////////// - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Inserts an object x of type T constructed with - //! std::forward(args)... if and only if there is no element in the container - //! with key equivalent to the key of x. - //! - //! Returns: The bool component of the returned pair is true if and only - //! if the insertion takes place, and the iterator component of the pair - //! points to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic search time plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - template - BOOST_CONTAINER_FORCEINLINE std::pair emplace(BOOST_FWD_REF(Args)... args) - { return container_detail::force_copy< std::pair >(m_flat_tree.emplace_unique(boost::forward(args)...)); } - - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... in the container if and only if there is - //! no element in the container with key equivalent to the key of x. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic search time (constant if x is inserted - //! right before p) plus insertion linear to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - template - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args) - { - return container_detail::force_copy - (m_flat_tree.emplace_hint_unique( container_detail::force_copy(hint) - , boost::forward(args)...)); - } - - //! Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, - //! forward_as_tuple(k), forward_as_tuple(forward(args)...). - //! - //! Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise - //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k), - //! forward_as_tuple(forward(args)...). - //! - //! Returns: The bool component of the returned pair is true if and only if the - //! insertion took place. The returned iterator points to the map element whose key is equivalent to k. - //! - //! Complexity: Logarithmic. - template - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace(const key_type& k, BOOST_FWD_REF(Args)... args) - { - return container_detail::force_copy< std::pair >( - m_flat_tree.try_emplace(impl_const_iterator(), k, boost::forward(args)...)); - } - - //! Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, - //! forward_as_tuple(k), forward_as_tuple(forward(args)...). - //! - //! Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise - //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k), - //! forward_as_tuple(forward(args)...). - //! - //! Returns: The returned iterator points to the map element whose key is equivalent to k. - //! - //! Complexity: Logarithmic in general, but amortized constant if value - //! is inserted right before p. - template - BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k, BOOST_FWD_REF(Args)... args) - { - return container_detail::force_copy(m_flat_tree.try_emplace - (container_detail::force_copy(hint), k, boost::forward(args)...).first); - } - - //! Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, - //! forward_as_tuple(move(k)), forward_as_tuple(forward(args)...). - //! - //! Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise - //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)), - //! forward_as_tuple(forward(args)...). - //! - //! Returns: The bool component of the returned pair is true if and only if the - //! insertion took place. The returned iterator points to the map element whose key is equivalent to k. - //! - //! Complexity: Logarithmic. - template - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args) - { - return container_detail::force_copy< std::pair > - (m_flat_tree.try_emplace(impl_const_iterator(), boost::move(k), boost::forward(args)...)); - } - - //! Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, - //! forward_as_tuple(move(k)), forward_as_tuple(forward(args)...). - //! - //! Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise - //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)), - //! forward_as_tuple(forward(args)...). - //! - //! Returns: The returned iterator points to the map element whose key is equivalent to k. - //! - //! Complexity: Logarithmic in general, but amortized constant if value - //! is inserted right before p. - template - BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args) - { - return container_detail::force_copy - (m_flat_tree.try_emplace(container_detail::force_copy - (hint), boost::move(k), boost::forward(args)...).first); - } - - #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #define BOOST_CONTAINER_FLAT_MAP_EMPLACE_CODE(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE std::pair emplace(BOOST_MOVE_UREF##N)\ - {\ - return container_detail::force_copy< std::pair >\ - (m_flat_tree.emplace_unique(BOOST_MOVE_FWD##N));\ - }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - return container_detail::force_copy(m_flat_tree.emplace_hint_unique\ - (container_detail::force_copy(hint) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\ - }\ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace(const key_type& k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - return container_detail::force_copy< std::pair >\ - (m_flat_tree.try_emplace(impl_const_iterator(), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\ - }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - { return container_detail::force_copy(m_flat_tree.try_emplace\ - (container_detail::force_copy(hint), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first); }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace(BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - return container_detail::force_copy< std::pair >\ - (m_flat_tree.try_emplace(impl_const_iterator(), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\ - }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - { return container_detail::force_copy(m_flat_tree.try_emplace\ - (container_detail::force_copy(hint), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first); }\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_MAP_EMPLACE_CODE) - #undef BOOST_CONTAINER_FLAT_MAP_EMPLACE_CODE - - #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - //! Effects: Inserts x if and only if there is no element in the container - //! with key equivalent to the key of x. - //! - //! Returns: The bool component of the returned pair is true if and only - //! if the insertion takes place, and the iterator component of the pair - //! points to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic search time plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE std::pair insert(const value_type& x) - { return container_detail::force_copy >( - m_flat_tree.insert_unique(container_detail::force(x))); } - - //! Effects: Inserts a new value_type move constructed from the pair if and - //! only if there is no element in the container with key equivalent to the key of x. - //! - //! Returns: The bool component of the returned pair is true if and only - //! if the insertion takes place, and the iterator component of the pair - //! points to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic search time plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE std::pair insert(BOOST_RV_REF(value_type) x) - { return container_detail::force_copy >( - m_flat_tree.insert_unique(boost::move(container_detail::force(x)))); } - - //! Effects: Inserts a new value_type move constructed from the pair if and - //! only if there is no element in the container with key equivalent to the key of x. - //! - //! Returns: The bool component of the returned pair is true if and only - //! if the insertion takes place, and the iterator component of the pair - //! points to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic search time plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE std::pair insert(BOOST_RV_REF(movable_value_type) x) - { - return container_detail::force_copy > - (m_flat_tree.insert_unique(boost::move(x))); - } - - //! Effects: Inserts a copy of x in the container if and only if there is - //! no element in the container with key equivalent to the key of x. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic search time (constant if x is inserted - //! right before p) plus insertion linear to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x) - { - return container_detail::force_copy( - m_flat_tree.insert_unique( container_detail::force_copy(p) - , container_detail::force(x))); - } - - //! Effects: Inserts an element move constructed from x in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic search time (constant if x is inserted - //! right before p) plus insertion linear to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(value_type) x) - { - return container_detail::force_copy - (m_flat_tree.insert_unique( container_detail::force_copy(p) - , boost::move(container_detail::force(x)))); - } - - //! Effects: Inserts an element move constructed from x in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic search time (constant if x is inserted - //! right before p) plus insertion linear to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x) - { - return container_detail::force_copy( - m_flat_tree.insert_unique(container_detail::force_copy(p), boost::move(x))); - } - - //! Requires: first, last are not iterators into *this. - //! - //! Effects: inserts each element from the range [first,last) if and only - //! if there is no element with key equivalent to the key of that element. - //! - //! Complexity: At most N log(size()+N) (N is the distance from first to last) - //! search time plus N*size() insertion time. - //! - //! Note: If an element is inserted it might invalidate elements. - template - BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last) - { m_flat_tree.insert_unique(first, last); } - - //! Requires: first, last are not iterators into *this. - //! - //! Requires: [first ,last) must be ordered according to the predicate and must be - //! unique values. - //! - //! Effects: inserts each element from the range [first,last) if and only - //! if there is no element with key equivalent to the key of that element. This - //! function is more efficient than the normal range creation for ordered ranges. - //! - //! Complexity: At most N log(size()+N) (N is the distance from first to last) - //! search time plus N*size() insertion time. - //! - //! Note: If an element is inserted it might invalidate elements. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, InputIterator first, InputIterator last) - { m_flat_tree.insert_unique(ordered_unique_range, first, last); } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: inserts each element from the range [il.begin(), il.end()) if and only - //! if there is no element with key equivalent to the key of that element. - //! - //! Complexity: At most N log(size()+N) (N is the distance from il.first() to il.end()) - //! search time plus N*size() insertion time. - //! - //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list il) - { m_flat_tree.insert_unique(il.begin(), il.end()); } - - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be - //! unique values. - //! - //! Effects: inserts each element from the range [il.begin(), il.end()) if and only - //! if there is no element with key equivalent to the key of that element. This - //! function is more efficient than the normal range creation for ordered ranges. - //! - //! Complexity: At most N log(size()+N) (N is the distance from first to last) - //! search time plus N*size() insertion time. - //! - //! Note: If an element is inserted it might invalidate elements. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, std::initializer_list il) - { m_flat_tree.insert_unique(ordered_unique_range, il.begin(), il.end()); } -#endif - - //! Requires: this->get_allocator() == source.get_allocator(). - //! - //! Effects: Attempts to extract each element in source and insert it into a using - //! the comparison object of *this. If there is an element in a with key equivalent to the - //! key of an element from source, then that element is not extracted from source. - //! - //! Postcondition: Pointers and references to the transferred elements of source refer - //! to those same elements but as members of *this. Iterators referring to the transferred - //! elements will continue to refer to their elements, but they now behave as iterators into *this, - //! not into source. - //! - //! Throws: Nothing unless the comparison object throws. - //! - //! Complexity: N log(a.size() + N) (N has the value source.size()) - template - BOOST_CONTAINER_FORCEINLINE void merge(flat_map& source) - { m_flat_tree.merge_unique(source.tree()); } - - //! @copydoc ::boost::container::flat_map::merge(flat_map&) - template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_map BOOST_RV_REF_END source) - { return this->merge(static_cast&>(source)); } - - //! @copydoc ::boost::container::flat_map::merge(flat_map&) - template - BOOST_CONTAINER_FORCEINLINE void merge(flat_multimap& source) - { m_flat_tree.merge_unique(source.tree()); } - - //! @copydoc ::boost::container::flat_map::merge(flat_map&) - template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multimap BOOST_RV_REF_END source) - { return this->merge(static_cast&>(source)); } - - //! Effects: Erases the element pointed to by p. - //! - //! Returns: Returns an iterator pointing to the element immediately - //! following q prior to the element being erased. If no such element exists, - //! returns end(). - //! - //! Complexity: Linear to the elements with keys bigger than p - //! - //! Note: Invalidates elements with keys - //! not less than the erased element. - BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator p) - { - return container_detail::force_copy - (m_flat_tree.erase(container_detail::force_copy(p))); - } - - //! Effects: Erases all elements in the container with key equivalent to x. - //! - //! Returns: Returns the number of erased elements. - //! - //! Complexity: Logarithmic search time plus erasure time - //! linear to the elements with bigger keys. - BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& x) - { return m_flat_tree.erase(x); } - - //! Effects: Erases all the elements in the range [first, last). - //! - //! Returns: Returns last. - //! - //! Complexity: size()*N where N is the distance from first to last. - //! - //! Complexity: Logarithmic search time plus erasure time - //! linear to the elements with bigger keys. - BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator first, const_iterator last) - { - return container_detail::force_copy( - m_flat_tree.erase( container_detail::force_copy(first) - , container_detail::force_copy(last))); - } - - //! Effects: Swaps the contents of *this and x. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE void swap(flat_map& x) - BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value - && boost::container::container_detail::is_nothrow_swappable::value ) - { m_flat_tree.swap(x.m_flat_tree); } - - //! Effects: erase(a.begin(),a.end()). - //! - //! Postcondition: size() == 0. - //! - //! Complexity: linear in size(). - BOOST_CONTAINER_FORCEINLINE void clear() BOOST_NOEXCEPT_OR_NOTHROW - { m_flat_tree.clear(); } - - ////////////////////////////////////////////// - // - // observers - // - ////////////////////////////////////////////// - - //! Effects: Returns the comparison object out - //! of which a was constructed. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE key_compare key_comp() const - { return container_detail::force_copy(m_flat_tree.key_comp()); } - - //! Effects: Returns an object of value_compare constructed out - //! of the comparison object. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const - { return value_compare(container_detail::force_copy(m_flat_tree.key_comp())); } - - ////////////////////////////////////////////// - // - // map operations - // - ////////////////////////////////////////////// - - //! Returns: An iterator pointing to an element with the key - //! equivalent to x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE iterator find(const key_type& x) - { return container_detail::force_copy(m_flat_tree.find(x)); } - - //! Returns: A const_iterator pointing to an element with the key - //! equivalent to x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE const_iterator find(const key_type& x) const - { return container_detail::force_copy(m_flat_tree.find(x)); } - - //! Returns: The number of elements with key equivalent to x. - //! - //! Complexity: log(size())+count(k) - BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const - { return static_cast(m_flat_tree.find(x) != m_flat_tree.end()); } - - //! Returns: An iterator pointing to the first element with key not less - //! than k, or a.end() if such an element is not found. - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& x) - { return container_detail::force_copy(m_flat_tree.lower_bound(x)); } - - //! Returns: A const iterator pointing to the first element with key not - //! less than k, or a.end() if such an element is not found. - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& x) const - { return container_detail::force_copy(m_flat_tree.lower_bound(x)); } - - //! Returns: An iterator pointing to the first element with key not less - //! than x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& x) - { return container_detail::force_copy(m_flat_tree.upper_bound(x)); } - - //! Returns: A const iterator pointing to the first element with key not - //! less than x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& x) const - { return container_detail::force_copy(m_flat_tree.upper_bound(x)); } - - //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const key_type& x) - { return container_detail::force_copy >(m_flat_tree.lower_bound_range(x)); } - - //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const key_type& x) const - { return container_detail::force_copy >(m_flat_tree.lower_bound_range(x)); } - - //! Effects: Extracts the internal sequence container. - //! - //! Complexity: Same as the move constructor of sequence_type, usually constant. - //! - //! Postcondition: this->empty() - //! - //! Throws: If secuence_type's move constructor throws - BOOST_CONTAINER_FORCEINLINE sequence_type extract_sequence() - { - return boost::move(container_detail::force(m_flat_tree.get_sequence_ref())); - } - - //! Effects: Discards the internally hold sequence container and adopts the - //! one passed externally using the move assignment. Erases non-unique elements. - //! - //! Complexity: Assuming O(1) move assignment, O(NlogN) with N = seq.size() - //! - //! Throws: If the comparison or the move constructor throws - BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq) - { this->m_flat_tree.adopt_sequence_unique(boost::move(container_detail::force(seq))); } - - //! Requires: seq shall be ordered according to this->compare() - //! and shall contain unique elements. - //! - //! Effects: Discards the internally hold sequence container and adopts the - //! one passed externally using the move assignment. - //! - //! Complexity: Assuming O(1) move assignment, O(1) - //! - //! Throws: If the move assignment throws - BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_unique_range_t, BOOST_RV_REF(sequence_type) seq) - { this->m_flat_tree.adopt_sequence_unique(ordered_unique_range_t(), boost::move(container_detail::force(seq))); } - - //! Effects: Returns true if x and y are equal - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_FORCEINLINE friend bool operator==(const flat_map& x, const flat_map& y) - { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); } - - //! Effects: Returns true if x and y are unequal - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const flat_map& x, const flat_map& y) - { return !(x == y); } - - //! Effects: Returns true if x is less than y - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_FORCEINLINE friend bool operator<(const flat_map& x, const flat_map& y) - { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } - - //! Effects: Returns true if x is greater than y - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_FORCEINLINE friend bool operator>(const flat_map& x, const flat_map& y) - { return y < x; } - - //! Effects: Returns true if x is equal or less than y - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const flat_map& x, const flat_map& y) - { return !(y < x); } - - //! Effects: Returns true if x is equal or greater than y - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const flat_map& x, const flat_map& y) - { return !(x < y); } - - //! Effects: x.swap(y) - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE friend void swap(flat_map& x, flat_map& y) - { x.swap(y); } - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - mapped_type &priv_subscript(const key_type& k) - { - iterator i = lower_bound(k); - // i->first is greater than or equivalent to k. - if (i == end() || key_comp()(k, (*i).first)){ - container_detail::value_init m; - i = insert(i, impl_value_type(k, ::boost::move(m.m_t))); - } - return (*i).second; - } - mapped_type &priv_subscript(BOOST_RV_REF(key_type) mk) - { - key_type &k = mk; - iterator i = lower_bound(k); - // i->first is greater than or equivalent to k. - if (i == end() || key_comp()(k, (*i).first)){ - container_detail::value_init m; - i = insert(i, impl_value_type(boost::move(k), ::boost::move(m.m_t))); - } - return (*i).second; - } - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -}; - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -} //namespace container { - -//!has_trivial_destructor_after_move<> == true_type -//!specialization for optimizations -template -struct has_trivial_destructor_after_move > -{ - typedef typename ::boost::container::allocator_traits::pointer pointer; - static const bool value = ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value; -}; - -namespace container { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! A flat_multimap is a kind of associative container that supports equivalent keys -//! (possibly containing multiple copies of the same key value) and provides for -//! fast retrieval of values of another type T based on the keys. The flat_multimap -//! class supports random-access iterators. -//! -//! A flat_multimap satisfies all of the requirements of a container and of a reversible -//! container and of an associative container. For a -//! flat_multimap the key_type is Key and the value_type is std::pair -//! (unlike std::multimap which value_type is std::pair<const Key, T>). -//! -//! Compare is the ordering function for Keys (e.g. std::less). -//! -//! Allocator is the allocator to allocate the value_types -//! (e.g. allocator< std::pair >). -//! -//! flat_multimap is similar to std::multimap but it's implemented like an ordered vector. -//! This means that inserting a new element into a flat_map invalidates -//! previous iterators and references -//! -//! Erasing an element invalidates iterators and references -//! pointing to elements that come after (their keys are bigger) the erased element. -//! -//! This container provides random-access iterators. -//! -//! \tparam Key is the key_type of the map -//! \tparam Value is the mapped_type -//! \tparam Compare is the ordering function for Keys (e.g. std::less). -//! \tparam Allocator is the allocator to allocate the value_types -//! (e.g. allocator< std::pair > ). -#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED -template , class Allocator = new_allocator< std::pair< Key, T> > > -#else -template -#endif -class flat_multimap -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - BOOST_COPYABLE_AND_MOVABLE(flat_multimap) - typedef container_detail::flat_tree< - std::pair, - container_detail::select1st, - Compare, - Allocator> tree_t; - //This is the real tree stored here. It's based on a movable pair - typedef container_detail::flat_tree< - container_detail::pair, - container_detail::select1st, - Compare, - typename allocator_traits::template portable_rebind_alloc - >::type> impl_tree_t; - impl_tree_t m_flat_tree; // flat tree representing flat_map - - typedef typename impl_tree_t::value_type impl_value_type; - typedef typename impl_tree_t::const_iterator impl_const_iterator; - typedef typename impl_tree_t::iterator impl_iterator; - typedef typename impl_tree_t::allocator_type impl_allocator_type; - typedef container_detail::flat_tree_value_compare - < Compare - , container_detail::select1st - , std::pair > value_compare_impl; - typedef typename container_detail::get_flat_tree_iterators - ::pointer>::iterator iterator_impl; - typedef typename container_detail::get_flat_tree_iterators - ::pointer>::const_iterator const_iterator_impl; - typedef typename container_detail::get_flat_tree_iterators - ::pointer>::reverse_iterator reverse_iterator_impl; - typedef typename container_detail::get_flat_tree_iterators - ::pointer>::const_reverse_iterator const_reverse_iterator_impl; - public: - typedef typename impl_tree_t::stored_allocator_type impl_stored_allocator_type; - typedef typename impl_tree_t::sequence_type impl_sequence_type; - - BOOST_CONTAINER_FORCEINLINE impl_tree_t &tree() - { return m_flat_tree; } - - BOOST_CONTAINER_FORCEINLINE const impl_tree_t &tree() const - { return m_flat_tree; } - - private: - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - - ////////////////////////////////////////////// - // - // types - // - ////////////////////////////////////////////// - typedef Key key_type; - typedef T mapped_type; - typedef std::pair value_type; - typedef ::boost::container::allocator_traits allocator_traits_type; - typedef typename boost::container::allocator_traits::pointer pointer; - typedef typename boost::container::allocator_traits::const_pointer const_pointer; - typedef typename boost::container::allocator_traits::reference reference; - typedef typename boost::container::allocator_traits::const_reference const_reference; - typedef typename boost::container::allocator_traits::size_type size_type; - typedef typename boost::container::allocator_traits::difference_type difference_type; - typedef Allocator allocator_type; - typedef BOOST_CONTAINER_IMPDEF(Allocator) stored_allocator_type; - typedef BOOST_CONTAINER_IMPDEF(value_compare_impl) value_compare; - typedef Compare key_compare; - typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator; - typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator; - typedef BOOST_CONTAINER_IMPDEF(reverse_iterator_impl) reverse_iterator; - typedef BOOST_CONTAINER_IMPDEF(const_reverse_iterator_impl) const_reverse_iterator; - typedef BOOST_CONTAINER_IMPDEF(impl_value_type) movable_value_type; - typedef typename BOOST_CONTAINER_IMPDEF(tree_t::sequence_type) sequence_type; - - //Allocator::value_type must be std::pair - BOOST_STATIC_ASSERT((container_detail::is_same, typename Allocator::value_type>::value)); - - ////////////////////////////////////////////// - // - // construct/copy/destroy - // - ////////////////////////////////////////////// - - //! Effects: Default constructs an empty flat_map. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE flat_multimap() - BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible::value && - container_detail::is_nothrow_default_constructible::value) - : m_flat_tree() - {} - - //! Effects: Constructs an empty flat_multimap using the specified allocator. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit flat_multimap(const allocator_type& a) - : m_flat_tree(container_detail::force(a)) - {} - - //! Effects: Constructs an empty flat_multimap using the specified comparison - //! object . - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit flat_multimap(const Compare& comp) - : m_flat_tree(comp) - {} - - //! Effects: Constructs an empty flat_multimap using the specified comparison - //! object and allocator. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - flat_multimap(const Compare& comp, const allocator_type& a) - : m_flat_tree(comp, container_detail::force(a)) - {} - - //! Effects: Constructs an empty flat_multimap - //! and inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE - flat_multimap(InputIterator first, InputIterator last) - : m_flat_tree(false, first, last) - {} - - //! Effects: Constructs an empty flat_multimap using the specified - //! allocator, and inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE - flat_multimap(InputIterator first, InputIterator last, const allocator_type& a) - : m_flat_tree(false, first, last, container_detail::force(a)) - {} - - //! Effects: Constructs an empty flat_multimap using the specified comparison object - //! and inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE - flat_multimap(InputIterator first, InputIterator last, const Compare& comp) - : m_flat_tree(false, first, last, comp) - {} - - //! Effects: Constructs an empty flat_multimap using the specified comparison object - //! and allocator, and inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE - flat_multimap(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) - : m_flat_tree(false, first, last, comp, container_detail::force(a)) - {} - - //! Effects: Constructs an empty flat_multimap - //! and inserts elements from the ordered range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE - flat_multimap(ordered_range_t, InputIterator first, InputIterator last) - : m_flat_tree(ordered_range, first, last) - {} - - //! Effects: Constructs an empty flat_multimap using the specified comparison object and - //! inserts elements from the ordered range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE - flat_multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp) - : m_flat_tree(ordered_range, first, last, comp) - {} - - //! Effects: Constructs an empty flat_multimap using the specified comparison object and - //! allocator, and inserts elements from the ordered range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE - flat_multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) - : m_flat_tree(ordered_range, first, last, comp, a) - {} - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Constructs an empty flat_map and - //! inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - BOOST_CONTAINER_FORCEINLINE - flat_multimap(std::initializer_list il) - : m_flat_tree(false, il.begin(), il.end()) - {} - - //! Effects: Constructs an empty flat_map using the specified - //! allocator, and inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - BOOST_CONTAINER_FORCEINLINE - flat_multimap(std::initializer_list il, const allocator_type& a) - : m_flat_tree(false, il.begin(), il.end(), container_detail::force(a)) - {} - - //! Effects: Constructs an empty flat_map using the specified comparison object and - //! inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - BOOST_CONTAINER_FORCEINLINE - flat_multimap(std::initializer_list il, const Compare& comp) - : m_flat_tree(false, il.begin(), il.end(), comp) - {} - - //! Effects: Constructs an empty flat_map using the specified comparison object and - //! allocator, and inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - BOOST_CONTAINER_FORCEINLINE - flat_multimap(std::initializer_list il, const Compare& comp, const allocator_type& a) - : m_flat_tree(false, il.begin(), il.end(), comp, container_detail::force(a)) - {} - - //! Effects: Constructs an empty flat_multimap and - //! inserts elements from the ordered range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE - flat_multimap(ordered_range_t, std::initializer_list il) - : m_flat_tree(ordered_range, il.begin(), il.end()) - {} - - //! Effects: Constructs an empty flat_multimap using the specified comparison object and - //! inserts elements from the ordered range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE - flat_multimap(ordered_range_t, std::initializer_list il, const Compare& comp) - : m_flat_tree(ordered_range, il.begin(), il.end(), comp) - {} - - //! Effects: Constructs an empty flat_multimap using the specified comparison object and - //! allocator, and inserts elements from the ordered range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE - flat_multimap(ordered_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) - : m_flat_tree(ordered_range, il.begin(), il.end(), comp, a) - {} -#endif - - //! Effects: Copy constructs a flat_multimap. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE - flat_multimap(const flat_multimap& x) - : m_flat_tree(x.m_flat_tree) - {} - - //! Effects: Move constructs a flat_multimap. Constructs *this using x's resources. - //! - //! Complexity: Constant. - //! - //! Postcondition: x is emptied. - BOOST_CONTAINER_FORCEINLINE - flat_multimap(BOOST_RV_REF(flat_multimap) x) - BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible::value) - : m_flat_tree(boost::move(x.m_flat_tree)) - {} - - //! Effects: Copy constructs a flat_multimap using the specified allocator. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE - flat_multimap(const flat_multimap& x, const allocator_type &a) - : m_flat_tree(x.m_flat_tree, a) - {} - - //! Effects: Move constructs a flat_multimap using the specified allocator. - //! Constructs *this using x's resources. - //! - //! Complexity: Constant if a == x.get_allocator(), linear otherwise. - BOOST_CONTAINER_FORCEINLINE - flat_multimap(BOOST_RV_REF(flat_multimap) x, const allocator_type &a) - : m_flat_tree(boost::move(x.m_flat_tree), a) - {} - - //! Effects: Makes *this a copy of x. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE - flat_multimap& operator=(BOOST_COPY_ASSIGN_REF(flat_multimap) x) - { m_flat_tree = x.m_flat_tree; return *this; } - - //! Effects: this->swap(x.get()). - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - flat_multimap& operator=(BOOST_RV_REF(flat_multimap) x) - BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || - allocator_traits_type::is_always_equal::value) && - boost::container::container_detail::is_nothrow_move_assignable::value) - { m_flat_tree = boost::move(x.m_flat_tree); return *this; } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Assign content of il to *this - //! - //! Complexity: Linear in il.size(). - BOOST_CONTAINER_FORCEINLINE - flat_multimap& operator=(std::initializer_list il) - { - this->clear(); - this->insert(il.begin(), il.end()); - return *this; - } -#endif - - //! Effects: Returns a copy of the allocator that - //! was passed to the object's constructor. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.get_allocator()); } - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE - stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force(m_flat_tree.get_stored_allocator()); } - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE - const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force(m_flat_tree.get_stored_allocator()); } - - ////////////////////////////////////////////// - // - // iterators - // - ////////////////////////////////////////////// - - //! Effects: Returns an iterator to the first element contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - iterator begin() BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.begin()); } - - //! Effects: Returns a const_iterator to the first element contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.begin()); } - - //! Effects: Returns an iterator to the end of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - iterator end() BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.end()); } - - //! Effects: Returns a const_iterator to the end of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.end()); } - - //! Effects: Returns a reverse_iterator pointing to the beginning - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.rbegin()); } - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.rbegin()); } - - //! Effects: Returns a reverse_iterator pointing to the end - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.rend()); } - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.rend()); } - - //! Effects: Returns a const_iterator to the first element contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.cbegin()); } - - //! Effects: Returns a const_iterator to the end of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.cend()); } - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.crbegin()); } - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.crend()); } - - ////////////////////////////////////////////// - // - // capacity - // - ////////////////////////////////////////////// - - //! Effects: Returns true if the container contains no elements. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - bool empty() const BOOST_NOEXCEPT_OR_NOTHROW - { return m_flat_tree.empty(); } - - //! Effects: Returns the number of the elements contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - size_type size() const BOOST_NOEXCEPT_OR_NOTHROW - { return m_flat_tree.size(); } - - //! Effects: Returns the largest possible size of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW - { return m_flat_tree.max_size(); } - - //! Effects: Number of elements for which memory has been allocated. - //! capacity() is always greater than or equal to size(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW - { return m_flat_tree.capacity(); } - - //! Effects: If n is less than or equal to capacity(), this call has no - //! effect. Otherwise, it is a request for allocation of additional memory. - //! If the request is successful, then capacity() is greater than or equal to - //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged. - //! - //! Throws: If memory allocation allocation throws or T's copy constructor throws. - //! - //! Note: If capacity() is less than "cnt", iterators and references to - //! to values might be invalidated. - BOOST_CONTAINER_FORCEINLINE - void reserve(size_type cnt) - { m_flat_tree.reserve(cnt); } - - //! Effects: Tries to deallocate the excess of memory created - // with previous allocations. The size of the vector is unchanged - //! - //! Throws: If memory allocation throws, or T's copy constructor throws. - //! - //! Complexity: Linear to size(). - BOOST_CONTAINER_FORCEINLINE - void shrink_to_fit() - { m_flat_tree.shrink_to_fit(); } - - //! @copydoc ::boost::container::flat_set::nth(size_type) - BOOST_CONTAINER_FORCEINLINE - iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.nth(n)); } - - //! @copydoc ::boost::container::flat_set::nth(size_type) const - BOOST_CONTAINER_FORCEINLINE - const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW - { return container_detail::force_copy(m_flat_tree.nth(n)); } - - //! @copydoc ::boost::container::flat_set::index_of(iterator) - BOOST_CONTAINER_FORCEINLINE - size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW - { return m_flat_tree.index_of(container_detail::force_copy(p)); } - - //! @copydoc ::boost::container::flat_set::index_of(const_iterator) const - BOOST_CONTAINER_FORCEINLINE - size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW - { return m_flat_tree.index_of(container_detail::force_copy(p)); } - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... and returns the iterator pointing to the - //! newly inserted element. - //! - //! Complexity: Logarithmic search time plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - template - BOOST_CONTAINER_FORCEINLINE - iterator emplace(BOOST_FWD_REF(Args)... args) - { return container_detail::force_copy(m_flat_tree.emplace_equal(boost::forward(args)...)); } - - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic search time (constant time if the value - //! is to be inserted before p) plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - template - BOOST_CONTAINER_FORCEINLINE - iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args) - { - return container_detail::force_copy(m_flat_tree.emplace_hint_equal - (container_detail::force_copy(hint), boost::forward(args)...)); - } - - #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #define BOOST_CONTAINER_FLAT_MULTIMAP_EMPLACE_CODE(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\ - { return container_detail::force_copy(m_flat_tree.emplace_equal(BOOST_MOVE_FWD##N)); }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - return container_detail::force_copy(m_flat_tree.emplace_hint_equal\ - (container_detail::force_copy(hint) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\ - }\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_MULTIMAP_EMPLACE_CODE) - #undef BOOST_CONTAINER_FLAT_MULTIMAP_EMPLACE_CODE - - #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - //! Effects: Inserts x and returns the iterator pointing to the - //! newly inserted element. - //! - //! Complexity: Logarithmic search time plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE iterator insert(const value_type& x) - { - return container_detail::force_copy( - m_flat_tree.insert_equal(container_detail::force(x))); - } - - //! Effects: Inserts a new value move-constructed from x and returns - //! the iterator pointing to the newly inserted element. - //! - //! Complexity: Logarithmic search time plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF(value_type) x) - { return container_detail::force_copy(m_flat_tree.insert_equal(boost::move(x))); } - - //! Effects: Inserts a new value move-constructed from x and returns - //! the iterator pointing to the newly inserted element. - //! - //! Complexity: Logarithmic search time plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF(impl_value_type) x) - { return container_detail::force_copy(m_flat_tree.insert_equal(boost::move(x))); } - - //! Effects: Inserts a copy of x in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic search time (constant time if the value - //! is to be inserted before p) plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x) - { - return container_detail::force_copy - (m_flat_tree.insert_equal( container_detail::force_copy(p) - , container_detail::force(x))); - } - - //! Effects: Inserts a value move constructed from x in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic search time (constant time if the value - //! is to be inserted before p) plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(value_type) x) - { - return container_detail::force_copy - (m_flat_tree.insert_equal(container_detail::force_copy(p) - , boost::move(x))); - } - - //! Effects: Inserts a value move constructed from x in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic search time (constant time if the value - //! is to be inserted before p) plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(impl_value_type) x) - { - return container_detail::force_copy( - m_flat_tree.insert_equal(container_detail::force_copy(p), boost::move(x))); - } - - //! Requires: first, last are not iterators into *this. - //! - //! Effects: inserts each element from the range [first,last) . - //! - //! Complexity: At most N log(size()+N) (N is the distance from first to last) - //! search time plus N*size() insertion time. - //! - //! Note: If an element is inserted it might invalidate elements. - template - BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last) - { m_flat_tree.insert_equal(first, last); } - - //! Requires: first, last are not iterators into *this. - //! - //! Requires: [first ,last) must be ordered according to the predicate. - //! - //! Effects: inserts each element from the range [first,last) if and only - //! if there is no element with key equivalent to the key of that element. This - //! function is more efficient than the normal range creation for ordered ranges. - //! - //! Complexity: At most N log(size()+N) (N is the distance from first to last) - //! search time plus N*size() insertion time. - //! - //! Note: If an element is inserted it might invalidate elements. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, InputIterator first, InputIterator last) - { m_flat_tree.insert_equal(ordered_range, first, last); } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: inserts each element from the range [il.begin(), il.end()) . - //! - //! Complexity: At most N log(size()+N) (N is the distance from first to last) - //! search time plus N*size() insertion time. - //! - //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list il) - { m_flat_tree.insert_equal(il.begin(), il.end()); } - - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate. - //! - //! Effects: inserts each element from the range [il.begin(), il.end()) if and only - //! if there is no element with key equivalent to the key of that element. This - //! function is more efficient than the normal range creation for ordered ranges. - //! - //! Complexity: At most N log(size()+N) (N is the distance from first to last) - //! search time plus N*size() insertion time. - //! - //! Note: If an element is inserted it might invalidate elements. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, std::initializer_list il) - { m_flat_tree.insert_equal(ordered_range, il.begin(), il.end()); } -#endif - - //! Requires: this->get_allocator() == source.get_allocator(). - //! - //! Effects: Extracts each element in source and insert it into a using - //! the comparison object of *this. - //! - //! Postcondition: Pointers and references to the transferred elements of source refer - //! to those same elements but as members of *this. Iterators referring to the transferred - //! elements will continue to refer to their elements, but they now behave as iterators into *this, - //! not into source. - //! - //! Throws: Nothing unless the comparison object throws. - //! - //! Complexity: N log(a.size() + N) (N has the value source.size()) - template - BOOST_CONTAINER_FORCEINLINE void merge(flat_multimap& source) - { m_flat_tree.merge_equal(source.tree()); } - - //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap&) - template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multimap BOOST_RV_REF_END source) - { return this->merge(static_cast&>(source)); } - - //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap&) - template - BOOST_CONTAINER_FORCEINLINE void merge(flat_map& source) - { m_flat_tree.merge_equal(source.tree()); } - - //! @copydoc ::boost::container::flat_multimap::merge(flat_map&) - template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_map BOOST_RV_REF_END source) - { return this->merge(static_cast&>(source)); } - - //! Effects: Erases the element pointed to by p. - //! - //! Returns: Returns an iterator pointing to the element immediately - //! following q prior to the element being erased. If no such element exists, - //! returns end(). - //! - //! Complexity: Linear to the elements with keys bigger than p - //! - //! Note: Invalidates elements with keys - //! not less than the erased element. - BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator p) - { - return container_detail::force_copy( - m_flat_tree.erase(container_detail::force_copy(p))); - } - - //! Effects: Erases all elements in the container with key equivalent to x. - //! - //! Returns: Returns the number of erased elements. - //! - //! Complexity: Logarithmic search time plus erasure time - //! linear to the elements with bigger keys. - BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& x) - { return m_flat_tree.erase(x); } - - //! Effects: Erases all the elements in the range [first, last). - //! - //! Returns: Returns last. - //! - //! Complexity: size()*N where N is the distance from first to last. - //! - //! Complexity: Logarithmic search time plus erasure time - //! linear to the elements with bigger keys. - BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator first, const_iterator last) - { - return container_detail::force_copy - (m_flat_tree.erase( container_detail::force_copy(first) - , container_detail::force_copy(last))); - } - - //! Effects: Swaps the contents of *this and x. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE void swap(flat_multimap& x) - BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value - && boost::container::container_detail::is_nothrow_swappable::value ) - { m_flat_tree.swap(x.m_flat_tree); } - - //! Effects: erase(a.begin(),a.end()). - //! - //! Postcondition: size() == 0. - //! - //! Complexity: linear in size(). - BOOST_CONTAINER_FORCEINLINE void clear() BOOST_NOEXCEPT_OR_NOTHROW - { m_flat_tree.clear(); } - - ////////////////////////////////////////////// - // - // observers - // - ////////////////////////////////////////////// - - //! Effects: Returns the comparison object out - //! of which a was constructed. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE key_compare key_comp() const - { return container_detail::force_copy(m_flat_tree.key_comp()); } - - //! Effects: Returns an object of value_compare constructed out - //! of the comparison object. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const - { return value_compare(container_detail::force_copy(m_flat_tree.key_comp())); } - - ////////////////////////////////////////////// - // - // map operations - // - ////////////////////////////////////////////// - - //! Returns: An iterator pointing to an element with the key - //! equivalent to x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE iterator find(const key_type& x) - { return container_detail::force_copy(m_flat_tree.find(x)); } - - //! Returns: An const_iterator pointing to an element with the key - //! equivalent to x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE const_iterator find(const key_type& x) const - { return container_detail::force_copy(m_flat_tree.find(x)); } - - //! Returns: The number of elements with key equivalent to x. - //! - //! Complexity: log(size())+count(k) - BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const - { return m_flat_tree.count(x); } - - //! Returns: An iterator pointing to the first element with key not less - //! than k, or a.end() if such an element is not found. - //! - //! Complexity: Logarithmic - BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& x) - { return container_detail::force_copy(m_flat_tree.lower_bound(x)); } - - //! Returns: A const iterator pointing to the first element with key - //! not less than k, or a.end() if such an element is not found. - //! - //! Complexity: Logarithmic - BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& x) const - { return container_detail::force_copy(m_flat_tree.lower_bound(x)); } - - //! Returns: An iterator pointing to the first element with key not less - //! than x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic - BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& x) - {return container_detail::force_copy(m_flat_tree.upper_bound(x)); } - - //! Returns: A const iterator pointing to the first element with key - //! not less than x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic - BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& x) const - { return container_detail::force_copy(m_flat_tree.upper_bound(x)); } - - //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). - //! - //! Complexity: Logarithmic - BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const key_type& x) - { return container_detail::force_copy >(m_flat_tree.equal_range(x)); } - - //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). - //! - //! Complexity: Logarithmic - BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const key_type& x) const - { return container_detail::force_copy >(m_flat_tree.equal_range(x)); } - - //! Effects: Extracts the internal sequence container. - //! - //! Complexity: Same as the move constructor of sequence_type, usually constant. - //! - //! Postcondition: this->empty() - //! - //! Throws: If secuence_type's move constructor throws - BOOST_CONTAINER_FORCEINLINE sequence_type extract_sequence() - { - return boost::move(container_detail::force(m_flat_tree.get_sequence_ref())); - } - - //! Effects: Discards the internally hold sequence container and adopts the - //! one passed externally using the move assignment. - //! - //! Complexity: Assuming O(1) move assignment, O(NlogN) with N = seq.size() - //! - //! Throws: If the comparison or the move constructor throws - BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq) - { this->m_flat_tree.adopt_sequence_equal(boost::move(container_detail::force(seq))); } - - //! Requires: seq shall be ordered according to this->compare(). - //! - //! Effects: Discards the internally hold sequence container and adopts the - //! one passed externally using the move assignment. - //! - //! Complexity: Assuming O(1) move assignment, O(1) - //! - //! Throws: If the move assignment throws - BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_range_t, BOOST_RV_REF(sequence_type) seq) - { this->m_flat_tree.adopt_sequence_equal(ordered_range_t(), boost::move(container_detail::force(seq))); } - - //! Effects: Returns true if x and y are equal - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_FORCEINLINE friend bool operator==(const flat_multimap& x, const flat_multimap& y) - { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); } - - //! Effects: Returns true if x and y are unequal - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const flat_multimap& x, const flat_multimap& y) - { return !(x == y); } - - //! Effects: Returns true if x is less than y - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_FORCEINLINE friend bool operator<(const flat_multimap& x, const flat_multimap& y) - { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } - - //! Effects: Returns true if x is greater than y - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_FORCEINLINE friend bool operator>(const flat_multimap& x, const flat_multimap& y) - { return y < x; } - - //! Effects: Returns true if x is equal or less than y - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const flat_multimap& x, const flat_multimap& y) - { return !(y < x); } - - //! Effects: Returns true if x is equal or greater than y - //! - //! Complexity: Linear to the number of elements in the container. - BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const flat_multimap& x, const flat_multimap& y) - { return !(x < y); } - - //! Effects: x.swap(y) - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE friend void swap(flat_multimap& x, flat_multimap& y) - { x.swap(y); } -}; - -}} - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -namespace boost { - -//!has_trivial_destructor_after_move<> == true_type -//!specialization for optimizations -template -struct has_trivial_destructor_after_move< boost::container::flat_multimap > -{ - typedef typename ::boost::container::allocator_traits::pointer pointer; - static const bool value = ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value; -}; - -} //namespace boost { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -#include - -#endif // BOOST_CONTAINER_FLAT_MAP_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/flat_set.hpp b/contrib/libboost/boost_1_65_0/boost/container/flat_set.hpp deleted file mode 100644 index 9e39be8e782..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/flat_set.hpp +++ /dev/null @@ -1,1675 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_FLAT_SET_HPP -#define BOOST_CONTAINER_FLAT_SET_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -// container -#include -#include -#include //new_allocator -// container/detail -#include -#include -// move -#include -#include -// move/detail -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif -#include -// intrusive/detail -#include //pair -#include //less, equal -// std -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) -#include -#endif - -namespace boost { -namespace container { - -#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) -template -class flat_multimap; -#endif - -//! flat_set is a Sorted Associative Container that stores objects of type Key. -//! It is also a Unique Associative Container, meaning that no two elements are the same. -//! -//! flat_set is similar to std::set but it's implemented like an ordered vector. -//! This means that inserting a new element into a flat_set invalidates -//! previous iterators and references -//! -//! Erasing an element of a flat_set invalidates iterators and references -//! pointing to elements that come after (their keys are bigger) the erased element. -//! -//! This container provides random-access iterators. -//! -//! \tparam Key is the type to be inserted in the set, which is also the key_type -//! \tparam Compare is the comparison functor used to order keys -//! \tparam Allocator is the allocator to be used to allocate memory for this container -#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED -template , class Allocator = new_allocator > -#else -template -#endif -class flat_set - ///@cond - : public container_detail::flat_tree, Compare, Allocator> - ///@endcond -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - BOOST_COPYABLE_AND_MOVABLE(flat_set) - typedef container_detail::flat_tree, Compare, Allocator> base_t; - - public: - base_t &tree() - { return *this; } - - const base_t &tree() const - { return *this; } - - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - ////////////////////////////////////////////// - // - // types - // - ////////////////////////////////////////////// - typedef Key key_type; - typedef Key value_type; - typedef Compare key_compare; - typedef Compare value_compare; - typedef ::boost::container::allocator_traits allocator_traits_type; - typedef typename ::boost::container::allocator_traits::pointer pointer; - typedef typename ::boost::container::allocator_traits::const_pointer const_pointer; - typedef typename ::boost::container::allocator_traits::reference reference; - typedef typename ::boost::container::allocator_traits::const_reference const_reference; - typedef typename ::boost::container::allocator_traits::size_type size_type; - typedef typename ::boost::container::allocator_traits::difference_type difference_type; - typedef Allocator allocator_type; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::sequence_type) sequence_type; - - public: - ////////////////////////////////////////////// - // - // construct/copy/destroy - // - ////////////////////////////////////////////// - - //! Effects: Default constructs an empty container. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - explicit flat_set() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible::value && - container_detail::is_nothrow_default_constructible::value) - : base_t() - {} - - //! Effects: Constructs an empty container using the specified - //! comparison object. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - explicit flat_set(const Compare& comp) - : base_t(comp) - {} - - //! Effects: Constructs an empty container using the specified allocator. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - explicit flat_set(const allocator_type& a) - : base_t(a) - {} - - //! Effects: Constructs an empty container using the specified - //! comparison object and allocator. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - flat_set(const Compare& comp, const allocator_type& a) - : base_t(comp, a) - {} - - //! Effects: Constructs an empty container and - //! inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! comp and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE - flat_set(InputIterator first, InputIterator last) - : base_t(true, first, last) - {} - - //! Effects: Constructs an empty container using the specified - //! allocator, and inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! comp and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE - flat_set(InputIterator first, InputIterator last, const allocator_type& a) - : base_t(true, first, last, a) - {} - - //! Effects: Constructs an empty container using the specified comparison object and - //! inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! comp and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE - flat_set(InputIterator first, InputIterator last, const Compare& comp) - : base_t(true, first, last, comp) - {} - - //! Effects: Constructs an empty container using the specified comparison object and - //! allocator, and inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! comp and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE - flat_set(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) - : base_t(true, first, last, comp, a) - {} - - //! Effects: Constructs an empty container and - //! inserts elements from the ordered unique range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE - flat_set(ordered_unique_range_t, InputIterator first, InputIterator last) - : base_t(ordered_unique_range, first, last) - {} - - //! Effects: Constructs an empty container using the specified comparison object and - //! inserts elements from the ordered unique range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE - flat_set(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp) - : base_t(ordered_unique_range, first, last, comp) - {} - - //! Effects: Constructs an empty container using the specified comparison object and - //! allocator, and inserts elements from the ordered unique range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE - flat_set(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) - : base_t(ordered_unique_range, first, last, comp, a) - {} - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Constructs an empty container and - //! inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using - //! comp and otherwise N logN, where N is il.begin() - il.end(). - BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list il) - : base_t(true, il.begin(), il.end()) - {} - - //! Effects: Constructs an empty container using the specified - //! allocator, and inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using - //! comp and otherwise N logN, where N is il.begin() - il.end(). - BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list il, const allocator_type& a) - : base_t(true, il.begin(), il.end(), a) - {} - - //! Effects: Constructs an empty container using the specified comparison object and - //! inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using - //! comp and otherwise N logN, where N is il.begin() - il.end(). - BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list il, const Compare& comp) - : base_t(true, il.begin(), il.end(), comp) - {} - - //! Effects: Constructs an empty container using the specified comparison object and - //! allocator, and inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using - //! comp and otherwise N logN, where N is il.begin() - il.end(). - BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list il, const Compare& comp, const allocator_type& a) - : base_t(true, il.begin(), il.end(), comp, a) - {} - - //! Effects: Constructs an empty container using the specified comparison object and - //! inserts elements from the ordered unique range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_set(ordered_unique_range_t, std::initializer_list il) - : base_t(ordered_unique_range, il.begin(), il.end()) - {} - - //! Effects: Constructs an empty container using the specified comparison object and - //! inserts elements from the ordered unique range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_set(ordered_unique_range_t, std::initializer_list il, const Compare& comp) - : base_t(ordered_unique_range, il.begin(), il.end(), comp) - {} - - //! Effects: Constructs an empty container using the specified comparison object and - //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_set(ordered_unique_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) - : base_t(ordered_unique_range, il.begin(), il.end(), comp, a) - {} -#endif - - //! Effects: Copy constructs the container. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE flat_set(const flat_set& x) - : base_t(static_cast(x)) - {} - - //! Effects: Move constructs thecontainer. Constructs *this using x's resources. - //! - //! Complexity: Constant. - //! - //! Postcondition: x is emptied. - BOOST_CONTAINER_FORCEINLINE flat_set(BOOST_RV_REF(flat_set) x) - BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible::value) - : base_t(BOOST_MOVE_BASE(base_t, x)) - {} - - //! Effects: Copy constructs a container using the specified allocator. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE flat_set(const flat_set& x, const allocator_type &a) - : base_t(static_cast(x), a) - {} - - //! Effects: Move constructs a container using the specified allocator. - //! Constructs *this using x's resources. - //! - //! Complexity: Constant if a == x.get_allocator(), linear otherwise - BOOST_CONTAINER_FORCEINLINE flat_set(BOOST_RV_REF(flat_set) x, const allocator_type &a) - : base_t(BOOST_MOVE_BASE(base_t, x), a) - {} - - //! Effects: Makes *this a copy of x. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE flat_set& operator=(BOOST_COPY_ASSIGN_REF(flat_set) x) - { return static_cast(this->base_t::operator=(static_cast(x))); } - - //! Throws: If allocator_traits_type::propagate_on_container_move_assignment - //! is false and (allocation throws or value_type's move constructor throws) - //! - //! Complexity: Constant if allocator_traits_type:: - //! propagate_on_container_move_assignment is true or - //! this->get>allocator() == x.get_allocator(). Linear otherwise. - BOOST_CONTAINER_FORCEINLINE flat_set& operator=(BOOST_RV_REF(flat_set) x) - BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || - allocator_traits_type::is_always_equal::value) && - boost::container::container_detail::is_nothrow_move_assignable::value) - { return static_cast(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Copy all elements from il to *this. - //! - //! Complexity: Linear in il.size(). - flat_set& operator=(std::initializer_list il) - { - this->clear(); - this->insert(il.begin(), il.end()); - return *this; - } -#endif - - #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED - //! Effects: Returns a copy of the allocator that - //! was passed to the object's constructor. - //! - //! Complexity: Constant. - allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns an iterator to the first element contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - iterator begin() BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a const_iterator to the first element contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns an iterator to the end of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - iterator end() BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a const_iterator to the end of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a reverse_iterator pointing to the beginning - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a reverse_iterator pointing to the end - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a const_iterator to the first element contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a const_iterator to the end of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns true if the container contains no elements. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - bool empty() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns the number of the elements contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - size_type size() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns the largest possible size of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Number of elements for which memory has been allocated. - //! capacity() is always greater than or equal to size(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: If n is less than or equal to capacity(), this call has no - //! effect. Otherwise, it is a request for allocation of additional memory. - //! If the request is successful, then capacity() is greater than or equal to - //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged. - //! - //! Throws: If memory allocation allocation throws or Key's copy constructor throws. - //! - //! Note: If capacity() is less than "cnt", iterators and references to - //! to values might be invalidated. - void reserve(size_type cnt); - - //! Effects: Tries to deallocate the excess of memory created - // with previous allocations. The size of the vector is unchanged - //! - //! Throws: If memory allocation throws, or Key's copy constructor throws. - //! - //! Complexity: Linear to size(). - void shrink_to_fit(); - - #endif // #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - ////////////////////////////////////////////// - // - // modifiers - // - ////////////////////////////////////////////// - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Inserts an object x of type Key constructed with - //! std::forward(args)... if and only if there is no element in the container - //! with key equivalent to the key of x. - //! - //! Returns: The bool component of the returned pair is true if and only - //! if the insertion takes place, and the iterator component of the pair - //! points to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic search time plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - template - BOOST_CONTAINER_FORCEINLINE std::pair emplace(BOOST_FWD_REF(Args)... args) - { return this->base_t::emplace_unique(boost::forward(args)...); } - - //! Effects: Inserts an object of type Key constructed with - //! std::forward(args)... in the container if and only if there is - //! no element in the container with key equivalent to the key of x. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic search time (constant if x is inserted - //! right before p) plus insertion linear to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - template - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) - { return this->base_t::emplace_hint_unique(p, boost::forward(args)...); } - - #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #define BOOST_CONTAINER_FLAT_SET_EMPLACE_CODE(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE std::pair emplace(BOOST_MOVE_UREF##N)\ - { return this->base_t::emplace_unique(BOOST_MOVE_FWD##N); }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - { return this->base_t::emplace_hint_unique(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_SET_EMPLACE_CODE) - #undef BOOST_CONTAINER_FLAT_SET_EMPLACE_CODE - - #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: Inserts x if and only if there is no element in the container - //! with key equivalent to the key of x. - //! - //! Returns: The bool component of the returned pair is true if and only - //! if the insertion takes place, and the iterator component of the pair - //! points to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic search time plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - std::pair insert(const value_type &x); - - //! Effects: Inserts a new value_type move constructed from the pair if and - //! only if there is no element in the container with key equivalent to the key of x. - //! - //! Returns: The bool component of the returned pair is true if and only - //! if the insertion takes place, and the iterator component of the pair - //! points to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic search time plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - std::pair insert(value_type &&x); - #else - private: - typedef std::pair insert_return_pair; - public: - BOOST_MOVE_CONVERSION_AWARE_CATCH(insert, value_type, insert_return_pair, this->priv_insert) - #endif - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: Inserts a copy of x in the container if and only if there is - //! no element in the container with key equivalent to the key of x. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic search time (constant if x is inserted - //! right before p) plus insertion linear to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - iterator insert(const_iterator p, const value_type &x); - - //! Effects: Inserts an element move constructed from x in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic search time (constant if x is inserted - //! right before p) plus insertion linear to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - iterator insert(const_iterator p, value_type &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator) - #endif - - //! Requires: first, last are not iterators into *this. - //! - //! Effects: inserts each element from the range [first,last) if and only - //! if there is no element with key equivalent to the key of that element. - //! - //! Complexity: At most N log(size()+N) (N is the distance from first to last) - //! search time plus N*size() insertion time. - //! - //! Note: If an element is inserted it might invalidate elements. - template - BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last) - { this->base_t::insert_unique(first, last); } - - //! Requires: first, last are not iterators into *this and - //! must be ordered according to the predicate and must be - //! unique values. - //! - //! Effects: inserts each element from the range [first,last) .This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Complexity: At most N log(size()+N) (N is the distance from first to last) - //! search time plus N*size() insertion time. - //! - //! Note: Non-standard extension. If an element is inserted it might invalidate elements. - template - BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, InputIterator first, InputIterator last) - { this->base_t::insert_unique(ordered_unique_range, first, last); } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: inserts each element from the range [il.begin(), il.end()) if and only - //! if there is no element with key equivalent to the key of that element. - //! - //! Complexity: At most N log(size()+N) (N is the distance from il.begin() to il.end()) - //! search time plus N*size() insertion time. - //! - //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list il) - { this->base_t::insert_unique(il.begin(), il.end()); } - - //! Requires: Range [il.begin(), il.end()) must be ordered according to the predicate - //! and must be unique values. - //! - //! Effects: inserts each element from the range [il.begin(), il.end()) .This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Complexity: At most N log(size()+N) (N is the distance from il.begin() to il.end()) - //! search time plus N*size() insertion time. - //! - //! Note: Non-standard extension. If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, std::initializer_list il) - { this->base_t::insert_unique(ordered_unique_range, il.begin(), il.end()); } -#endif - - //! @copydoc ::boost::container::flat_map::merge(flat_map&) - template - BOOST_CONTAINER_FORCEINLINE void merge(flat_set& source) - { this->base_t::merge_unique(source.tree()); } - - //! @copydoc ::boost::container::flat_set::merge(flat_set&) - template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_set BOOST_RV_REF_END source) - { return this->merge(static_cast&>(source)); } - - //! @copydoc ::boost::container::flat_map::merge(flat_multimap&) - template - BOOST_CONTAINER_FORCEINLINE void merge(flat_multiset& source) - { this->base_t::merge_unique(source.tree()); } - - //! @copydoc ::boost::container::flat_set::merge(flat_multiset&) - template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multiset BOOST_RV_REF_END source) - { return this->merge(static_cast&>(source)); } - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Erases the element pointed to by p. - //! - //! Returns: Returns an iterator pointing to the element immediately - //! following q prior to the element being erased. If no such element exists, - //! returns end(). - //! - //! Complexity: Linear to the elements with keys bigger than p - //! - //! Note: Invalidates elements with keys - //! not less than the erased element. - iterator erase(const_iterator p); - - //! Effects: Erases all elements in the container with key equivalent to x. - //! - //! Returns: Returns the number of erased elements. - //! - //! Complexity: Logarithmic search time plus erasure time - //! linear to the elements with bigger keys. - size_type erase(const key_type& x); - - //! Effects: Erases all the elements in the range [first, last). - //! - //! Returns: Returns last. - //! - //! Complexity: size()*N where N is the distance from first to last. - //! - //! Complexity: Logarithmic search time plus erasure time - //! linear to the elements with bigger keys. - iterator erase(const_iterator first, const_iterator last); - - //! Effects: Swaps the contents of *this and x. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - void swap(flat_set& x) - BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value - && boost::container::container_detail::is_nothrow_swappable::value ); - - //! Effects: erase(a.begin(),a.end()). - //! - //! Postcondition: size() == 0. - //! - //! Complexity: linear in size(). - void clear() BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns the comparison object out - //! of which a was constructed. - //! - //! Complexity: Constant. - key_compare key_comp() const; - - //! Effects: Returns an object of value_compare constructed out - //! of the comparison object. - //! - //! Complexity: Constant. - value_compare value_comp() const; - - //! Returns: An iterator pointing to an element with the key - //! equivalent to x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic. - iterator find(const key_type& x); - - //! Returns: A const_iterator pointing to an element with the key - //! equivalent to x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic. - const_iterator find(const key_type& x) const; - - //! Requires: size() >= n. - //! - //! Effects: Returns an iterator to the nth element - //! from the beginning of the container. Returns end() - //! if n == size(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension - iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW; - - //! Requires: size() >= n. - //! - //! Effects: Returns a const_iterator to the nth element - //! from the beginning of the container. Returns end() - //! if n == size(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension - const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Requires: begin() <= p <= end(). - //! - //! Effects: Returns the index of the element pointed by p - //! and size() if p == end(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension - size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW; - - //! Requires: begin() <= p <= end(). - //! - //! Effects: Returns the index of the element pointed by p - //! and size() if p == end(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension - size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW; - - #endif // #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Returns: The number of elements with key equivalent to x. - //! - //! Complexity: log(size())+count(k) - BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const - { return static_cast(this->base_t::find(x) != this->base_t::cend()); } - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Returns: An iterator pointing to the first element with key not less - //! than k, or a.end() if such an element is not found. - //! - //! Complexity: Logarithmic - iterator lower_bound(const key_type& x); - - //! Returns: A const iterator pointing to the first element with key not - //! less than k, or a.end() if such an element is not found. - //! - //! Complexity: Logarithmic - const_iterator lower_bound(const key_type& x) const; - - //! Returns: An iterator pointing to the first element with key not less - //! than x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic - iterator upper_bound(const key_type& x); - - //! Returns: A const iterator pointing to the first element with key not - //! less than x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic - const_iterator upper_bound(const key_type& x) const; - - #endif // #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). - //! - //! Complexity: Logarithmic - BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const key_type& x) const - { return this->base_t::lower_bound_range(x); } - - //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). - //! - //! Complexity: Logarithmic - BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const key_type& x) - { return this->base_t::lower_bound_range(x); } - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Returns true if x and y are equal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator==(const flat_set& x, const flat_set& y); - - //! Effects: Returns true if x and y are unequal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator!=(const flat_set& x, const flat_set& y); - - //! Effects: Returns true if x is less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<(const flat_set& x, const flat_set& y); - - //! Effects: Returns true if x is greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>(const flat_set& x, const flat_set& y); - - //! Effects: Returns true if x is equal or less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<=(const flat_set& x, const flat_set& y); - - //! Effects: Returns true if x is equal or greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>=(const flat_set& x, const flat_set& y); - - //! Effects: x.swap(y) - //! - //! Complexity: Constant. - friend void swap(flat_set& x, flat_set& y); - - //! Effects: Extracts the internal sequence container. - //! - //! Complexity: Same as the move constructor of sequence_type, usually constant. - //! - //! Postcondition: this->empty() - //! - //! Throws: If secuence_type's move constructor throws - sequence_type extract_sequence(); - - #endif //#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED - - //! Effects: Discards the internally hold sequence container and adopts the - //! one passed externally using the move assignment. Erases non-unique elements. - //! - //! Complexity: Assuming O(1) move assignment, O(NlogN) with N = seq.size() - //! - //! Throws: If the comparison or the move constructor throws - BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq) - { this->base_t::adopt_sequence_unique(boost::move(seq)); } - - //! Requires: seq shall be ordered according to this->compare() - //! and shall contain unique elements. - //! - //! Effects: Discards the internally hold sequence container and adopts the - //! one passed externally using the move assignment. - //! - //! Complexity: Assuming O(1) move assignment, O(1) - //! - //! Throws: If the move assignment throws - BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_unique_range_t, BOOST_RV_REF(sequence_type) seq) - { this->base_t::adopt_sequence_unique(ordered_unique_range_t(), boost::move(seq)); } - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - template - BOOST_CONTAINER_FORCEINLINE std::pair priv_insert(BOOST_FWD_REF(KeyType) x) - { return this->base_t::insert_unique(::boost::forward(x)); } - - template - BOOST_CONTAINER_FORCEINLINE iterator priv_insert(const_iterator p, BOOST_FWD_REF(KeyType) x) - { return this->base_t::insert_unique(p, ::boost::forward(x)); } - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -}; - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -} //namespace container { - -//!has_trivial_destructor_after_move<> == true_type -//!specialization for optimizations -template -struct has_trivial_destructor_after_move > -{ - typedef typename ::boost::container::allocator_traits::pointer pointer; - static const bool value = ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value; -}; - -namespace container { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! flat_multiset is a Sorted Associative Container that stores objects of type Key. -//! -//! flat_multiset can store multiple copies of the same key value. -//! -//! flat_multiset is similar to std::multiset but it's implemented like an ordered vector. -//! This means that inserting a new element into a flat_multiset invalidates -//! previous iterators and references -//! -//! Erasing an element invalidates iterators and references -//! pointing to elements that come after (their keys are bigger) the erased element. -//! -//! This container provides random-access iterators. -//! -//! \tparam Key is the type to be inserted in the multiset, which is also the key_type -//! \tparam Compare is the comparison functor used to order keys -//! \tparam Allocator is the allocator to be used to allocate memory for this container -#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED -template , class Allocator = new_allocator > -#else -template -#endif -class flat_multiset - ///@cond - : public container_detail::flat_tree, Compare, Allocator> - ///@endcond -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - BOOST_COPYABLE_AND_MOVABLE(flat_multiset) - typedef container_detail::flat_tree, Compare, Allocator> base_t; - - public: - base_t &tree() - { return *this; } - - const base_t &tree() const - { return *this; } - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - ////////////////////////////////////////////// - // - // types - // - ////////////////////////////////////////////// - typedef Key key_type; - typedef Key value_type; - typedef Compare key_compare; - typedef Compare value_compare; - typedef ::boost::container::allocator_traits allocator_traits_type; - typedef typename ::boost::container::allocator_traits::pointer pointer; - typedef typename ::boost::container::allocator_traits::const_pointer const_pointer; - typedef typename ::boost::container::allocator_traits::reference reference; - typedef typename ::boost::container::allocator_traits::const_reference const_reference; - typedef typename ::boost::container::allocator_traits::size_type size_type; - typedef typename ::boost::container::allocator_traits::difference_type difference_type; - typedef Allocator allocator_type; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::sequence_type) sequence_type; - - //! @copydoc ::boost::container::flat_set::flat_set() - BOOST_CONTAINER_FORCEINLINE explicit flat_multiset() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible::value && - container_detail::is_nothrow_default_constructible::value) - : base_t() - {} - - //! @copydoc ::boost::container::flat_set::flat_set(const Compare&) - BOOST_CONTAINER_FORCEINLINE explicit flat_multiset(const Compare& comp) - : base_t(comp) - {} - - //! @copydoc ::boost::container::flat_set::flat_set(const allocator_type&) - BOOST_CONTAINER_FORCEINLINE explicit flat_multiset(const allocator_type& a) - : base_t(a) - {} - - //! @copydoc ::boost::container::flat_set::flat_set(const Compare&, const allocator_type&) - BOOST_CONTAINER_FORCEINLINE flat_multiset(const Compare& comp, const allocator_type& a) - : base_t(comp, a) - {} - - //! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator) - template - BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last) - : base_t(false, first, last) - {} - - //! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator, const allocator_type&) - template - BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last, const allocator_type& a) - : base_t(false, first, last, a) - {} - - //! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator, const Compare& comp) - template - BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last, const Compare& comp) - : base_t(false, first, last, comp) - {} - - //! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator, const Compare& comp, const allocator_type&) - template - BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) - : base_t(false, first, last, comp, a) - {} - - //! Effects: Constructs an empty flat_multiset and - //! inserts elements from the ordered range [first ,last ). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last) - : base_t(ordered_range, first, last) - {} - - //! Effects: Constructs an empty flat_multiset using the specified comparison object and - //! inserts elements from the ordered range [first ,last ). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp) - : base_t(ordered_range, first, last, comp) - {} - - //! Effects: Constructs an empty flat_multiset using the specified comparison object and - //! allocator, and inserts elements from the ordered range [first, last ). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) - : base_t(ordered_range, first, last, comp, a) - {} - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list il) - : base_t(false, il.begin(), il.end()) - {} - - //! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list, const allocator_type&) - BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list il, const allocator_type& a) - : base_t(false, il.begin(), il.end(), a) - {} - - //! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list, const Compare& comp) - BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list il, const Compare& comp) - : base_t(false, il.begin(), il.end(), comp) - {} - - //! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list, const Compare& comp, const allocator_type&) - BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list il, const Compare& comp, const allocator_type& a) - : base_t(false, il.begin(), il.end(), comp, a) - {} - - //! Effects: Constructs an empty containerand - //! inserts elements from the ordered unique range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, std::initializer_list il) - : base_t(ordered_range, il.begin(), il.end()) - {} - - //! Effects: Constructs an empty container using the specified comparison object and - //! inserts elements from the ordered unique range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, std::initializer_list il, const Compare& comp) - : base_t(ordered_range, il.begin(), il.end(), comp) - {} - - //! Effects: Constructs an empty container using the specified comparison object and - //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) - : base_t(ordered_range, il.begin(), il.end(), comp, a) - {} -#endif - - //! @copydoc ::boost::container::flat_set::flat_set(const flat_set &) - BOOST_CONTAINER_FORCEINLINE flat_multiset(const flat_multiset& x) - : base_t(static_cast(x)) - {} - - //! @copydoc ::boost::container::flat_set::flat_set(flat_set &&) - BOOST_CONTAINER_FORCEINLINE flat_multiset(BOOST_RV_REF(flat_multiset) x) - BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible::value) - : base_t(boost::move(static_cast(x))) - {} - - //! @copydoc ::boost::container::flat_set::flat_set(const flat_set &, const allocator_type &) - BOOST_CONTAINER_FORCEINLINE flat_multiset(const flat_multiset& x, const allocator_type &a) - : base_t(static_cast(x), a) - {} - - //! @copydoc ::boost::container::flat_set::flat_set(flat_set &&, const allocator_type &) - BOOST_CONTAINER_FORCEINLINE flat_multiset(BOOST_RV_REF(flat_multiset) x, const allocator_type &a) - : base_t(BOOST_MOVE_BASE(base_t, x), a) - {} - - //! @copydoc ::boost::container::flat_set::operator=(const flat_set &) - BOOST_CONTAINER_FORCEINLINE flat_multiset& operator=(BOOST_COPY_ASSIGN_REF(flat_multiset) x) - { return static_cast(this->base_t::operator=(static_cast(x))); } - - //! @copydoc ::boost::container::flat_set::operator=(flat_set &&) - BOOST_CONTAINER_FORCEINLINE flat_multiset& operator=(BOOST_RV_REF(flat_multiset) x) - BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || - allocator_traits_type::is_always_equal::value) && - boost::container::container_detail::is_nothrow_move_assignable::value) - { return static_cast(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! @copydoc ::boost::container::flat_set::operator=(std::initializer_list) - flat_multiset& operator=(std::initializer_list il) - { - this->clear(); - this->insert(il.begin(), il.end()); - return *this; - } -#endif - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! @copydoc ::boost::container::flat_set::get_allocator() - allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::get_stored_allocator() - stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::get_stored_allocator() const - const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::begin() - iterator begin() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::begin() const - const_iterator begin() const; - - //! @copydoc ::boost::container::flat_set::cbegin() const - const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::end() - iterator end() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::end() const - const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::cend() const - const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::rbegin() - reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::rbegin() const - const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::crbegin() const - const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::rend() - reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::rend() const - const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::crend() const - const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::empty() const - bool empty() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::size() const - size_type size() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::max_size() const - size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::capacity() const - size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::reserve(size_type) - void reserve(size_type cnt); - - //! @copydoc ::boost::container::flat_set::shrink_to_fit() - void shrink_to_fit(); - - #endif // #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - ////////////////////////////////////////////// - // - // modifiers - // - ////////////////////////////////////////////// - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Inserts an object of type Key constructed with - //! std::forward(args)... and returns the iterator pointing to the - //! newly inserted element. - //! - //! Complexity: Logarithmic search time plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - template - BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_FWD_REF(Args)... args) - { return this->base_t::emplace_equal(boost::forward(args)...); } - - //! Effects: Inserts an object of type Key constructed with - //! std::forward(args)... in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic search time (constant if x is inserted - //! right before p) plus insertion linear to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - template - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) - { return this->base_t::emplace_hint_equal(p, boost::forward(args)...); } - - #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #define BOOST_CONTAINER_FLAT_MULTISET_EMPLACE_CODE(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\ - { return this->base_t::emplace_equal(BOOST_MOVE_FWD##N); }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - { return this->base_t::emplace_hint_equal(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_MULTISET_EMPLACE_CODE) - #undef BOOST_CONTAINER_FLAT_MULTISET_EMPLACE_CODE - - #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: Inserts x and returns the iterator pointing to the - //! newly inserted element. - //! - //! Complexity: Logarithmic search time plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - iterator insert(const value_type &x); - - //! Effects: Inserts a new value_type move constructed from x - //! and returns the iterator pointing to the newly inserted element. - //! - //! Complexity: Logarithmic search time plus linear insertion - //! to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - iterator insert(value_type &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH(insert, value_type, iterator, this->priv_insert) - #endif - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: Inserts a copy of x in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic search time (constant if x is inserted - //! right before p) plus insertion linear to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - iterator insert(const_iterator p, const value_type &x); - - //! Effects: Inserts a new value move constructed from x in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic search time (constant if x is inserted - //! right before p) plus insertion linear to the elements with bigger keys than x. - //! - //! Note: If an element is inserted it might invalidate elements. - iterator insert(const_iterator p, value_type &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator) - #endif - - //! Requires: first, last are not iterators into *this. - //! - //! Effects: inserts each element from the range [first,last) . - //! - //! Complexity: At most N log(size()+N) (N is the distance from first to last) - //! search time plus N*size() insertion time. - //! - //! Note: If an element is inserted it might invalidate elements. - template - BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last) - { this->base_t::insert_equal(first, last); } - - //! Requires: first, last are not iterators into *this and - //! must be ordered according to the predicate. - //! - //! Effects: inserts each element from the range [first,last) .This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Complexity: At most N log(size()+N) (N is the distance from first to last) - //! search time plus N*size() insertion time. - //! - //! Note: Non-standard extension. If an element is inserted it might invalidate elements. - template - BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, InputIterator first, InputIterator last) - { this->base_t::insert_equal(ordered_range, first, last); } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: inserts each element from the range [il.begin(), il.end()). - //! - //! Complexity: At most N log(size()+N) (N is the distance from first to last) - //! search time plus N*size() insertion time. - //! - //! Note: If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list il) - { this->base_t::insert_equal(il.begin(), il.end()); } - - //! Requires: Range [il.begin(), il.end()) must be ordered according to the predicate. - //! - //! Effects: inserts each element from the range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Complexity: At most N log(size()+N) (N is the distance from il.begin() to il.end()) - //! search time plus N*size() insertion time. - //! - //! Note: Non-standard extension. If an element is inserted it might invalidate elements. - BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, std::initializer_list il) - { this->base_t::insert_equal(ordered_range, il.begin(), il.end()); } -#endif - - //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap&) - template - BOOST_CONTAINER_FORCEINLINE void merge(flat_multiset& source) - { this->base_t::merge_equal(source.tree()); } - - //! @copydoc ::boost::container::flat_multiset::merge(flat_multiset&) - template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multiset BOOST_RV_REF_END source) - { return this->merge(static_cast&>(source)); } - - //! @copydoc ::boost::container::flat_multimap::merge(flat_map&) - template - BOOST_CONTAINER_FORCEINLINE void merge(flat_set& source) - { this->base_t::merge_equal(source.tree()); } - - //! @copydoc ::boost::container::flat_multiset::merge(flat_set&) - template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_set BOOST_RV_REF_END source) - { return this->merge(static_cast&>(source)); } - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! @copydoc ::boost::container::flat_set::erase(const_iterator) - iterator erase(const_iterator p); - - //! @copydoc ::boost::container::flat_set::erase(const key_type&) - size_type erase(const key_type& x); - - //! @copydoc ::boost::container::flat_set::erase(const_iterator,const_iterator) - iterator erase(const_iterator first, const_iterator last); - - //! @copydoc ::boost::container::flat_set::swap - void swap(flat_multiset& x) - BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value - && boost::container::container_detail::is_nothrow_swappable::value ); - - //! @copydoc ::boost::container::flat_set::clear - void clear() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::key_comp - key_compare key_comp() const; - - //! @copydoc ::boost::container::flat_set::value_comp - value_compare value_comp() const; - - //! @copydoc ::boost::container::flat_set::find(const key_type& ) - iterator find(const key_type& x); - - //! @copydoc ::boost::container::flat_set::find(const key_type& ) const - const_iterator find(const key_type& x) const; - - //! @copydoc ::boost::container::flat_set::nth(size_type) - iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::nth(size_type) const - const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::index_of(iterator) - size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::index_of(const_iterator) const - size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::flat_set::count(const key_type& ) const - size_type count(const key_type& x) const; - - //! @copydoc ::boost::container::flat_set::lower_bound(const key_type& ) - iterator lower_bound(const key_type& x); - - //! @copydoc ::boost::container::flat_set::lower_bound(const key_type& ) const - const_iterator lower_bound(const key_type& x) const; - - //! @copydoc ::boost::container::flat_set::upper_bound(const key_type& ) - iterator upper_bound(const key_type& x); - - //! @copydoc ::boost::container::flat_set::upper_bound(const key_type& ) const - const_iterator upper_bound(const key_type& x) const; - - //! @copydoc ::boost::container::flat_set::equal_range(const key_type& ) const - std::pair equal_range(const key_type& x) const; - - //! @copydoc ::boost::container::flat_set::equal_range(const key_type& ) - std::pair equal_range(const key_type& x); - - //! Effects: Returns true if x and y are equal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator==(const flat_multiset& x, const flat_multiset& y); - - //! Effects: Returns true if x and y are unequal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator!=(const flat_multiset& x, const flat_multiset& y); - - //! Effects: Returns true if x is less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<(const flat_multiset& x, const flat_multiset& y); - - //! Effects: Returns true if x is greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>(const flat_multiset& x, const flat_multiset& y); - - //! Effects: Returns true if x is equal or less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<=(const flat_multiset& x, const flat_multiset& y); - - //! Effects: Returns true if x is equal or greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>=(const flat_multiset& x, const flat_multiset& y); - - //! Effects: x.swap(y) - //! - //! Complexity: Constant. - friend void swap(flat_multiset& x, flat_multiset& y); - - //! Effects: Extracts the internal sequence container. - //! - //! Complexity: Same as the move constructor of sequence_type, usually constant. - //! - //! Postcondition: this->empty() - //! - //! Throws: If secuence_type's move constructor throws - sequence_type extract_sequence(); - - #endif //#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED - - //! Effects: Discards the internally hold sequence container and adopts the - //! one passed externally using the move assignment. - //! - //! Complexity: Assuming O(1) move assignment, O(NlogN) with N = seq.size() - //! - //! Throws: If the comparison or the move constructor throws - BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq) - { this->base_t::adopt_sequence_equal(boost::move(seq)); } - - //! Requires: seq shall be ordered according to this->compare() - //! - //! Effects: Discards the internally hold sequence container and adopts the - //! one passed externally using the move assignment. - //! - //! Complexity: Assuming O(1) move assignment, O(1) - //! - //! Throws: If the move assignment throws - BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_range_t, BOOST_RV_REF(sequence_type) seq) - { this->base_t::adopt_sequence_equal(ordered_range_t(), boost::move(seq)); } - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - template - BOOST_CONTAINER_FORCEINLINE iterator priv_insert(BOOST_FWD_REF(KeyType) x) - { return this->base_t::insert_equal(::boost::forward(x)); } - - template - BOOST_CONTAINER_FORCEINLINE iterator priv_insert(const_iterator p, BOOST_FWD_REF(KeyType) x) - { return this->base_t::insert_equal(p, ::boost::forward(x)); } - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -}; - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -} //namespace container { - -//!has_trivial_destructor_after_move<> == true_type -//!specialization for optimizations -template -struct has_trivial_destructor_after_move > -{ - typedef typename ::boost::container::allocator_traits::pointer pointer; - static const bool value = ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value; -}; - -namespace container { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -}} - -#include - -#endif // BOOST_CONTAINER_FLAT_SET_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/list.hpp b/contrib/libboost/boost_1_65_0/boost/container/list.hpp deleted file mode 100644 index f779cc4553d..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/list.hpp +++ /dev/null @@ -1,1498 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-2015. 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_LIST_HPP -#define BOOST_CONTAINER_LIST_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -// container -#include -#include //new_allocator -#include -// container/detail -#include -#include -#include -#include -#include -#include -#include -// move -#include -#include -#include -// move/detail -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -# include -#endif -#include - -// intrusive -#include -#include -// other -#include -// std -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) -#include -#endif - -namespace boost { -namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -namespace container_detail { - -template -struct list_hook -{ - typedef typename container_detail::bi::make_list_base_hook - , container_detail::bi::link_mode >::type type; -}; - -template -struct list_node - : public list_hook::type -{ - private: - list_node(); - - public: - typedef T value_type; - typedef typename list_hook::type hook_type; - - T m_data; - - T &get_data() - { return this->m_data; } - - const T &get_data() const - { return this->m_data; } -}; - -template -struct iiterator_node_value_type< list_node > { - typedef T type; -}; - -template -struct intrusive_list_type -{ - typedef boost::container::allocator_traits allocator_traits_type; - typedef typename allocator_traits_type::value_type value_type; - typedef typename boost::intrusive::pointer_traits - ::template - rebind_pointer::type - void_pointer; - typedef typename container_detail::list_node - node_type; - typedef typename container_detail::bi::make_list - < node_type - , container_detail::bi::base_hook::type> - , container_detail::bi::constant_time_size - , container_detail::bi::size_type - - >::type container_type; - typedef container_type type ; -}; - -} //namespace container_detail { -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! A list is a doubly linked list. That is, it is a Sequence that supports both -//! forward and backward traversal, and (amortized) constant time insertion and -//! removal of elements at the beginning or the end, or in the middle. Lists have -//! the important property that insertion and splicing do not invalidate iterators -//! to list elements, and that even removal invalidates only the iterators that point -//! to the elements that are removed. The ordering of iterators may be changed -//! (that is, list::iterator might have a different predecessor or successor -//! after a list operation than it did before), but the iterators themselves will -//! not be invalidated or made to point to different elements unless that invalidation -//! or mutation is explicit. -//! -//! \tparam T The type of object that is stored in the list -//! \tparam Allocator The allocator used for all internal memory management -#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED -template > -#else -template -#endif -class list - : protected container_detail::node_alloc_holder - ::type> -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - typedef typename - container_detail::intrusive_list_type::type Icont; - typedef container_detail::node_alloc_holder AllocHolder; - typedef typename AllocHolder::NodePtr NodePtr; - typedef typename AllocHolder::NodeAlloc NodeAlloc; - typedef typename AllocHolder::ValAlloc ValAlloc; - typedef typename AllocHolder::Node Node; - typedef container_detail::allocator_destroyer Destroyer; - typedef typename AllocHolder::alloc_version alloc_version; - typedef boost::container::allocator_traits allocator_traits_type; - typedef boost::container::equal_to_value equal_to_value_type; - - BOOST_COPYABLE_AND_MOVABLE(list) - - typedef container_detail::iterator_from_iiterator iterator_impl; - typedef container_detail::iterator_from_iiterator const_iterator_impl; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - ////////////////////////////////////////////// - // - // types - // - ////////////////////////////////////////////// - - typedef T value_type; - typedef typename ::boost::container::allocator_traits::pointer pointer; - typedef typename ::boost::container::allocator_traits::const_pointer const_pointer; - typedef typename ::boost::container::allocator_traits::reference reference; - typedef typename ::boost::container::allocator_traits::const_reference const_reference; - typedef typename ::boost::container::allocator_traits::size_type size_type; - typedef typename ::boost::container::allocator_traits::difference_type difference_type; - typedef Allocator allocator_type; - typedef BOOST_CONTAINER_IMPDEF(NodeAlloc) stored_allocator_type; - typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator; - typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator; - typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) reverse_iterator; - typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) const_reverse_iterator; - - ////////////////////////////////////////////// - // - // construct/copy/destroy - // - ////////////////////////////////////////////// - - //! Effects: Default constructs a list. - //! - //! Throws: If allocator_type's default constructor throws. - //! - //! Complexity: Constant. - list() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible::value) - : AllocHolder() - {} - - //! Effects: Constructs a list taking the allocator as parameter. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - explicit list(const allocator_type &a) BOOST_NOEXCEPT_OR_NOTHROW - : AllocHolder(a) - {} - - //! Effects: Constructs a list - //! and inserts n value-initialized value_types. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's default or copy constructor throws. - //! - //! Complexity: Linear to n. - explicit list(size_type n) - : AllocHolder(Allocator()) - { this->resize(n); } - - //! Effects: Constructs a list that will use a copy of allocator a - //! and inserts n copies of value. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's default or copy constructor throws. - //! - //! Complexity: Linear to n. - list(size_type n, const allocator_type &a) - : AllocHolder(a) - { this->resize(n); } - - //! Effects: Constructs a list that will use a copy of allocator a - //! and inserts n copies of value. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's default or copy constructor throws. - //! - //! Complexity: Linear to n. - list(size_type n, const T& value, const Allocator& a = Allocator()) - : AllocHolder(a) - { this->insert(this->cbegin(), n, value); } - - //! Effects: Copy constructs a list. - //! - //! Postcondition: x == *this. - //! - //! Throws: If allocator_type's default constructor throws. - //! - //! Complexity: Linear to the elements x contains. - list(const list& x) - : AllocHolder(x) - { this->insert(this->cbegin(), x.begin(), x.end()); } - - //! Effects: Move constructor. Moves x's resources to *this. - //! - //! Throws: If allocator_type's copy constructor throws. - //! - //! Complexity: Constant. - list(BOOST_RV_REF(list) x) BOOST_NOEXCEPT_OR_NOTHROW - : AllocHolder(BOOST_MOVE_BASE(AllocHolder, x)) - {} - - //! Effects: Copy constructs a list using the specified allocator. - //! - //! Postcondition: x == *this. - //! - //! Throws: If allocator_type's default constructor or copy constructor throws. - //! - //! Complexity: Linear to the elements x contains. - list(const list& x, const allocator_type &a) - : AllocHolder(a) - { this->insert(this->cbegin(), x.begin(), x.end()); } - - //! Effects: Move constructor sing the specified allocator. - //! Moves x's resources to *this. - //! - //! Throws: If allocation or value_type's copy constructor throws. - //! - //! Complexity: Constant if a == x.get_allocator(), linear otherwise. - list(BOOST_RV_REF(list) x, const allocator_type &a) - : AllocHolder(a) - { - if(this->node_alloc() == x.node_alloc()){ - this->icont().swap(x.icont()); - } - else{ - this->insert(this->cbegin(), boost::make_move_iterator(x.begin()), boost::make_move_iterator(x.end())); - } - } - - //! Effects: Constructs a list that will use a copy of allocator a - //! and inserts a copy of the range [first, last) in the list. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's constructor taking a dereferenced InIt throws. - //! - //! Complexity: Linear to the range [first, last). - template - list(InpIt first, InpIt last, const Allocator &a = Allocator()) - : AllocHolder(a) - { this->insert(this->cbegin(), first, last); } - - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Constructs a list that will use a copy of allocator a - //! and inserts a copy of the range [il.begin(), il.end()) in the list. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's constructor taking a dereferenced - //! std::initializer_list iterator throws. - //! - //! Complexity: Linear to the range [il.begin(), il.end()). - list(std::initializer_list il, const Allocator &a = Allocator()) - : AllocHolder(a) - { this->insert(this->cbegin(), il.begin(), il.end()); } -#endif - - //! Effects: Destroys the list. All stored values are destroyed - //! and used memory is deallocated. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the number of elements. - ~list() BOOST_NOEXCEPT_OR_NOTHROW - {} //AllocHolder clears the list - - //! Effects: Makes *this contain the same elements as x. - //! - //! Postcondition: this->size() == x.size(). *this contains a copy - //! of each of x's elements. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to the number of elements in x. - list& operator=(BOOST_COPY_ASSIGN_REF(list) x) - { - if (&x != this){ - NodeAlloc &this_alloc = this->node_alloc(); - const NodeAlloc &x_alloc = x.node_alloc(); - container_detail::bool_ flag; - if(flag && this_alloc != x_alloc){ - this->clear(); - } - this->AllocHolder::copy_assign_alloc(x); - this->assign(x.begin(), x.end()); - } - return *this; - } - - //! Effects: Move assignment. All x's values are transferred to *this. - //! - //! Postcondition: x.empty(). *this contains a the elements x had - //! before the function. - //! - //! Throws: If allocator_traits_type::propagate_on_container_move_assignment - //! is false and (allocation throws or value_type's move constructor throws) - //! - //! Complexity: Constant if allocator_traits_type:: - //! propagate_on_container_move_assignment is true or - //! this->get>allocator() == x.get_allocator(). Linear otherwise. - list& operator=(BOOST_RV_REF(list) x) - BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value - || allocator_traits_type::is_always_equal::value) - { - BOOST_ASSERT(this != &x); - NodeAlloc &this_alloc = this->node_alloc(); - NodeAlloc &x_alloc = x.node_alloc(); - const bool propagate_alloc = allocator_traits_type:: - propagate_on_container_move_assignment::value; - const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal; - //Resources can be transferred if both allocators are - //going to be equal after this function (either propagated or already equal) - if(propagate_alloc || allocators_equal){ - //Destroy - this->clear(); - //Move allocator if needed - this->AllocHolder::move_assign_alloc(x); - //Obtain resources - this->icont() = boost::move(x.icont()); - } - //Else do a one by one move - else{ - this->assign( boost::make_move_iterator(x.begin()) - , boost::make_move_iterator(x.end())); - } - return *this; - } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Makes *this contain the same elements as il. - //! - //! Postcondition: this->size() == il.size(). *this contains a copy - //! of each of x's elements. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to the number of elements in x. - list& operator=(std::initializer_list il) - { - assign(il.begin(), il.end()); - return *this; - } -#endif - - //! Effects: Assigns the n copies of val to *this. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to n. - void assign(size_type n, const T& val) - { - typedef constant_iterator cvalue_iterator; - return this->assign(cvalue_iterator(val, n), cvalue_iterator()); - } - - //! Effects: Assigns the range [first, last) to *this. - //! - //! Throws: If memory allocation throws or - //! T's constructor from dereferencing InpIt throws. - //! - //! Complexity: Linear to n. - template - void assign(InpIt first, InpIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::disable_if_convertible::type * = 0 - #endif - ) - { - iterator first1 = this->begin(); - const iterator last1 = this->end(); - for ( ; first1 != last1 && first != last; ++first1, ++first) - *first1 = *first; - if (first == last) - this->erase(first1, last1); - else{ - this->insert(last1, first, last); - } - } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Assigns the range [il.begin(), il.end()) to *this. - //! - //! Throws: If memory allocation throws or - //! T's constructor from dereferencing std::initializer_list iterator throws. - //! - //! Complexity: Linear to n. - void assign(std::initializer_list il) - { assign(il.begin(), il.end()); } -#endif - - //! Effects: Returns a copy of the internal allocator. - //! - //! Throws: If allocator's copy constructor throws. - //! - //! Complexity: Constant. - allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW - { return allocator_type(this->node_alloc()); } - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW - { return this->node_alloc(); } - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->node_alloc(); } - - ////////////////////////////////////////////// - // - // iterators - // - ////////////////////////////////////////////// - - //! Effects: Returns an iterator to the first element contained in the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - iterator begin() BOOST_NOEXCEPT_OR_NOTHROW - { return iterator(this->icont().begin()); } - - //! Effects: Returns a const_iterator to the first element contained in the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->cbegin(); } - - //! Effects: Returns an iterator to the end of the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - iterator end() BOOST_NOEXCEPT_OR_NOTHROW - { return iterator(this->icont().end()); } - - //! Effects: Returns a const_iterator to the end of the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->cend(); } - - //! Effects: Returns a reverse_iterator pointing to the beginning - //! of the reversed list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW - { return reverse_iterator(end()); } - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->crbegin(); } - - //! Effects: Returns a reverse_iterator pointing to the end - //! of the reversed list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW - { return reverse_iterator(begin()); } - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->crend(); } - - //! Effects: Returns a const_iterator to the first element contained in the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_iterator(this->non_const_icont().begin()); } - - //! Effects: Returns a const_iterator to the end of the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_iterator(this->non_const_icont().end()); } - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_reverse_iterator(this->cend()); } - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_reverse_iterator(this->cbegin()); } - - ////////////////////////////////////////////// - // - // capacity - // - ////////////////////////////////////////////// - - //! Effects: Returns true if the list contains no elements. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - bool empty() const BOOST_NOEXCEPT_OR_NOTHROW - { return !this->size(); } - - //! Effects: Returns the number of the elements contained in the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - size_type size() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->icont().size(); } - - //! Effects: Returns the largest possible size of the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW - { return AllocHolder::max_size(); } - - //! Effects: Inserts or erases elements at the end such that - //! the size becomes n. New elements are value initialized. - //! - //! Throws: If memory allocation throws, or T's copy constructor throws. - //! - //! Complexity: Linear to the difference between size() and new_size. - void resize(size_type new_size) - { - if(!priv_try_shrink(new_size)){ - typedef value_init_construct_iterator value_init_iterator; - this->insert(this->cend(), value_init_iterator(new_size - this->size()), value_init_iterator()); - } - } - - //! Effects: Inserts or erases elements at the end such that - //! the size becomes n. New elements are copy constructed from x. - //! - //! Throws: If memory allocation throws, or T's copy constructor throws. - //! - //! Complexity: Linear to the difference between size() and new_size. - void resize(size_type new_size, const T& x) - { - if(!priv_try_shrink(new_size)){ - this->insert(this->cend(), new_size - this->size(), x); - } - } - - ////////////////////////////////////////////// - // - // element access - // - ////////////////////////////////////////////// - - //! Requires: !empty() - //! - //! Effects: Returns a reference to the first element - //! from the beginning of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reference front() BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - return *this->begin(); - } - - //! Requires: !empty() - //! - //! Effects: Returns a const reference to the first element - //! from the beginning of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - return *this->begin(); - } - - //! Requires: !empty() - //! - //! Effects: Returns a reference to the first element - //! from the beginning of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reference back() BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - return *(--this->end()); - } - - //! Requires: !empty() - //! - //! Effects: Returns a const reference to the first element - //! from the beginning of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - return *(--this->end()); - } - - ////////////////////////////////////////////// - // - // modifiers - // - ////////////////////////////////////////////// - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... in the end of the list. - //! - //! Returns: A reference to the created object. - //! - //! Throws: If memory allocation throws or - //! T's in-place constructor throws. - //! - //! Complexity: Constant - template - reference emplace_back(BOOST_FWD_REF(Args)... args) - { return *this->emplace(this->cend(), boost::forward(args)...); } - - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... in the beginning of the list. - //! - //! Returns: A reference to the created object. - //! - //! Throws: If memory allocation throws or - //! T's in-place constructor throws. - //! - //! Complexity: Constant - template - reference emplace_front(BOOST_FWD_REF(Args)... args) - { return *this->emplace(this->cbegin(), boost::forward(args)...); } - - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... before p. - //! - //! Throws: If memory allocation throws or - //! T's in-place constructor throws. - //! - //! Complexity: Constant - template - iterator emplace(const_iterator position, BOOST_FWD_REF(Args)... args) - { - BOOST_ASSERT((priv_is_linked)(position)); - NodePtr pnode(AllocHolder::create_node(boost::forward(args)...)); - return iterator(this->icont().insert(position.get(), *pnode)); - } - - #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #define BOOST_CONTAINER_LIST_EMPLACE_CODE(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - reference emplace_back(BOOST_MOVE_UREF##N)\ - { return *this->emplace(this->cend() BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - reference emplace_front(BOOST_MOVE_UREF##N)\ - { return *this->emplace(this->cbegin() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);}\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - iterator emplace(const_iterator position BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - BOOST_ASSERT(position == this->cend() || (--(++position) == position) );\ - NodePtr pnode (AllocHolder::create_node(BOOST_MOVE_FWD##N));\ - return iterator(this->icont().insert(position.get(), *pnode));\ - }\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_LIST_EMPLACE_CODE) - #undef BOOST_CONTAINER_LIST_EMPLACE_CODE - - #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: Inserts a copy of x at the beginning of the list. - //! - //! Throws: If memory allocation throws or - //! T's copy constructor throws. - //! - //! Complexity: Amortized constant time. - void push_front(const T &x); - - //! Effects: Constructs a new element in the beginning of the list - //! and moves the resources of x to this new element. - //! - //! Throws: If memory allocation throws. - //! - //! Complexity: Amortized constant time. - void push_front(T &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH(push_front, T, void, priv_push_front) - #endif - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: Inserts a copy of x at the end of the list. - //! - //! Throws: If memory allocation throws or - //! T's copy constructor throws. - //! - //! Complexity: Amortized constant time. - void push_back(const T &x); - - //! Effects: Constructs a new element in the end of the list - //! and moves the resources of x to this new element. - //! - //! Throws: If memory allocation throws. - //! - //! Complexity: Amortized constant time. - void push_back(T &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH(push_back, T, void, priv_push_back) - #endif - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Insert a copy of x before p. - //! - //! Returns: an iterator to the inserted element. - //! - //! Throws: If memory allocation throws or x's copy constructor throws. - //! - //! Complexity: Amortized constant time. - iterator insert(const_iterator p, const T &x); - - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Insert a new element before p with x's resources. - //! - //! Returns: an iterator to the inserted element. - //! - //! Throws: If memory allocation throws. - //! - //! Complexity: Amortized constant time. - iterator insert(const_iterator p, T &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator) - #endif - - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Inserts n copies of x before p. - //! - //! Returns: an iterator to the first inserted element or p if n is 0. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to n. - iterator insert(const_iterator position, size_type n, const T& x) - { - //range check is done by insert - typedef constant_iterator cvalue_iterator; - return this->insert(position, cvalue_iterator(x, n), cvalue_iterator()); - } - - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Insert a copy of the [first, last) range before p. - //! - //! Returns: an iterator to the first inserted element or p if first == last. - //! - //! Throws: If memory allocation throws, T's constructor from a - //! dereferenced InpIt throws. - //! - //! Complexity: Linear to distance [first, last). - template - iterator insert(const_iterator p, InpIt first, InpIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::enable_if_c - < !container_detail::is_convertible::value - && (container_detail::is_input_iterator::value - || container_detail::is_same::value - ) - >::type * = 0 - #endif - ) - { - BOOST_ASSERT((priv_is_linked)(p)); - const typename Icont::iterator ipos(p.get()); - iterator ret_it(ipos); - if(first != last){ - ret_it = iterator(this->icont().insert(ipos, *this->create_node_from_it(first))); - ++first; - } - for (; first != last; ++first){ - this->icont().insert(ipos, *this->create_node_from_it(first)); - } - return ret_it; - } - - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - template - iterator insert(const_iterator position, FwdIt first, FwdIt last - , typename container_detail::enable_if_c - < !container_detail::is_convertible::value - && !(container_detail::is_input_iterator::value - || container_detail::is_same::value - ) - >::type * = 0 - ) - { - BOOST_ASSERT((priv_is_linked)(position)); - //Optimized allocation and construction - insertion_functor func(this->icont(), position.get()); - iterator before_p(position.get()); - --before_p; - this->allocate_many_and_construct(first, boost::container::iterator_distance(first, last), func); - return ++before_p; - } - #endif - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Insert a copy of the [il.begin(), il.end()) range before p. - //! - //! Returns: an iterator to the first inserted element or p if if.begin() == il.end(). - //! - //! Throws: If memory allocation throws, T's constructor from a - //! dereferenced std::initializer_list iterator throws. - //! - //! Complexity: Linear to distance [il.begin(), il.end()). - iterator insert(const_iterator p, std::initializer_list il) - { - //position range check is done by insert() - return insert(p, il.begin(), il.end()); - } -#endif - - //! Effects: Removes the first element from the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Amortized constant time. - void pop_front() BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - this->erase(this->cbegin()); - } - - //! Effects: Removes the last element from the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Amortized constant time. - void pop_back() BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - const_iterator tmp = this->cend(); - this->erase(--tmp); - } - - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Erases the element at p. - //! - //! Throws: Nothing. - //! - //! Complexity: Amortized constant time. - iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(p != this->cend() && (priv_is_linked)(p)); - return iterator(this->icont().erase_and_dispose(p.get(), Destroyer(this->node_alloc()))); - } - - //! Requires: first and last must be valid iterator to elements in *this. - //! - //! Effects: Erases the elements pointed by [first, last). - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the distance between first and last. - iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(first == last || (first != this->cend() && (priv_is_linked)(first))); - BOOST_ASSERT(first == last || (priv_is_linked)(last)); - return iterator(AllocHolder::erase_range(first.get(), last.get(), alloc_version())); - } - - //! Effects: Swaps the contents of *this and x. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - void swap(list& x) - BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_swap::value - || allocator_traits_type::is_always_equal::value) - { - BOOST_ASSERT(allocator_traits_type::propagate_on_container_swap::value || - allocator_traits_type::is_always_equal::value || - this->get_stored_allocator() == x.get_stored_allocator()); - AllocHolder::swap(x); - } - - //! Effects: Erases all the elements of the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the number of elements in the list. - void clear() BOOST_NOEXCEPT_OR_NOTHROW - { AllocHolder::clear(alloc_version()); } - - ////////////////////////////////////////////// - // - // slist operations - // - ////////////////////////////////////////////// - - //! Requires: p must point to an element contained - //! by the list. x != *this. this' allocator and x's allocator shall compare equal - //! - //! Effects: Transfers all the elements of list x to this list, before the - //! the element pointed by p. No destructors or copy constructors are called. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Iterators of values obtained from list x now point to elements of - //! this list. Iterators of this list and all the references are not invalidated. - void splice(const_iterator p, list& x) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT((priv_is_linked)(p)); - BOOST_ASSERT(this != &x); - BOOST_ASSERT(this->node_alloc() == x.node_alloc()); - this->icont().splice(p.get(), x.icont()); - } - - //! Requires: p must point to an element contained - //! by the list. x != *this. this' allocator and x's allocator shall compare equal - //! - //! Effects: Transfers all the elements of list x to this list, before the - //! the element pointed by p. No destructors or copy constructors are called. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Iterators of values obtained from list x now point to elements of - //! this list. Iterators of this list and all the references are not invalidated. - void splice(const_iterator p, BOOST_RV_REF(list) x) BOOST_NOEXCEPT_OR_NOTHROW - { - //Checks done in splice - this->splice(p, static_cast(x)); - } - - //! Requires: p must point to an element contained - //! by this list. i must point to an element contained in list x. - //! this' allocator and x's allocator shall compare equal - //! - //! Effects: Transfers the value pointed by i, from list x to this list, - //! before the element pointed by p. No destructors or copy constructors are called. - //! If p == i or p == ++i, this function is a null operation. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Iterators of values obtained from list x now point to elements of this - //! list. Iterators of this list and all the references are not invalidated. - void splice(const_iterator p, list &x, const_iterator i) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT((priv_is_linked)(p)); - BOOST_ASSERT(this->node_alloc() == x.node_alloc()); - this->icont().splice(p.get(), x.icont(), i.get()); - } - - //! Requires: p must point to an element contained - //! by this list. i must point to an element contained in list x. - //! this' allocator and x's allocator shall compare equal. - //! - //! Effects: Transfers the value pointed by i, from list x to this list, - //! before the element pointed by p. No destructors or copy constructors are called. - //! If p == i or p == ++i, this function is a null operation. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Iterators of values obtained from list x now point to elements of this - //! list. Iterators of this list and all the references are not invalidated. - void splice(const_iterator p, BOOST_RV_REF(list) x, const_iterator i) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this != &x); - //Additional checks done in splice() - this->splice(p, static_cast(x), i); - } - - //! Requires: p must point to an element contained - //! by this list. first and last must point to elements contained in list x. - //! this' allocator and x's allocator shall compare equal - //! - //! Effects: Transfers the range pointed by first and last from list x to this list, - //! before the element pointed by p. No destructors or copy constructors are called. - //! - //! Throws: Nothing - //! - //! Complexity: Linear to the number of elements transferred. - //! - //! Note: Iterators of values obtained from list x now point to elements of this - //! list. Iterators of this list and all the references are not invalidated. - void splice(const_iterator p, list &x, const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT((priv_is_linked)(p)); - BOOST_ASSERT(first == last || (first != x.cend() && x.priv_is_linked(first))); - BOOST_ASSERT(first == last || x.priv_is_linked(last)); - BOOST_ASSERT(this->node_alloc() == x.node_alloc()); - this->icont().splice(p.get(), x.icont(), first.get(), last.get()); - } - - //! Requires: p must point to an element contained - //! by this list. first and last must point to elements contained in list x. - //! this' allocator and x's allocator shall compare equal. - //! - //! Effects: Transfers the range pointed by first and last from list x to this list, - //! before the element pointed by p. No destructors or copy constructors are called. - //! - //! Throws: Nothing - //! - //! Complexity: Linear to the number of elements transferred. - //! - //! Note: Iterators of values obtained from list x now point to elements of this - //! list. Iterators of this list and all the references are not invalidated. - void splice(const_iterator p, BOOST_RV_REF(list) x, const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this != &x); - //Additional checks done in splice() - this->splice(p, static_cast(x), first, last); - } - - //! Requires: p must point to an element contained - //! by this list. first and last must point to elements contained in list x. - //! n == distance(first, last). this' allocator and x's allocator shall compare equal - //! - //! Effects: Transfers the range pointed by first and last from list x to this list, - //! before the element pointed by p. No destructors or copy constructors are called. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Iterators of values obtained from list x now point to elements of this - //! list. Iterators of this list and all the references are not invalidated. - //! - //! Note: Non-standard extension - void splice(const_iterator p, list &x, const_iterator first, const_iterator last, size_type n) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->node_alloc() == x.node_alloc()); - this->icont().splice(p.get(), x.icont(), first.get(), last.get(), n); - } - - //! Requires: p must point to an element contained - //! by this list. first and last must point to elements contained in list x. - //! n == distance(first, last). this' allocator and x's allocator shall compare equal - //! - //! Effects: Transfers the range pointed by first and last from list x to this list, - //! before the element pointed by p. No destructors or copy constructors are called. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Iterators of values obtained from list x now point to elements of this - //! list. Iterators of this list and all the references are not invalidated. - //! - //! Note: Non-standard extension - void splice(const_iterator p, BOOST_RV_REF(list) x, const_iterator first, const_iterator last, size_type n) BOOST_NOEXCEPT_OR_NOTHROW - { this->splice(p, static_cast(x), first, last, n); } - - //! Effects: Removes all the elements that compare equal to value. - //! - //! Throws: If comparison throws. - //! - //! Complexity: Linear time. It performs exactly size() comparisons for equality. - //! - //! Note: The relative order of elements that are not removed is unchanged, - //! and iterators to elements that are not removed remain valid. - void remove(const T& value) - { this->remove_if(equal_to_value_type(value)); } - - //! Effects: Removes all the elements for which a specified - //! predicate is satisfied. - //! - //! Throws: If pred throws. - //! - //! Complexity: Linear time. It performs exactly size() calls to the predicate. - //! - //! Note: The relative order of elements that are not removed is unchanged, - //! and iterators to elements that are not removed remain valid. - template - void remove_if(Pred pred) - { - typedef value_to_node_compare value_to_node_compare_type; - this->icont().remove_and_dispose_if(value_to_node_compare_type(pred), Destroyer(this->node_alloc())); - } - - //! Effects: Removes adjacent duplicate elements or adjacent - //! elements that are equal from the list. - //! - //! Throws: If comparison throws. - //! - //! Complexity: Linear time (size()-1 comparisons equality comparisons). - //! - //! Note: The relative order of elements that are not removed is unchanged, - //! and iterators to elements that are not removed remain valid. - void unique() - { this->unique(value_equal()); } - - //! Effects: Removes adjacent duplicate elements or adjacent - //! elements that satisfy some binary predicate from the list. - //! - //! Throws: If pred throws. - //! - //! Complexity: Linear time (size()-1 comparisons calls to pred()). - //! - //! Note: The relative order of elements that are not removed is unchanged, - //! and iterators to elements that are not removed remain valid. - template - void unique(BinaryPredicate binary_pred) - { - typedef value_to_node_compare value_to_node_compare_type; - this->icont().unique_and_dispose(value_to_node_compare_type(binary_pred), Destroyer(this->node_alloc())); - } - - //! Requires: The lists x and *this must be distinct. - //! - //! Effects: This function removes all of x's elements and inserts them - //! in order into *this according to std::less. The merge is stable; - //! that is, if an element from *this is equivalent to one from x, then the element - //! from *this will precede the one from x. - //! - //! Throws: If comparison throws. - //! - //! Complexity: This function is linear time: it performs at most - //! size() + x.size() - 1 comparisons. - void merge(list &x) - { this->merge(x, value_less()); } - - //! Requires: The lists x and *this must be distinct. - //! - //! Effects: This function removes all of x's elements and inserts them - //! in order into *this according to std::less. The merge is stable; - //! that is, if an element from *this is equivalent to one from x, then the element - //! from *this will precede the one from x. - //! - //! Throws: If comparison throws. - //! - //! Complexity: This function is linear time: it performs at most - //! size() + x.size() - 1 comparisons. - void merge(BOOST_RV_REF(list) x) - { this->merge(static_cast(x)); } - - //! Requires: p must be a comparison function that induces a strict weak - //! ordering and both *this and x must be sorted according to that ordering - //! The lists x and *this must be distinct. - //! - //! Effects: This function removes all of x's elements and inserts them - //! in order into *this. The merge is stable; that is, if an element from *this is - //! equivalent to one from x, then the element from *this will precede the one from x. - //! - //! Throws: If comp throws. - //! - //! Complexity: This function is linear time: it performs at most - //! size() + x.size() - 1 comparisons. - //! - //! Note: Iterators and references to *this are not invalidated. - template - void merge(list &x, const StrictWeakOrdering &comp) - { - BOOST_ASSERT(this->node_alloc() == x.node_alloc()); - typedef value_to_node_compare value_to_node_compare_type; - this->icont().merge(x.icont(), value_to_node_compare_type(comp)); - } - - //! Requires: p must be a comparison function that induces a strict weak - //! ordering and both *this and x must be sorted according to that ordering - //! The lists x and *this must be distinct. - //! - //! Effects: This function removes all of x's elements and inserts them - //! in order into *this. The merge is stable; that is, if an element from *this is - //! equivalent to one from x, then the element from *this will precede the one from x. - //! - //! Throws: If comp throws. - //! - //! Complexity: This function is linear time: it performs at most - //! size() + x.size() - 1 comparisons. - //! - //! Note: Iterators and references to *this are not invalidated. - template - void merge(BOOST_RV_REF(list) x, StrictWeakOrdering comp) - { this->merge(static_cast(x), comp); } - - //! Effects: This function sorts the list *this according to std::less. - //! The sort is stable, that is, the relative order of equivalent elements is preserved. - //! - //! Throws: If comparison throws. - //! - //! Notes: Iterators and references are not invalidated. - //! - //! Complexity: The number of comparisons is approximately N log N, where N - //! is the list's size. - void sort() - { this->sort(value_less()); } - - //! Effects: This function sorts the list *this according to std::less. - //! The sort is stable, that is, the relative order of equivalent elements is preserved. - //! - //! Throws: If comp throws. - //! - //! Notes: Iterators and references are not invalidated. - //! - //! Complexity: The number of comparisons is approximately N log N, where N - //! is the list's size. - template - void sort(StrictWeakOrdering comp) - { - // nothing if the list has length 0 or 1. - if (this->size() < 2) - return; - typedef value_to_node_compare value_to_node_compare_type; - this->icont().sort(value_to_node_compare_type(comp)); - } - - //! Effects: Reverses the order of elements in the list. - //! - //! Throws: Nothing. - //! - //! Complexity: This function is linear time. - //! - //! Note: Iterators and references are not invalidated - void reverse() BOOST_NOEXCEPT_OR_NOTHROW - { this->icont().reverse(); } - - //! Effects: Returns true if x and y are equal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator==(const list& x, const list& y) - { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); } - - //! Effects: Returns true if x and y are unequal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator!=(const list& x, const list& y) - { return !(x == y); } - - //! Effects: Returns true if x is less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<(const list& x, const list& y) - { return boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } - - //! Effects: Returns true if x is greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>(const list& x, const list& y) - { return y < x; } - - //! Effects: Returns true if x is equal or less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<=(const list& x, const list& y) - { return !(y < x); } - - //! Effects: Returns true if x is equal or greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>=(const list& x, const list& y) - { return !(x < y); } - - //! Effects: x.swap(y) - //! - //! Complexity: Constant. - friend void swap(list& x, list& y) - { x.swap(y); } - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - - static bool priv_is_linked(const_iterator const position) - { - const_iterator cur(position); - //This list is circular including end nodes - return (--(++cur)) == position && (++(--cur)) == position; - } - - bool priv_try_shrink(size_type new_size) - { - const size_type len = this->size(); - if(len > new_size){ - const const_iterator iend = this->cend(); - size_type to_erase = len - new_size; - const_iterator ifirst; - if(to_erase < len/2u){ - ifirst = iend; - while(to_erase--){ - --ifirst; - } - } - else{ - ifirst = this->cbegin(); - size_type to_skip = len - to_erase; - while(to_skip--){ - ++ifirst; - } - } - this->erase(ifirst, iend); - return true; - } - else{ - return false; - } - } - - iterator priv_insert(const_iterator p, const T &x) - { - BOOST_ASSERT((priv_is_linked)(p)); - NodePtr tmp = AllocHolder::create_node(x); - return iterator(this->icont().insert(p.get(), *tmp)); - } - - iterator priv_insert(const_iterator p, BOOST_RV_REF(T) x) - { - BOOST_ASSERT((priv_is_linked)(p)); - NodePtr tmp = AllocHolder::create_node(boost::move(x)); - return iterator(this->icont().insert(p.get(), *tmp)); - } - - void priv_push_back (const T &x) - { this->insert(this->cend(), x); } - - void priv_push_back (BOOST_RV_REF(T) x) - { this->insert(this->cend(), boost::move(x)); } - - void priv_push_front (const T &x) - { this->insert(this->cbegin(), x); } - - void priv_push_front (BOOST_RV_REF(T) x) - { this->insert(this->cbegin(), boost::move(x)); } - - class insertion_functor; - friend class insertion_functor; - - class insertion_functor - { - Icont &icont_; - typedef typename Icont::const_iterator iconst_iterator; - const iconst_iterator pos_; - - public: - insertion_functor(Icont &icont, typename Icont::const_iterator pos) - : icont_(icont), pos_(pos) - {} - - void operator()(Node &n) - { - this->icont_.insert(pos_, n); - } - }; - - //Functors for member algorithm defaults - struct value_less - { - bool operator()(const value_type &a, const value_type &b) const - { return a < b; } - }; - - struct value_equal - { - bool operator()(const value_type &a, const value_type &b) const - { return a == b; } - }; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -}; - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -} //namespace container { - -//!has_trivial_destructor_after_move<> == true_type -//!specialization for optimizations -template -struct has_trivial_destructor_after_move > -{ - typedef typename ::boost::container::allocator_traits::pointer pointer; - static const bool value = ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value; -}; - -namespace container { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -}} - -#include - -#endif // BOOST_CONTAINER_LIST_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/map.hpp b/contrib/libboost/boost_1_65_0/boost/container/map.hpp deleted file mode 100644 index 33e0331eb09..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/map.hpp +++ /dev/null @@ -1,1950 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// -#ifndef BOOST_CONTAINER_MAP_HPP -#define BOOST_CONTAINER_MAP_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -// container -#include -#include //new_allocator -#include -// container/detail -#include -#include -#include -#include -#include -#include - -// move -#include -#include -// move/detail -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif -#include -// intrusive/detail -#include //pair -#include //less, equal -// other -#include -#include -// std -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) -#include -#endif - -namespace boost { -namespace container { - -#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! A map is a kind of associative container that supports unique keys (contains at -//! most one of each key value) and provides for fast retrieval of values of another -//! type T based on the keys. The map class supports bidirectional iterators. -//! -//! A map satisfies all of the requirements of a container and of a reversible -//! container and of an associative container. The value_type stored -//! by this container is the value_type is std::pair. -//! -//! \tparam Key is the key_type of the map -//! \tparam T is the mapped_type -//! \tparam Compare is the ordering function for Keys (e.g. std::less). -//! \tparam Allocator is the allocator to allocate the value_types -//! (e.g. allocator< std::pair > ). -//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options. -template < class Key, class T, class Compare = std::less - , class Allocator = new_allocator< std::pair< const Key, T> >, class Options = tree_assoc_defaults > -#else -template -#endif -class map - ///@cond - : public container_detail::tree - < std::pair - , container_detail::select1st - , Compare, Allocator, Options> - ///@endcond -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - BOOST_COPYABLE_AND_MOVABLE(map) - - typedef container_detail::select1st select_1st_t; - typedef std::pair value_type_impl; - typedef container_detail::tree - base_t; - typedef container_detail::pair movable_value_type_impl; - typedef typename base_t::value_compare value_compare_impl; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - ////////////////////////////////////////////// - // - // types - // - ////////////////////////////////////////////// - - typedef Key key_type; - typedef ::boost::container::allocator_traits allocator_traits_type; - typedef T mapped_type; - typedef typename boost::container::allocator_traits::value_type value_type; - typedef typename boost::container::allocator_traits::pointer pointer; - typedef typename boost::container::allocator_traits::const_pointer const_pointer; - typedef typename boost::container::allocator_traits::reference reference; - typedef typename boost::container::allocator_traits::const_reference const_reference; - typedef typename boost::container::allocator_traits::size_type size_type; - typedef typename boost::container::allocator_traits::difference_type difference_type; - typedef Allocator allocator_type; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type; - typedef BOOST_CONTAINER_IMPDEF(value_compare_impl) value_compare; - typedef Compare key_compare; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator; - typedef std::pair nonconst_value_type; - typedef BOOST_CONTAINER_IMPDEF(movable_value_type_impl) movable_value_type; - typedef BOOST_CONTAINER_IMPDEF(node_handle< - typename base_t::stored_allocator_type - BOOST_MOVE_I pair_key_mapped_of_value - >) node_type; - typedef BOOST_CONTAINER_IMPDEF - (insert_return_type_base) insert_return_type; - - //allocator_type::value_type type must be std::pair - BOOST_STATIC_ASSERT((container_detail::is_same >::value)); - - ////////////////////////////////////////////// - // - // construct/copy/destroy - // - ////////////////////////////////////////////// - - //! Effects: Default constructs an empty map. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE - map() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible::value && - container_detail::is_nothrow_default_constructible::value) - : base_t() - {} - - //! Effects: Constructs an empty map using the specified comparison object - //! and allocator. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE map(const Compare& comp, const allocator_type& a) - : base_t(comp, a) - {} - - //! Effects: Constructs an empty map using the specified comparison object. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit map(const Compare& comp) - : base_t(comp) - {} - - //! Effects: Constructs an empty map using the specified allocator. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit map(const allocator_type& a) - : base_t(a) - {} - - //! Effects: Constructs an empty map and - //! inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last) - : base_t(true, first, last) - {} - - //! Effects: Constructs an empty map using the specified - //! allocator, and inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last, const allocator_type& a) - : base_t(true, first, last, Compare(), a) - {} - - //! Effects: Constructs an empty map using the specified comparison object and - //! inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last, const Compare& comp) - : base_t(true, first, last, comp) - {} - - //! Effects: Constructs an empty map using the specified comparison object and - //! allocator, and inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) - : base_t(true, first, last, comp, a) - {} - - //! Effects: Constructs an empty map and - //! inserts elements from the ordered unique range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, InputIterator first, InputIterator last) - : base_t(ordered_range, first, last) - {} - - //! Effects: Constructs an empty map using the specified comparison object and - //! inserts elements from the ordered unique range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp) - : base_t(ordered_range, first, last, comp) - {} - - //! Effects: Constructs an empty map using the specified comparison object and - //! allocator, and inserts elements from the ordered unique range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, InputIterator first, InputIterator last - , const Compare& comp, const allocator_type& a) - : base_t(ordered_range, first, last, comp, a) - {} - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Constructs an empty map and - //! inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted according - //! to the predicate and otherwise N logN, where N is il.first() - il.end(). - BOOST_CONTAINER_FORCEINLINE map(std::initializer_list il) - : base_t(true, il.begin(), il.end()) - {} - - //! Effects: Constructs an empty map using the specified comparison object and - //! inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is il.first() - il.end(). - BOOST_CONTAINER_FORCEINLINE map(std::initializer_list il, const Compare& comp) - : base_t(true, il.begin(), il.end(), comp) - {} - - //! Effects: Constructs an empty map using the specified - //! allocator, and inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is il.first() - il.end(). - BOOST_CONTAINER_FORCEINLINE map(std::initializer_list il, const allocator_type& a) - : base_t(true, il.begin(), il.end(), Compare(), a) - {} - - //! Effects: Constructs an empty map using the specified comparison object and - //! allocator, and inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is il.first() - il.end(). - BOOST_CONTAINER_FORCEINLINE map(std::initializer_list il, const Compare& comp, const allocator_type& a) - : base_t(true, il.begin(), il.end(), comp, a) - {} - - //! Effects: Constructs an empty map and inserts elements from the ordered unique range [il.begin(), il.end()). - //! This function is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE map(ordered_unique_range_t, std::initializer_list il) - : base_t(ordered_range, il.begin(), il.end()) - {} - - //! Effects: Constructs an empty map using the specified comparison object, - //! and inserts elements from the ordered unique range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE map(ordered_unique_range_t, std::initializer_list il, const Compare& comp) - : base_t(ordered_range, il.begin(), il.end(), comp) - {} - - //! Effects: Constructs an empty map using the specified comparison object and - //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, std::initializer_list il - , const Compare& comp, const allocator_type& a) - : base_t(ordered_range, il.begin(), il.end(), comp, a) - {} - -#endif - - //! Effects: Copy constructs a map. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE map(const map& x) - : base_t(static_cast(x)) - {} - - //! Effects: Move constructs a map. Constructs *this using x's resources. - //! - //! Complexity: Constant. - //! - //! Postcondition: x is emptied. - BOOST_CONTAINER_FORCEINLINE map(BOOST_RV_REF(map) x) - BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible::value) - : base_t(BOOST_MOVE_BASE(base_t, x)) - {} - - //! Effects: Copy constructs a map using the specified allocator. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE map(const map& x, const allocator_type &a) - : base_t(static_cast(x), a) - {} - - //! Effects: Move constructs a map using the specified allocator. - //! Constructs *this using x's resources. - //! - //! Complexity: Constant if x == x.get_allocator(), linear otherwise. - //! - //! Postcondition: x is emptied. - BOOST_CONTAINER_FORCEINLINE map(BOOST_RV_REF(map) x, const allocator_type &a) - : base_t(BOOST_MOVE_BASE(base_t, x), a) - {} - - //! Effects: Makes *this a copy of x. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE map& operator=(BOOST_COPY_ASSIGN_REF(map) x) - { return static_cast(this->base_t::operator=(static_cast(x))); } - - //! Effects: this->swap(x.get()). - //! - //! Throws: If allocator_traits_type::propagate_on_container_move_assignment - //! is false and (allocation throws or value_type's move constructor throws) - //! - //! Complexity: Constant if allocator_traits_type:: - //! propagate_on_container_move_assignment is true or - //! this->get>allocator() == x.get_allocator(). Linear otherwise. - BOOST_CONTAINER_FORCEINLINE map& operator=(BOOST_RV_REF(map) x) - BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || - allocator_traits_type::is_always_equal::value) && - boost::container::container_detail::is_nothrow_move_assignable::value) - { return static_cast(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Assign content of il to *this. - //! - BOOST_CONTAINER_FORCEINLINE map& operator=(std::initializer_list il) - { - this->clear(); - insert(il.begin(), il.end()); - return *this; - } -#endif - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Returns a copy of the allocator that - //! was passed to the object's constructor. - //! - //! Complexity: Constant. - allocator_type get_allocator() const; - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns an iterator to the first element contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - iterator begin() BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a const_iterator to the first element contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a const_iterator to the first element contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns an iterator to the end of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - iterator end() BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a const_iterator to the end of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a const_iterator to the end of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a reverse_iterator pointing to the beginning - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a reverse_iterator pointing to the end - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns true if the container contains no elements. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - bool empty() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns the number of the elements contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - size_type size() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns the largest possible size of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW; - - #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: If there is no key equivalent to x in the map, inserts - //! value_type(x, T()) into the map. - //! - //! Returns: A reference to the mapped_type corresponding to x in *this. - //! - //! Complexity: Logarithmic. - mapped_type& operator[](const key_type &k); - - //! Effects: If there is no key equivalent to x in the map, inserts - //! value_type(boost::move(x), T()) into the map (the key is move-constructed) - //! - //! Returns: A reference to the mapped_type corresponding to x in *this. - //! - //! Complexity: Logarithmic. - mapped_type& operator[](key_type &&k); - #elif defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN) - //in compilers like GCC 3.4, we can't catch temporaries - BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); } - BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](BOOST_RV_REF(key_type) k) { return this->priv_subscript(::boost::move(k)); } - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH( operator[] , key_type, mapped_type&, this->priv_subscript) - #endif - - //! Effects: If a key equivalent to k already exists in the container, assigns forward(obj) - //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value - //! as if by insert, constructing it from value_type(k, forward(obj)). - //! - //! No iterators or references are invalidated. If the insertion is successful, pointers and references - //! to the element obtained while it is held in the node handle are invalidated, and pointers and - //! references obtained to that element before it was extracted become valid. - //! - //! Returns: The bool component is true if the insertion took place and false if the assignment - //! took place. The iterator component is pointing at the element that was inserted or updated. - //! - //! Complexity: Logarithmic in the size of the container. - template - BOOST_CONTAINER_FORCEINLINE std::pair insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj) - { return this->base_t::insert_or_assign(const_iterator(), k, ::boost::forward(obj)); } - - //! Effects: If a key equivalent to k already exists in the container, assigns forward(obj) - //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value - //! as if by insert, constructing it from value_type(k, move(obj)). - //! - //! No iterators or references are invalidated. If the insertion is successful, pointers and references - //! to the element obtained while it is held in the node handle are invalidated, and pointers and - //! references obtained to that element before it was extracted become valid. - //! - //! Returns: The bool component is true if the insertion took place and false if the assignment - //! took place. The iterator component is pointing at the element that was inserted or updated. - //! - //! Complexity: Logarithmic in the size of the container. - template - BOOST_CONTAINER_FORCEINLINE std::pair insert_or_assign(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj) - { return this->base_t::insert_or_assign(const_iterator(), ::boost::move(k), ::boost::forward(obj)); } - - //! Effects: If a key equivalent to k already exists in the container, assigns forward(obj) - //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value - //! as if by insert, constructing it from value_type(k, forward(obj)) and the new element - //! to the container as close as possible to the position just before hint. - //! - //! No iterators or references are invalidated. If the insertion is successful, pointers and references - //! to the element obtained while it is held in the node handle are invalidated, and pointers and - //! references obtained to that element before it was extracted become valid. - //! - //! Returns: The bool component is true if the insertion took place and false if the assignment - //! took place. The iterator component is pointing at the element that was inserted or updated. - //! - //! Complexity: Logarithmic in the size of the container in general, but amortized constant if - //! the new element is inserted just before hint. - template - BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, const key_type& k, BOOST_FWD_REF(M) obj) - { return this->base_t::insert_or_assign(hint, k, ::boost::forward(obj)); } - - //! Effects: If a key equivalent to k already exists in the container, assigns forward(obj) - //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value - //! as if by insert, constructing it from value_type(k, move(obj)) and the new element - //! to the container as close as possible to the position just before hint. - //! - //! No iterators or references are invalidated. If the insertion is successful, pointers and references - //! to the element obtained while it is held in the node handle are invalidated, and pointers and - //! references obtained to that element before it was extracted become valid. - //! - //! Returns: The bool component is true if the insertion took place and false if the assignment - //! took place. The iterator component is pointing at the element that was inserted or updated. - //! - //! Complexity: Logarithmic in the size of the container in general, but amortized constant if - //! the new element is inserted just before hint. - template - BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj) - { return this->base_t::insert_or_assign(hint, ::boost::move(k), ::boost::forward(obj)); } - - //! Returns: A reference to the element whose key is equivalent to x. - //! Throws: An exception object of type out_of_range if no such element is present. - //! Complexity: logarithmic. - T& at(const key_type& k) - { - iterator i = this->find(k); - if(i == this->end()){ - throw_out_of_range("map::at key not found"); - } - return i->second; - } - - //! Returns: A reference to the element whose key is equivalent to x. - //! Throws: An exception object of type out_of_range if no such element is present. - //! Complexity: logarithmic. - const T& at(const key_type& k) const - { - const_iterator i = this->find(k); - if(i == this->end()){ - throw_out_of_range("map::at key not found"); - } - return i->second; - } - - ////////////////////////////////////////////// - // - // modifiers - // - ////////////////////////////////////////////// - - //! Effects: Inserts x if and only if there is no element in the container - //! with key equivalent to the key of x. - //! - //! Returns: The bool component of the returned pair is true if and only - //! if the insertion takes place, and the iterator component of the pair - //! points to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE std::pair insert(const value_type& x) - { return this->base_t::insert_unique(x); } - - //! Effects: Inserts a new value_type created from the pair if and only if - //! there is no element in the container with key equivalent to the key of x. - //! - //! Returns: The bool component of the returned pair is true if and only - //! if the insertion takes place, and the iterator component of the pair - //! points to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE std::pair insert(const nonconst_value_type& x) - { return this->try_emplace(x.first, x.second); } - - //! Effects: Inserts a new value_type move constructed from the pair if and - //! only if there is no element in the container with key equivalent to the key of x. - //! - //! Returns: The bool component of the returned pair is true if and only - //! if the insertion takes place, and the iterator component of the pair - //! points to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE std::pair insert(BOOST_RV_REF(nonconst_value_type) x) - { return this->try_emplace(boost::move(x.first), boost::move(x.second)); } - - //! Effects: Inserts a new value_type move constructed from the pair if and - //! only if there is no element in the container with key equivalent to the key of x. - //! - //! Returns: The bool component of the returned pair is true if and only - //! if the insertion takes place, and the iterator component of the pair - //! points to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE std::pair insert(BOOST_RV_REF(movable_value_type) x) - { return this->try_emplace(boost::move(x.first), boost::move(x.second)); } - - //! Effects: Move constructs a new value from x if and only if there is - //! no element in the container with key equivalent to the key of x. - //! - //! Returns: The bool component of the returned pair is true if and only - //! if the insertion takes place, and the iterator component of the pair - //! points to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE std::pair insert(BOOST_RV_REF(value_type) x) - { return this->base_t::insert_unique(boost::move(x)); } - - //! Effects: Inserts a copy of x in the container if and only if there is - //! no element in the container with key equivalent to the key of x. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic in general, but amortized constant if t - //! is inserted right before p. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x) - { return this->base_t::insert_unique(p, x); } - - //! Effects: Move constructs a new value from x if and only if there is - //! no element in the container with key equivalent to the key of x. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic in general, but amortized constant if t - //! is inserted right before p. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x) - { return this->try_emplace(p, boost::move(x.first), boost::move(x.second)); } - - //! Effects: Move constructs a new value from x if and only if there is - //! no element in the container with key equivalent to the key of x. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic in general, but amortized constant if t - //! is inserted right before p. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x) - { return this->try_emplace(p, boost::move(x.first), boost::move(x.second)); } - - //! Effects: Inserts a copy of x in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic. - iterator insert(const_iterator p, const nonconst_value_type& x) - { return this->try_emplace(p, x.first, x.second); } - - //! Effects: Inserts an element move constructed from x in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(value_type) x) - { return this->base_t::insert_unique(p, boost::move(x)); } - - //! Requires: first, last are not iterators into *this. - //! - //! Effects: inserts each element from the range [first,last) if and only - //! if there is no element with key equivalent to the key of that element. - //! - //! Complexity: At most N log(size()+N) (N is the distance from first to last) - template - BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last) - { this->base_t::insert_unique(first, last); } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: inserts each element from the range [il.begin(), il.end()) if and only - //! if there is no element with key equivalent to the key of that element. - //! - //! Complexity: At most N log(size()+N) (N is the distance from il.begin() to il.end()) - BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list il) - { this->base_t::insert_unique(il.begin(), il.end()); } -#endif - - //! Requires: nh is empty or this->get_allocator() == nh.get_allocator(). - //! - //! Effects: If nh is empty, has no effect. Otherwise, inserts the element owned - //! by nh if and only if there is no element in the container with a key equivalent to nh.key(). - //! - //! Returns: If nh is empty, insert_return_type.inserted is false, insert_return_type.position - //! is end(), and insert_return_type.node is empty. Otherwise if the insertion took place, - //! insert_return_type.inserted is true, insert_return_type.position points to the inserted element, - //! and insert_return_type.node is empty; if the insertion failed, insert_return_type.inserted is - //! false, insert_return_type.node has the previous value of nh, and insert_return_type.position - //! points to an element with a key equivalent to nh.key(). - //! - //! Complexity: Logarithmic - insert_return_type insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) - { - typename base_t::node_type n(boost::move(nh)); - typename base_t::insert_return_type base_ret(this->base_t::insert_unique_node(boost::move(n))); - return insert_return_type (base_ret.inserted, base_ret.position, boost::move(base_ret.node)); - } - - //! Effects: Same as `insert(node_type && nh)` but the element is inserted as close as possible - //! to the position just prior to "hint". - //! - //! Complexity: logarithmic in general, but amortized constant if the element is inserted - //! right before "hint". - insert_return_type insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) - { - typename base_t::node_type n(boost::move(nh)); - typename base_t::insert_return_type base_ret(this->base_t::insert_unique_node(hint, boost::move(n))); - return insert_return_type (base_ret.inserted, base_ret.position, boost::move(base_ret.node)); - } - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Inserts an object x of type T constructed with - //! std::forward(args)... in the container if and only if there is - //! no element in the container with an equivalent key. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: The bool component of the returned pair is true if and only - //! if the insertion takes place, and the iterator component of the pair - //! points to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic in general, but amortized constant if t - //! is inserted right before p. - template - BOOST_CONTAINER_FORCEINLINE std::pair emplace(BOOST_FWD_REF(Args)... args) - { return this->base_t::emplace_unique(boost::forward(args)...); } - - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... in the container if and only if there is - //! no element in the container with an equivalent key. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic in general, but amortized constant if t - //! is inserted right before p. - template - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) - { return this->base_t::emplace_hint_unique(p, boost::forward(args)...); } - - //! Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, - //! forward_as_tuple(k), forward_as_tuple(forward(args)...). - //! - //! Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise - //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k), - //! forward_as_tuple(forward(args)...). - //! - //! Returns: The bool component of the returned pair is true if and only if the - //! insertion took place. The returned iterator points to the map element whose key is equivalent to k. - //! - //! Complexity: Logarithmic. - template - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace(const key_type& k, BOOST_FWD_REF(Args)... args) - { return this->base_t::try_emplace(const_iterator(), k, boost::forward(args)...); } - - //! Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, - //! forward_as_tuple(k), forward_as_tuple(forward(args)...). - //! - //! Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise - //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k), - //! forward_as_tuple(forward(args)...). - //! - //! Returns: The returned iterator points to the map element whose key is equivalent to k. - //! - //! Complexity: Logarithmic in general, but amortized constant if value - //! is inserted right before p. - template - BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k, BOOST_FWD_REF(Args)... args) - { return this->base_t::try_emplace(hint, k, boost::forward(args)...).first; } - - //! Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, - //! forward_as_tuple(move(k)), forward_as_tuple(forward(args)...). - //! - //! Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise - //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)), - //! forward_as_tuple(forward(args)...). - //! - //! Returns: The bool component of the returned pair is true if and only if the - //! insertion took place. The returned iterator points to the map element whose key is equivalent to k. - //! - //! Complexity: Logarithmic. - template - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args) - { return this->base_t::try_emplace(const_iterator(), boost::move(k), boost::forward(args)...); } - - //! Requires: value_type shall be EmplaceConstructible into map from piecewise_construct, - //! forward_as_tuple(move(k)), forward_as_tuple(forward(args)...). - //! - //! Effects: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise - //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)), - //! forward_as_tuple(forward(args)...). - //! - //! Returns: The returned iterator points to the map element whose key is equivalent to k. - //! - //! Complexity: Logarithmic in general, but amortized constant if value - //! is inserted right before p. - template - BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args) - { return this->base_t::try_emplace(hint, boost::move(k), boost::forward(args)...).first; } - - #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #define BOOST_CONTAINER_MAP_EMPLACE_CODE(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE std::pair emplace(BOOST_MOVE_UREF##N)\ - { return this->base_t::emplace_unique(BOOST_MOVE_FWD##N); }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - { return this->base_t::emplace_hint_unique(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace(const key_type& k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - { return this->base_t::try_emplace(const_iterator(), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - { return this->base_t::try_emplace(hint, k BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first; }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE std::pair try_emplace(BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - { return this->base_t::try_emplace(const_iterator(), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - { return this->base_t::try_emplace(hint, boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first; }\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MAP_EMPLACE_CODE) - #undef BOOST_CONTAINER_MAP_EMPLACE_CODE - - #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Erases the element pointed to by p. - //! - //! Returns: Returns an iterator pointing to the element immediately - //! following q prior to the element being erased. If no such element exists, - //! returns end(). - //! - //! Complexity: Amortized constant time - iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Erases all elements in the container with key equivalent to x. - //! - //! Returns: Returns the number of erased elements. - //! - //! Complexity: log(size()) + count(k) - size_type erase(const key_type& x) BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Erases all the elements in the range [first, last). - //! - //! Returns: Returns last. - //! - //! Complexity: log(size())+N where N is the distance from first to last. - iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW; - - #endif - - //! Effects: Removes the first element in the container with key equivalent to k. - //! - //! Returns: A node_type owning the element if found, otherwise an empty node_type. - //! - //! Complexity: log(a.size()). - node_type extract(const key_type& k) - { - typename base_t::node_type base_nh(this->base_t::extract(k)); - node_type nh(boost::move(base_nh)); - return BOOST_MOVE_RET(node_type, nh); - } - - //! Effects: Removes the element pointed to by "position". - //! - //! Returns: A node_type owning the element, otherwise an empty node_type. - //! - //! Complexity: Amortized constant. - node_type extract(const_iterator position) - { - typename base_t::node_type base_nh(this->base_t::extract(position)); - node_type nh(boost::move(base_nh)); - return BOOST_MOVE_RET(node_type, nh); - } - - //! Requires: this->get_allocator() == source.get_allocator(). - //! - //! Effects: Attempts to extract each element in source and insert it into a using - //! the comparison object of *this. If there is an element in a with key equivalent to the - //! key of an element from source, then that element is not extracted from source. - //! - //! Postcondition: Pointers and references to the transferred elements of source refer - //! to those same elements but as members of *this. Iterators referring to the transferred - //! elements will continue to refer to their elements, but they now behave as iterators into *this, - //! not into source. - //! - //! Throws: Nothing unless the comparison object throws. - //! - //! Complexity: N log(a.size() + N) (N has the value source.size()) - template - BOOST_CONTAINER_FORCEINLINE void merge(map& source) - { - typedef container_detail::tree - base2_t; - this->merge_unique(static_cast(source)); - } - - //! @copydoc ::boost::container::map::merge(map&) - template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG map BOOST_RV_REF_END source) - { return this->merge(static_cast&>(source)); } - - //! @copydoc ::boost::container::map::merge(map&) - template - BOOST_CONTAINER_FORCEINLINE void merge(multimap& source) - { - typedef container_detail::tree - base2_t; - this->base_t::merge_unique(static_cast(source)); - } - - //! @copydoc ::boost::container::map::merge(map&) - template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multimap BOOST_RV_REF_END source) - { return this->merge(static_cast&>(source)); } - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: Swaps the contents of *this and x. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - void swap(map& x) - BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value - && boost::container::container_detail::is_nothrow_swappable::value ) - - //! Effects: erase(a.begin(),a.end()). - //! - //! Postcondition: size() == 0. - //! - //! Complexity: linear in size(). - void clear() BOOST_NOEXCEPT_OR_NOTHROW; - - //! Effects: Returns the comparison object out - //! of which a was constructed. - //! - //! Complexity: Constant. - key_compare key_comp() const; - - //! Effects: Returns an object of value_compare constructed out - //! of the comparison object. - //! - //! Complexity: Constant. - value_compare value_comp() const; - - //! Returns: An iterator pointing to an element with the key - //! equivalent to x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic. - iterator find(const key_type& x); - - //! Returns: A const_iterator pointing to an element with the key - //! equivalent to x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic. - const_iterator find(const key_type& x) const; - - #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Returns: The number of elements with key equivalent to x. - //! - //! Complexity: log(size())+count(k) - BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const - { return static_cast(this->find(x) != this->cend()); } - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Returns: An iterator pointing to the first element with key not less - //! than k, or a.end() if such an element is not found. - //! - //! Complexity: Logarithmic - iterator lower_bound(const key_type& x); - - //! Returns: A const iterator pointing to the first element with key not - //! less than k, or a.end() if such an element is not found. - //! - //! Complexity: Logarithmic - const_iterator lower_bound(const key_type& x) const; - - //! Returns: An iterator pointing to the first element with key not less - //! than x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic - iterator upper_bound(const key_type& x); - - //! Returns: A const iterator pointing to the first element with key not - //! less than x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic - const_iterator upper_bound(const key_type& x) const; - - //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). - //! - //! Complexity: Logarithmic - std::pair equal_range(const key_type& x); - - //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). - //! - //! Complexity: Logarithmic - std::pair equal_range(const key_type& x) const; - - //! Effects: Rebalances the tree. It's a no-op for Red-Black and AVL trees. - //! - //! Complexity: Linear - void rebalance(); - - //! Effects: Returns true if x and y are equal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator==(const map& x, const map& y); - - //! Effects: Returns true if x and y are unequal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator!=(const map& x, const map& y); - - //! Effects: Returns true if x is less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<(const map& x, const map& y); - - //! Effects: Returns true if x is greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>(const map& x, const map& y); - - //! Effects: Returns true if x is equal or less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<=(const map& x, const map& y); - - //! Effects: Returns true if x is equal or greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>=(const map& x, const map& y); - - //! Effects: x.swap(y) - //! - //! Complexity: Constant. - friend void swap(map& x, map& y); - - #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - template - BOOST_CONTAINER_FORCEINLINE mapped_type& priv_subscript(BOOST_FWD_REF(KeyConvertible) k) - { - return this->try_emplace(boost::forward(k)).first->second; - } - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -}; - - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -} //namespace container { - -//!has_trivial_destructor_after_move<> == true_type -//!specialization for optimizations -template -struct has_trivial_destructor_after_move > -{ - typedef typename ::boost::container::allocator_traits::pointer pointer; - static const bool value = ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value; -}; - -namespace container { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! A multimap is a kind of associative container that supports equivalent keys -//! (possibly containing multiple copies of the same key value) and provides for -//! fast retrieval of values of another type T based on the keys. The multimap class -//! supports bidirectional iterators. -//! -//! A multimap satisfies all of the requirements of a container and of a reversible -//! container and of an associative container. The value_type stored -//! by this container is the value_type is std::pair. -//! -//! \tparam Key is the key_type of the map -//! \tparam Value is the mapped_type -//! \tparam Compare is the ordering function for Keys (e.g. std::less). -//! \tparam Allocator is the allocator to allocate the value_types -//! (e.g. allocator< std::pair > ). -//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options. -template < class Key, class T, class Compare = std::less - , class Allocator = new_allocator< std::pair< const Key, T> >, class Options = tree_assoc_defaults> -#else -template -#endif -class multimap - ///@cond - : public container_detail::tree - < std::pair - , container_detail::select1st - , Compare, Allocator, Options> - ///@endcond -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - BOOST_COPYABLE_AND_MOVABLE(multimap) - - typedef container_detail::select1st select_1st_t; - typedef std::pair value_type_impl; - typedef container_detail::tree - base_t; - typedef container_detail::pair movable_value_type_impl; - typedef typename base_t::value_compare value_compare_impl; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - typedef ::boost::container::allocator_traits allocator_traits_type; - - public: - ////////////////////////////////////////////// - // - // types - // - ////////////////////////////////////////////// - - typedef Key key_type; - typedef T mapped_type; - typedef typename boost::container::allocator_traits::value_type value_type; - typedef typename boost::container::allocator_traits::pointer pointer; - typedef typename boost::container::allocator_traits::const_pointer const_pointer; - typedef typename boost::container::allocator_traits::reference reference; - typedef typename boost::container::allocator_traits::const_reference const_reference; - typedef typename boost::container::allocator_traits::size_type size_type; - typedef typename boost::container::allocator_traits::difference_type difference_type; - typedef Allocator allocator_type; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type; - typedef BOOST_CONTAINER_IMPDEF(value_compare_impl) value_compare; - typedef Compare key_compare; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator; - typedef std::pair nonconst_value_type; - typedef BOOST_CONTAINER_IMPDEF(movable_value_type_impl) movable_value_type; - typedef BOOST_CONTAINER_IMPDEF(node_handle< - typename base_t::stored_allocator_type - BOOST_MOVE_I pair_key_mapped_of_value - >) node_type; - - //allocator_type::value_type type must be std::pair - BOOST_STATIC_ASSERT((container_detail::is_same >::value)); - - ////////////////////////////////////////////// - // - // construct/copy/destroy - // - ////////////////////////////////////////////// - - //! Effects: Default constructs an empty multimap. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE multimap() - BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible::value && - container_detail::is_nothrow_default_constructible::value) - : base_t() - {} - - //! Effects: Constructs an empty multimap using the specified allocator - //! object and allocator. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit multimap(const allocator_type& a) - : base_t(a) - {} - - //! Effects: Constructs an empty multimap using the specified comparison. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit multimap(const Compare& comp) - : base_t(comp) - {} - - //! Effects: Constructs an empty multimap using the specified comparison and allocator. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE multimap(const Compare& comp, const allocator_type& a) - : base_t(comp, a) - {} - - //! Effects: Constructs an empty multimap and - //! inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last) - : base_t(false, first, last) - {} - - //! Effects: Constructs an empty multimap using the specified - //! allocator, and inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last, const allocator_type& a) - : base_t(false, first, last, Compare(), a) - {} - - //! Effects: Constructs an empty multimap using the specified comparison object and - //! inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last, const Compare& comp) - : base_t(false, first, last, comp) - {} - - //! Effects: Constructs an empty multimap using the specified comparison object - //! and allocator, and inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last, - const Compare& comp, const allocator_type& a) - : base_t(false, first, last, comp, a) - {} - - //! Effects: Constructs an empty multimap and - //! inserts elements from the ordered range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last) - : base_t(ordered_range, first, last) - {} - - //! Effects: Constructs an empty multimap using the specified comparison object and - //! inserts elements from the ordered range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp) - : base_t(ordered_range, first, last, comp) - {} - - //! Effects: Constructs an empty multimap using the specified comparison object and - //! allocator, and inserts elements from the ordered range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, - const allocator_type& a) - : base_t(ordered_range, first, last, comp, a) - {} - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Constructs an empty multimap and - //! and inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is il.first() - il.end(). - BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list il) - : base_t(false, il.begin(), il.end()) - {} - - //! Effects: Constructs an empty multimap using the specified - //! allocator, and inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is il.first() - il.end(). - BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list il, const allocator_type& a) - : base_t(false, il.begin(), il.end(), Compare(), a) - {} - - //! Effects: Constructs an empty multimap using the specified comparison object and - //! inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is il.first() - il.end(). - BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list il, const Compare& comp) - : base_t(false, il.begin(), il.end(), comp) - {} - - //! Effects: Constructs an empty multimap using the specified comparison object and - //! allocator, and inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is il.first() - il.end(). - BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list il, const Compare& comp, const allocator_type& a) - : base_t(false, il.begin(), il.end(), comp, a) - {} - - - //! Effects: Constructs an empty map and - //! inserts elements from the ordered range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, std::initializer_list il) - : base_t(ordered_range, il.begin(), il.end()) - {} - - //! Effects: Constructs an empty map using the specified comparison object and - //! inserts elements from the ordered range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, std::initializer_list il, const Compare& comp) - : base_t(ordered_range, il.begin(), il.end(), comp) - {} - - //! Effects: Constructs an empty map and - //! inserts elements from the ordered range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) - : base_t(ordered_range, il.begin(), il.end(), comp, a) - {} - -#endif - - //! Effects: Copy constructs a multimap. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE multimap(const multimap& x) - : base_t(static_cast(x)) - {} - - //! Effects: Move constructs a multimap. Constructs *this using x's resources. - //! - //! Complexity: Constant. - //! - //! Postcondition: x is emptied. - BOOST_CONTAINER_FORCEINLINE multimap(BOOST_RV_REF(multimap) x) - BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible::value) - : base_t(BOOST_MOVE_BASE(base_t, x)) - {} - - //! Effects: Copy constructs a multimap. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE multimap(const multimap& x, const allocator_type &a) - : base_t(static_cast(x), a) - {} - - //! Effects: Move constructs a multimap using the specified allocator. - //! Constructs *this using x's resources. - //! Complexity: Constant if a == x.get_allocator(), linear otherwise. - //! - //! Postcondition: x is emptied. - BOOST_CONTAINER_FORCEINLINE multimap(BOOST_RV_REF(multimap) x, const allocator_type &a) - : base_t(BOOST_MOVE_BASE(base_t, x), a) - {} - - //! Effects: Makes *this a copy of x. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE multimap& operator=(BOOST_COPY_ASSIGN_REF(multimap) x) - { return static_cast(this->base_t::operator=(static_cast(x))); } - - //! Effects: this->swap(x.get()). - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE multimap& operator=(BOOST_RV_REF(multimap) x) - BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || - allocator_traits_type::is_always_equal::value) && - boost::container::container_detail::is_nothrow_move_assignable::value) - { return static_cast(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Assign content of il to *this. - //! - BOOST_CONTAINER_FORCEINLINE multimap& operator=(std::initializer_list il) - { - this->clear(); - insert(il.begin(), il.end()); - return *this; - } -#endif - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! @copydoc ::boost::container::set::get_allocator() - allocator_type get_allocator() const; - - //! @copydoc ::boost::container::set::get_stored_allocator() - stored_allocator_type &get_stored_allocator(); - - //! @copydoc ::boost::container::set::get_stored_allocator() const - const stored_allocator_type &get_stored_allocator() const; - - //! @copydoc ::boost::container::set::begin() - iterator begin(); - - //! @copydoc ::boost::container::set::begin() const - const_iterator begin() const; - - //! @copydoc ::boost::container::set::cbegin() const - const_iterator cbegin() const; - - //! @copydoc ::boost::container::set::end() - iterator end() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::end() const - const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::cend() const - const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::rbegin() - reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::rbegin() const - const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::crbegin() const - const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::rend() - reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::rend() const - const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::crend() const - const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::empty() const - bool empty() const; - - //! @copydoc ::boost::container::set::size() const - size_type size() const; - - //! @copydoc ::boost::container::set::max_size() const - size_type max_size() const; - - #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic in general, but amortized constant if t - //! is inserted right before p. - template - BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_FWD_REF(Args)... args) - { return this->base_t::emplace_equal(boost::forward(args)...); } - - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic in general, but amortized constant if t - //! is inserted right before p. - template - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) - { return this->base_t::emplace_hint_equal(p, boost::forward(args)...); } - - #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #define BOOST_CONTAINER_MULTIMAP_EMPLACE_CODE(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\ - { return this->base_t::emplace_equal(BOOST_MOVE_FWD##N); }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - { return this->base_t::emplace_hint_equal(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MULTIMAP_EMPLACE_CODE) - #undef BOOST_CONTAINER_MULTIMAP_EMPLACE_CODE - - #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - //! Effects: Inserts x and returns the iterator pointing to the - //! newly inserted element. - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE iterator insert(const value_type& x) - { return this->base_t::insert_equal(x); } - - //! Effects: Inserts a new value constructed from x and returns - //! the iterator pointing to the newly inserted element. - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE iterator insert(const nonconst_value_type& x) - { return this->base_t::emplace_equal(x); } - - //! Effects: Inserts a new value move-constructed from x and returns - //! the iterator pointing to the newly inserted element. - //! - //! Complexity: Logarithmic. - BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF(nonconst_value_type) x) - { return this->base_t::emplace_equal(boost::move(x)); } - - //! Effects: Inserts a new value move-constructed from x and returns - //! the iterator pointing to the newly inserted element. - //! - //! Complexity: Logarithmic. - iterator insert(BOOST_RV_REF(movable_value_type) x) - { return this->base_t::emplace_equal(boost::move(x)); } - - //! Effects: Inserts a copy of x in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic in general, but amortized constant if t - //! is inserted right before p. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x) - { return this->base_t::insert_equal(p, x); } - - //! Effects: Inserts a new value constructed from x in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic in general, but amortized constant if t - //! is inserted right before p. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const nonconst_value_type& x) - { return this->base_t::emplace_hint_equal(p, x); } - - //! Effects: Inserts a new value move constructed from x in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic in general, but amortized constant if t - //! is inserted right before p. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x) - { return this->base_t::emplace_hint_equal(p, boost::move(x)); } - - //! Effects: Inserts a new value move constructed from x in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic in general, but amortized constant if t - //! is inserted right before p. - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x) - { return this->base_t::emplace_hint_equal(p, boost::move(x)); } - - //! Requires: first, last are not iterators into *this. - //! - //! Effects: inserts each element from the range [first,last) . - //! - //! Complexity: At most N log(size()+N) (N is the distance from first to last) - template - BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last) - { this->base_t::insert_equal(first, last); } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: inserts each element from the range [il.begin(), il.end(). - //! - //! Complexity: At most N log(size()+N) (N is the distance from il.begin() to il.end()) - BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list il) - { this->base_t::insert_equal(il.begin(), il.end()); } -#endif - - //! Requires: nh is empty or this->get_allocator() == nh.get_allocator(). - //! - //! Effects/Returns: If nh is empty, has no effect and returns end(). Otherwise, inserts - //! the element owned by nh and returns an iterator pointing to the newly inserted element. - //! If a range containing elements with keys equivalent to nh.key() exists, - //! the element is inserted at the end of that range. nh is always emptied. - //! - //! Complexity: Logarithmic - iterator insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) - { - typename base_t::node_type n(boost::move(nh)); - return this->base_t::insert_equal_node(boost::move(n)); - } - - //! Effects: Same as `insert(node_type && nh)` but the element is inserted as close as possible - //! to the position just prior to "hint". - //! - //! Complexity: logarithmic in general, but amortized constant if the element is inserted - //! right before "hint". - iterator insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) - { - typename base_t::node_type n(boost::move(nh)); - return this->base_t::insert_equal_node(hint, boost::move(n)); - } - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! @copydoc ::boost::container::set::erase(const_iterator) - iterator erase(const_iterator p); - - //! @copydoc ::boost::container::set::erase(const key_type&) - size_type erase(const key_type& x); - - //! @copydoc ::boost::container::set::erase(const_iterator,const_iterator) - iterator erase(const_iterator first, const_iterator last); - #endif - - //! @copydoc ::boost::container::map::extract(const key_type&) - node_type extract(const key_type& k) - { - typename base_t::node_type base_nh(this->base_t::extract(k)); - return node_type(boost::move(base_nh)); - } - - //! @copydoc ::boost::container::map::extract(const_iterator) - node_type extract(const_iterator position) - { - typename base_t::node_type base_nh(this->base_t::extract(position)); - return node_type (boost::move(base_nh)); - } - - //! Requires: this->get_allocator() == source.get_allocator(). - //! - //! Effects: Extracts each element in source and insert it into a using - //! the comparison object of *this. - //! - //! Postcondition: Pointers and references to the transferred elements of source refer - //! to those same elements but as members of *this. Iterators referring to the transferred - //! elements will continue to refer to their elements, but they now behave as iterators into *this, - //! not into source. - //! - //! Throws: Nothing unless the comparison object throws. - //! - //! Complexity: N log(a.size() + N) (N has the value source.size()) - template - BOOST_CONTAINER_FORCEINLINE void merge(multimap& source) - { - typedef container_detail::tree - base2_t; - this->base_t::merge_equal(static_cast(source)); - } - - //! @copydoc ::boost::container::multimap::merge(multimap&) - template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multimap BOOST_RV_REF_END source) - { return this->merge(static_cast&>(source)); } - - //! @copydoc ::boost::container::multimap::merge(multimap&) - template - BOOST_CONTAINER_FORCEINLINE void merge(map& source) - { - typedef container_detail::tree - base2_t; - this->base_t::merge_equal(static_cast(source)); - } - - //! @copydoc ::boost::container::multimap::merge(multimap&) - template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG map BOOST_RV_REF_END source) - { return this->merge(static_cast&>(source)); } - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! @copydoc ::boost::container::set::swap - void swap(multiset& x) - BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value - && boost::container::container_detail::is_nothrow_swappable::value ); - - //! @copydoc ::boost::container::set::clear - void clear() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::key_comp - key_compare key_comp() const; - - //! @copydoc ::boost::container::set::value_comp - value_compare value_comp() const; - - //! Returns: An iterator pointing to an element with the key - //! equivalent to x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic. - iterator find(const key_type& x); - - //! Returns: A const iterator pointing to an element with the key - //! equivalent to x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic. - const_iterator find(const key_type& x) const; - - //! Returns: The number of elements with key equivalent to x. - //! - //! Complexity: log(size())+count(k) - size_type count(const key_type& x) const; - - //! Returns: An iterator pointing to the first element with key not less - //! than k, or a.end() if such an element is not found. - //! - //! Complexity: Logarithmic - iterator lower_bound(const key_type& x); - - //! Returns: A const iterator pointing to the first element with key not - //! less than k, or a.end() if such an element is not found. - //! - //! Complexity: Logarithmic - const_iterator lower_bound(const key_type& x) const; - - //! Returns: An iterator pointing to the first element with key not less - //! than x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic - iterator upper_bound(const key_type& x); - - //! Returns: A const iterator pointing to the first element with key not - //! less than x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic - const_iterator upper_bound(const key_type& x) const; - - //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). - //! - //! Complexity: Logarithmic - std::pair equal_range(const key_type& x); - - //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). - //! - //! Complexity: Logarithmic - std::pair equal_range(const key_type& x) const; - - //! Effects: Rebalances the tree. It's a no-op for Red-Black and AVL trees. - //! - //! Complexity: Linear - void rebalance(); - - //! Effects: Returns true if x and y are equal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator==(const multimap& x, const multimap& y); - - //! Effects: Returns true if x and y are unequal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator!=(const multimap& x, const multimap& y); - - //! Effects: Returns true if x is less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<(const multimap& x, const multimap& y); - - //! Effects: Returns true if x is greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>(const multimap& x, const multimap& y); - - //! Effects: Returns true if x is equal or less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<=(const multimap& x, const multimap& y); - - //! Effects: Returns true if x is equal or greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>=(const multimap& x, const multimap& y); - - //! Effects: x.swap(y) - //! - //! Complexity: Constant. - friend void swap(multimap& x, multimap& y); - - #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) -}; - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -} //namespace container { - -//!has_trivial_destructor_after_move<> == true_type -//!specialization for optimizations -template -struct has_trivial_destructor_after_move > -{ - typedef typename ::boost::container::allocator_traits::pointer pointer; - static const bool value = ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value; -}; - -namespace container { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -}} - -#include - -#endif // BOOST_CONTAINER_MAP_HPP - diff --git a/contrib/libboost/boost_1_65_0/boost/container/new_allocator.hpp b/contrib/libboost/boost_1_65_0/boost/container/new_allocator.hpp deleted file mode 100644 index 51065efa73a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/new_allocator.hpp +++ /dev/null @@ -1,179 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2014-2015. 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_NEW_ALLOCATOR_HPP -#define BOOST_CONTAINER_NEW_ALLOCATOR_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include -#include - -//!\file - -namespace boost { -namespace container { - -/// @cond - -template -struct new_allocator_bool -{ static const bool value = Value; }; - -template -class new_allocator; - -/// @endcond - -//! Specialization of new_allocator for void types -template<> -class new_allocator -{ - public: - typedef void value_type; - typedef void * pointer; - typedef const void* const_pointer; - //!A integral constant of type bool with value true - typedef BOOST_CONTAINER_IMPDEF(new_allocator_bool) propagate_on_container_move_assignment; - //!A integral constant of type bool with value true - typedef BOOST_CONTAINER_IMPDEF(new_allocator_bool) is_always_equal; - // reference-to-void members are impossible - - //!Obtains an new_allocator that allocates - //!objects of type T2 - template - struct rebind - { - typedef new_allocator< T2> other; - }; - - //!Default constructor - //!Never throws - new_allocator() BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!Constructor from other new_allocator. - //!Never throws - new_allocator(const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!Constructor from related new_allocator. - //!Never throws - template - new_allocator(const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!Swaps two allocators, does nothing - //!because this new_allocator is stateless - friend void swap(new_allocator &, new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!An new_allocator always compares to true, as memory allocated with one - //!instance can be deallocated by another instance - friend bool operator==(const new_allocator &, const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - { return true; } - - //!An new_allocator always compares to false, as memory allocated with one - //!instance can be deallocated by another instance - friend bool operator!=(const new_allocator &, const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - { return false; } -}; - - -//! This class is a reduced STL-compatible allocator that allocates memory using operator new -template -class new_allocator -{ - public: - typedef T value_type; - typedef T * pointer; - typedef const T * const_pointer; - typedef T & reference; - typedef const T & const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - //!A integral constant of type bool with value true - typedef BOOST_CONTAINER_IMPDEF(new_allocator_bool) propagate_on_container_move_assignment; - //!A integral constant of type bool with value true - typedef BOOST_CONTAINER_IMPDEF(new_allocator_bool) is_always_equal; - - //!Obtains an new_allocator that allocates - //!objects of type T2 - template - struct rebind - { - typedef new_allocator other; - }; - - //!Default constructor - //!Never throws - new_allocator() BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!Constructor from other new_allocator. - //!Never throws - new_allocator(const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!Constructor from related new_allocator. - //!Never throws - template - new_allocator(const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!Allocates memory for an array of count elements. - //!Throws std::bad_alloc if there is no enough memory - pointer allocate(size_type count) - { - if(BOOST_UNLIKELY(count > this->max_size())) - throw_bad_alloc(); - return static_cast(::operator new(count*sizeof(T))); - } - - //!Deallocates previously allocated memory. - //!Never throws - void deallocate(pointer ptr, size_type) BOOST_NOEXCEPT_OR_NOTHROW - { ::operator delete((void*)ptr); } - - //!Returns the maximum number of elements that could be allocated. - //!Never throws - size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW - { return size_type(-1)/sizeof(T); } - - //!Swaps two allocators, does nothing - //!because this new_allocator is stateless - friend void swap(new_allocator &, new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!An new_allocator always compares to true, as memory allocated with one - //!instance can be deallocated by another instance - friend bool operator==(const new_allocator &, const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - { return true; } - - //!An new_allocator always compares to false, as memory allocated with one - //!instance can be deallocated by another instance - friend bool operator!=(const new_allocator &, const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - { return false; } -}; - -} //namespace container { -} //namespace boost { - -#include - -#endif //BOOST_CONTAINER_NEW_ALLOCATOR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/node_allocator.hpp b/contrib/libboost/boost_1_65_0/boost/container/node_allocator.hpp deleted file mode 100644 index 7a6988c4b09..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/node_allocator.hpp +++ /dev/null @@ -1,341 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2008-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_POOLED_NODE_ALLOCATOR_HPP -#define BOOST_CONTAINER_POOLED_NODE_ALLOCATOR_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -namespace boost { -namespace container { - -//!An STL node allocator that uses a modified DlMalloc as memory -//!source. -//! -//!This node allocator shares a segregated storage between all instances -//!of node_allocator with equal sizeof(T). -//! -//!NodesPerBlock is the number of nodes allocated at once when the allocator -//!runs out of nodes -#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED -template - < class T - , std::size_t NodesPerBlock = NodeAlloc_nodes_per_block> -#else -template - < class T - , std::size_t NodesPerBlock - , std::size_t Version> -#endif -class node_allocator -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - //! If Version is 1, the allocator is a STL conforming allocator. If Version is 2, - //! the allocator offers advanced expand in place and burst allocation capabilities. - public: - typedef unsigned int allocation_type; - typedef node_allocator self_t; - - static const std::size_t nodes_per_block = NodesPerBlock; - - BOOST_STATIC_ASSERT((Version <=2)); - #endif - - public: - //------- - typedef T value_type; - typedef T * pointer; - typedef const T * const_pointer; - typedef typename ::boost::container:: - container_detail::unvoid_ref::type reference; - typedef typename ::boost::container:: - container_detail::unvoid_ref::type const_reference; - typedef std::size_t size_type; - typedef std::ptrdiff_t difference_type; - - typedef boost::container::container_detail:: - version_type version; - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - typedef boost::container::container_detail:: - basic_multiallocation_chain multiallocation_chain_void; - typedef boost::container::container_detail:: - transform_multiallocation_chain - multiallocation_chain; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - //!Obtains node_allocator from - //!node_allocator - template - struct rebind - { - typedef node_allocator< T2, NodesPerBlock - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - , Version - #endif - > other; - }; - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - //!Not assignable from related node_allocator - template - node_allocator& operator= - (const node_allocator&); - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - - //!Default constructor - node_allocator() BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!Copy constructor from other node_allocator. - node_allocator(const node_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!Copy constructor from related node_allocator. - template - node_allocator - (const node_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!Destructor - ~node_allocator() BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!Returns the number of elements that could be allocated. - //!Never throws - size_type max_size() const - { return size_type(-1)/sizeof(T); } - - //!Allocate memory for an array of count elements. - //!Throws std::bad_alloc if there is no enough memory - pointer allocate(size_type count, const void * = 0) - { - if(BOOST_UNLIKELY(count > this->max_size())) - boost::container::throw_bad_alloc(); - - if(Version == 1 && count == 1){ - typedef container_detail::shared_node_pool - shared_pool_t; - typedef container_detail::singleton_default singleton_t; - return pointer(static_cast(singleton_t::instance().allocate_node())); - } - else{ - void *ret = dlmalloc_malloc(count*sizeof(T)); - if(BOOST_UNLIKELY(!ret)) - boost::container::throw_bad_alloc(); - return static_cast(ret); - } - } - - //!Deallocate allocated memory. - //!Never throws - void deallocate(const pointer &ptr, size_type count) BOOST_NOEXCEPT_OR_NOTHROW - { - (void)count; - if(Version == 1 && count == 1){ - typedef container_detail::shared_node_pool - shared_pool_t; - typedef container_detail::singleton_default singleton_t; - singleton_t::instance().deallocate_node(ptr); - } - else{ - dlmalloc_free(ptr); - } - } - - //!Deallocates all free blocks of the pool - static void deallocate_free_blocks() BOOST_NOEXCEPT_OR_NOTHROW - { - typedef container_detail::shared_node_pool - shared_pool_t; - typedef container_detail::singleton_default singleton_t; - singleton_t::instance().deallocate_free_blocks(); - } - - pointer allocation_command - (allocation_type command, size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse) - { - BOOST_STATIC_ASSERT(( Version > 1 )); - pointer ret = this->priv_allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse); - if(BOOST_UNLIKELY(!ret && !(command & BOOST_CONTAINER_NOTHROW_ALLOCATION))) - boost::container::throw_bad_alloc(); - return ret; - } - - //!Returns maximum the number of objects the previously allocated memory - //!pointed by p can hold. - size_type size(pointer p) const BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_STATIC_ASSERT(( Version > 1 )); - return dlmalloc_size(p); - } - - //!Allocates just one object. Memory allocated with this function - //!must be deallocated only with deallocate_one(). - //!Throws bad_alloc if there is no enough memory - pointer allocate_one() - { - BOOST_STATIC_ASSERT(( Version > 1 )); - typedef container_detail::shared_node_pool - shared_pool_t; - typedef container_detail::singleton_default singleton_t; - return (pointer)singleton_t::instance().allocate_node(); - } - - //!Allocates many elements of size == 1. - //!Elements must be individually deallocated with deallocate_one() - void allocate_individual(std::size_t num_elements, multiallocation_chain &chain) - { - BOOST_STATIC_ASSERT(( Version > 1 )); - typedef container_detail::shared_node_pool - shared_pool_t; - typedef container_detail::singleton_default singleton_t; - typename shared_pool_t::multiallocation_chain ch; - singleton_t::instance().allocate_nodes(num_elements, ch); - chain.incorporate_after(chain.before_begin(), (T*)&*ch.begin(), (T*)&*ch.last(), ch.size()); - } - - //!Deallocates memory previously allocated with allocate_one(). - //!You should never use deallocate_one to deallocate memory allocated - //!with other functions different from allocate_one(). Never throws - void deallocate_one(pointer p) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_STATIC_ASSERT(( Version > 1 )); - typedef container_detail::shared_node_pool - shared_pool_t; - typedef container_detail::singleton_default singleton_t; - singleton_t::instance().deallocate_node(p); - } - - void deallocate_individual(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_STATIC_ASSERT(( Version > 1 )); - typedef container_detail::shared_node_pool - shared_pool_t; - typedef container_detail::singleton_default singleton_t; - typename shared_pool_t::multiallocation_chain ch(&*chain.begin(), &*chain.last(), chain.size()); - singleton_t::instance().deallocate_nodes(ch); - } - - //!Allocates many elements of size elem_size. - //!Elements must be individually deallocated with deallocate() - void allocate_many(size_type elem_size, std::size_t n_elements, multiallocation_chain &chain) - { - BOOST_STATIC_ASSERT(( Version > 1 )); - dlmalloc_memchain ch; - BOOST_CONTAINER_MEMCHAIN_INIT(&ch); - if(BOOST_UNLIKELY(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch))){ - boost::container::throw_bad_alloc(); - } - chain.incorporate_after( chain.before_begin() - , (T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch) - , (T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch) - , BOOST_CONTAINER_MEMCHAIN_SIZE(&ch)); - } - - //!Allocates n_elements elements, each one of size elem_sizes[i] - //!Elements must be individually deallocated with deallocate() - void allocate_many(const size_type *elem_sizes, size_type n_elements, multiallocation_chain &chain) - { - BOOST_STATIC_ASSERT(( Version > 1 )); - dlmalloc_memchain ch; - dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch); - if(BOOST_UNLIKELY(BOOST_CONTAINER_MEMCHAIN_EMPTY(&ch))){ - boost::container::throw_bad_alloc(); - } - chain.incorporate_after( chain.before_begin() - , (T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch) - , (T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch) - , BOOST_CONTAINER_MEMCHAIN_SIZE(&ch)); - } - - void deallocate_many(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_STATIC_ASSERT(( Version > 1 )); - void *first = &*chain.begin(); - void *last = &*chain.last(); - size_t num = chain.size(); - dlmalloc_memchain ch; - BOOST_CONTAINER_MEMCHAIN_INIT_FROM(&ch, first, last, num); - dlmalloc_multidealloc(&ch); - } - - //!Swaps allocators. Does not throw. If each allocator is placed in a - //!different memory segment, the result is undefined. - friend void swap(self_t &, self_t &) BOOST_NOEXCEPT_OR_NOTHROW - {} - - //!An allocator always compares to true, as memory allocated with one - //!instance can be deallocated by another instance - friend bool operator==(const node_allocator &, const node_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - { return true; } - - //!An allocator always compares to false, as memory allocated with one - //!instance can be deallocated by another instance - friend bool operator!=(const node_allocator &, const node_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - { return false; } - - private: - pointer priv_allocation_command - (allocation_type command, std::size_t limit_size - ,size_type &prefer_in_recvd_out_size - ,pointer &reuse) - { - std::size_t const preferred_size = prefer_in_recvd_out_size; - dlmalloc_command_ret_t ret = {0 , 0}; - if((limit_size > this->max_size()) | (preferred_size > this->max_size())){ - return pointer(); - } - std::size_t l_size = limit_size*sizeof(T); - std::size_t p_size = preferred_size*sizeof(T); - std::size_t r_size; - { - void* reuse_ptr_void = reuse; - ret = dlmalloc_allocation_command(command, sizeof(T), l_size, p_size, &r_size, reuse_ptr_void); - reuse = static_cast(reuse_ptr_void); - } - prefer_in_recvd_out_size = r_size/sizeof(T); - return (pointer)ret.first; - } -}; - -} //namespace container { -} //namespace boost { - -#include - -#endif //#ifndef BOOST_CONTAINER_POOLED_NODE_ALLOCATOR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/node_handle.hpp b/contrib/libboost/boost_1_65_0/boost/container/node_handle.hpp deleted file mode 100644 index 594a09c99e3..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/node_handle.hpp +++ /dev/null @@ -1,443 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2016-2016. 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_NODE_HANDLE_HPP -#define BOOST_CONTAINER_NODE_HANDLE_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - - -//!\file - -namespace boost { -namespace container { - -///@cond - -template -struct node_handle_keymapped_traits -{ - typedef typename KeyMapped::key_type key_type; - typedef typename KeyMapped::mapped_type mapped_type; -}; - -template -struct node_handle_keymapped_traits -{ - typedef Value key_type; - typedef Value mapped_type; -}; - -class node_handle_friend -{ - public: - - template - BOOST_CONTAINER_FORCEINLINE static void destroy_alloc(NH &nh) BOOST_NOEXCEPT - { nh.destroy_alloc(); } - - template - BOOST_CONTAINER_FORCEINLINE static typename NH::node_pointer &get_node_pointer(NH &nh) BOOST_NOEXCEPT - { return nh.get_node_pointer(); } -}; - - -///@endcond - -//! A node_handle is an object that accepts ownership of a single element from an associative container. -//! It may be used to transfer that ownership to another container with compatible nodes. Containers -//! with compatible nodes have the same node handle type. Elements may be transferred in either direction -//! between container types in the same row:. -//! -//! Container types with compatible nodes -//! -//! map <-> map -//! -//! map <-> multimap -//! -//! set <-> set -//! -//! set <-> multiset -//! -//! If a node handle is not empty, then it contains an allocator that is equal to the allocator of the container -//! when the element was extracted. If a node handle is empty, it contains no allocator. -template -class node_handle -{ - typedef NodeAllocator nallocator_type; - typedef allocator_traits nator_traits; - typedef typename nator_traits::value_type priv_node_t; - typedef typename priv_node_t::value_type priv_value_t; - typedef node_handle_keymapped_traits keymapped_t; - - public: - typedef priv_value_t value_type; - typedef typename keymapped_t::key_type key_type; - typedef typename keymapped_t::mapped_type mapped_type; - typedef typename nator_traits::template portable_rebind_alloc - ::type allocator_type; - - typedef priv_node_t container_node_type; - friend class node_handle_friend; - - ///@cond - private: - BOOST_MOVABLE_BUT_NOT_COPYABLE(node_handle) - - typedef typename nator_traits::pointer node_pointer; - typedef ::boost::aligned_storage - < sizeof(nallocator_type) - , boost::alignment_of::value> nalloc_storage_t; - - node_pointer m_ptr; - nalloc_storage_t m_nalloc_storage; - - void move_construct_alloc(nallocator_type &al) - { ::new(m_nalloc_storage.address(), boost_container_new_t()) nallocator_type(::boost::move(al)); } - - void destroy_deallocate_node() - { - nator_traits::destroy(this->node_alloc(), boost::movelib::to_raw_pointer(m_ptr)); - nator_traits::deallocate(this->node_alloc(), m_ptr, 1u); - } - - template - void move_construct_end(OtherNodeHandle &nh) - { - if(m_ptr){ - ::new (m_nalloc_storage.address(), boost_container_new_t()) nallocator_type(::boost::move(nh.node_alloc())); - node_handle_friend::destroy_alloc(nh); - node_handle_friend::get_node_pointer(nh) = node_pointer(); - } - BOOST_ASSERT(nh.empty()); - } - - void destroy_alloc() BOOST_NOEXCEPT - { static_cast(m_nalloc_storage.address())->~nallocator_type(); } - - node_pointer &get_node_pointer() BOOST_NOEXCEPT - { return m_ptr; } - - ///@endcond - - public: - //! Effects: Initializes m_ptr to nullptr. - //! - //! Postcondition: this->empty() - BOOST_CXX14_CONSTEXPR node_handle() BOOST_NOEXCEPT - : m_ptr() - { } - - //! Effects: Constructs a node_handle object initializing internal pointer with p. - //! If p != nullptr copy constructs internal allocator from al. - node_handle(node_pointer p, const nallocator_type &al) BOOST_NOEXCEPT - : m_ptr(p) - { - if(m_ptr){ - ::new (m_nalloc_storage.address(), boost_container_new_t()) nallocator_type(al); - } - } - - //! Effects: Constructs a node_handle object initializing internal pointer with a related nh's internal pointer - //! and assigns nullptr to the later. If nh's internal pointer was not nullptr, move constructs internal - //! allocator with nh's internal allocator and destroy nh's internal allocator. - //! - //! Postcondition: nh.empty() - //! - //! Note: Two node_handle's are related if only one of KeyMapped template parameter - //! of a node handle is void. - template - node_handle( BOOST_RV_REF_BEG node_handle BOOST_RV_REF_END nh - , typename container_detail::enable_if_c - < ((unsigned)container_detail::is_same::value + - (unsigned)container_detail::is_same::value) == 1u - >::type* = 0) BOOST_NOEXCEPT - : m_ptr(nh.get()) - { this->move_construct_end(nh); } - - //! Effects: Constructs a node_handle object initializing internal pointer with nh's internal pointer - //! and assigns nullptr to the later. If nh's internal pointer was not nullptr, move constructs internal - //! allocator with nh's internal allocator and destroy nh's internal allocator. - //! - //! Postcondition: nh.empty() - node_handle (BOOST_RV_REF(node_handle) nh) BOOST_NOEXCEPT - : m_ptr(nh.m_ptr) - { this->move_construct_end(nh); } - - //! Effects: If !this->empty(), destroys the value_type subobject in the container_node_type object - //! pointed to by c by calling allocator_traits::destroy, then deallocates m_ptr by calling - //! nator_traits::rebind_traits::deallocate. - ~node_handle() BOOST_NOEXCEPT - { - if(!this->empty()){ - this->destroy_deallocate_node(); - this->destroy_alloc(); - } - } - - //! Requires: Either this->empty(), or nator_traits::propagate_on_container_move_assignment is true, or - //! node_alloc() == nh.node_alloc(). - //! - //! Effects: If m_ptr != nullptr, destroys the value_type subobject in the container_node_type object - //! pointed to by m_ptr by calling nator_traits::destroy, then deallocates m_ptr by calling - //! nator_traits::deallocate. Assigns nh.m_ptr to m_ptr. If this->empty() - //! or nator_traits::propagate_on_container_move_assignment is true, move assigns nh.node_alloc() to - //! node_alloc(). Assigns nullptr to nh.m_ptr and assigns nullopt to nh.node_alloc(). - //! - //! Returns: *this. - //! - //! Throws: Nothing. - node_handle & operator=(BOOST_RV_REF(node_handle) nh) BOOST_NOEXCEPT - { - BOOST_ASSERT(this->empty() || nator_traits::propagate_on_container_move_assignment::value - || nator_traits::equal(node_alloc(), nh.node_alloc())); - - bool const was_this_non_null = !this->empty(); - bool const was_nh_non_null = !nh.empty(); - - if(was_nh_non_null){ - if(was_this_non_null){ - this->destroy_deallocate_node(); - if(nator_traits::propagate_on_container_move_assignment::value){ - this->node_alloc() = ::boost::move(nh.node_alloc()); - } - } - else{ - this->move_construct_alloc(nh.node_alloc()); - } - m_ptr = nh.m_ptr; - nh.m_ptr = node_pointer(); - nh.destroy_alloc(); - } - else if(was_this_non_null){ - this->destroy_deallocate_node(); - this->destroy_alloc(); - m_ptr = node_pointer(); - } - return *this; - } - - //! Requires: empty() == false. - //! - //! Returns: A reference to the value_type subobject in the container_node_type object pointed to by m_ptr - //! - //! Throws: Nothing. - value_type& value() const BOOST_NOEXCEPT - { - BOOST_STATIC_ASSERT((container_detail::is_same::value)); - BOOST_ASSERT(!empty()); - return m_ptr->get_data(); - } - - //! Requires: empty() == false. - //! - //! Returns: A non-const reference to the key_type member of the value_type subobject in the - //! container_node_type object pointed to by m_ptr. - //! - //! Throws: Nothing. - //! - //! Requires: Modifying the key through the returned reference is permitted. - key_type& key() const BOOST_NOEXCEPT - { - BOOST_STATIC_ASSERT((!container_detail::is_same::value)); - BOOST_ASSERT(!empty()); - return const_cast(KeyMapped().key_of_value(m_ptr->get_data())); - } - - //! Requires: empty() == false. - //! - //! Returns: A reference to the mapped_type member of the value_type subobject - //! in the container_node_type object pointed to by m_ptr - //! - //! Throws: Nothing. - mapped_type& mapped() const BOOST_NOEXCEPT - { - BOOST_STATIC_ASSERT((!container_detail::is_same::value)); - BOOST_ASSERT(!empty()); - return KeyMapped().mapped_of_value(m_ptr->get_data()); - } - - //! Requires: empty() == false. - //! - //! Returns: A copy of the internally hold allocator. - //! - //! Throws: Nothing. - allocator_type get_allocator() const - { - BOOST_ASSERT(!empty()); - return this->node_alloc(); - } - - //! Returns: m_ptr != nullptr. - //! - #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED - BOOST_CONTAINER_FORCEINLINE explicit operator bool - #else - private: struct bool_conversion {int for_bool; int for_arg(); }; typedef int bool_conversion::* explicit_bool_arg; - public: BOOST_CONTAINER_FORCEINLINE operator explicit_bool_arg - #endif - ()const BOOST_NOEXCEPT - { return m_ptr ? &bool_conversion::for_bool : explicit_bool_arg(0); } - - //! Returns: m_ptr == nullptr. - //! - bool empty() const BOOST_NOEXCEPT - { - return !this->m_ptr; - } - - //! Requires: this->empty(), or nh.empty(), or nator_traits::propagate_on_container_swap is true, or - //! node_alloc() == nh.node_alloc(). - //! - //! Effects: Calls swap(m_ptr, nh.m_ptr). If this->empty(), or nh.empty(), or nator_traits::propagate_on_- - //! container_swap is true calls swap(node_alloc(), nh.node_alloc()). - void swap(node_handle &nh) - BOOST_NOEXCEPT_IF(nator_traits::propagate_on_container_swap::value || nator_traits::is_always_equal::value) - { - BOOST_ASSERT(this->empty() || nh.empty() || nator_traits::propagate_on_container_swap::value - || nator_traits::equal(node_alloc(), nh.node_alloc())); - - bool const was_this_non_null = !this->empty(); - bool const was_nh_non_null = !nh.empty(); - - if(was_nh_non_null){ - if(was_this_non_null){ - if(nator_traits::propagate_on_container_swap::value){ - ::boost::adl_move_swap(this->node_alloc(), nh.node_alloc()); - } - } - else{ - this->move_construct_alloc(nh.node_alloc()); - nh.destroy_alloc(); - } - } - else if(was_this_non_null){ - nh.move_construct_alloc(this->node_alloc()); - this->destroy_alloc(); - } - ::boost::adl_move_swap(m_ptr, nh.m_ptr); - } - - //! Effects: If this->empty() returns nullptr, otherwise returns m_ptr - //! resets m_ptr to nullptr and destroys the internal allocator. - //! - //! Postcondition: this->empty() - //! - //! Note: Non-standard extensions - node_pointer release() BOOST_NOEXCEPT - { - node_pointer p(m_ptr); - m_ptr = node_pointer(); - if(p) - this->destroy_alloc(); - return p; - } - - //! Effects: Returns m_ptr. - //! - //! Note: Non-standard extensions - node_pointer get() const BOOST_NOEXCEPT - { - return m_ptr; - } - - //! Effects: Returns a reference to the internal node allocator. - //! - //! Note: Non-standard extensions - nallocator_type &node_alloc() BOOST_NOEXCEPT - { - BOOST_ASSERT(!empty()); - return *static_cast(m_nalloc_storage.address()); - } - - - //! Effects: Returns a reference to the internal node allocator. - //! - //! Note: Non-standard extensions - const nallocator_type &node_alloc() const BOOST_NOEXCEPT - { - BOOST_ASSERT(!empty()); - return *static_cast(m_nalloc_storage.address()); - } - - //! Effects: x.swap(y). - //! - friend void swap(node_handle & x, node_handle & y) BOOST_NOEXCEPT_IF(BOOST_NOEXCEPT(x.swap(y))) - { x.swap(y); } -}; - -//! A class template used to describe the results of inserting a -//! Container::node_type in a Container with unique keys. -//! Includes at least the following non-static public data members: -//! -//!
  • bool inserted
  • ; -//!
  • Iterator position
  • ; -//!
  • NodeType node
-//! -//! This type is MoveConstructible, MoveAssignable, DefaultConstructible, -//! Destructible, and lvalues of that type are swappable -template -struct insert_return_type_base -{ - private: - BOOST_MOVABLE_BUT_NOT_COPYABLE(insert_return_type_base) - - public: - insert_return_type_base() - : inserted(false), position(), node() - {} - - insert_return_type_base(BOOST_RV_REF(insert_return_type_base) other) - : inserted(other.inserted), position(other.position), node(boost::move(other.node)) - {} - - template - insert_return_type_base(bool insert, RelatedIt it, BOOST_RV_REF(RelatedNode) node) - : inserted(insert), position(it), node(boost::move(node)) - {} - - insert_return_type_base & operator=(BOOST_RV_REF(insert_return_type_base) other) - { - inserted = other.inserted; - position = other.position; - node = boost::move(other.node); - return *this; - } - - bool inserted; - Iterator position; - NodeType node; -}; - -} //namespace container { -} //namespace boost { - -#include - -#endif //BOOST_CONTAINER_NODE_HANDLE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/options.hpp b/contrib/libboost/boost_1_65_0/boost/container/options.hpp deleted file mode 100644 index da8b6a79523..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/options.hpp +++ /dev/null @@ -1,80 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2013-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/container for documentation. -// -///////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_OPTIONS_HPP -#define BOOST_CONTAINER_OPTIONS_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include - -namespace boost { -namespace container { - -#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - -template -struct tree_opt -{ - static const boost::container::tree_type_enum tree_type = TreeType; - static const bool optimize_size = OptimizeSize; -}; - -#endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - -//!This option setter specifies the underlying tree type -//!(red-black, AVL, Scapegoat or Splay) for ordered associative containers -BOOST_INTRUSIVE_OPTION_CONSTANT(tree_type, tree_type_enum, TreeType, tree_type) - -//!This option setter specifies if node size is optimized -//!storing rebalancing data masked into pointers for ordered associative containers -BOOST_INTRUSIVE_OPTION_CONSTANT(optimize_size, bool, Enabled, optimize_size) - -//! Helper metafunction to combine options into a single type to be used -//! by \c boost::container::set, \c boost::container::multiset -//! \c boost::container::map and \c boost::container::multimap. -//! Supported options are: \c boost::container::optimize_size and \c boost::container::tree_type -#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) || defined(BOOST_CONTAINER_VARIADIC_TEMPLATES) -template -#else -template -#endif -struct tree_assoc_options -{ - /// @cond - typedef typename ::boost::intrusive::pack_options - < tree_assoc_defaults, - #if !defined(BOOST_CONTAINER_VARIADIC_TEMPLATES) - O1, O2, O3, O4 - #else - Options... - #endif - >::type packed_options; - typedef tree_opt implementation_defined; - /// @endcond - typedef implementation_defined type; -}; - -} //namespace container { -} //namespace boost { - -#include - -#endif //#ifndef BOOST_CONTAINER_OPTIONS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/deque.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/deque.hpp deleted file mode 100644 index acb7da3d0de..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/deque.hpp +++ /dev/null @@ -1,45 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_DEQUE_HPP -#define BOOST_CONTAINER_PMR_DEQUE_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { -namespace pmr { - -#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - -template -using deque = boost::container::deque>; - -#endif - -//! A portable metafunction to obtain a deque -//! that uses a polymorphic allocator -template -struct deque_of -{ - typedef boost::container::deque - < T, polymorphic_allocator > type; -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#endif //BOOST_CONTAINER_PMR_DEQUE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/flat_map.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/flat_map.hpp deleted file mode 100644 index 150d5332f2b..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/flat_map.hpp +++ /dev/null @@ -1,67 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_FLAT_MAP_HPP -#define BOOST_CONTAINER_PMR_FLAT_MAP_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { -namespace pmr { - -#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - -template - ,class Options = tree_assoc_defaults > -using flat_map = boost::container::flat_map > >; - -template - ,class Options = tree_assoc_defaults > -using flat_multimap = boost::container::flat_multimap > >; - -#endif - -//! A portable metafunction to obtain a flat_map -//! that uses a polymorphic allocator -template - ,class Options = tree_assoc_defaults > -struct flat_map_of -{ - typedef boost::container::flat_map > > type; -}; - -//! A portable metafunction to obtain a flat_multimap -//! that uses a polymorphic allocator -template - ,class Options = tree_assoc_defaults > -struct flat_multimap_of -{ - typedef boost::container::flat_multimap > > type; -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#endif //BOOST_CONTAINER_PMR_FLAT_MAP_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/flat_set.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/flat_set.hpp deleted file mode 100644 index 6d4292bfb43..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/flat_set.hpp +++ /dev/null @@ -1,63 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_SET_HPP -#define BOOST_CONTAINER_PMR_SET_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { -namespace pmr { - -#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - -template - ,class Options = tree_assoc_defaults > -using flat_set = boost::container::flat_set >; - -template - ,class Options = tree_assoc_defaults > -using flat_multiset = boost::container::flat_multiset >; - -#endif - -//! A portable metafunction to obtain a flat_set -//! that uses a polymorphic allocator -template - ,class Options = tree_assoc_defaults > -struct flat_set_of -{ - typedef boost::container::flat_set > type; -}; - -//! A portable metafunction to obtain a flat_multiset -//! that uses a polymorphic allocator -template - ,class Options = tree_assoc_defaults > -struct flat_multiset_of -{ - typedef boost::container::flat_multiset > type; -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#endif //BOOST_CONTAINER_PMR_SET_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/global_resource.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/global_resource.hpp deleted file mode 100644 index 219309b072d..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/global_resource.hpp +++ /dev/null @@ -1,66 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_GLOBAL_RESOURCE_HPP -#define BOOST_CONTAINER_PMR_GLOBAL_RESOURCE_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include -#include - -#include - -namespace boost { -namespace container { -namespace pmr { - -/// @cond -class memory_resource; -/// @endcond - -//! Returns: A pointer to a static-duration object of a type derived from -//! memory_resource that can serve as a resource for allocating memory using -//! global `operator new` and global `operator delete`. The same value is returned every time this function -//! is called. For return value p and memory resource r, p->is_equal(r) returns &r == p. -BOOST_CONTAINER_DECL memory_resource* new_delete_resource() BOOST_NOEXCEPT; - -//! Returns: A pointer to a static-duration object of a type derived from -//! memory_resource for which allocate() always throws bad_alloc and for which -//! deallocate() has no effect. The same value is returned every time this function -//! is called. For return value p and memory resource r, p->is_equal(r) returns &r == p. -BOOST_CONTAINER_DECL memory_resource* null_memory_resource() BOOST_NOEXCEPT; - -//! Effects: If r is non-null, sets the value of the default memory resource -//! pointer to r, otherwise sets the default memory resource pointer to new_delete_resource(). -//! -//! Postconditions: get_default_resource() == r. -//! -//! Returns: The previous value of the default memory resource pointer. -//! -//! Remarks: Calling the set_default_resource and get_default_resource functions shall -//! not incur a data race. A call to the set_default_resource function shall synchronize -//! with subsequent calls to the set_default_resource and get_default_resource functions. -BOOST_CONTAINER_DECL memory_resource* set_default_resource(memory_resource* r) BOOST_NOEXCEPT; - -//! Returns: The current value of the default -//! memory resource pointer. -BOOST_CONTAINER_DECL memory_resource* get_default_resource() BOOST_NOEXCEPT; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#include - -#endif //BOOST_CONTAINER_PMR_GLOBAL_RESOURCE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/list.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/list.hpp deleted file mode 100644 index f3676a3d171..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/list.hpp +++ /dev/null @@ -1,45 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_LIST_HPP -#define BOOST_CONTAINER_PMR_LIST_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { -namespace pmr { - -#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - -template -using list = boost::container::list>; - -#endif - -//! A portable metafunction to obtain a list -//! that uses a polymorphic allocator -template -struct list_of -{ - typedef boost::container::list - < T, polymorphic_allocator > type; -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#endif //BOOST_CONTAINER_PMR_VECTOR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/map.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/map.hpp deleted file mode 100644 index 165a4733730..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/map.hpp +++ /dev/null @@ -1,67 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_MAP_HPP -#define BOOST_CONTAINER_PMR_MAP_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { -namespace pmr { - -#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - -template - ,class Options = tree_assoc_defaults > -using map = boost::container::map >, Options>; - -template - ,class Options = tree_assoc_defaults > -using multimap = boost::container::multimap >, Options>; - -#endif - -//! A portable metafunction to obtain a map -//! that uses a polymorphic allocator -template - ,class Options = tree_assoc_defaults > -struct map_of -{ - typedef boost::container::map >, Options> type; -}; - -//! A portable metafunction to obtain a multimap -//! that uses a polymorphic allocator -template - ,class Options = tree_assoc_defaults > -struct multimap_of -{ - typedef boost::container::multimap >, Options> type; -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#endif //BOOST_CONTAINER_PMR_MAP_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/memory_resource.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/memory_resource.hpp deleted file mode 100644 index 72338a75590..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/memory_resource.hpp +++ /dev/null @@ -1,101 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_MEMORY_RESOURCE_HPP -#define BOOST_CONTAINER_PMR_MEMORY_RESOURCE_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include -#include -#include - -namespace boost { -namespace container { -namespace pmr { - -//! The memory_resource class is an abstract interface to an -//! unbounded set of classes encapsulating memory resources. -class memory_resource -{ - public: - // For exposition only - static BOOST_CONSTEXPR_OR_CONST std::size_t max_align = - boost::move_detail::alignment_of::value; - - //! Effects: Destroys - //! this memory_resource. - virtual ~memory_resource(){} - - //! Effects: Equivalent to - //! `return do_allocate(bytes, alignment);` - void* allocate(std::size_t bytes, std::size_t alignment = max_align) - { return this->do_allocate(bytes, alignment); } - - //! Effects: Equivalent to - //! `return do_deallocate(bytes, alignment);` - void deallocate(void* p, std::size_t bytes, std::size_t alignment = max_align) - { return this->do_deallocate(p, bytes, alignment); } - - //! Effects: Equivalent to - //! `return return do_is_equal(other);` - bool is_equal(const memory_resource& other) const BOOST_NOEXCEPT - { return this->do_is_equal(other); } - - //! Returns: - //! `&a == &b || a.is_equal(b)`. - friend bool operator==(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT - { return &a == &b || a.is_equal(b); } - - //! Returns: - //! !(a == b). - friend bool operator!=(const memory_resource& a, const memory_resource& b) BOOST_NOEXCEPT - { return !(a == b); } - - protected: - //! Requires: Alignment shall be a power of two. - //! - //! Returns: A derived class shall implement this function to return a pointer - //! to allocated storage with a size of at least bytes. The returned storage is - //! aligned to the specified alignment, if such alignment is supported; otherwise - //! it is aligned to max_align. - //! - //! Throws: A derived class implementation shall throw an appropriate exception if - //! it is unable to allocate memory with the requested size and alignment. - virtual void* do_allocate(std::size_t bytes, std::size_t alignment) = 0; - - //! Requires: p shall have been returned from a prior call to - //! `allocate(bytes, alignment)` on a memory resource equal to *this, and the storage - //! at p shall not yet have been deallocated. - //! - //! Effects: A derived class shall implement this function to dispose of allocated storage. - //! - //! Throws: Nothing. - virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment) = 0; - - //! Returns: A derived class shall implement this function to return true if memory - //! allocated from this can be deallocated from other and vice-versa; otherwise it shall - //! return false. [Note: The most-derived type of other might not match the type of this. - //! For a derived class, D, a typical implementation of this function will compute - //! `dynamic_cast(&other)` and go no further (i.e., return false) - //! if it returns nullptr. - end note]. - virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT = 0; -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#include - -#endif //BOOST_CONTAINER_PMR_MEMORY_RESOURCE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/monotonic_buffer_resource.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/monotonic_buffer_resource.hpp deleted file mode 100644 index dfffe87dc38..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/monotonic_buffer_resource.hpp +++ /dev/null @@ -1,180 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_MONOTONIC_BUFFER_RESOURCE_HPP -#define BOOST_CONTAINER_PMR_MONOTONIC_BUFFER_RESOURCE_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace container { -namespace pmr { - -//! A monotonic_buffer_resource is a special-purpose memory resource intended for -//! very fast memory allocations in situations where memory is used to build up a -//! few objects and then is released all at once when the memory resource object -//! is destroyed. It has the following qualities: -//! -//! - A call to deallocate has no effect, thus the amount of memory consumed -//! increases monotonically until the resource is destroyed. -//! -//! - The program can supply an initial buffer, which the allocator uses to satisfy -//! memory requests. -//! -//! - When the initial buffer (if any) is exhausted, it obtains additional buffers -//! from an upstream memory resource supplied at construction. Each additional -//! buffer is larger than the previous one, following a geometric progression. -//! -//! - It is intended for access from one thread of control at a time. Specifically, -//! calls to allocate and deallocate do not synchronize with one another. -//! -//! - It owns the allocated memory and frees it on destruction, even if deallocate has -//! not been called for some of the allocated blocks. -class BOOST_CONTAINER_DECL monotonic_buffer_resource - : public memory_resource -{ - block_slist m_memory_blocks; - void* m_current_buffer; - std::size_t m_current_buffer_size; - std::size_t m_next_buffer_size; - - /// @cond - void increase_next_buffer(); - void increase_next_buffer_at_least_to(std::size_t minimum_size); - void *allocate_from_current(std::size_t aligner, std::size_t bytes); - /// @endcond - - public: - - //! The number of bytes that will be requested by the default in the first call - //! to the upstream allocator - //! - //! Note: Non-standard extension. - static const std::size_t initial_next_buffer_size = 32u*sizeof(void*); - - //! Requires: `upstream` shall be the address of a valid memory resource or `nullptr` - //! - //! Effects: If `upstream` is not nullptr, sets the internal resource to `upstream`, - //! to get_default_resource() otherwise. - //! Sets the internal `current_buffer` to `nullptr` and the internal `next_buffer_size` to an - //! implementation-defined size. - explicit monotonic_buffer_resource(memory_resource* upstream = 0) BOOST_NOEXCEPT; - - //! Requires: `upstream` shall be the address of a valid memory resource or `nullptr` - //! and `initial_size` shall be greater than zero. - //! - //! Effects: If `upstream` is not nullptr, sets the internal resource to `upstream`, - //! to get_default_resource() otherwise. Sets the internal `current_buffer` to `nullptr` and - //! `next_buffer_size` to at least `initial_size`. - explicit monotonic_buffer_resource(std::size_t initial_size, memory_resource* upstream = 0) BOOST_NOEXCEPT; - - //! Requires: `upstream` shall be the address of a valid memory resource or `nullptr`, - //! `buffer_size` shall be no larger than the number of bytes in buffer. - //! - //! Effects: If `upstream` is not nullptr, sets the internal resource to `upstream`, - //! to get_default_resource() otherwise. Sets the internal `current_buffer` to `buffer`, - //! and `next_buffer_size` to `buffer_size` (but not less than an implementation-defined size), - //! then increases `next_buffer_size` by an implementation-defined growth factor (which need not be integral). - monotonic_buffer_resource(void* buffer, std::size_t buffer_size, memory_resource* upstream = 0) BOOST_NOEXCEPT; - - #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - monotonic_buffer_resource(const monotonic_buffer_resource&) = delete; - monotonic_buffer_resource operator=(const monotonic_buffer_resource&) = delete; - #else - private: - monotonic_buffer_resource (const monotonic_buffer_resource&); - monotonic_buffer_resource operator=(const monotonic_buffer_resource&); - public: - #endif - - //! Effects: Calls - //! `this->release()`. - virtual ~monotonic_buffer_resource(); - - //! Effects: `upstream_resource()->deallocate()` as necessary to release all allocated memory. - //! [Note: memory is released back to `upstream_resource()` even if some blocks that were allocated - //! from this have not been deallocated from this. - end note] - void release() BOOST_NOEXCEPT; - - //! Returns: The value of - //! the internal resource. - memory_resource* upstream_resource() const BOOST_NOEXCEPT; - - //! Returns: - //! The number of bytes of storage available for the specified alignment and - //! the number of bytes wasted due to the requested alignment. - //! - //! Note: Non-standard extension. - std::size_t remaining_storage(std::size_t alignment, std::size_t &wasted_due_to_alignment) const BOOST_NOEXCEPT; - - //! Returns: - //! The number of bytes of storage available for the specified alignment. - //! - //! Note: Non-standard extension. - std::size_t remaining_storage(std::size_t alignment = 1u) const BOOST_NOEXCEPT; - - //! Returns: - //! The number of bytes of storage available for the specified alignment. - //! - //! Note: Non-standard extension. - const void *current_buffer() const BOOST_NOEXCEPT; - - //! Returns: - //! The number of bytes that will be requested for the next buffer once the - //! current one is exhausted. - //! - //! Note: Non-standard extension. - std::size_t next_buffer_size() const BOOST_NOEXCEPT; - - protected: - - //! Returns: A pointer to allocated storage with a size of at least `bytes`. The size - //! and alignment of the allocated memory shall meet the requirements for a class derived - //! from `memory_resource`. - //! - //! Effects: If the unused space in the internal `current_buffer` can fit a block with the specified - //! bytes and alignment, then allocate the return block from the internal `current_buffer`; otherwise sets - //! the internal `current_buffer` to `upstream_resource()->allocate(n, m)`, where `n` is not less than - //! `max(bytes, next_buffer_size)` and `m` is not less than alignment, and increase - //! `next_buffer_size` by an implementation-defined growth factor (which need not be integral), - //! then allocate the return block from the newly-allocated internal `current_buffer`. - //! - //! Throws: Nothing unless `upstream_resource()->allocate()` throws. - virtual void* do_allocate(std::size_t bytes, std::size_t alignment); - - //! Effects: None - //! - //! Throws: Nothing - //! - //! Remarks: Memory used by this resource increases monotonically until its destruction. - virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment) BOOST_NOEXCEPT; - - //! Returns: - //! `this == dynamic_cast(&other)`. - virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT; -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#include - -#endif //BOOST_CONTAINER_PMR_MONOTONIC_BUFFER_RESOURCE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/polymorphic_allocator.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/polymorphic_allocator.hpp deleted file mode 100644 index d189b3a311a..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/polymorphic_allocator.hpp +++ /dev/null @@ -1,166 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_POLYMORPHIC_ALLOCATOR_HPP -#define BOOST_CONTAINER_PMR_POLYMORPHIC_ALLOCATOR_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace container { -namespace pmr { - -//! A specialization of class template `polymorphic_allocator` conforms to the Allocator requirements. -//! Constructed with different memory resources, different instances of the same specialization of -//! `polymorphic_allocator` can exhibit entirely different allocation behavior. This runtime -//! polymorphism allows objects that use polymorphic_allocator to behave as if they used different -//! allocator types at run time even though they use the same static allocator type. -template -class polymorphic_allocator -{ - public: - typedef T value_type; - - //! Effects: Sets m_resource to - //! `get_default_resource()`. - polymorphic_allocator() BOOST_NOEXCEPT - : m_resource(::boost::container::pmr::get_default_resource()) - {} - - //! Requires: r is non-null. - //! - //! Effects: Sets m_resource to r. - //! - //! Throws: Nothing - //! - //! Notes: This constructor provides an implicit conversion from memory_resource*. - //! Non-standard extension: if r is null m_resource is set to get_default_resource(). - polymorphic_allocator(memory_resource* r) - : m_resource(r ? r : ::boost::container::pmr::get_default_resource()) - {} - - //! Effects: Sets m_resource to - //! other.resource(). - polymorphic_allocator(const polymorphic_allocator& other) - : m_resource(other.m_resource) - {} - - //! Effects: Sets m_resource to - //! other.resource(). - template - polymorphic_allocator(const polymorphic_allocator& other) BOOST_NOEXCEPT - : m_resource(other.resource()) - {} - - //! Effects: Sets m_resource to - //! other.resource(). - polymorphic_allocator& operator=(const polymorphic_allocator& other) - { m_resource = other.m_resource; return *this; } - - //! Returns: Equivalent to - //! `static_cast(m_resource->allocate(n * sizeof(T), alignof(T)))`. - T* allocate(size_t n) - { return static_cast(m_resource->allocate(n*sizeof(T), ::boost::move_detail::alignment_of::value)); } - - //! Requires: p was allocated from a memory resource, x, equal to *m_resource, - //! using `x.allocate(n * sizeof(T), alignof(T))`. - //! - //! Effects: Equivalent to m_resource->deallocate(p, n * sizeof(T), alignof(T)). - //! - //! Throws: Nothing. - void deallocate(T* p, size_t n) - { m_resource->deallocate(p, n*sizeof(T), ::boost::move_detail::alignment_of::value); } - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Requires: Uses-allocator construction of T with allocator - //! `this->resource()` and constructor arguments `std::forward(args)...` - //! is well-formed. [Note: uses-allocator construction is always well formed for - //! types that do not use allocators. - end note] - //! - //! Effects: Construct a T object at p by uses-allocator construction with allocator - //! `this->resource()` and constructor arguments `std::forward(args)...`. - //! - //! Throws: Nothing unless the constructor for T throws. - template < typename U, class ...Args> - void construct(U* p, BOOST_FWD_REF(Args)...args) - { - new_allocator na; - container_detail::dispatch_uses_allocator - (na, this->resource(), p, ::boost::forward(args)...); - } - - #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //Disable this overload if the first argument is pair as some compilers have - //overload selection problems when the first parameter is a pair. - #define BOOST_CONTAINER_PMR_POLYMORPHIC_ALLOCATOR_CONSTRUCT_CODE(N) \ - template < typename U BOOST_MOVE_I##N BOOST_MOVE_CLASSQ##N >\ - void construct(U* p BOOST_MOVE_I##N BOOST_MOVE_UREFQ##N)\ - {\ - new_allocator na;\ - container_detail::dispatch_uses_allocator\ - (na, this->resource(), p BOOST_MOVE_I##N BOOST_MOVE_FWDQ##N);\ - }\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_PMR_POLYMORPHIC_ALLOCATOR_CONSTRUCT_CODE) - #undef BOOST_CONTAINER_PMR_POLYMORPHIC_ALLOCATOR_CONSTRUCT_CODE - - #endif //#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: - //! p->~U(). - template - void destroy(U* p) - { (void)p; p->~U(); } - - //! Returns: Equivalent to - //! `polymorphic_allocator()`. - polymorphic_allocator select_on_container_copy_construction() const - { return polymorphic_allocator(); } - - //! Returns: - //! m_resource. - memory_resource* resource() const - { return m_resource; } - - private: - memory_resource* m_resource; -}; - -//! Returns: -//! `*a.resource() == *b.resource()`. -template -bool operator==(const polymorphic_allocator& a, const polymorphic_allocator& b) BOOST_NOEXCEPT -{ return *a.resource() == *b.resource(); } - - -//! Returns: -//! `! (a == b)`. -template -bool operator!=(const polymorphic_allocator& a, const polymorphic_allocator& b) BOOST_NOEXCEPT -{ return *a.resource() != *b.resource(); } - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#endif //BOOST_CONTAINER_PMR_POLYMORPHIC_ALLOCATOR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/pool_options.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/pool_options.hpp deleted file mode 100644 index e9f72896b18..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/pool_options.hpp +++ /dev/null @@ -1,52 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_POOL_OPTIONS_HPP -#define BOOST_CONTAINER_PMR_POOL_OPTIONS_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include - -namespace boost { -namespace container { -namespace pmr { - -//! The members of pool_options comprise a set of constructor options for pool resources. -//! The effect of each option on the pool resource behavior is described below: -//! -//! - `std::size_t max_blocks_per_chunk`: The maximum number of blocks that will be allocated -//! at once from the upstream memory resource to replenish a pool. If the value of -//! `max_blocks_per_chunk` is zero or is greater than an implementation-defined limit, -//! that limit is used instead. The implementation may choose to use a smaller value -//! than is specified in this field and may use different values for different pools. -//! -//! - `std::size_t largest_required_pool_block`: The largest allocation size that is required -//! to be fulfilled using the pooling mechanism. Attempts to allocate a single block -//! larger than this threshold will be allocated directly from the upstream memory -//! resource. If largest_required_pool_block is zero or is greater than an -//! implementation-defined limit, that limit is used instead. The implementation may -//! choose a pass-through threshold larger than specified in this field. -struct pool_options -{ - pool_options() - : max_blocks_per_chunk(0u), largest_required_pool_block(0u) - {} - std::size_t max_blocks_per_chunk; - std::size_t largest_required_pool_block; -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#endif //BOOST_CONTAINER_PMR_POOL_OPTIONS_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/resource_adaptor.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/resource_adaptor.hpp deleted file mode 100644 index deece632e87..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/resource_adaptor.hpp +++ /dev/null @@ -1,193 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_RESOURCE_ADAPTOR_HPP -#define BOOST_CONTAINER_PMR_RESOURCE_ADAPTOR_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include -#include -#include -#include - -namespace boost { -namespace container { -namespace pmr { - -//! An instance of resource_adaptor is an adaptor that wraps a memory_resource interface -//! around Allocator. In order that resource_adaptor> and resource_adaptor> are the same -//! type for any allocator template X and types T and U, resource_adaptor is rendered as -//! an alias to this class template such that Allocator is rebound to a char value type in every -//! specialization of the class template. The requirements on this class template are defined below. -//! In addition to the Allocator requirements, the parameter to resource_adaptor shall meet -//! the following additional requirements: -//! -//! - `typename allocator_traits:: pointer` shall be identical to -//! `typename allocator_traits:: value_type*`. -//! -//! - `typename allocator_traits:: const_pointer` shall be identical to -//! `typename allocator_traits:: value_type const*`. -//! -//! - `typename allocator_traits:: void_pointer` shall be identical to `void*`. -//! -//! - `typename allocator_traits:: const_void_pointer` shall be identical to `void const*`. -template -class resource_adaptor_imp - : public memory_resource - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - , private ::boost::intrusive::detail::ebo_functor_holder - #endif -{ - #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED - Allocator m_alloc; - #else - BOOST_COPYABLE_AND_MOVABLE(resource_adaptor_imp) - typedef ::boost::intrusive::detail::ebo_functor_holder ebo_alloc_t; - void static_assert_if_not_char_allocator() const - { - //This class can only be used with allocators type char - BOOST_STATIC_ASSERT((container_detail::is_same::value)); - } - #endif - - public: - typedef Allocator allocator_type; - - //! Effects: Default constructs - //! m_alloc. - resource_adaptor_imp() - { this->static_assert_if_not_char_allocator(); } - - //! Effects: Copy constructs - //! m_alloc. - resource_adaptor_imp(const resource_adaptor_imp &other) - : ebo_alloc_t(other.ebo_alloc_t::get()) - {} - - //! Effects: Move constructs - //! m_alloc. - resource_adaptor_imp(BOOST_RV_REF(resource_adaptor_imp) other) - : ebo_alloc_t(::boost::move(other.get())) - {} - - //! Effects: Initializes m_alloc with - //! a2. - explicit resource_adaptor_imp(const Allocator& a2) - : ebo_alloc_t(a2) - { this->static_assert_if_not_char_allocator(); } - - //! Effects: Initializes m_alloc with - //! a2. - explicit resource_adaptor_imp(BOOST_RV_REF(Allocator) a2) - : ebo_alloc_t(::boost::move(a2)) - { this->static_assert_if_not_char_allocator(); } - - //! Effects: Copy assigns - //! m_alloc. - resource_adaptor_imp& operator=(BOOST_COPY_ASSIGN_REF(resource_adaptor_imp) other) - { this->ebo_alloc_t::get() = other.ebo_alloc_t::get(); return *this; } - - //! Effects: Move assigns - //! m_alloc. - resource_adaptor_imp& operator=(BOOST_RV_REF(resource_adaptor_imp) other) - { this->ebo_alloc_t::get() = ::boost::move(other.ebo_alloc_t::get()); return *this; } - - //! Effects: Returns m_alloc. - allocator_type &get_allocator() - { return this->ebo_alloc_t::get(); } - - //! Effects: Returns m_alloc. - const allocator_type &get_allocator() const - { return this->ebo_alloc_t::get(); } - - protected: - //! Returns: Allocated memory obtained by calling m_alloc.allocate. The size and alignment - //! of the allocated memory shall meet the requirements for a class derived from memory_resource. - virtual void* do_allocate(size_t bytes, size_t alignment) - { (void)alignment; return this->ebo_alloc_t::get().allocate(bytes); } - - //! Requires: p was previously allocated using A.allocate, where A == m_alloc, and not - //! subsequently deallocated. - //! - //! Effects: Returns memory to the allocator using m_alloc.deallocate(). - virtual void do_deallocate(void* p, size_t bytes, size_t alignment) - { (void)alignment; this->ebo_alloc_t::get().deallocate((char*)p, bytes); } - - //! Let p be dynamic_cast(&other). - //! - //! Returns: false if p is null, otherwise the value of m_alloc == p->m_alloc. - virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT - { - const resource_adaptor_imp* p = dynamic_cast(&other); - return p && p->ebo_alloc_t::get() == this->ebo_alloc_t::get(); - } -}; - -#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - -//! `resource_adaptor` is rendered as an alias to resource_adaptor_imp class template -//! such that Allocator is rebound to a char value type. -template -using resource_adaptor = resource_adaptor_imp - ::template rebind_alloc >; - -#else - -template -class resource_adaptor - : public resource_adaptor_imp - ::template portable_rebind_alloc::type> -{ - typedef resource_adaptor_imp - ::template portable_rebind_alloc::type> base_t; - - BOOST_COPYABLE_AND_MOVABLE(resource_adaptor) - - public: - resource_adaptor() - : base_t() - {} - - resource_adaptor(const resource_adaptor &other) - : base_t(other) - {} - - resource_adaptor(BOOST_RV_REF(resource_adaptor) other) - : base_t(BOOST_MOVE_BASE(base_t, other)) - {} - - explicit resource_adaptor(const Allocator& a2) - : base_t(a2) - {} - - explicit resource_adaptor(BOOST_RV_REF(Allocator) a2) - : base_t(BOOST_MOVE_BASE(base_t, a2)) - {} - - resource_adaptor& operator=(BOOST_COPY_ASSIGN_REF(resource_adaptor) other) - { return static_cast(this->base_t::operator=(other)); } - - resource_adaptor& operator=(BOOST_RV_REF(resource_adaptor) other) - { return static_cast(this->base_t::operator=(BOOST_MOVE_BASE(base_t, other))); } - - //get_allocator and protected functions are properly inherited -}; - -#endif - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#endif //BOOST_CONTAINER_PMR_RESOURCE_ADAPTOR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/set.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/set.hpp deleted file mode 100644 index 04583ce2dd2..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/set.hpp +++ /dev/null @@ -1,63 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_SET_HPP -#define BOOST_CONTAINER_PMR_SET_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { -namespace pmr { - -#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - -template - ,class Options = tree_assoc_defaults > -using set = boost::container::set, Options>; - -template - ,class Options = tree_assoc_defaults > -using multiset = boost::container::multiset, Options>; - -#endif - -//! A portable metafunction to obtain a set -//! that uses a polymorphic allocator -template - ,class Options = tree_assoc_defaults > -struct set_of -{ - typedef boost::container::set, Options> type; -}; - -//! A portable metafunction to obtain a multiset -//! that uses a polymorphic allocator -template - ,class Options = tree_assoc_defaults > -struct multiset_of -{ - typedef boost::container::multiset, Options> type; -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#endif //BOOST_CONTAINER_PMR_SET_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/slist.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/slist.hpp deleted file mode 100644 index c90fd7d6cd3..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/slist.hpp +++ /dev/null @@ -1,45 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_SLIST_HPP -#define BOOST_CONTAINER_PMR_SLIST_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { -namespace pmr { - -#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - -template -using slist = boost::container::slist>; - -#endif - -//! A portable metafunction to obtain a slist -//! that uses a polymorphic allocator -template -struct slist_of -{ - typedef boost::container::slist - < T, polymorphic_allocator > type; -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#endif //BOOST_CONTAINER_PMR_VECTOR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/small_vector.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/small_vector.hpp deleted file mode 100644 index 6eef149728e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/small_vector.hpp +++ /dev/null @@ -1,45 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_SMALL_VECTOR_HPP -#define BOOST_CONTAINER_PMR_SMALL_VECTOR_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { -namespace pmr { - -#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - -template -using small_vector = boost::container::small_vector>; - -#endif - -//! A portable metafunction to obtain a small_vector -//! that uses a polymorphic allocator -template -struct small_vector_of -{ - typedef boost::container::small_vector - < T, N, polymorphic_allocator > type; -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#endif //BOOST_CONTAINER_PMR_SMALL_VECTOR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/stable_vector.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/stable_vector.hpp deleted file mode 100644 index d11c426fc40..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/stable_vector.hpp +++ /dev/null @@ -1,45 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_STABLE_VECTOR_HPP -#define BOOST_CONTAINER_PMR_STABLE_VECTOR_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { -namespace pmr { - -#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - -template -using stable_vector = boost::container::stable_vector>; - -#endif - -//! A portable metafunction to obtain a stable_vector -//! that uses a polymorphic allocator -template -struct stable_vector_of -{ - typedef boost::container::stable_vector - < T, polymorphic_allocator > type; -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#endif //BOOST_CONTAINER_PMR_STABLE_VECTOR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/string.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/string.hpp deleted file mode 100644 index c1eba672963..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/string.hpp +++ /dev/null @@ -1,50 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_STRING_HPP -#define BOOST_CONTAINER_PMR_STRING_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { -namespace pmr { - -#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - -template > -using basic_string = - boost::container::basic_string >; - -#endif - -//! A portable metafunction to obtain a basic_string -//! that uses a polymorphic allocator -template > -struct basic_string_of -{ - typedef boost::container::basic_string - > type; -}; - -typedef basic_string_of::type string; - -typedef basic_string_of::type wstring; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#endif //BOOST_CONTAINER_PMR_STRING_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/synchronized_pool_resource.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/synchronized_pool_resource.hpp deleted file mode 100644 index e4d4dd54a1c..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/synchronized_pool_resource.hpp +++ /dev/null @@ -1,138 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_SYNCHRONIZED_POOL_RESOURCE_HPP -#define BOOST_CONTAINER_PMR_SYNCHRONIZED_POOL_RESOURCE_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace container { -namespace pmr { - -//! A synchronized_pool_resource is a general-purpose memory resources having -//! the following qualities: -//! -//! - Each resource owns the allocated memory, and frees it on destruction, -//! even if deallocate has not been called for some of the allocated blocks. -//! -//! - A pool resource consists of a collection of pools, serving -//! requests for different block sizes. Each individual pool manages a -//! collection of chunks that are in turn divided into blocks of uniform size, -//! returned via calls to do_allocate. Each call to do_allocate(size, alignment) -//! is dispatched to the pool serving the smallest blocks accommodating at -//! least size bytes. -//! -//! - When a particular pool is exhausted, allocating a block from that pool -//! results in the allocation of an additional chunk of memory from the upstream -//! allocator (supplied at construction), thus replenishing the pool. With -//! each successive replenishment, the chunk size obtained increases -//! geometrically. [ Note: By allocating memory in chunks, the pooling strategy -//! increases the chance that consecutive allocations will be close together -//! in memory. - end note ] -//! -//! - Allocation requests that exceed the largest block size of any pool are -//! fulfilled directly from the upstream allocator. -//! -//! - A pool_options struct may be passed to the pool resource constructors to -//! tune the largest block size and the maximum chunk size. -//! -//! A synchronized_pool_resource may be accessed from multiple threads without -//! external synchronization and may have thread-specific pools to reduce -//! synchronization costs. -class BOOST_CONTAINER_DECL synchronized_pool_resource - : public memory_resource -{ - pool_resource m_pool_resource; - void *m_opaque_sync; - - public: - - //! @copydoc ::boost::container::pmr::unsynchronized_pool_resource::unsynchronized_pool_resource(const pool_options&,memory_resource*) - synchronized_pool_resource(const pool_options& opts, memory_resource* upstream) BOOST_NOEXCEPT; - - //! @copydoc ::boost::container::pmr::unsynchronized_pool_resource::unsynchronized_pool_resource() - synchronized_pool_resource() BOOST_NOEXCEPT; - - //! @copydoc ::boost::container::pmr::unsynchronized_pool_resource::unsynchronized_pool_resource(memory_resource*) - explicit synchronized_pool_resource(memory_resource* upstream) BOOST_NOEXCEPT; - - //! @copydoc ::boost::container::pmr::unsynchronized_pool_resource::unsynchronized_pool_resource(const pool_options&) - explicit synchronized_pool_resource(const pool_options& opts) BOOST_NOEXCEPT; - - #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - synchronized_pool_resource(const synchronized_pool_resource&) = delete; - synchronized_pool_resource operator=(const synchronized_pool_resource&) = delete; - #else - private: - synchronized_pool_resource (const synchronized_pool_resource&); - synchronized_pool_resource operator=(const synchronized_pool_resource&); - public: - #endif - - //! @copydoc ::boost::container::pmr::unsynchronized_pool_resource::~unsynchronized_pool_resource() - virtual ~synchronized_pool_resource(); - - //! @copydoc ::boost::container::pmr::unsynchronized_pool_resource::release() - void release(); - - //! @copydoc ::boost::container::pmr::unsynchronized_pool_resource::upstream_resource()const - memory_resource* upstream_resource() const; - - //! @copydoc ::boost::container::pmr::unsynchronized_pool_resource::options()const - pool_options options() const; - - protected: - - //! @copydoc ::boost::container::pmr::unsynchronized_pool_resource::do_allocate() - virtual void* do_allocate(std::size_t bytes, std::size_t alignment); - - //! @copydoc ::boost::container::pmr::unsynchronized_pool_resource::do_deallocate(void*,std::size_t,std::size_t) - virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment); - - //! @copydoc ::boost::container::pmr::unsynchronized_pool_resource::do_is_equal(const memory_resource&)const - virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT; - - //Non-standard observers - public: - - //! @copydoc ::boost::container::pmr::unsynchronized_pool_resource::pool_count() - std::size_t pool_count() const; - - //! @copydoc ::boost::container::pmr::unsynchronized_pool_resource::pool_index(std::size_t)const - std::size_t pool_index(std::size_t bytes) const; - - //! @copydoc ::boost::container::pmr::unsynchronized_pool_resource::pool_next_blocks_per_chunk(std::size_t)const - std::size_t pool_next_blocks_per_chunk(std::size_t pool_idx) const; - - //! @copydoc ::boost::container::pmr::unsynchronized_pool_resource::pool_block(std::size_t)const - std::size_t pool_block(std::size_t pool_idx) const; - - //! @copydoc ::boost::container::pmr::unsynchronized_pool_resource::pool_cached_blocks(std::size_t)const - std::size_t pool_cached_blocks(std::size_t pool_idx) const; -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#include - -#endif //BOOST_CONTAINER_PMR_SYNCHRONIZED_POOL_RESOURCE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/unsynchronized_pool_resource.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/unsynchronized_pool_resource.hpp deleted file mode 100644 index 21d30b1ebce..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/unsynchronized_pool_resource.hpp +++ /dev/null @@ -1,194 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_UNSYNCHRONIZED_POOL_RESOURCE_HPP -#define BOOST_CONTAINER_PMR_UNSYNCHRONIZED_POOL_RESOURCE_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include -#include -#include -#include - -#include - -namespace boost { -namespace container { -namespace pmr { - -//! A unsynchronized_pool_resource is a general-purpose memory resources having -//! the following qualities: -//! -//! - Each resource owns the allocated memory, and frees it on destruction, -//! even if deallocate has not been called for some of the allocated blocks. -//! -//! - A pool resource consists of a collection of pools, serving -//! requests for different block sizes. Each individual pool manages a -//! collection of chunks that are in turn divided into blocks of uniform size, -//! returned via calls to do_allocate. Each call to do_allocate(size, alignment) -//! is dispatched to the pool serving the smallest blocks accommodating at -//! least size bytes. -//! -//! - When a particular pool is exhausted, allocating a block from that pool -//! results in the allocation of an additional chunk of memory from the upstream -//! allocator (supplied at construction), thus replenishing the pool. With -//! each successive replenishment, the chunk size obtained increases -//! geometrically. [ Note: By allocating memory in chunks, the pooling strategy -//! increases the chance that consecutive allocations will be close together -//! in memory. - end note ] -//! -//! - Allocation requests that exceed the largest block size of any pool are -//! fulfilled directly from the upstream allocator. -//! -//! - A pool_options struct may be passed to the pool resource constructors to -//! tune the largest block size and the maximum chunk size. -//! -//! An unsynchronized_pool_resource class may not be accessed from multiple threads -//! simultaneously and thus avoids the cost of synchronization entirely in -//! single-threaded applications. -class BOOST_CONTAINER_DECL unsynchronized_pool_resource - : public memory_resource -{ - pool_resource m_resource; - - public: - - //! Requires: `upstream` is the address of a valid memory resource. - //! - //! Effects: Constructs a pool resource object that will obtain memory - //! from upstream whenever the pool resource is unable to satisfy a memory - //! request from its own internal data structures. The resulting object will hold - //! a copy of upstream, but will not own the resource to which upstream points. - //! [ Note: The intention is that calls to upstream->allocate() will be - //! substantially fewer than calls to this->allocate() in most cases. - end note - //! The behavior of the pooling mechanism is tuned according to the value of - //! the opts argument. - //! - //! Throws: Nothing unless upstream->allocate() throws. It is unspecified if - //! or under what conditions this constructor calls upstream->allocate(). - unsynchronized_pool_resource(const pool_options& opts, memory_resource* upstream) BOOST_NOEXCEPT; - - //! Effects: Same as - //! `unsynchronized_pool_resource(pool_options(), get_default_resource())`. - unsynchronized_pool_resource() BOOST_NOEXCEPT; - - //! Effects: Same as - //! `unsynchronized_pool_resource(pool_options(), upstream)`. - explicit unsynchronized_pool_resource(memory_resource* upstream) BOOST_NOEXCEPT; - - //! Effects: Same as - //! `unsynchronized_pool_resource(opts, get_default_resource())`. - explicit unsynchronized_pool_resource(const pool_options& opts) BOOST_NOEXCEPT; - - #if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - unsynchronized_pool_resource(const unsynchronized_pool_resource&) = delete; - unsynchronized_pool_resource operator=(const unsynchronized_pool_resource&) = delete; - #else - private: - unsynchronized_pool_resource (const unsynchronized_pool_resource&); - unsynchronized_pool_resource operator=(const unsynchronized_pool_resource&); - public: - #endif - - //! Effects: Calls - //! `this->release()`. - virtual ~unsynchronized_pool_resource(); - - //! Effects: Calls Calls `upstream_resource()->deallocate()` as necessary - //! to release all allocated memory. [ Note: memory is released back to - //! `upstream_resource()` even if deallocate has not been called for some - //! of the allocated blocks. - end note ] - void release(); - - //! Returns: The value of the upstream argument provided to the - //! constructor of this object. - memory_resource* upstream_resource() const; - - //! Returns: The options that control the pooling behavior of this resource. - //! The values in the returned struct may differ from those supplied to the pool - //! resource constructor in that values of zero will be replaced with - //! implementation-defined defaults and sizes may be rounded to unspecified granularity. - pool_options options() const; - - protected: - - //! Returns: A pointer to allocated storage with a size of at least `bytes`. - //! The size and alignment of the allocated memory shall meet the requirements for - //! a class derived from `memory_resource`. - //! - //! Effects: If the pool selected for a block of size bytes is unable to - //! satisfy the memory request from its own internal data structures, it will call - //! `upstream_resource()->allocate()` to obtain more memory. If `bytes` is larger - //! than that which the largest pool can handle, then memory will be allocated - //! using `upstream_resource()->allocate()`. - //! - //! Throws: Nothing unless `upstream_resource()->allocate()` throws. - virtual void* do_allocate(std::size_t bytes, std::size_t alignment); - - //! Effects: Return the memory at p to the pool. It is unspecified if or under - //! what circumstances this operation will result in a call to - //! `upstream_resource()->deallocate()`. - //! - //! Throws: Nothing. - virtual void do_deallocate(void* p, std::size_t bytes, std::size_t alignment); - - //! Returns: - //! `this == dynamic_cast(&other)`. - virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT; - - //Non-standard observers - public: - //! Returns: The number of pools that will be used in the pool resource. - //! - //! Note: Non-standard extension. - std::size_t pool_count() const; - - //! Returns: The index of the pool that will be used to serve the allocation of `bytes`. - //! Returns `pool_count()` if `bytes` is bigger - //! than `options().largest_required_pool_block` (no pool will be used to serve this). - //! - //! Note: Non-standard extension. - std::size_t pool_index(std::size_t bytes) const; - - //! Requires: `pool_idx < pool_index()` - //! - //! Returns: The number blocks that will be allocated in the next chunk - //! from the pool specified by `pool_idx`. - //! - //! Note: Non-standard extension. - std::size_t pool_next_blocks_per_chunk(std::size_t pool_idx) const; - - //! Requires: `pool_idx < pool_index()` - //! - //! Returns: The number of bytes of the block that the specified `pool_idx` pool manages. - //! - //! Note: Non-standard extension. - std::size_t pool_block(std::size_t pool_idx) const; - - //! Requires: `pool_idx < pool_index()` - //! - //! Returns: The number of blocks that the specified `pool_idx` pool has cached - //! and will be served without calling the upstream_allocator. - //! - //! Note: Non-standard extension. - std::size_t pool_cached_blocks(std::size_t pool_idx) const; -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#include - -#endif //BOOST_CONTAINER_PMR_UNSYNCHRONIZED_POOL_RESOURCE_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/pmr/vector.hpp b/contrib/libboost/boost_1_65_0/boost/container/pmr/vector.hpp deleted file mode 100644 index 2bd9c157e0e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/pmr/vector.hpp +++ /dev/null @@ -1,45 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_PMR_VECTOR_HPP -#define BOOST_CONTAINER_PMR_VECTOR_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include - -namespace boost { -namespace container { -namespace pmr { - -#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) - -template -using vector = boost::container::vector>; - -#endif - -//! A portable metafunction to obtain a vector -//! that uses a polymorphic allocator -template -struct vector_of -{ - typedef boost::container::vector - < T, polymorphic_allocator > type; -}; - -} //namespace pmr { -} //namespace container { -} //namespace boost { - -#endif //BOOST_CONTAINER_PMR_VECTOR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/scoped_allocator.hpp b/contrib/libboost/boost_1_65_0/boost/container/scoped_allocator.hpp deleted file mode 100644 index 6a041a653d8..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/scoped_allocator.hpp +++ /dev/null @@ -1,907 +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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_ALLOCATOR_SCOPED_ALLOCATOR_HPP -#define BOOST_CONTAINER_ALLOCATOR_SCOPED_ALLOCATOR_HPP - -#if defined (_MSC_VER) -# pragma once -#endif - -#include -#include - -#include -#include -#include - -#include -#include -#include - -#include -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif -#include - -#include - -namespace boost { namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -namespace container_detail { - -template -struct is_scoped_allocator_imp -{ - typedef char yes_type; - struct no_type{ char dummy[2]; }; - - template - static yes_type test(typename T::outer_allocator_type*); - - template - static int test(...); - - static const bool value = (sizeof(yes_type) == sizeof(test(0))); -}; - -template::value > -struct outermost_allocator_type_impl -{ - typedef typename MaybeScopedAlloc::outer_allocator_type outer_type; - typedef typename outermost_allocator_type_impl::type type; -}; - -template -struct outermost_allocator_type_impl -{ - typedef MaybeScopedAlloc type; -}; - -template::value > -struct outermost_allocator_imp -{ - typedef MaybeScopedAlloc type; - - static type &get(MaybeScopedAlloc &a) - { return a; } - - static const type &get(const MaybeScopedAlloc &a) - { return a; } -}; - -template -struct outermost_allocator_imp -{ - typedef typename MaybeScopedAlloc::outer_allocator_type outer_type; - typedef typename outermost_allocator_type_impl::type type; - - static type &get(MaybeScopedAlloc &a) - { return outermost_allocator_imp::get(a.outer_allocator()); } - - static const type &get(const MaybeScopedAlloc &a) - { return outermost_allocator_imp::get(a.outer_allocator()); } -}; - -} //namespace container_detail { - -template -struct is_scoped_allocator - : container_detail::is_scoped_allocator_imp -{}; - -template -struct outermost_allocator - : container_detail::outermost_allocator_imp -{}; - -template -typename outermost_allocator::type & - get_outermost_allocator(Allocator &a) -{ return outermost_allocator::get(a); } - -template -const typename outermost_allocator::type & - get_outermost_allocator(const Allocator &a) -{ return outermost_allocator::get(a); } - -namespace container_detail { - -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -template -class scoped_allocator_adaptor_base - : public OuterAlloc -{ - typedef allocator_traits outer_traits_type; - BOOST_COPYABLE_AND_MOVABLE(scoped_allocator_adaptor_base) - - public: - template - struct rebind_base - { - typedef scoped_allocator_adaptor_base other; - }; - - typedef OuterAlloc outer_allocator_type; - typedef scoped_allocator_adaptor inner_allocator_type; - typedef allocator_traits inner_traits_type; - typedef scoped_allocator_adaptor - scoped_allocator_type; - typedef container_detail::bool_< - outer_traits_type::propagate_on_container_copy_assignment::value || - inner_allocator_type::propagate_on_container_copy_assignment::value - > propagate_on_container_copy_assignment; - typedef container_detail::bool_< - outer_traits_type::propagate_on_container_move_assignment::value || - inner_allocator_type::propagate_on_container_move_assignment::value - > propagate_on_container_move_assignment; - typedef container_detail::bool_< - outer_traits_type::propagate_on_container_swap::value || - inner_allocator_type::propagate_on_container_swap::value - > propagate_on_container_swap; - typedef container_detail::bool_< - outer_traits_type::is_always_equal::value && - inner_allocator_type::is_always_equal::value - > is_always_equal; - - scoped_allocator_adaptor_base() - {} - - template - scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs &...args) - : outer_allocator_type(::boost::forward(outerAlloc)) - , m_inner(args...) - {} - - scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other) - : outer_allocator_type(other.outer_allocator()) - , m_inner(other.inner_allocator()) - {} - - scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other) - : outer_allocator_type(::boost::move(other.outer_allocator())) - , m_inner(::boost::move(other.inner_allocator())) - {} - - template - scoped_allocator_adaptor_base - (const scoped_allocator_adaptor_base& other) - : outer_allocator_type(other.outer_allocator()) - , m_inner(other.inner_allocator()) - {} - - template - scoped_allocator_adaptor_base - (BOOST_RV_REF_BEG scoped_allocator_adaptor_base - BOOST_RV_REF_END other) - : outer_allocator_type(other.outer_allocator()) - , m_inner(other.inner_allocator()) - {} - - public: - struct internal_type_t{}; - - template - scoped_allocator_adaptor_base - ( internal_type_t - , BOOST_FWD_REF(OuterA2) outerAlloc - , const inner_allocator_type &inner) - : outer_allocator_type(::boost::forward(outerAlloc)) - , m_inner(inner) - {} - - public: - - scoped_allocator_adaptor_base &operator= - (BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other) - { - outer_allocator_type::operator=(other.outer_allocator()); - m_inner = other.inner_allocator(); - return *this; - } - - scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other) - { - outer_allocator_type::operator=(boost::move(other.outer_allocator())); - m_inner = ::boost::move(other.inner_allocator()); - return *this; - } - - void swap(scoped_allocator_adaptor_base &r) - { - boost::adl_move_swap(this->outer_allocator(), r.outer_allocator()); - boost::adl_move_swap(this->m_inner, r.inner_allocator()); - } - - friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r) - { l.swap(r); } - - inner_allocator_type& inner_allocator() BOOST_NOEXCEPT_OR_NOTHROW - { return m_inner; } - - inner_allocator_type const& inner_allocator() const BOOST_NOEXCEPT_OR_NOTHROW - { return m_inner; } - - outer_allocator_type & outer_allocator() BOOST_NOEXCEPT_OR_NOTHROW - { return static_cast(*this); } - - const outer_allocator_type &outer_allocator() const BOOST_NOEXCEPT_OR_NOTHROW - { return static_cast(*this); } - - scoped_allocator_type select_on_container_copy_construction() const - { - return scoped_allocator_type - (internal_type_t() - ,outer_traits_type::select_on_container_copy_construction(this->outer_allocator()) - ,inner_traits_type::select_on_container_copy_construction(this->inner_allocator()) - ); - } - - private: - inner_allocator_type m_inner; -}; - -#else //#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -//Let's add a dummy first template parameter to allow creating -//specializations up to maximum InnerAlloc count -template -class scoped_allocator_adaptor_base; - -//Specializations for the adaptor with InnerAlloc allocators - -#define BOOST_CONTAINER_SCOPED_ALLOCATOR_ADAPTOR_BASE_CODE(N)\ -template \ -class scoped_allocator_adaptor_base\ - : public OuterAlloc\ -{\ - typedef allocator_traits outer_traits_type;\ - BOOST_COPYABLE_AND_MOVABLE(scoped_allocator_adaptor_base)\ - \ - public:\ - template \ - struct rebind_base\ - {\ - typedef scoped_allocator_adaptor_base other;\ - };\ - \ - typedef OuterAlloc outer_allocator_type;\ - typedef scoped_allocator_adaptor inner_allocator_type;\ - typedef scoped_allocator_adaptor scoped_allocator_type;\ - typedef allocator_traits inner_traits_type;\ - typedef container_detail::bool_<\ - outer_traits_type::propagate_on_container_copy_assignment::value ||\ - inner_allocator_type::propagate_on_container_copy_assignment::value\ - > propagate_on_container_copy_assignment;\ - typedef container_detail::bool_<\ - outer_traits_type::propagate_on_container_move_assignment::value ||\ - inner_allocator_type::propagate_on_container_move_assignment::value\ - > propagate_on_container_move_assignment;\ - typedef container_detail::bool_<\ - outer_traits_type::propagate_on_container_swap::value ||\ - inner_allocator_type::propagate_on_container_swap::value\ - > propagate_on_container_swap;\ - \ - typedef container_detail::bool_<\ - outer_traits_type::is_always_equal::value &&\ - inner_allocator_type::is_always_equal::value\ - > is_always_equal;\ - \ - scoped_allocator_adaptor_base(){}\ - \ - template \ - scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc, BOOST_MOVE_CREF##N)\ - : outer_allocator_type(::boost::forward(outerAlloc))\ - , m_inner(BOOST_MOVE_ARG##N)\ - {}\ - \ - scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other)\ - : outer_allocator_type(other.outer_allocator())\ - , m_inner(other.inner_allocator())\ - {}\ - \ - scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other)\ - : outer_allocator_type(::boost::move(other.outer_allocator()))\ - , m_inner(::boost::move(other.inner_allocator()))\ - {}\ - \ - template \ - scoped_allocator_adaptor_base\ - (const scoped_allocator_adaptor_base& other)\ - : outer_allocator_type(other.outer_allocator())\ - , m_inner(other.inner_allocator())\ - {}\ - \ - template \ - scoped_allocator_adaptor_base\ - (BOOST_RV_REF_BEG scoped_allocator_adaptor_base BOOST_RV_REF_END other)\ - : outer_allocator_type(other.outer_allocator())\ - , m_inner(other.inner_allocator())\ - {}\ - \ - public:\ - struct internal_type_t{};\ - \ - template \ - scoped_allocator_adaptor_base\ - ( internal_type_t, BOOST_FWD_REF(OuterA2) outerAlloc, const inner_allocator_type &inner)\ - : outer_allocator_type(::boost::forward(outerAlloc))\ - , m_inner(inner)\ - {}\ - \ - public:\ - scoped_allocator_adaptor_base &operator=\ - (BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other)\ - {\ - outer_allocator_type::operator=(other.outer_allocator());\ - m_inner = other.inner_allocator();\ - return *this;\ - }\ - \ - scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other)\ - {\ - outer_allocator_type::operator=(boost::move(other.outer_allocator()));\ - m_inner = ::boost::move(other.inner_allocator());\ - return *this;\ - }\ - \ - void swap(scoped_allocator_adaptor_base &r)\ - {\ - boost::adl_move_swap(this->outer_allocator(), r.outer_allocator());\ - boost::adl_move_swap(this->m_inner, r.inner_allocator());\ - }\ - \ - friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r)\ - { l.swap(r); }\ - \ - inner_allocator_type& inner_allocator()\ - { return m_inner; }\ - \ - inner_allocator_type const& inner_allocator() const\ - { return m_inner; }\ - \ - outer_allocator_type & outer_allocator()\ - { return static_cast(*this); }\ - \ - const outer_allocator_type &outer_allocator() const\ - { return static_cast(*this); }\ - \ - scoped_allocator_type select_on_container_copy_construction() const\ - {\ - return scoped_allocator_type\ - (internal_type_t()\ - ,outer_traits_type::select_on_container_copy_construction(this->outer_allocator())\ - ,inner_traits_type::select_on_container_copy_construction(this->inner_allocator())\ - );\ - }\ - private:\ - inner_allocator_type m_inner;\ -};\ -//! -BOOST_MOVE_ITERATE_1TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_ADAPTOR_BASE_CODE) -#undef BOOST_CONTAINER_SCOPED_ALLOCATOR_ADAPTOR_BASE_CODE - -#endif //#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - #define BOOST_CONTAINER_SCOPEDALLOC_DUMMYTRUE ,true - #define BOOST_CONTAINER_SCOPEDALLOC_ALLINNER BOOST_MOVE_TARG9 - #define BOOST_CONTAINER_SCOPEDALLOC_ALLINNERCLASS BOOST_MOVE_CLASS9 -#else - #define BOOST_CONTAINER_SCOPEDALLOC_DUMMYTRUE - #define BOOST_CONTAINER_SCOPEDALLOC_ALLINNER InnerAllocs... - #define BOOST_CONTAINER_SCOPEDALLOC_ALLINNERCLASS typename... InnerAllocs -#endif - -//Specialization for adaptor without any InnerAlloc -template -class scoped_allocator_adaptor_base< OuterAlloc BOOST_CONTAINER_SCOPEDALLOC_DUMMYTRUE> - : public OuterAlloc -{ - BOOST_COPYABLE_AND_MOVABLE(scoped_allocator_adaptor_base) - public: - - template - struct rebind_base - { - typedef scoped_allocator_adaptor_base - ::template portable_rebind_alloc::type - BOOST_CONTAINER_SCOPEDALLOC_DUMMYTRUE > other; - }; - - typedef OuterAlloc outer_allocator_type; - typedef allocator_traits outer_traits_type; - typedef scoped_allocator_adaptor inner_allocator_type; - typedef inner_allocator_type scoped_allocator_type; - typedef allocator_traits inner_traits_type; - typedef typename outer_traits_type:: - propagate_on_container_copy_assignment propagate_on_container_copy_assignment; - typedef typename outer_traits_type:: - propagate_on_container_move_assignment propagate_on_container_move_assignment; - typedef typename outer_traits_type:: - propagate_on_container_swap propagate_on_container_swap; - typedef typename outer_traits_type:: - is_always_equal is_always_equal; - - scoped_allocator_adaptor_base() - {} - - template - scoped_allocator_adaptor_base(BOOST_FWD_REF(OuterA2) outerAlloc) - : outer_allocator_type(::boost::forward(outerAlloc)) - {} - - scoped_allocator_adaptor_base(const scoped_allocator_adaptor_base& other) - : outer_allocator_type(other.outer_allocator()) - {} - - scoped_allocator_adaptor_base(BOOST_RV_REF(scoped_allocator_adaptor_base) other) - : outer_allocator_type(::boost::move(other.outer_allocator())) - {} - - template - scoped_allocator_adaptor_base - (const scoped_allocator_adaptor_base& other) - : outer_allocator_type(other.outer_allocator()) - {} - - template - scoped_allocator_adaptor_base - (BOOST_RV_REF_BEG scoped_allocator_adaptor_base BOOST_RV_REF_END other) - : outer_allocator_type(other.outer_allocator()) - {} - - public: - struct internal_type_t{}; - - template - scoped_allocator_adaptor_base(internal_type_t, BOOST_FWD_REF(OuterA2) outerAlloc, const inner_allocator_type &) - : outer_allocator_type(::boost::forward(outerAlloc)) - {} - - public: - scoped_allocator_adaptor_base &operator=(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor_base) other) - { - outer_allocator_type::operator=(other.outer_allocator()); - return *this; - } - - scoped_allocator_adaptor_base &operator=(BOOST_RV_REF(scoped_allocator_adaptor_base) other) - { - outer_allocator_type::operator=(boost::move(other.outer_allocator())); - return *this; - } - - void swap(scoped_allocator_adaptor_base &r) - { - boost::adl_move_swap(this->outer_allocator(), r.outer_allocator()); - } - - friend void swap(scoped_allocator_adaptor_base &l, scoped_allocator_adaptor_base &r) - { l.swap(r); } - - inner_allocator_type& inner_allocator() - { return static_cast(*this); } - - inner_allocator_type const& inner_allocator() const - { return static_cast(*this); } - - outer_allocator_type & outer_allocator() - { return static_cast(*this); } - - const outer_allocator_type &outer_allocator() const - { return static_cast(*this); } - - scoped_allocator_type select_on_container_copy_construction() const - { - return scoped_allocator_type - (internal_type_t() - ,outer_traits_type::select_on_container_copy_construction(this->outer_allocator()) - //Don't use inner_traits_type::select_on_container_copy_construction(this->inner_allocator()) - //as inner_allocator() is equal to *this and that would trigger an infinite loop - , this->inner_allocator() - ); - } -}; - -} //namespace container_detail { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//Scoped allocator -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - -#if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST) - -//! This class is a C++03-compatible implementation of std::scoped_allocator_adaptor. -//! The class template scoped_allocator_adaptor is an allocator template that specifies -//! the memory resource (the outer allocator) to be used by a container (as any other -//! allocator does) and also specifies an inner allocator resource to be passed to -//! the constructor of every element within the container. -//! -//! This adaptor is -//! instantiated with one outer and zero or more inner allocator types. If -//! instantiated with only one allocator type, the inner allocator becomes the -//! scoped_allocator_adaptor itself, thus using the same allocator resource for the -//! container and every element within the container and, if the elements themselves -//! are containers, each of their elements recursively. If instantiated with more than -//! one allocator, the first allocator is the outer allocator for use by the container, -//! the second allocator is passed to the constructors of the container's elements, -//! and, if the elements themselves are containers, the third allocator is passed to -//! the elements' elements, and so on. If containers are nested to a depth greater -//! than the number of allocators, the last allocator is used repeatedly, as in the -//! single-allocator case, for any remaining recursions. -//! -//! [Note: The -//! scoped_allocator_adaptor is derived from the outer allocator type so it can be -//! substituted for the outer allocator type in most expressions. -end note] -//! -//! In the construct member functions, OUTERMOST(x) is x if x does not have -//! an outer_allocator() member function and -//! OUTERMOST(x.outer_allocator()) otherwise; OUTERMOST_ALLOC_TRAITS(x) is -//! allocator_traits. -//! -//! [Note: OUTERMOST(x) and -//! OUTERMOST_ALLOC_TRAITS(x) are recursive operations. It is incumbent upon -//! the definition of outer_allocator() to ensure that the recursion terminates. -//! It will terminate for all instantiations of scoped_allocator_adaptor. -end note] -template -class scoped_allocator_adaptor - -#else // #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST) - -template -class scoped_allocator_adaptor - -#endif // #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST) - -#else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - -template -class scoped_allocator_adaptor -#endif - - : public container_detail::scoped_allocator_adaptor_base - -{ - BOOST_COPYABLE_AND_MOVABLE(scoped_allocator_adaptor) - - public: - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - typedef container_detail::scoped_allocator_adaptor_base - base_type; - typedef typename base_type::internal_type_t internal_type_t; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - typedef OuterAlloc outer_allocator_type; - //! Type: For exposition only - //! - typedef allocator_traits outer_traits_type; - //! Type: scoped_allocator_adaptor if sizeof...(InnerAllocs) is zero; otherwise, - //! scoped_allocator_adaptor. - typedef typename base_type::inner_allocator_type inner_allocator_type; - typedef allocator_traits inner_traits_type; - typedef typename outer_traits_type::value_type value_type; - typedef typename outer_traits_type::size_type size_type; - typedef typename outer_traits_type::difference_type difference_type; - typedef typename outer_traits_type::pointer pointer; - typedef typename outer_traits_type::const_pointer const_pointer; - typedef typename outer_traits_type::void_pointer void_pointer; - typedef typename outer_traits_type::const_void_pointer const_void_pointer; - //! Type: A type with a constant boolean value == true if - //!`allocator_traits:: propagate_on_container_copy_assignment::value` is - //! true for any Allocator in the set of OuterAlloc and InnerAllocs..., false otherwise. - typedef typename base_type:: - propagate_on_container_copy_assignment propagate_on_container_copy_assignment; - //! Type: A type with a constant boolean value == true if - //!`allocator_traits:: propagate_on_container_move_assignment::value` is - //! true for any Allocator in the set of OuterAlloc and InnerAllocs..., false otherwise. - typedef typename base_type:: - propagate_on_container_move_assignment propagate_on_container_move_assignment; - - //! Type: A type with a constant boolean value == true if - //! `allocator_traits:: propagate_on_container_swap::value` is - //! true for any Allocator in the set of OuterAlloc and InnerAllocs..., false otherwise. - typedef typename base_type:: - propagate_on_container_swap propagate_on_container_swap; - - //! Type: A type with a constant boolean value == true if - //!`allocator_traits:: is_always_equal::value` is - //! true for all Allocator in the set of OuterAlloc and InnerAllocs..., false otherwise. - typedef typename base_type:: - is_always_equal is_always_equal; - - //! Type: Rebinds scoped allocator to - //! typedef scoped_allocator_adaptor - //! < typename outer_traits_type::template portable_rebind_alloc::type - //! , InnerAllocs... > - template - struct rebind - { - typedef scoped_allocator_adaptor - < typename outer_traits_type::template portable_rebind_alloc::type - , BOOST_CONTAINER_SCOPEDALLOC_ALLINNER> other; - }; - - //! Effects: value-initializes the OuterAlloc base class - //! and the inner allocator object. - scoped_allocator_adaptor() - {} - - ~scoped_allocator_adaptor() - {} - - //! Effects: initializes each allocator within the adaptor with - //! the corresponding allocator from other. - scoped_allocator_adaptor(const scoped_allocator_adaptor& other) - : base_type(other.base()) - {} - - //! Effects: move constructs each allocator within the adaptor with - //! the corresponding allocator from other. - scoped_allocator_adaptor(BOOST_RV_REF(scoped_allocator_adaptor) other) - : base_type(::boost::move(other.base())) - {} - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Requires: OuterAlloc shall be constructible from OuterA2. - //! - //! Effects: initializes the OuterAlloc base class with boost::forward(outerAlloc) and inner - //! with innerAllocs...(hence recursively initializing each allocator within the adaptor with the - //! corresponding allocator from the argument list). - template - scoped_allocator_adaptor(BOOST_FWD_REF(OuterA2) outerAlloc, const InnerAllocs & ...innerAllocs) - : base_type(::boost::forward(outerAlloc), innerAllocs...) - {} - #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - #define BOOST_CONTAINER_SCOPED_ALLOCATOR_ADAPTOR_RELATED_ALLOCATOR_CONSTRUCTOR_CODE(N)\ - template \ - scoped_allocator_adaptor(BOOST_FWD_REF(OuterA2) outerAlloc BOOST_MOVE_I##N BOOST_MOVE_CREF##N)\ - : base_type(::boost::forward(outerAlloc) BOOST_MOVE_I##N BOOST_MOVE_ARG##N)\ - {}\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_ADAPTOR_RELATED_ALLOCATOR_CONSTRUCTOR_CODE) - #undef BOOST_CONTAINER_SCOPED_ALLOCATOR_ADAPTOR_RELATED_ALLOCATOR_CONSTRUCTOR_CODE - - #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Requires: OuterAlloc shall be constructible from OuterA2. - //! - //! Effects: initializes each allocator within the adaptor with the corresponding allocator from other. - template - scoped_allocator_adaptor(const scoped_allocator_adaptor &other) - : base_type(other.base()) - {} - - //! Requires: OuterAlloc shall be constructible from OuterA2. - //! - //! Effects: initializes each allocator within the adaptor with the corresponding allocator - //! rvalue from other. - template - scoped_allocator_adaptor(BOOST_RV_REF_BEG scoped_allocator_adaptor - BOOST_RV_REF_END other) - : base_type(::boost::move(other.base())) - {} - - scoped_allocator_adaptor &operator=(BOOST_COPY_ASSIGN_REF(scoped_allocator_adaptor) other) - { return static_cast(base_type::operator=(static_cast(other))); } - - scoped_allocator_adaptor &operator=(BOOST_RV_REF(scoped_allocator_adaptor) other) - { return static_cast(base_type::operator=(boost::move(other.base()))); } - - #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED - //! Effects: swaps *this with r. - //! - void swap(scoped_allocator_adaptor &r); - - //! Effects: swaps *this with r. - //! - friend void swap(scoped_allocator_adaptor &l, scoped_allocator_adaptor &r); - - //! Returns: - //! static_cast(*this). - outer_allocator_type & outer_allocator() BOOST_NOEXCEPT_OR_NOTHROW; - - //! Returns: - //! static_cast(*this). - const outer_allocator_type &outer_allocator() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! Returns: - //! *this if sizeof...(InnerAllocs) is zero; otherwise, inner. - inner_allocator_type& inner_allocator() BOOST_NOEXCEPT_OR_NOTHROW; - - //! Returns: - //! *this if sizeof...(InnerAllocs) is zero; otherwise, inner. - inner_allocator_type const& inner_allocator() const BOOST_NOEXCEPT_OR_NOTHROW; - - #endif //BOOST_CONTAINER_DOXYGEN_INVOKED - - //! Returns: - //! allocator_traits:: max_size(outer_allocator()). - size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW - { return outer_traits_type::max_size(this->outer_allocator()); } - - //! Effects: - //! calls OUTERMOST_ALLOC_TRAITS(*this):: destroy(OUTERMOST(*this), p). - template - void destroy(T* p) BOOST_NOEXCEPT_OR_NOTHROW - { - allocator_traits::type> - ::destroy(get_outermost_allocator(this->outer_allocator()), p); - } - - //! Returns: - //! allocator_traits::allocate(outer_allocator(), n). - pointer allocate(size_type n) - { return outer_traits_type::allocate(this->outer_allocator(), n); } - - //! Returns: - //! allocator_traits::allocate(outer_allocator(), n, hint). - pointer allocate(size_type n, const_void_pointer hint) - { return outer_traits_type::allocate(this->outer_allocator(), n, hint); } - - //! Effects: - //! allocator_traits::deallocate(outer_allocator(), p, n). - void deallocate(pointer p, size_type n) - { outer_traits_type::deallocate(this->outer_allocator(), p, n); } - - #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED - //! Returns: A new scoped_allocator_adaptor object where each allocator - //! Allocator in the adaptor is initialized from the result of calling - //! allocator_traits::select_on_container_copy_construction() on - //! the corresponding allocator in *this. - scoped_allocator_adaptor select_on_container_copy_construction() const; - #endif //BOOST_CONTAINER_DOXYGEN_INVOKED - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - base_type &base() { return *this; } - - const base_type &base() const { return *this; } - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: - //! 1) If uses_allocator::value is false calls - //! OUTERMOST_ALLOC_TRAITS(*this):: - //! construct(OUTERMOST(*this), p, std::forward(args)...). - //! - //! 2) Otherwise, if uses_allocator::value is true and - //! is_constructible:: value is true, calls - //! OUTERMOST_ALLOC_TRAITS(*this):: construct(OUTERMOST(*this), p, allocator_arg, - //! inner_allocator(), std::forward(args)...). - //! - //! [Note: In compilers without advanced decltype SFINAE support, is_constructible can't - //! be implemented so that condition will be replaced by - //! constructible_with_allocator_prefix::value. -end note] - //! - //! 3) Otherwise, if uses_allocator::value is true and - //! is_constructible:: value is true, calls - //! OUTERMOST_ALLOC_TRAITS(*this):: construct(OUTERMOST(*this), p, - //! std::forward(args)..., inner_allocator()). - //! - //! [Note: In compilers without advanced decltype SFINAE support, is_constructible can't be - //! implemented so that condition will be replaced by - //! constructible_with_allocator_suffix:: value. -end note] - //! - //! 4) Otherwise, the program is ill-formed. - //! - //! [Note: An error will result if uses_allocator evaluates - //! to true but the specific constructor does not take an allocator. This definition prevents a silent - //! failure to pass an inner allocator to a contained element. -end note] - template < typename T, class ...Args> - void construct(T* p, BOOST_FWD_REF(Args)...args) - { - container_detail::dispatch_uses_allocator - ( (get_outermost_allocator)(this->outer_allocator()) - , this->inner_allocator(), p, ::boost::forward(args)...); - } - - #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //Disable this overload if the first argument is pair as some compilers have - //overload selection problems when the first parameter is a pair. - #define BOOST_CONTAINER_SCOPED_ALLOCATOR_CONSTRUCT_CODE(N) \ - template < typename T BOOST_MOVE_I##N BOOST_MOVE_CLASSQ##N >\ - void construct(T* p BOOST_MOVE_I##N BOOST_MOVE_UREFQ##N)\ - {\ - container_detail::dispatch_uses_allocator\ - ( (get_outermost_allocator)(this->outer_allocator())\ - , this->inner_allocator(), p BOOST_MOVE_I##N BOOST_MOVE_FWDQ##N);\ - }\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SCOPED_ALLOCATOR_CONSTRUCT_CODE) - #undef BOOST_CONTAINER_SCOPED_ALLOCATOR_CONSTRUCT_CODE - - #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - //Internal function - template - scoped_allocator_adaptor(internal_type_t, BOOST_FWD_REF(OuterA2) outer, const inner_allocator_type& inner) - : base_type(internal_type_t(), ::boost::forward(outer), inner) - {} - - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -}; - -/// @cond - -template -struct scoped_allocator_operator_equal -{ - //Optimize equal outer allocator types with - //allocator_traits::equal which uses is_always_equal - template - static bool equal_outer(const IA &l, const IA &r) - { return allocator_traits::equal(l, r); } - - //Otherwise compare it normally - template - static bool equal_outer(const IA1 &l, const IA2 &r) - { return l == r; } - - //Otherwise compare it normally - template - static bool equal_inner(const IA &l, const IA &r) - { return allocator_traits::equal(l, r); } -}; - -template<> -struct scoped_allocator_operator_equal - : scoped_allocator_operator_equal -{ - //when inner allocator count is zero, - //inner_allocator_type is the same as outer_allocator_type - //so both types can be different in operator== - template - static bool equal_inner(const IA1 &, const IA2 &) - { return true; } -}; - -/// @endcond - -template -inline bool operator==(const scoped_allocator_adaptor& a - ,const scoped_allocator_adaptor& b) -{ - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - const bool has_zero_inner = sizeof...(InnerAllocs) == 0u; - #else - const bool has_zero_inner = boost::container::container_detail::is_same::value; - #endif - typedef scoped_allocator_operator_equal equal_t; - return equal_t::equal_outer(a.outer_allocator(), b.outer_allocator()) && - equal_t::equal_inner(a.inner_allocator(), b.inner_allocator()); -} - -template -inline bool operator!=(const scoped_allocator_adaptor& a - ,const scoped_allocator_adaptor& b) -{ return !(a == b); } - -}} // namespace boost { namespace container { - -#include - -#endif // BOOST_CONTAINER_ALLOCATOR_SCOPED_ALLOCATOR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/scoped_allocator_fwd.hpp b/contrib/libboost/boost_1_65_0/boost/container/scoped_allocator_fwd.hpp deleted file mode 100644 index cddf7fad156..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/scoped_allocator_fwd.hpp +++ /dev/null @@ -1,71 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_SCOPED_ALLOCATOR_FWD_HPP -#define BOOST_CONTAINER_ALLOCATOR_SCOPED_ALLOCATOR_FWD_HPP - -//! \file -//! This header file forward declares boost::container::scoped_allocator_adaptor - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include -#include - -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif - -namespace boost { namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST) - - template - class scoped_allocator_adaptor; - - #else // #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST) - - template - class scoped_allocator_adaptor; - - template - class scoped_allocator_adaptor; - - #endif // #if !defined(BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST) - -#else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - template - class scoped_allocator_adaptor; - -#endif - - -#else //BOOST_CONTAINER_DOXYGEN_INVOKED - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -}} // namespace boost { namespace container { - -#include - -#endif // BOOST_CONTAINER_ALLOCATOR_SCOPED_ALLOCATOR_FWD_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/set.hpp b/contrib/libboost/boost_1_65_0/boost/container/set.hpp deleted file mode 100644 index 8730b1c89ad..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/set.hpp +++ /dev/null @@ -1,1430 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-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/container for documentation. -// -////////////////////////////////////////////////////////////////////////////// - -#ifndef BOOST_CONTAINER_SET_HPP -#define BOOST_CONTAINER_SET_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -// container -#include -// container/detail -#include -#include -#include //new_allocator -// intrusive/detail -#include //pair -#include //less, equal -// move -#include -#include -// move/detail -#include -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif -// std -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) -#include -#endif - -namespace boost { -namespace container { - -#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! A set is a kind of associative container that supports unique keys (contains at -//! most one of each key value) and provides for fast retrieval of the keys themselves. -//! Class set supports bidirectional iterators. -//! -//! A set satisfies all of the requirements of a container and of a reversible container -//! , and of an associative container. A set also provides most operations described in -//! for unique keys. -//! -//! \tparam Key is the type to be inserted in the set, which is also the key_type -//! \tparam Compare is the comparison functor used to order keys -//! \tparam Allocator is the allocator to be used to allocate memory for this container -//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options. -template , class Allocator = new_allocator, class Options = tree_assoc_defaults > -#else -template -#endif -class set - ///@cond - : public container_detail::tree - < Key, container_detail::identity, Compare, Allocator, Options> - ///@endcond -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - BOOST_COPYABLE_AND_MOVABLE(set) - typedef container_detail::tree - < Key, container_detail::identity, Compare, Allocator, Options> base_t; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - ////////////////////////////////////////////// - // - // types - // - ////////////////////////////////////////////// - typedef Key key_type; - typedef Key value_type; - typedef Compare key_compare; - typedef Compare value_compare; - typedef ::boost::container::allocator_traits allocator_traits_type; - typedef typename ::boost::container::allocator_traits::pointer pointer; - typedef typename ::boost::container::allocator_traits::const_pointer const_pointer; - typedef typename ::boost::container::allocator_traits::reference reference; - typedef typename ::boost::container::allocator_traits::const_reference const_reference; - typedef typename ::boost::container::allocator_traits::size_type size_type; - typedef typename ::boost::container::allocator_traits::difference_type difference_type; - typedef Allocator allocator_type; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::node_type) node_type; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::insert_return_type) insert_return_type; - - ////////////////////////////////////////////// - // - // construct/copy/destroy - // - ////////////////////////////////////////////// - - //! Effects: Default constructs an empty set. - //! - //! Complexity: Constant. - - BOOST_CONTAINER_FORCEINLINE set() - BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible::value && - container_detail::is_nothrow_default_constructible::value) - : base_t() - {} - - //! Effects: Constructs an empty set using the specified allocator object. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit set(const allocator_type& a) - : base_t(a) - {} - - //! Effects: Constructs an empty set using the specified comparison object. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE explicit set(const Compare& comp) - : base_t(comp) - {} - - //! Effects: Constructs an empty set using the specified comparison object - //! and allocator. - //! - //! Complexity: Constant. - BOOST_CONTAINER_FORCEINLINE set(const Compare& comp, const allocator_type& a) - : base_t(comp, a) - {} - - //! Effects: Constructs an empty set using and - //! inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last) - : base_t(true, first, last) - {} - - //! Effects: Constructs an empty set using the specified - //! allocator, and inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last, const allocator_type& a) - : base_t(true, first, last, key_compare(), a) - {} - - //! Effects: Constructs an empty set using the specified comparison object and - //! inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last, const Compare& comp) - : base_t(true, first, last, comp) - {} - - //! Effects: Constructs an empty set using the specified comparison object and - //! allocator, and inserts elements from the range [first ,last ). - //! - //! Complexity: Linear in N if the range [first ,last ) is already sorted using - //! the predicate and otherwise N logN, where N is last - first. - template - BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) - : base_t(true, first, last, comp, a) - {} - - //! Effects: Constructs an empty set and - //! inserts elements from the ordered unique range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, InputIterator first, InputIterator last) - : base_t(ordered_range, first, last) - {} - - //! Effects: Constructs an empty set using the specified comparison object and - //! inserts elements from the ordered unique range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp ) - : base_t(ordered_range, first, last, comp) - {} - - //! Effects: Constructs an empty set using the specified comparison object and - //! allocator, and inserts elements from the ordered unique range [first ,last). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, InputIterator first, InputIterator last - , const Compare& comp, const allocator_type& a) - : base_t(ordered_range, first, last, comp, a) - {} - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Constructs an empty set and - //! inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using - //! the predicate and otherwise N logN, where N is il.begin() - il.end(). - BOOST_CONTAINER_FORCEINLINE set(std::initializer_list il) - : base_t(true, il.begin(), il.end()) - {} - - //! Effects: Constructs an empty set using the specified - //! allocator, and inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using - //! the predicate and otherwise N logN, where N is il.begin() - il.end(). - BOOST_CONTAINER_FORCEINLINE set(std::initializer_list il, const allocator_type& a) - : base_t(true, il.begin(), il.end(), Compare(), a) - {} - - //! Effects: Constructs an empty set using the specified comparison object and - //! inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using - //! the predicate and otherwise N logN, where N is il.begin() - il.end(). - BOOST_CONTAINER_FORCEINLINE set(std::initializer_list il, const Compare& comp ) - : base_t(true, il.begin(), il.end(), comp) - {} - - //! Effects: Constructs an empty set using the specified comparison object and - //! allocator, and inserts elements from the range [il.begin(), il.end()). - //! - //! Complexity: Linear in N if the range [il.begin(), il.end()) is already sorted using - //! the predicate and otherwise N logN, where N is il.begin() - il.end(). - BOOST_CONTAINER_FORCEINLINE set(std::initializer_list il, const Compare& comp, const allocator_type& a) - : base_t(true, il.begin(), il.end(), comp, a) - {} - - //! Effects: Constructs an empty set and - //! inserts elements from the ordered unique range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, std::initializer_list il) - : base_t(ordered_range, il.begin(), il.end()) - {} - - //! Effects: Constructs an empty set using the specified comparison object and - //! inserts elements from the ordered unique range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, std::initializer_list il, const Compare& comp) - : base_t(ordered_range, il.begin(), il.end(), comp) - {} - - //! Effects: Constructs an empty set using the specified comparison object and - //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [il.begin(), il.end()) must be ordered according to the predicate and must be - //! unique values. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) - : base_t(ordered_range, il.begin(), il.end(), comp, a) - {} -#endif - - //! Effects: Copy constructs a set. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE set(const set& x) - : base_t(static_cast(x)) - {} - - //! Effects: Move constructs a set. Constructs *this using x's resources. - //! - //! Complexity: Constant. - //! - //! Postcondition: x is emptied. - BOOST_CONTAINER_FORCEINLINE set(BOOST_RV_REF(set) x) - BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible::value) - : base_t(BOOST_MOVE_BASE(base_t, x)) - {} - - //! Effects: Copy constructs a set using the specified allocator. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE set(const set& x, const allocator_type &a) - : base_t(static_cast(x), a) - {} - - //! Effects: Move constructs a set using the specified allocator. - //! Constructs *this using x's resources. - //! - //! Complexity: Constant if a == x.get_allocator(), linear otherwise. - BOOST_CONTAINER_FORCEINLINE set(BOOST_RV_REF(set) x, const allocator_type &a) - : base_t(BOOST_MOVE_BASE(base_t, x), a) - {} - - //! Effects: Makes *this a copy of x. - //! - //! Complexity: Linear in x.size(). - BOOST_CONTAINER_FORCEINLINE set& operator=(BOOST_COPY_ASSIGN_REF(set) x) - { return static_cast(this->base_t::operator=(static_cast(x))); } - - //! Effects: this->swap(x.get()). - //! - //! Throws: If allocator_traits_type::propagate_on_container_move_assignment - //! is false and (allocation throws or value_type's move constructor throws) - //! - //! Complexity: Constant if allocator_traits_type:: - //! propagate_on_container_move_assignment is true or - //! this->get>allocator() == x.get_allocator(). Linear otherwise. - BOOST_CONTAINER_FORCEINLINE set& operator=(BOOST_RV_REF(set) x) - BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || - allocator_traits_type::is_always_equal::value) && - boost::container::container_detail::is_nothrow_move_assignable::value) - { return static_cast(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Copy all elements from il to *this. - //! - //! Complexity: Linear in il.size(). - set& operator=(std::initializer_list il) - { - this->clear(); - insert(il.begin(), il.end()); - return *this; - } -#endif - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Returns a copy of the allocator that - //! was passed to the object's constructor. - //! - //! Complexity: Constant. - allocator_type get_allocator() const; - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - stored_allocator_type &get_stored_allocator(); - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - const stored_allocator_type &get_stored_allocator() const; - - //! Effects: Returns an iterator to the first element contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant - iterator begin(); - - //! Effects: Returns a const_iterator to the first element contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator begin() const; - - //! Effects: Returns a const_iterator to the first element contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator cbegin() const; - - //! Effects: Returns an iterator to the end of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - iterator end(); - - //! Effects: Returns a const_iterator to the end of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator end() const; - - //! Effects: Returns a const_iterator to the end of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator cend() const; - - //! Effects: Returns a reverse_iterator pointing to the beginning - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reverse_iterator rbegin(); - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator rbegin() const; - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator crbegin() const; - - //! Effects: Returns a reverse_iterator pointing to the end - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reverse_iterator rend(); - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator rend() const; - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator crend() const; - - //! Effects: Returns true if the container contains no elements. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - bool empty() const; - - //! Effects: Returns the number of the elements contained in the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - size_type size() const; - - //! Effects: Returns the largest possible size of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - size_type max_size() const; - #endif // #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Inserts an object x of type Key constructed with - //! std::forward(args)... if and only if there is - //! no element in the container with equivalent value. - //! and returns the iterator pointing to the - //! newly inserted element. - //! - //! Returns: The bool component of the returned pair is true if and only - //! if the insertion takes place, and the iterator component of the pair - //! points to the element with key equivalent to the key of x. - //! - //! Throws: If memory allocation throws or - //! Key's in-place constructor throws. - //! - //! Complexity: Logarithmic. - template - BOOST_CONTAINER_FORCEINLINE std::pair emplace(BOOST_FWD_REF(Args)... args) - { return this->base_t::emplace_unique(boost::forward(args)...); } - - //! Effects: Inserts an object of type Key constructed with - //! std::forward(args)... if and only if there is - //! no element in the container with equivalent value. - //! p is a hint pointing to where the insert - //! should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic. - template - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) - { return this->base_t::emplace_hint_unique(p, boost::forward(args)...); } - - #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #define BOOST_CONTAINER_SET_EMPLACE_CODE(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE std::pair emplace(BOOST_MOVE_UREF##N)\ - { return this->base_t::emplace_unique(BOOST_MOVE_FWD##N); }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - { return this->base_t::emplace_hint_unique(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SET_EMPLACE_CODE) - #undef BOOST_CONTAINER_SET_EMPLACE_CODE - - #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: Inserts x if and only if there is no element in the container - //! with key equivalent to the key of x. - //! - //! Returns: The bool component of the returned pair is true if and only - //! if the insertion takes place, and the iterator component of the pair - //! points to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic. - std::pair insert(const value_type &x); - - //! Effects: Move constructs a new value from x if and only if there is - //! no element in the container with key equivalent to the key of x. - //! - //! Returns: The bool component of the returned pair is true if and only - //! if the insertion takes place, and the iterator component of the pair - //! points to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic. - std::pair insert(value_type &&x); - #else - private: - typedef std::pair insert_return_pair; - public: - BOOST_MOVE_CONVERSION_AWARE_CATCH(insert, value_type, insert_return_pair, this->priv_insert) - #endif - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: Inserts a copy of x in the container if and only if there is - //! no element in the container with key equivalent to the key of x. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic in general, but amortized constant if t - //! is inserted right before p. - iterator insert(const_iterator p, const value_type &x); - - //! Effects: Inserts an element move constructed from x in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent to the key of x. - //! - //! Complexity: Logarithmic. - iterator insert(const_iterator p, value_type &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator) - #endif - - //! Requires: first, last are not iterators into *this. - //! - //! Effects: inserts each element from the range [first,last) if and only - //! if there is no element with key equivalent to the key of that element. - //! - //! Complexity: At most N log(size()+N) (N is the distance from first to last) - template - BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last) - { this->base_t::insert_unique(first, last); } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: inserts each element from the range [il.begin(),il.end()) if and only - //! if there is no element with key equivalent to the key of that element. - //! - //! Complexity: At most N log(size()+N) (N is the distance from il.begin() to il.end()) - BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list il) - { this->base_t::insert_unique(il.begin(), il.end()); } -#endif - - //! @copydoc ::boost::container::map::insert(node_type&&) - BOOST_CONTAINER_FORCEINLINE insert_return_type insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) - { return this->base_t::insert_unique_node(boost::move(nh)); } - - //! @copydoc ::boost::container::map::insert(const_iterator, node_type&&) - BOOST_CONTAINER_FORCEINLINE insert_return_type insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) - { return this->base_t::insert_unique_node(hint, boost::move(nh)); } - - //! @copydoc ::boost::container::map::merge(map&) - template - BOOST_CONTAINER_FORCEINLINE void merge(set& source) - { - typedef container_detail::tree - , C2, Allocator, Options> base2_t; - this->base_t::merge_unique(static_cast(source)); - } - - //! @copydoc ::boost::container::set::merge(set&) - template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG set BOOST_RV_REF_END source) - { return this->merge(static_cast&>(source)); } - - //! @copydoc ::boost::container::map::merge(multimap&) - template - BOOST_CONTAINER_FORCEINLINE void merge(multiset& source) - { - typedef container_detail::tree - , C2, Allocator, Options> base2_t; - this->base_t::merge_unique(static_cast(source)); - } - - //! @copydoc ::boost::container::set::merge(multiset&) - template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multiset BOOST_RV_REF_END source) - { return this->merge(static_cast&>(source)); } - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Erases the element pointed to by p. - //! - //! Returns: Returns an iterator pointing to the element immediately - //! following q prior to the element being erased. If no such element exists, - //! returns end(). - //! - //! Complexity: Amortized constant time - iterator erase(const_iterator p); - - //! Effects: Erases all elements in the container with key equivalent to x. - //! - //! Returns: Returns the number of erased elements. - //! - //! Complexity: log(size()) + count(k) - size_type erase(const key_type& x); - - //! Effects: Erases all the elements in the range [first, last). - //! - //! Returns: Returns last. - //! - //! Complexity: log(size())+N where N is the distance from first to last. - iterator erase(const_iterator first, const_iterator last); - - //! @copydoc ::boost::container::map::extract(const_iterator) - node_type extract(const_iterator p); - - //! @copydoc ::boost::container::map::extract(const key_type&) - node_type extract(const key_type& x); - - //! Effects: Swaps the contents of *this and x. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - void swap(set& x) - BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value - && boost::container::container_detail::is_nothrow_swappable::value ); - - //! Effects: erase(a.begin(),a.end()). - //! - //! Postcondition: size() == 0. - //! - //! Complexity: linear in size(). - void clear(); - - //! Effects: Returns the comparison object out - //! of which a was constructed. - //! - //! Complexity: Constant. - key_compare key_comp() const; - - //! Effects: Returns an object of value_compare constructed out - //! of the comparison object. - //! - //! Complexity: Constant. - value_compare value_comp() const; - - //! Returns: An iterator pointing to an element with the key - //! equivalent to x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic. - iterator find(const key_type& x); - - //! Returns: A const_iterator pointing to an element with the key - //! equivalent to x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic. - const_iterator find(const key_type& x) const; - - #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Returns: The number of elements with key equivalent to x. - //! - //! Complexity: log(size())+count(k) - BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const - { return static_cast(this->base_t::find(x) != this->base_t::cend()); } - - //! Returns: The number of elements with key equivalent to x. - //! - //! Complexity: log(size())+count(k) - BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) - { return static_cast(this->base_t::find(x) != this->base_t::end()); } - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Returns: An iterator pointing to the first element with key not less - //! than k, or a.end() if such an element is not found. - //! - //! Complexity: Logarithmic - iterator lower_bound(const key_type& x); - - //! Returns: A const iterator pointing to the first element with key not - //! less than k, or a.end() if such an element is not found. - //! - //! Complexity: Logarithmic - const_iterator lower_bound(const key_type& x) const; - - //! Returns: An iterator pointing to the first element with key not less - //! than x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic - iterator upper_bound(const key_type& x); - - //! Returns: A const iterator pointing to the first element with key not - //! less than x, or end() if such an element is not found. - //! - //! Complexity: Logarithmic - const_iterator upper_bound(const key_type& x) const; - - #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). - //! - //! Complexity: Logarithmic - BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const key_type& x) - { return this->base_t::lower_bound_range(x); } - - //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). - //! - //! Complexity: Logarithmic - BOOST_CONTAINER_FORCEINLINE std::pair equal_range(const key_type& x) const - { return this->base_t::lower_bound_range(x); } - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). - //! - //! Complexity: Logarithmic - std::pair equal_range(const key_type& x); - - //! Effects: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)). - //! - //! Complexity: Logarithmic - std::pair equal_range(const key_type& x) const; - - //! Effects: Rebalances the tree. It's a no-op for Red-Black and AVL trees. - //! - //! Complexity: Linear - void rebalance(); - - //! Effects: Returns true if x and y are equal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator==(const set& x, const set& y); - - //! Effects: Returns true if x and y are unequal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator!=(const set& x, const set& y); - - //! Effects: Returns true if x is less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<(const set& x, const set& y); - - //! Effects: Returns true if x is greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>(const set& x, const set& y); - - //! Effects: Returns true if x is equal or less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<=(const set& x, const set& y); - - //! Effects: Returns true if x is equal or greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>=(const set& x, const set& y); - - //! Effects: x.swap(y) - //! - //! Complexity: Constant. - friend void swap(set& x, set& y); - - #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - template - BOOST_CONTAINER_FORCEINLINE std::pair priv_insert(BOOST_FWD_REF(KeyType) x) - { return this->base_t::insert_unique(::boost::forward(x)); } - - template - BOOST_CONTAINER_FORCEINLINE iterator priv_insert(const_iterator p, BOOST_FWD_REF(KeyType) x) - { return this->base_t::insert_unique(p, ::boost::forward(x)); } - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -}; - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -} //namespace container { - -//!has_trivial_destructor_after_move<> == true_type -//!specialization for optimizations -template -struct has_trivial_destructor_after_move > -{ - typedef typename ::boost::container::allocator_traits::pointer pointer; - static const bool value = ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value; -}; - -namespace container { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! A multiset is a kind of associative container that supports equivalent keys -//! (possibly contains multiple copies of the same key value) and provides for -//! fast retrieval of the keys themselves. Class multiset supports bidirectional iterators. -//! -//! A multiset satisfies all of the requirements of a container and of a reversible -//! container, and of an associative container). multiset also provides most operations -//! described for duplicate keys. -//! -//! \tparam Key is the type to be inserted in the set, which is also the key_type -//! \tparam Compare is the comparison functor used to order keys -//! \tparam Allocator is the allocator to be used to allocate memory for this container -//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options. -template , class Allocator = new_allocator, class Options = tree_assoc_defaults > -#else -template -#endif -class multiset - /// @cond - : public container_detail::tree - , Compare, Allocator, Options> - /// @endcond -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - BOOST_COPYABLE_AND_MOVABLE(multiset) - typedef container_detail::tree - , Compare, Allocator, Options> base_t; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - - ////////////////////////////////////////////// - // - // types - // - ////////////////////////////////////////////// - typedef Key key_type; - typedef Key value_type; - typedef Compare key_compare; - typedef Compare value_compare; - typedef ::boost::container::allocator_traits allocator_traits_type; - typedef typename ::boost::container::allocator_traits::pointer pointer; - typedef typename ::boost::container::allocator_traits::const_pointer const_pointer; - typedef typename ::boost::container::allocator_traits::reference reference; - typedef typename ::boost::container::allocator_traits::const_reference const_reference; - typedef typename ::boost::container::allocator_traits::size_type size_type; - typedef typename ::boost::container::allocator_traits::difference_type difference_type; - typedef Allocator allocator_type; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator; - typedef typename BOOST_CONTAINER_IMPDEF(base_t::node_type) node_type; - - ////////////////////////////////////////////// - // - // construct/copy/destroy - // - ////////////////////////////////////////////// - - //! @copydoc ::boost::container::set::set() - BOOST_CONTAINER_FORCEINLINE multiset() - BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible::value && - container_detail::is_nothrow_default_constructible::value) - : base_t() - {} - - //! @copydoc ::boost::container::set::set(const allocator_type&) - BOOST_CONTAINER_FORCEINLINE explicit multiset(const allocator_type& a) - : base_t(a) - {} - - //! @copydoc ::boost::container::set::set(const Compare&) - BOOST_CONTAINER_FORCEINLINE explicit multiset(const Compare& comp) - : base_t(comp) - {} - - //! @copydoc ::boost::container::set::set(const Compare&, const allocator_type&) - BOOST_CONTAINER_FORCEINLINE multiset(const Compare& comp, const allocator_type& a) - : base_t(comp, a) - {} - - //! @copydoc ::boost::container::set::set(InputIterator, InputIterator) - template - BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last) - : base_t(false, first, last) - {} - - //! @copydoc ::boost::container::set::set(InputIterator, InputIterator, const allocator_type&) - template - BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last, const allocator_type& a) - : base_t(false, first, last, key_compare(), a) - {} - - //! @copydoc ::boost::container::set::set(InputIterator, InputIterator, const Compare&) - template - BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last, const Compare& comp) - : base_t(false, first, last, comp) - {} - - //! @copydoc ::boost::container::set::set(InputIterator, InputIterator, const Compare&, const allocator_type&) - template - BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) - : base_t(false, first, last, comp, a) - {} - - //! Effects: Constructs an empty multiset and - //! and inserts elements from the ordered range [first ,last ). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE multiset( ordered_range_t, InputIterator first, InputIterator last ) - : base_t(ordered_range, first, last) - {} - - //! Effects: Constructs an empty multiset using the specified comparison object and - //! inserts elements from the ordered range [first ,last ). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE multiset( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp) - : base_t(ordered_range, first, last, comp) - {} - - //! Effects: Constructs an empty multiset using the specified comparison object and - //! allocator, and inserts elements from the ordered range [first ,last ). This function - //! is more efficient than the normal range creation for ordered ranges. - //! - //! Requires: [first ,last) must be ordered according to the predicate. - //! - //! Complexity: Linear in N. - //! - //! Note: Non-standard extension. - template - BOOST_CONTAINER_FORCEINLINE multiset( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a) - : base_t(ordered_range, first, last, comp, a) - {} - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! @copydoc ::boost::container::set::set(std::initializer_list) - BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list il) - : base_t(false, il.begin(), il.end()) - {} - - //! @copydoc ::boost::container::set::set(std::initializer_list, const allocator_type&) - BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list il, const allocator_type& a) - : base_t(false, il.begin(), il.end(), Compare(), a) - {} - - //! @copydoc ::boost::container::set::set(std::initializer_list, const Compare&) - BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list il, const Compare& comp) - : base_t(false, il.begin(), il.end(), comp) - {} - - //! @copydoc ::boost::container::set::set(std::initializer_list, const Compare&, const allocator_type&) - BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list il, const Compare& comp, const allocator_type& a) - : base_t(false, il.begin(), il.end(), comp, a) - {} - - //! @copydoc ::boost::container::set::set(ordered_unique_range_t, std::initializer_list) - BOOST_CONTAINER_FORCEINLINE multiset(ordered_range_t, std::initializer_list il) - : base_t(ordered_range, il.begin(), il.end()) - {} - - //! @copydoc ::boost::container::set::set(ordered_unique_range_t, std::initializer_list, const Compare&) - BOOST_CONTAINER_FORCEINLINE multiset(ordered_range_t, std::initializer_list il, const Compare& comp) - : base_t(ordered_range, il.begin(), il.end(), comp) - {} - - //! @copydoc ::boost::container::set::set(ordered_unique_range_t, std::initializer_list, const Compare&, const allocator_type&) - BOOST_CONTAINER_FORCEINLINE multiset(ordered_range_t, std::initializer_list il, const Compare& comp, const allocator_type& a) - : base_t(ordered_range, il.begin(), il.end(), comp, a) - {} -#endif - - //! @copydoc ::boost::container::set::set(const set &) - BOOST_CONTAINER_FORCEINLINE multiset(const multiset& x) - : base_t(static_cast(x)) - {} - - //! @copydoc ::boost::container::set::set(set &&) - BOOST_CONTAINER_FORCEINLINE multiset(BOOST_RV_REF(multiset) x) - BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible::value) - : base_t(BOOST_MOVE_BASE(base_t, x)) - {} - - //! @copydoc ::boost::container::set::set(const set &, const allocator_type &) - BOOST_CONTAINER_FORCEINLINE multiset(const multiset& x, const allocator_type &a) - : base_t(static_cast(x), a) - {} - - //! @copydoc ::boost::container::set::set(set &&, const allocator_type &) - BOOST_CONTAINER_FORCEINLINE multiset(BOOST_RV_REF(multiset) x, const allocator_type &a) - : base_t(BOOST_MOVE_BASE(base_t, x), a) - {} - - //! @copydoc ::boost::container::set::operator=(const set &) - BOOST_CONTAINER_FORCEINLINE multiset& operator=(BOOST_COPY_ASSIGN_REF(multiset) x) - { return static_cast(this->base_t::operator=(static_cast(x))); } - - //! @copydoc ::boost::container::set::operator=(set &&) - BOOST_CONTAINER_FORCEINLINE multiset& operator=(BOOST_RV_REF(multiset) x) - BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value || - allocator_traits_type::is_always_equal::value) && - boost::container::container_detail::is_nothrow_move_assignable::value) - { return static_cast(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! @copydoc ::boost::container::set::operator=(std::initializer_list) - multiset& operator=(std::initializer_list il) - { - this->clear(); - insert(il.begin(), il.end()); - return *this; - } -#endif - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! @copydoc ::boost::container::set::get_allocator() - allocator_type get_allocator() const; - - //! @copydoc ::boost::container::set::get_stored_allocator() - stored_allocator_type &get_stored_allocator(); - - //! @copydoc ::boost::container::set::get_stored_allocator() const - const stored_allocator_type &get_stored_allocator() const; - - //! @copydoc ::boost::container::set::begin() - iterator begin(); - - //! @copydoc ::boost::container::set::begin() const - const_iterator begin() const; - - //! @copydoc ::boost::container::set::cbegin() const - const_iterator cbegin() const; - - //! @copydoc ::boost::container::set::end() - iterator end() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::end() const - const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::cend() const - const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::rbegin() - reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::rbegin() const - const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::crbegin() const - const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::rend() - reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::rend() const - const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::crend() const - const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::empty() const - bool empty() const; - - //! @copydoc ::boost::container::set::size() const - size_type size() const; - - //! @copydoc ::boost::container::set::max_size() const - size_type max_size() const; - - #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Inserts an object of type Key constructed with - //! std::forward(args)... and returns the iterator pointing to the - //! newly inserted element. - //! - //! Complexity: Logarithmic. - template - BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_FWD_REF(Args)... args) - { return this->base_t::emplace_equal(boost::forward(args)...); } - - //! Effects: Inserts an object of type Key constructed with - //! std::forward(args)... - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic in general, but amortized constant if t - //! is inserted right before p. - template - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args) - { return this->base_t::emplace_hint_equal(p, boost::forward(args)...); } - - #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #define BOOST_CONTAINER_MULTISET_EMPLACE_CODE(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\ - { return this->base_t::emplace_equal(BOOST_MOVE_FWD##N); }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - { return this->base_t::emplace_hint_equal(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MULTISET_EMPLACE_CODE) - #undef BOOST_CONTAINER_MULTISET_EMPLACE_CODE - - #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: Inserts x and returns the iterator pointing to the - //! newly inserted element. - //! - //! Complexity: Logarithmic. - iterator insert(const value_type &x); - - //! Effects: Inserts a copy of x in the container. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic in general, but amortized constant if t - //! is inserted right before p. - iterator insert(value_type &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH(insert, value_type, iterator, this->priv_insert) - #endif - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: Inserts a copy of x in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic in general, but amortized constant if t - //! is inserted right before p. - iterator insert(const_iterator p, const value_type &x); - - //! Effects: Inserts a value move constructed from x in the container. - //! p is a hint pointing to where the insert should start to search. - //! - //! Returns: An iterator pointing to the element with key equivalent - //! to the key of x. - //! - //! Complexity: Logarithmic in general, but amortized constant if t - //! is inserted right before p. - iterator insert(const_iterator p, value_type &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator) - #endif - - //! Requires: first, last are not iterators into *this. - //! - //! Effects: inserts each element from the range [first,last) . - //! - //! Complexity: At most N log(size()+N) (N is the distance from first to last) - template - BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last) - { this->base_t::insert_equal(first, last); } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! @copydoc ::boost::container::set::insert(std::initializer_list) - BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list il) - { this->base_t::insert_equal(il.begin(), il.end()); } -#endif - - //! @copydoc ::boost::container::multimap::insert(node_type&&) - BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) - { return this->base_t::insert_equal_node(boost::move(nh)); } - - //! @copydoc ::boost::container::multimap::insert(const_iterator, node_type&&) - BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh) - { return this->base_t::insert_equal_node(hint, boost::move(nh)); } - - //! @copydoc ::boost::container::multimap::merge(multimap&) - template - BOOST_CONTAINER_FORCEINLINE void merge(multiset& source) - { - typedef container_detail::tree - , C2, Allocator, Options> base2_t; - this->base_t::merge_equal(static_cast(source)); - } - - //! @copydoc ::boost::container::multiset::merge(multiset&) - template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multiset BOOST_RV_REF_END source) - { return this->merge(static_cast&>(source)); } - - //! @copydoc ::boost::container::multimap::merge(map&) - template - BOOST_CONTAINER_FORCEINLINE void merge(set& source) - { - typedef container_detail::tree - , C2, Allocator, Options> base2_t; - this->base_t::merge_equal(static_cast(source)); - } - - //! @copydoc ::boost::container::multiset::merge(set&) - template - BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG set BOOST_RV_REF_END source) - { return this->merge(static_cast&>(source)); } - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! @copydoc ::boost::container::set::erase(const_iterator) - iterator erase(const_iterator p); - - //! @copydoc ::boost::container::set::erase(const key_type&) - size_type erase(const key_type& x); - - //! @copydoc ::boost::container::set::erase(const_iterator,const_iterator) - iterator erase(const_iterator first, const_iterator last); - - //! @copydoc ::boost::container::multimap::extract(const_iterator) - node_type extract(const_iterator p); - - //! @copydoc ::boost::container::multimap::extract(const key_type&) - node_type extract(const key_type& x); - - //! @copydoc ::boost::container::set::swap - void swap(multiset& x) - BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value - && boost::container::container_detail::is_nothrow_swappable::value ); - - //! @copydoc ::boost::container::set::clear - void clear() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @copydoc ::boost::container::set::key_comp - key_compare key_comp() const; - - //! @copydoc ::boost::container::set::value_comp - value_compare value_comp() const; - - //! @copydoc ::boost::container::set::find(const key_type& ) - iterator find(const key_type& x); - - //! @copydoc ::boost::container::set::find(const key_type& ) const - const_iterator find(const key_type& x) const; - - //! @copydoc ::boost::container::set::count(const key_type& ) const - size_type count(const key_type& x) const; - - //! @copydoc ::boost::container::set::lower_bound(const key_type& ) - iterator lower_bound(const key_type& x); - - //! @copydoc ::boost::container::set::lower_bound(const key_type& ) const - const_iterator lower_bound(const key_type& x) const; - - //! @copydoc ::boost::container::set::upper_bound(const key_type& ) - iterator upper_bound(const key_type& x); - - //! @copydoc ::boost::container::set::upper_bound(const key_type& ) const - const_iterator upper_bound(const key_type& x) const; - - //! @copydoc ::boost::container::set::equal_range(const key_type& ) const - std::pair equal_range(const key_type& x) const; - - //! @copydoc ::boost::container::set::equal_range(const key_type& ) - std::pair equal_range(const key_type& x); - - //! @copydoc ::boost::container::set::rebalance() - void rebalance(); - - //! Effects: Returns true if x and y are equal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator==(const multiset& x, const multiset& y); - - //! Effects: Returns true if x and y are unequal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator!=(const multiset& x, const multiset& y); - - //! Effects: Returns true if x is less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<(const multiset& x, const multiset& y); - - //! Effects: Returns true if x is greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>(const multiset& x, const multiset& y); - - //! Effects: Returns true if x is equal or less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<=(const multiset& x, const multiset& y); - - //! Effects: Returns true if x is equal or greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>=(const multiset& x, const multiset& y); - - //! Effects: x.swap(y) - //! - //! Complexity: Constant. - friend void swap(multiset& x, multiset& y); - - #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - template - BOOST_CONTAINER_FORCEINLINE iterator priv_insert(BOOST_FWD_REF(KeyType) x) - { return this->base_t::insert_equal(::boost::forward(x)); } - - template - BOOST_CONTAINER_FORCEINLINE iterator priv_insert(const_iterator p, BOOST_FWD_REF(KeyType) x) - { return this->base_t::insert_equal(p, ::boost::forward(x)); } - - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -}; - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -} //namespace container { - -//!has_trivial_destructor_after_move<> == true_type -//!specialization for optimizations -template -struct has_trivial_destructor_after_move > -{ - typedef typename ::boost::container::allocator_traits::pointer pointer; - static const bool value = ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value; -}; - -namespace container { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -}} - -#include - -#endif // BOOST_CONTAINER_SET_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/slist.hpp b/contrib/libboost/boost_1_65_0/boost/container/slist.hpp deleted file mode 100644 index 3a1d66bb6d3..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/slist.hpp +++ /dev/null @@ -1,1720 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2004-2015. 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_SLIST_HPP -#define BOOST_CONTAINER_SLIST_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -// container -#include -#include //new_allocator -#include -// container/detail -#include //algo_equal(), algo_lexicographical_compare -#include -#include -#include -#include -#include -#include -// intrusive -#include -#include -// move -#include -#include -#include -// move/detail -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif -#include -// other -#include -// std -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) -#include -#endif - -namespace boost { -namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -template -class slist; - -namespace container_detail { - -template -struct slist_hook -{ - typedef typename container_detail::bi::make_slist_base_hook - , container_detail::bi::link_mode >::type type; -}; - -template -struct slist_node - : public slist_hook::type -{ - private: - slist_node(); - - public: - typedef T value_type; - typedef typename slist_hook::type hook_type; - - T m_data; - - T &get_data() - { return this->m_data; } - - const T &get_data() const - { return this->m_data; } -}; - -template -struct iiterator_node_value_type< slist_node > { - typedef T type; -}; - -template -struct intrusive_slist_type -{ - typedef boost::container::allocator_traits allocator_traits_type; - typedef typename allocator_traits_type::value_type value_type; - typedef typename boost::intrusive::pointer_traits - ::template - rebind_pointer::type - void_pointer; - typedef typename container_detail::slist_node - node_type; - - typedef typename container_detail::bi::make_slist - ::type> - ,container_detail::bi::constant_time_size - , container_detail::bi::size_type - - >::type container_type; - typedef container_type type ; -}; - -} //namespace container_detail { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! An slist is a singly linked list: a list where each element is linked to the next -//! element, but not to the previous element. That is, it is a Sequence that -//! supports forward but not backward traversal, and (amortized) constant time -//! insertion and removal of elements. Slists, like lists, have the important -//! property that insertion and splicing do not invalidate iterators to list elements, -//! and that even removal invalidates only the iterators that point to the elements -//! that are removed. The ordering of iterators may be changed (that is, -//! slist::iterator might have a different predecessor or successor after a list -//! operation than it did before), but the iterators themselves will not be invalidated -//! or made to point to different elements unless that invalidation or mutation is explicit. -//! -//! The main difference between slist and list is that list's iterators are bidirectional -//! iterators, while slist's iterators are forward iterators. This means that slist is -//! less versatile than list; frequently, however, bidirectional iterators are -//! unnecessary. You should usually use slist unless you actually need the extra -//! functionality of list, because singly linked lists are smaller and faster than double -//! linked lists. -//! -//! Important performance note: like every other Sequence, slist defines the member -//! functions insert and erase. Using these member functions carelessly, however, can -//! result in disastrously slow programs. The problem is that insert's first argument is -//! an iterator p, and that it inserts the new element(s) before p. This means that -//! insert must find the iterator just before p; this is a constant-time operation -//! for list, since list has bidirectional iterators, but for slist it must find that -//! iterator by traversing the list from the beginning up to p. In other words: -//! insert and erase are slow operations anywhere but near the beginning of the slist. -//! -//! Slist provides the member functions insert_after and erase_after, which are constant -//! time operations: you should always use insert_after and erase_after whenever -//! possible. If you find that insert_after and erase_after aren't adequate for your -//! needs, and that you often need to use insert and erase in the middle of the list, -//! then you should probably use list instead of slist. -//! -//! \tparam T The type of object that is stored in the list -//! \tparam Allocator The allocator used for all internal memory management -#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED -template > -#else -template -#endif -class slist - : protected container_detail::node_alloc_holder - ::type> -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - typedef typename - container_detail::intrusive_slist_type::type Icont; - typedef container_detail::node_alloc_holder AllocHolder; - typedef typename AllocHolder::NodePtr NodePtr; - typedef typename AllocHolder::NodeAlloc NodeAlloc; - typedef typename AllocHolder::ValAlloc ValAlloc; - typedef typename AllocHolder::Node Node; - typedef container_detail::allocator_destroyer Destroyer; - typedef typename AllocHolder::alloc_version alloc_version; - typedef boost::container:: - allocator_traits allocator_traits_type; - typedef boost::container::equal_to_value equal_to_value_type; - - BOOST_COPYABLE_AND_MOVABLE(slist) - typedef container_detail::iterator_from_iiterator iterator_impl; - typedef container_detail::iterator_from_iiterator const_iterator_impl; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - ////////////////////////////////////////////// - // - // types - // - ////////////////////////////////////////////// - - typedef T value_type; - typedef typename ::boost::container::allocator_traits::pointer pointer; - typedef typename ::boost::container::allocator_traits::const_pointer const_pointer; - typedef typename ::boost::container::allocator_traits::reference reference; - typedef typename ::boost::container::allocator_traits::const_reference const_reference; - typedef typename ::boost::container::allocator_traits::size_type size_type; - typedef typename ::boost::container::allocator_traits::difference_type difference_type; - typedef Allocator allocator_type; - typedef BOOST_CONTAINER_IMPDEF(NodeAlloc) stored_allocator_type; - typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator; - typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator; - - public: - - ////////////////////////////////////////////// - // - // construct/copy/destroy - // - ////////////////////////////////////////////// - - //! Effects: Constructs a list taking the allocator as parameter. - //! - //! Throws: If allocator_type's copy constructor throws. - //! - //! Complexity: Constant. - slist() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible::value) - : AllocHolder() - {} - - //! Effects: Constructs a list taking the allocator as parameter. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - explicit slist(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW - : AllocHolder(a) - {} - - //! Effects: Constructs a list - //! and inserts n value-initialized value_types. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's default or copy constructor throws. - //! - //! Complexity: Linear to n. - explicit slist(size_type n) - : AllocHolder(allocator_type()) - { this->resize(n); } - - //! Effects: Constructs a list that will use a copy of allocator a - //! and inserts n copies of value. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's default or copy constructor throws. - //! - //! Complexity: Linear to n. - slist(size_type n, const allocator_type &a) - : AllocHolder(a) - { this->resize(n); } - - //! Effects: Constructs a list that will use a copy of allocator a - //! and inserts n copies of value. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's default or copy constructor throws. - //! - //! Complexity: Linear to n. - explicit slist(size_type n, const value_type& x, const allocator_type& a = allocator_type()) - : AllocHolder(a) - { this->insert_after(this->cbefore_begin(), n, x); } - - //! Effects: Constructs a list that will use a copy of allocator a - //! and inserts a copy of the range [first, last) in the list. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's constructor taking a dereferenced InIt throws. - //! - //! Complexity: Linear to the range [first, last). - template - slist(InpIt first, InpIt last, const allocator_type& a = allocator_type()) - : AllocHolder(a) - { this->insert_after(this->cbefore_begin(), first, last); } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Constructs a list that will use a copy of allocator a - //! and inserts a copy of the range [il.begin(), il.end()) in the list. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's constructor taking a dereferenced std::initializer_list iterator throws. - //! - //! Complexity: Linear to the range [il.begin(), il.end()). - slist(std::initializer_list il, const allocator_type& a = allocator_type()) - : AllocHolder(a) - { this->insert_after(this->cbefore_begin(), il.begin(), il.end()); } -#endif - - //! Effects: Copy constructs a list. - //! - //! Postcondition: x == *this. - //! - //! Throws: If allocator_type's default constructor - //! - //! Complexity: Linear to the elements x contains. - slist(const slist& x) - : AllocHolder(x) - { this->insert_after(this->cbefore_begin(), x.begin(), x.end()); } - - //! Effects: Move constructor. Moves x's resources to *this. - //! - //! Throws: If allocator_type's copy constructor throws. - //! - //! Complexity: Constant. - slist(BOOST_RV_REF(slist) x) BOOST_NOEXCEPT_OR_NOTHROW - : AllocHolder(BOOST_MOVE_BASE(AllocHolder, x)) - {} - - //! Effects: Copy constructs a list using the specified allocator. - //! - //! Postcondition: x == *this. - //! - //! Throws: If allocator_type's default constructor - //! - //! Complexity: Linear to the elements x contains. - slist(const slist& x, const allocator_type &a) - : AllocHolder(a) - { this->insert_after(this->cbefore_begin(), x.begin(), x.end()); } - - //! Effects: Move constructor using the specified allocator. - //! Moves x's resources to *this. - //! - //! Throws: If allocation or value_type's copy constructor throws. - //! - //! Complexity: Constant if a == x.get_allocator(), linear otherwise. - slist(BOOST_RV_REF(slist) x, const allocator_type &a) - : AllocHolder(a) - { - if(this->node_alloc() == x.node_alloc()){ - this->icont().swap(x.icont()); - } - else{ - this->insert_after(this->cbefore_begin(), boost::make_move_iterator(x.begin()), boost::make_move_iterator(x.end())); - } - } - - //! Effects: Destroys the list. All stored values are destroyed - //! and used memory is deallocated. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the number of elements. - ~slist() BOOST_NOEXCEPT_OR_NOTHROW - {} //AllocHolder clears the slist - - //! Effects: Makes *this contain the same elements as x. - //! - //! Postcondition: this->size() == x.size(). *this contains a copy - //! of each of x's elements. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to the number of elements in x. - slist& operator= (BOOST_COPY_ASSIGN_REF(slist) x) - { - if (&x != this){ - NodeAlloc &this_alloc = this->node_alloc(); - const NodeAlloc &x_alloc = x.node_alloc(); - container_detail::bool_ flag; - if(flag && this_alloc != x_alloc){ - this->clear(); - } - this->AllocHolder::copy_assign_alloc(x); - this->assign(x.begin(), x.end()); - } - return *this; - } - - //! Effects: Makes *this contain the same elements as x. - //! - //! Postcondition: this->size() == x.size(). *this contains a copy - //! of each of x's elements. - //! - //! Throws: If allocator_traits_type::propagate_on_container_move_assignment - //! is false and (allocation throws or value_type's move constructor throws) - //! - //! Complexity: Constant if allocator_traits_type:: - //! propagate_on_container_move_assignment is true or - //! this->get>allocator() == x.get_allocator(). Linear otherwise. - slist& operator=(BOOST_RV_REF(slist) x) - BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value - || allocator_traits_type::is_always_equal::value) - { - BOOST_ASSERT(this != &x); - NodeAlloc &this_alloc = this->node_alloc(); - NodeAlloc &x_alloc = x.node_alloc(); - const bool propagate_alloc = allocator_traits_type:: - propagate_on_container_move_assignment::value; - const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal; - //Resources can be transferred if both allocators are - //going to be equal after this function (either propagated or already equal) - if(propagate_alloc || allocators_equal){ - //Destroy - this->clear(); - //Move allocator if needed - this->AllocHolder::move_assign_alloc(x); - //Obtain resources - this->icont() = boost::move(x.icont()); - } - //Else do a one by one move - else{ - this->assign( boost::make_move_iterator(x.begin()) - , boost::make_move_iterator(x.end())); - } - return *this; - } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Makes *this contain the same elements as in il. - //! - //! Postcondition: this->size() == il.size(). *this contains a copy - //! of each of il's elements. - //! - //! Throws: If allocator_traits_type::propagate_on_container_move_assignment - //! is false and (allocation throws or value_type's move constructor throws) - slist& operator=(std::initializer_list il) - { - assign(il.begin(), il.end()); - return *this; - } -#endif - - //! Effects: Assigns the n copies of val to *this. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to n. - void assign(size_type n, const T& val) - { - typedef constant_iterator cvalue_iterator; - return this->assign(cvalue_iterator(val, n), cvalue_iterator()); - } - - //! Effects: Assigns the range [first, last) to *this. - //! - //! Throws: If memory allocation throws or - //! T's constructor from dereferencing InpIt throws. - //! - //! Complexity: Linear to n. - template - void assign(InpIt first, InpIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::disable_if_convertible::type * = 0 - #endif - ) - { - iterator end_n(this->end()); - iterator prev(this->before_begin()); - iterator node(this->begin()); - while (node != end_n && first != last){ - *node = *first; - prev = node; - ++node; - ++first; - } - if (first != last) - this->insert_after(prev, first, last); - else - this->erase_after(prev, end_n); - } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Assigns the range [il.begin(), il.end()) to *this. - //! - //! Throws: If memory allocation throws or - //! T's constructor from dereferencing std::initializer_list iterator throws. - //! - //! Complexity: Linear to range [il.begin(), il.end()). - - void assign(std::initializer_list il) - { - assign(il.begin(), il.end()); - } -#endif - //! Effects: Returns a copy of the internal allocator. - //! - //! Throws: If allocator's copy constructor throws. - //! - //! Complexity: Constant. - allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW - { return allocator_type(this->node_alloc()); } - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW - { return this->node_alloc(); } - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->node_alloc(); } - - ////////////////////////////////////////////// - // - // iterators - // - ////////////////////////////////////////////// - - //! Effects: Returns a non-dereferenceable iterator that, - //! when incremented, yields begin(). This iterator may be used - //! as the argument to insert_after, erase_after, etc. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - iterator before_begin() BOOST_NOEXCEPT_OR_NOTHROW - { return iterator(end()); } - - //! Effects: Returns a non-dereferenceable const_iterator - //! that, when incremented, yields begin(). This iterator may be used - //! as the argument to insert_after, erase_after, etc. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator before_begin() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->cbefore_begin(); } - - //! Effects: Returns an iterator to the first element contained in the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - iterator begin() BOOST_NOEXCEPT_OR_NOTHROW - { return iterator(this->icont().begin()); } - - //! Effects: Returns a const_iterator to the first element contained in the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->cbegin(); } - - //! Effects: Returns an iterator to the end of the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - iterator end() BOOST_NOEXCEPT_OR_NOTHROW - { return iterator(this->icont().end()); } - - //! Effects: Returns a const_iterator to the end of the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->cend(); } - - //! Effects: Returns a non-dereferenceable const_iterator - //! that, when incremented, yields begin(). This iterator may be used - //! as the argument to insert_after, erase_after, etc. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator cbefore_begin() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_iterator(end()); } - - //! Effects: Returns a const_iterator to the first element contained in the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_iterator(this->non_const_icont().begin()); } - - //! Effects: Returns a const_iterator to the end of the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_iterator(this->non_const_icont().end()); } - - //! Returns: The iterator to the element before i in the sequence. - //! Returns the end-iterator, if either i is the begin-iterator or the - //! sequence is empty. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the number of elements before i. - //! - //! Note: Non-standard extension. - iterator previous(iterator p) BOOST_NOEXCEPT_OR_NOTHROW - { return iterator(this->icont().previous(p.get())); } - - //! Returns: The const_iterator to the element before i in the sequence. - //! Returns the end-const_iterator, if either i is the begin-const_iterator or - //! the sequence is empty. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the number of elements before i. - //! - //! Note: Non-standard extension. - const_iterator previous(const_iterator p) - { return const_iterator(this->icont().previous(p.get())); } - - ////////////////////////////////////////////// - // - // capacity - // - ////////////////////////////////////////////// - - //! Effects: Returns true if the list contains no elements. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - bool empty() const - { return !this->size(); } - - //! Effects: Returns the number of the elements contained in the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - size_type size() const - { return this->icont().size(); } - - //! Effects: Returns the largest possible size of the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - size_type max_size() const - { return AllocHolder::max_size(); } - - //! Effects: Inserts or erases elements at the end such that - //! the size becomes n. New elements are value initialized. - //! - //! Throws: If memory allocation throws, or T's copy constructor throws. - //! - //! Complexity: Linear to the difference between size() and new_size. - void resize(size_type new_size) - { - const_iterator last_pos; - if(!priv_try_shrink(new_size, last_pos)){ - typedef value_init_construct_iterator value_init_iterator; - this->insert_after(last_pos, value_init_iterator(new_size - this->size()), value_init_iterator()); - } - } - - //! Effects: Inserts or erases elements at the end such that - //! the size becomes n. New elements are copy constructed from x. - //! - //! Throws: If memory allocation throws, or T's copy constructor throws. - //! - //! Complexity: Linear to the difference between size() and new_size. - void resize(size_type new_size, const T& x) - { - const_iterator last_pos; - if(!priv_try_shrink(new_size, last_pos)){ - this->insert_after(last_pos, new_size, x); - } - } - - ////////////////////////////////////////////// - // - // element access - // - ////////////////////////////////////////////// - - //! Requires: !empty() - //! - //! Effects: Returns a reference to the first element - //! from the beginning of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reference front() - { - BOOST_ASSERT(!this->empty()); - return *this->begin(); - } - - //! Requires: !empty() - //! - //! Effects: Returns a const reference to the first element - //! from the beginning of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reference front() const - { - BOOST_ASSERT(!this->empty()); - return *this->begin(); - } - - ////////////////////////////////////////////// - // - // modifiers - // - ////////////////////////////////////////////// - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... in the front of the list - //! - //! Returns: A reference to the created object. - //! - //! Throws: If memory allocation throws or - //! T's copy constructor throws. - //! - //! Complexity: Amortized constant time. - template - reference emplace_front(BOOST_FWD_REF(Args)... args) - { return *this->emplace_after(this->cbefore_begin(), boost::forward(args)...); } - - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... after prev - //! - //! Throws: If memory allocation throws or - //! T's in-place constructor throws. - //! - //! Complexity: Constant - template - iterator emplace_after(const_iterator prev, BOOST_FWD_REF(Args)... args) - { - NodePtr pnode(AllocHolder::create_node(boost::forward(args)...)); - return iterator(this->icont().insert_after(prev.get(), *pnode)); - } - - #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #define BOOST_CONTAINER_SLIST_EMPLACE_CODE(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - reference emplace_front(BOOST_MOVE_UREF##N)\ - { return *this->emplace_after(this->cbefore_begin() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);}\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - iterator emplace_after(const_iterator p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - NodePtr pnode (AllocHolder::create_node(BOOST_MOVE_FWD##N));\ - return iterator(this->icont().insert_after(p.get(), *pnode));\ - }\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SLIST_EMPLACE_CODE) - #undef BOOST_CONTAINER_SLIST_EMPLACE_CODE - - #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: Inserts a copy of x at the beginning of the list. - //! - //! Throws: If memory allocation throws or - //! T's copy constructor throws. - //! - //! Complexity: Amortized constant time. - void push_front(const T &x); - - //! Effects: Constructs a new element in the beginning of the list - //! and moves the resources of x to this new element. - //! - //! Throws: If memory allocation throws. - //! - //! Complexity: Amortized constant time. - void push_front(T &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH(push_front, T, void, priv_push_front) - #endif - - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Inserts a copy of the value after prev_p. - //! - //! Returns: An iterator to the inserted element. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Amortized constant time. - //! - //! Note: Does not affect the validity of iterators and references of - //! previous values. - iterator insert_after(const_iterator prev_p, const T &x); - - //! Requires: prev_p must be a valid iterator of *this. - //! - //! Effects: Inserts a move constructed copy object from the value after the - //! element pointed by prev_p. - //! - //! Returns: An iterator to the inserted element. - //! - //! Throws: If memory allocation throws. - //! - //! Complexity: Amortized constant time. - //! - //! Note: Does not affect the validity of iterators and references of - //! previous values. - iterator insert_after(const_iterator prev_p, T &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert_after, T, iterator, priv_insert_after, const_iterator, const_iterator) - #endif - - //! Requires: prev_p must be a valid iterator of *this. - //! - //! Effects: Inserts n copies of x after prev_p. - //! - //! Returns: an iterator to the last inserted element or prev_p if n is 0. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! - //! Complexity: Linear to n. - //! - //! Note: Does not affect the validity of iterators and references of - //! previous values. - iterator insert_after(const_iterator prev_p, size_type n, const value_type& x) - { - typedef constant_iterator cvalue_iterator; - return this->insert_after(prev_p, cvalue_iterator(x, n), cvalue_iterator()); - } - - //! Requires: prev_p must be a valid iterator of *this. - //! - //! Effects: Inserts the range pointed by [first, last) after prev_p. - //! - //! Returns: an iterator to the last inserted element or prev_p if first == last. - //! - //! Throws: If memory allocation throws, T's constructor from a - //! dereferenced InpIt throws. - //! - //! Complexity: Linear to the number of elements inserted. - //! - //! Note: Does not affect the validity of iterators and references of - //! previous values. - template - iterator insert_after(const_iterator prev_p, InpIt first, InpIt last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - , typename container_detail::enable_if_c - < !container_detail::is_convertible::value - && (container_detail::is_input_iterator::value - || container_detail::is_same::value - ) - >::type * = 0 - #endif - ) - { - iterator ret_it(prev_p.get()); - for (; first != last; ++first){ - ret_it = iterator(this->icont().insert_after(ret_it.get(), *this->create_node_from_it(first))); - } - return ret_it; - } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Requires: prev_p must be a valid iterator of *this. - //! - //! Effects: Inserts the range pointed by [il.begin(), il.end()) after prev_p. - //! - //! Returns: an iterator to the last inserted element or prev_p if il.begin() == il.end(). - //! - //! Throws: If memory allocation throws, T's constructor from a - //! dereferenced std::initializer_list iterator throws. - //! - //! Complexity: Linear to the number of elements inserted. - //! - //! Note: Does not affect the validity of iterators and references of - //! previous values. - iterator insert_after(const_iterator prev_p, std::initializer_list il) - { - return insert_after(prev_p, il.begin(), il.end()); - } -#endif - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - template - iterator insert_after(const_iterator prev, FwdIt first, FwdIt last - , typename container_detail::enable_if_c - < !container_detail::is_convertible::value - && !(container_detail::is_input_iterator::value - || container_detail::is_same::value - ) - >::type * = 0 - ) - { - //Optimized allocation and construction - insertion_functor func(this->icont(), prev.get()); - this->allocate_many_and_construct(first, boost::container::iterator_distance(first, last), func); - return iterator(func.inserted_first()); - } - #endif - - //! Effects: Removes the first element from the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Amortized constant time. - void pop_front() - { - BOOST_ASSERT(!this->empty()); - this->icont().pop_front_and_dispose(Destroyer(this->node_alloc())); - } - - //! Effects: Erases the element after the element pointed by prev_p - //! of the list. - //! - //! Returns: the first element remaining beyond the removed elements, - //! or end() if no such element exists. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - //! - //! Note: Does not invalidate iterators or references to non erased elements. - iterator erase_after(const_iterator prev_p) - { - return iterator(this->icont().erase_after_and_dispose(prev_p.get(), Destroyer(this->node_alloc()))); - } - - //! Effects: Erases the range (before_first, last) from - //! the list. - //! - //! Returns: the first element remaining beyond the removed elements, - //! or end() if no such element exists. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the number of erased elements. - //! - //! Note: Does not invalidate iterators or references to non erased elements. - iterator erase_after(const_iterator before_first, const_iterator last) - { - return iterator(this->icont().erase_after_and_dispose(before_first.get(), last.get(), Destroyer(this->node_alloc()))); - } - - //! Effects: Swaps the contents of *this and x. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the number of elements on *this and x. - void swap(slist& x) - BOOST_NOEXCEPT_IF( allocator_traits_type::propagate_on_container_swap::value - || allocator_traits_type::is_always_equal::value) - { - BOOST_ASSERT(allocator_traits_type::propagate_on_container_swap::value || - allocator_traits_type::is_always_equal::value || - this->get_stored_allocator() == x.get_stored_allocator()); - AllocHolder::swap(x); - } - - //! Effects: Erases all the elements of the list. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the number of elements in the list. - void clear() - { this->icont().clear_and_dispose(Destroyer(this->node_alloc())); } - - ////////////////////////////////////////////// - // - // slist operations - // - ////////////////////////////////////////////// - - //! Requires: p must point to an element contained - //! by the list. x != *this - //! - //! Effects: Transfers all the elements of list x to this list, after the - //! the element pointed by p. No destructors or copy constructors are called. - //! - //! Throws: std::runtime_error if this' allocator and x's allocator - //! are not equal. - //! - //! Complexity: Linear to the elements in x. - //! - //! Note: Iterators of values obtained from list x now point to elements of - //! this list. Iterators of this list and all the references are not invalidated. - void splice_after(const_iterator prev_p, slist& x) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this != &x); - BOOST_ASSERT(this->node_alloc() == x.node_alloc()); - this->icont().splice_after(prev_p.get(), x.icont()); - } - - //! Requires: p must point to an element contained - //! by the list. x != *this - //! - //! Effects: Transfers all the elements of list x to this list, after the - //! the element pointed by p. No destructors or copy constructors are called. - //! - //! Throws: std::runtime_error if this' allocator and x's allocator - //! are not equal. - //! - //! Complexity: Linear to the elements in x. - //! - //! Note: Iterators of values obtained from list x now point to elements of - //! this list. Iterators of this list and all the references are not invalidated. - void splice_after(const_iterator prev_p, BOOST_RV_REF(slist) x) BOOST_NOEXCEPT_OR_NOTHROW - { this->splice_after(prev_p, static_cast(x)); } - - //! Requires: prev_p must be a valid iterator of this. - //! i must point to an element contained in list x. - //! this' allocator and x's allocator shall compare equal. - //! - //! Effects: Transfers the value pointed by i, from list x to this list, - //! after the element pointed by prev_p. - //! If prev_p == prev or prev_p == ++prev, this function is a null operation. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Iterators of values obtained from list x now point to elements of this - //! list. Iterators of this list and all the references are not invalidated. - void splice_after(const_iterator prev_p, slist& x, const_iterator prev) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->node_alloc() == x.node_alloc()); - this->icont().splice_after(prev_p.get(), x.icont(), prev.get()); - } - - //! Requires: prev_p must be a valid iterator of this. - //! i must point to an element contained in list x. - //! this' allocator and x's allocator shall compare equal. - //! - //! Effects: Transfers the value pointed by i, from list x to this list, - //! after the element pointed by prev_p. - //! If prev_p == prev or prev_p == ++prev, this function is a null operation. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Iterators of values obtained from list x now point to elements of this - //! list. Iterators of this list and all the references are not invalidated. - void splice_after(const_iterator prev_p, BOOST_RV_REF(slist) x, const_iterator prev) BOOST_NOEXCEPT_OR_NOTHROW - { this->splice_after(prev_p, static_cast(x), prev); } - - //! Requires: prev_p must be a valid iterator of this. - //! before_first and before_last must be valid iterators of x. - //! prev_p must not be contained in [before_first, before_last) range. - //! this' allocator and x's allocator shall compare equal. - //! - //! Effects: Transfers the range [before_first + 1, before_last + 1) - //! from list x to this list, after the element pointed by prev_p. - //! - //! Throws: Nothing - //! - //! Complexity: Linear to the number of transferred elements. - //! - //! Note: Iterators of values obtained from list x now point to elements of this - //! list. Iterators of this list and all the references are not invalidated. - void splice_after(const_iterator prev_p, slist& x, - const_iterator before_first, const_iterator before_last) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->node_alloc() == x.node_alloc()); - this->icont().splice_after - (prev_p.get(), x.icont(), before_first.get(), before_last.get()); - } - - //! Requires: prev_p must be a valid iterator of this. - //! before_first and before_last must be valid iterators of x. - //! prev_p must not be contained in [before_first, before_last) range. - //! this' allocator and x's allocator shall compare equal. - //! - //! Effects: Transfers the range [before_first + 1, before_last + 1) - //! from list x to this list, after the element pointed by prev_p. - //! - //! Throws: Nothing - //! - //! Complexity: Linear to the number of transferred elements. - //! - //! Note: Iterators of values obtained from list x now point to elements of this - //! list. Iterators of this list and all the references are not invalidated. - void splice_after(const_iterator prev_p, BOOST_RV_REF(slist) x, - const_iterator before_first, const_iterator before_last) BOOST_NOEXCEPT_OR_NOTHROW - { this->splice_after(prev_p, static_cast(x), before_first, before_last); } - - //! Requires: prev_p must be a valid iterator of this. - //! before_first and before_last must be valid iterators of x. - //! prev_p must not be contained in [before_first, before_last) range. - //! n == distance(before_first, before_last). - //! this' allocator and x's allocator shall compare equal. - //! - //! Effects: Transfers the range [before_first + 1, before_last + 1) - //! from list x to this list, after the element pointed by prev_p. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Iterators of values obtained from list x now point to elements of this - //! list. Iterators of this list and all the references are not invalidated. - void splice_after(const_iterator prev_p, slist& x, - const_iterator before_first, const_iterator before_last, - size_type n) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->node_alloc() == x.node_alloc()); - this->icont().splice_after - (prev_p.get(), x.icont(), before_first.get(), before_last.get(), n); - } - - //! Requires: prev_p must be a valid iterator of this. - //! before_first and before_last must be valid iterators of x. - //! prev_p must not be contained in [before_first, before_last) range. - //! n == distance(before_first, before_last). - //! this' allocator and x's allocator shall compare equal. - //! - //! Effects: Transfers the range [before_first + 1, before_last + 1) - //! from list x to this list, after the element pointed by prev_p. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Iterators of values obtained from list x now point to elements of this - //! list. Iterators of this list and all the references are not invalidated. - void splice_after(const_iterator prev_p, BOOST_RV_REF(slist) x, - const_iterator before_first, const_iterator before_last, - size_type n) BOOST_NOEXCEPT_OR_NOTHROW - { this->splice_after(prev_p, static_cast(x), before_first, before_last, n); } - - //! Effects: Removes all the elements that compare equal to value. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear time. It performs exactly size() comparisons for equality. - //! - //! Note: The relative order of elements that are not removed is unchanged, - //! and iterators to elements that are not removed remain valid. - void remove(const T& value) - { this->remove_if(equal_to_value_type(value)); } - - //! Effects: Removes all the elements for which a specified - //! predicate is satisfied. - //! - //! Throws: If pred throws. - //! - //! Complexity: Linear time. It performs exactly size() calls to the predicate. - //! - //! Note: The relative order of elements that are not removed is unchanged, - //! and iterators to elements that are not removed remain valid. - template - void remove_if(Pred pred) - { - typedef value_to_node_compare value_to_node_compare_type; - this->icont().remove_and_dispose_if(value_to_node_compare_type(pred), Destroyer(this->node_alloc())); - } - - //! Effects: Removes adjacent duplicate elements or adjacent - //! elements that are equal from the list. - //! - //! Throws: If comparison throws. - //! - //! Complexity: Linear time (size()-1 comparisons equality comparisons). - //! - //! Note: The relative order of elements that are not removed is unchanged, - //! and iterators to elements that are not removed remain valid. - void unique() - { this->unique(value_equal()); } - - //! Effects: Removes adjacent duplicate elements or adjacent - //! elements that satisfy some binary predicate from the list. - //! - //! Throws: If pred throws. - //! - //! Complexity: Linear time (size()-1 comparisons calls to pred()). - //! - //! Note: The relative order of elements that are not removed is unchanged, - //! and iterators to elements that are not removed remain valid. - template - void unique(Pred pred) - { - typedef value_to_node_compare value_to_node_compare_type; - this->icont().unique_and_dispose(value_to_node_compare_type(pred), Destroyer(this->node_alloc())); - } - - //! Requires: The lists x and *this must be distinct. - //! - //! Effects: This function removes all of x's elements and inserts them - //! in order into *this according to std::less. The merge is stable; - //! that is, if an element from *this is equivalent to one from x, then the element - //! from *this will precede the one from x. - //! - //! Throws: If comparison throws. - //! - //! Complexity: This function is linear time: it performs at most - //! size() + x.size() - 1 comparisons. - void merge(slist & x) - { this->merge(x, value_less()); } - - //! Requires: The lists x and *this must be distinct. - //! - //! Effects: This function removes all of x's elements and inserts them - //! in order into *this according to std::less. The merge is stable; - //! that is, if an element from *this is equivalent to one from x, then the element - //! from *this will precede the one from x. - //! - //! Throws: If comparison throws. - //! - //! Complexity: This function is linear time: it performs at most - //! size() + x.size() - 1 comparisons. - void merge(BOOST_RV_REF(slist) x) - { this->merge(static_cast(x)); } - - //! Requires: p must be a comparison function that induces a strict weak - //! ordering and both *this and x must be sorted according to that ordering - //! The lists x and *this must be distinct. - //! - //! Effects: This function removes all of x's elements and inserts them - //! in order into *this. The merge is stable; that is, if an element from *this is - //! equivalent to one from x, then the element from *this will precede the one from x. - //! - //! Throws: If comp throws. - //! - //! Complexity: This function is linear time: it performs at most - //! size() + x.size() - 1 comparisons. - //! - //! Note: Iterators and references to *this are not invalidated. - template - void merge(slist& x, StrictWeakOrdering comp) - { - typedef value_to_node_compare value_to_node_compare_type; - BOOST_ASSERT(this->node_alloc() == x.node_alloc()); - this->icont().merge(x.icont(), value_to_node_compare_type(comp)); - } - - //! Requires: p must be a comparison function that induces a strict weak - //! ordering and both *this and x must be sorted according to that ordering - //! The lists x and *this must be distinct. - //! - //! Effects: This function removes all of x's elements and inserts them - //! in order into *this. The merge is stable; that is, if an element from *this is - //! equivalent to one from x, then the element from *this will precede the one from x. - //! - //! Throws: If comp throws. - //! - //! Complexity: This function is linear time: it performs at most - //! size() + x.size() - 1 comparisons. - //! - //! Note: Iterators and references to *this are not invalidated. - template - void merge(BOOST_RV_REF(slist) x, StrictWeakOrdering comp) - { this->merge(static_cast(x), comp); } - - //! Effects: This function sorts the list *this according to std::less. - //! The sort is stable, that is, the relative order of equivalent elements is preserved. - //! - //! Throws: If comparison throws. - //! - //! Notes: Iterators and references are not invalidated. - //! - //! Complexity: The number of comparisons is approximately N log N, where N - //! is the list's size. - void sort() - { this->sort(value_less()); } - - //! Effects: This function sorts the list *this according to std::less. - //! The sort is stable, that is, the relative order of equivalent elements is preserved. - //! - //! Throws: If comp throws. - //! - //! Notes: Iterators and references are not invalidated. - //! - //! Complexity: The number of comparisons is approximately N log N, where N - //! is the list's size. - template - void sort(StrictWeakOrdering comp) - { - typedef value_to_node_compare value_to_node_compare_type; - // nothing if the slist has length 0 or 1. - if (this->size() < 2) - return; - this->icont().sort(value_to_node_compare_type(comp)); - } - - //! Effects: Reverses the order of elements in the list. - //! - //! Throws: Nothing. - //! - //! Complexity: This function is linear time. - //! - //! Note: Iterators and references are not invalidated - void reverse() BOOST_NOEXCEPT_OR_NOTHROW - { this->icont().reverse(); } - - ////////////////////////////////////////////// - // - // list compatibility interface - // - ////////////////////////////////////////////// - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... before p - //! - //! Throws: If memory allocation throws or - //! T's in-place constructor throws. - //! - //! Complexity: Linear to the elements before p - template - iterator emplace(const_iterator p, BOOST_FWD_REF(Args)... args) - { return this->emplace_after(this->previous(p), boost::forward(args)...); } - - #else - - #define BOOST_CONTAINER_SLIST_EMPLACE_CODE(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - iterator emplace(const_iterator p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - return this->emplace_after(this->previous(p) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\ - }\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SLIST_EMPLACE_CODE) - #undef BOOST_CONTAINER_SLIST_EMPLACE_CODE - - #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Insert a copy of x before p. - //! - //! Returns: an iterator to the inserted element. - //! - //! Throws: If memory allocation throws or x's copy constructor throws. - //! - //! Complexity: Linear to the elements before p. - iterator insert(const_iterator p, const T &x); - - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Insert a new element before p with x's resources. - //! - //! Returns: an iterator to the inserted element. - //! - //! Throws: If memory allocation throws. - //! - //! Complexity: Linear to the elements before p. - iterator insert(const_iterator prev_p, T &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator) - #endif - - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Inserts n copies of x before p. - //! - //! Returns: an iterator to the first inserted element or p if n == 0. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to n plus linear to the elements before p. - iterator insert(const_iterator p, size_type n, const value_type& x) - { - const_iterator prev(this->previous(p)); - this->insert_after(prev, n, x); - return ++iterator(prev.get()); - } - - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Insert a copy of the [first, last) range before p. - //! - //! Returns: an iterator to the first inserted element or p if first == last. - //! - //! Throws: If memory allocation throws, T's constructor from a - //! dereferenced InpIt throws. - //! - //! Complexity: Linear to distance [first, last) plus - //! linear to the elements before p. - template - iterator insert(const_iterator p, InIter first, InIter last) - { - const_iterator prev(this->previous(p)); - this->insert_after(prev, first, last); - return ++iterator(prev.get()); - } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Insert a copy of the [il.begin(), il.end()) range before p. - //! - //! Returns: an iterator to the first inserted element or p if il.begin() == il.end(). - //! - //! Throws: If memory allocation throws, T's constructor from a - //! dereferenced std::initializer_list iterator throws. - //! - //! Complexity: Linear to the range [il.begin(), il.end()) plus - //! linear to the elements before p. - iterator insert(const_iterator p, std::initializer_list il) - { - return insert(p, il.begin(), il.end()); - } -#endif - - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Erases the element at p. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the number of elements before p. - iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW - { return iterator(this->erase_after(previous(p))); } - - //! Requires: first and last must be valid iterator to elements in *this. - //! - //! Effects: Erases the elements pointed by [first, last). - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the distance between first and last plus - //! linear to the elements before first. - iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW - { return iterator(this->erase_after(previous(first), last)); } - - //! Requires: p must point to an element contained - //! by the list. x != *this. this' allocator and x's allocator shall compare equal - //! - //! Effects: Transfers all the elements of list x to this list, before the - //! the element pointed by p. No destructors or copy constructors are called. - //! - //! Throws: Nothing - //! - //! Complexity: Linear in distance(begin(), p), and linear in x.size(). - //! - //! Note: Iterators of values obtained from list x now point to elements of - //! this list. Iterators of this list and all the references are not invalidated. - void splice(const_iterator p, slist& x) BOOST_NOEXCEPT_OR_NOTHROW - { this->splice_after(this->previous(p), x); } - - //! Requires: p must point to an element contained - //! by the list. x != *this. this' allocator and x's allocator shall compare equal - //! - //! Effects: Transfers all the elements of list x to this list, before the - //! the element pointed by p. No destructors or copy constructors are called. - //! - //! Throws: Nothing - //! - //! Complexity: Linear in distance(begin(), p), and linear in x.size(). - //! - //! Note: Iterators of values obtained from list x now point to elements of - //! this list. Iterators of this list and all the references are not invalidated. - void splice(const_iterator p, BOOST_RV_REF(slist) x) BOOST_NOEXCEPT_OR_NOTHROW - { this->splice(p, static_cast(x)); } - - //! Requires: p must point to an element contained - //! by this list. i must point to an element contained in list x. - //! this' allocator and x's allocator shall compare equal - //! - //! Effects: Transfers the value pointed by i, from list x to this list, - //! before the element pointed by p. No destructors or copy constructors are called. - //! If p == i or p == ++i, this function is a null operation. - //! - //! Throws: Nothing - //! - //! Complexity: Linear in distance(begin(), p), and in distance(x.begin(), i). - //! - //! Note: Iterators of values obtained from list x now point to elements of this - //! list. Iterators of this list and all the references are not invalidated. - void splice(const_iterator p, slist& x, const_iterator i) BOOST_NOEXCEPT_OR_NOTHROW - { this->splice_after(this->previous(p), x, this->previous(i)); } - - //! Requires: p must point to an element contained - //! by this list. i must point to an element contained in list x. - //! this' allocator and x's allocator shall compare equal. - //! - //! Effects: Transfers the value pointed by i, from list x to this list, - //! before the element pointed by p. No destructors or copy constructors are called. - //! If p == i or p == ++i, this function is a null operation. - //! - //! Throws: Nothing - //! - //! Complexity: Linear in distance(begin(), p), and in distance(x.begin(), i). - //! - //! Note: Iterators of values obtained from list x now point to elements of this - //! list. Iterators of this list and all the references are not invalidated. - void splice(const_iterator p, BOOST_RV_REF(slist) x, const_iterator i) BOOST_NOEXCEPT_OR_NOTHROW - { this->splice(p, static_cast(x), i); } - - //! Requires: p must point to an element contained - //! by this list. first and last must point to elements contained in list x. - //! - //! Effects: Transfers the range pointed by first and last from list x to this list, - //! before the element pointed by p. No destructors or copy constructors are called. - //! this' allocator and x's allocator shall compare equal. - //! - //! Throws: Nothing - //! - //! Complexity: Linear in distance(begin(), p), in distance(x.begin(), first), - //! and in distance(first, last). - //! - //! Note: Iterators of values obtained from list x now point to elements of this - //! list. Iterators of this list and all the references are not invalidated. - void splice(const_iterator p, slist& x, const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW - { this->splice_after(this->previous(p), x, this->previous(first), this->previous(last)); } - - //! Requires: p must point to an element contained - //! by this list. first and last must point to elements contained in list x. - //! this' allocator and x's allocator shall compare equal - //! - //! Effects: Transfers the range pointed by first and last from list x to this list, - //! before the element pointed by p. No destructors or copy constructors are called. - //! - //! Throws: Nothing - //! - //! Complexity: Linear in distance(begin(), p), in distance(x.begin(), first), - //! and in distance(first, last). - //! - //! Note: Iterators of values obtained from list x now point to elements of this - //! list. Iterators of this list and all the references are not invalidated. - void splice(const_iterator p, BOOST_RV_REF(slist) x, const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW - { this->splice(p, static_cast(x), first, last); } - - //! Effects: Returns true if x and y are equal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator==(const slist& x, const slist& y) - { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); } - - //! Effects: Returns true if x and y are unequal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator!=(const slist& x, const slist& y) - { return !(x == y); } - - //! Effects: Returns true if x is less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<(const slist& x, const slist& y) - { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } - - //! Effects: Returns true if x is greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>(const slist& x, const slist& y) - { return y < x; } - - //! Effects: Returns true if x is equal or less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<=(const slist& x, const slist& y) - { return !(y < x); } - - //! Effects: Returns true if x is equal or greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>=(const slist& x, const slist& y) - { return !(x < y); } - - //! Effects: x.swap(y) - //! - //! Complexity: Constant. - friend void swap(slist& x, slist& y) - { x.swap(y); } - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - - void priv_push_front (const T &x) - { this->insert_after(this->cbefore_begin(), x); } - - void priv_push_front (BOOST_RV_REF(T) x) - { this->insert_after(this->cbefore_begin(), ::boost::move(x)); } - - bool priv_try_shrink(size_type new_size, const_iterator &last_pos) - { - typename Icont::iterator end_n(this->icont().end()), cur(this->icont().before_begin()), cur_next; - while (++(cur_next = cur) != end_n && new_size > 0){ - --new_size; - cur = cur_next; - } - last_pos = const_iterator(cur); - if (cur_next != end_n){ - this->erase_after(last_pos, const_iterator(end_n)); - return true; - } - else{ - return false; - } - } - - template - iterator priv_insert(const_iterator p, BOOST_FWD_REF(U) x) - { return this->insert_after(previous(p), ::boost::forward(x)); } - - template - iterator priv_insert_after(const_iterator prev_p, BOOST_FWD_REF(U) x) - { return iterator(this->icont().insert_after(prev_p.get(), *this->create_node(::boost::forward(x)))); } - - class insertion_functor; - friend class insertion_functor; - - class insertion_functor - { - Icont &icont_; - typedef typename Icont::iterator iiterator; - typedef typename Icont::const_iterator iconst_iterator; - const iconst_iterator prev_; - iiterator ret_; - - public: - insertion_functor(Icont &icont, typename Icont::const_iterator prev) - : icont_(icont), prev_(prev), ret_(prev.unconst()) - {} - - void operator()(Node &n) - { - ret_ = this->icont_.insert_after(prev_, n); - } - - iiterator inserted_first() const - { return ret_; } - }; - - //Functors for member algorithm defaults - struct value_less - { - bool operator()(const value_type &a, const value_type &b) const - { return a < b; } - }; - - struct value_equal - { - bool operator()(const value_type &a, const value_type &b) const - { return a == b; } - }; - - struct value_equal_to_this - { - explicit value_equal_to_this(const value_type &ref) - : m_ref(ref){} - - bool operator()(const value_type &val) const - { return m_ref == val; } - - const value_type &m_ref; - }; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -}; - -}} - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -namespace boost { - -//!has_trivial_destructor_after_move<> == true_type -//!specialization for optimizations -template -struct has_trivial_destructor_after_move > -{ - typedef typename ::boost::container::allocator_traits::pointer pointer; - static const bool value = ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value; -}; - -namespace container { - -}} //namespace boost{ namespace container { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -// Specialization of insert_iterator so that insertions will be constant -// time rather than linear time. - -#include -BOOST_CONTAINER_DOC1ST(namespace std {, BOOST_MOVE_STD_NS_BEG) - -//! A specialization of insert_iterator -//! that works with slist -template -class insert_iterator > -{ - private: - typedef boost::container::slist Container; - Container* container; - typename Container::iterator iter; - - public: - typedef Container container_type; - typedef output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - - insert_iterator(Container& x, - typename Container::iterator i, - bool is_previous = false) - : container(&x), iter(is_previous ? i : x.previous(i)){ } - - insert_iterator& - operator=(const typename Container::value_type& value) - { - iter = container->insert_after(iter, value); - return *this; - } - insert_iterator& operator*(){ return *this; } - insert_iterator& operator++(){ return *this; } - insert_iterator& operator++(int){ return *this; } -}; - -BOOST_CONTAINER_DOC1ST( }, BOOST_MOVE_STD_NS_END) -#include - -#include - -#endif // BOOST_CONTAINER_SLIST_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/small_vector.hpp b/contrib/libboost/boost_1_65_0/boost/container/small_vector.hpp deleted file mode 100644 index 804740cc72e..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/small_vector.hpp +++ /dev/null @@ -1,632 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2015-2015. 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_CONTAINER_SMALL_VECTOR_HPP -#define BOOST_CONTAINER_CONTAINER_SMALL_VECTOR_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -// container -#include -#include -#include -#include //new_allocator -// container/detail -#include -#include - -//move -#include -#include - -//move/detail -#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) -#include -#endif - -//std -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) -#include //for std::initializer_list -#endif - -namespace boost { -namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -template > -class small_vector_base; - -#endif - -//! A non-standard allocator used to implement `small_vector`. -//! Users should never use it directly. It is described here -//! for documentation purposes. -//! -//! This allocator inherits from a standard-conforming allocator -//! and forwards member functions to the standard allocator except -//! when internal storage is being used as memory source. -//! -//! This allocator is a "partially_propagable" allocator and -//! defines `is_partially_propagable` as true_type. -//! -//! A partially propagable allocator means that not all storage -//! allocatod by an instance of `small_vector_allocator` can be -//! deallocated by another instance of this type, even if both -//! instances compare equal or an instance is propagated to another -//! one using the copy/move constructor or assignment. The storage that -//! can never be propagated is identified by `storage_is_unpropagable(p)`. -//! -//! `boost::container::vector` supports partially propagable allocators -//! fallbacking to deep copy/swap/move operations when internal storage -//! is being used to store vector elements. -//! -//! `small_vector_allocator` assumes that will be instantiated as -//! `boost::container::vector< T, small_vector_allocator >` -//! and internal storage can be obtained downcasting that vector -//! to `small_vector_base`. -template -class small_vector_allocator - : public Allocator -{ - typedef unsigned int allocation_type; - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - - BOOST_COPYABLE_AND_MOVABLE(small_vector_allocator) - - BOOST_CONTAINER_FORCEINLINE const Allocator &as_base() const - { return static_cast(*this); } - - BOOST_CONTAINER_FORCEINLINE Allocator &as_base() - { return static_cast(*this); } - - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - typedef allocator_traits allocator_traits_type; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - typedef typename allocator_traits::value_type value_type; - typedef typename allocator_traits::pointer pointer; - typedef typename allocator_traits::const_pointer const_pointer; - typedef typename allocator_traits::reference reference; - typedef typename allocator_traits::const_reference const_reference; - typedef typename allocator_traits::size_type size_type; - typedef typename allocator_traits::difference_type difference_type; - typedef typename allocator_traits::void_pointer void_pointer; - typedef typename allocator_traits::const_void_pointer const_void_pointer; - - typedef typename allocator_traits::propagate_on_container_copy_assignment propagate_on_container_copy_assignment; - typedef typename allocator_traits::propagate_on_container_move_assignment propagate_on_container_move_assignment; - typedef typename allocator_traits::propagate_on_container_swap propagate_on_container_swap; - //! An integral constant with member `value == false` - typedef BOOST_CONTAINER_IMPDEF(container_detail::bool_) is_always_equal; - //! An integral constant with member `value == true` - typedef BOOST_CONTAINER_IMPDEF(container_detail::bool_) is_partially_propagable; - - BOOST_CONTAINER_DOCIGN(typedef container_detail::version_type version;) - - //!Obtains an small_vector_allocator that allocates - //!objects of type T2 - template - struct rebind - { - typedef typename allocator_traits::template rebind_alloc::type other; - }; - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //!Constructor from arbitrary arguments - template - BOOST_CONTAINER_FORCEINLINE explicit small_vector_allocator(BOOST_FWD_REF(Args) ...args) - : Allocator(::boost::forward(args)...) - {} - #else - #define BOOST_CONTAINER_SMALL_VECTOR_ALLOCATOR_CTOR_CODE(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - BOOST_CONTAINER_FORCEINLINE explicit small_vector_allocator(BOOST_MOVE_UREF##N)\ - : Allocator(BOOST_MOVE_FWD##N)\ - {}\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SMALL_VECTOR_ALLOCATOR_CTOR_CODE) - #undef BOOST_CONTAINER_SMALL_VECTOR_ALLOCATOR_CTOR_CODE - #endif - - //!Constructor from other small_vector_allocator. - //!Never throws - BOOST_CONTAINER_FORCEINLINE small_vector_allocator - (const small_vector_allocator &other) BOOST_NOEXCEPT_OR_NOTHROW - : Allocator(other.as_base()) - {} - - //!Move constructor from small_vector_allocator. - //!Never throws - BOOST_CONTAINER_FORCEINLINE small_vector_allocator - (BOOST_RV_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW - : Allocator(::boost::move(other.as_base())) - {} - - //!Constructor from related small_vector_allocator. - //!Never throws - template - BOOST_CONTAINER_FORCEINLINE small_vector_allocator - (const small_vector_allocator &other) BOOST_NOEXCEPT_OR_NOTHROW - : Allocator(other.as_base()) - {} - - //!Move constructor from related small_vector_allocator. - //!Never throws - template - BOOST_CONTAINER_FORCEINLINE small_vector_allocator - (BOOST_RV_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW - : Allocator(::boost::move(other.as_base())) - {} - - //!Assignment from other small_vector_allocator. - //!Never throws - BOOST_CONTAINER_FORCEINLINE small_vector_allocator & - operator=(BOOST_COPY_ASSIGN_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW - { return static_cast(this->Allocator::operator=(other.as_base())); } - - //!Move constructor from other small_vector_allocator. - //!Never throws - BOOST_CONTAINER_FORCEINLINE small_vector_allocator & - operator=(BOOST_RV_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW - { return static_cast(this->Allocator::operator=(::boost::move(other.as_base()))); } - - //!Assignment from related small_vector_allocator. - //!Never throws - template - BOOST_CONTAINER_FORCEINLINE small_vector_allocator & - operator=(BOOST_COPY_ASSIGN_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW - { return static_cast(this->Allocator::operator=(other.as_base())); } - - //!Move assignment from related small_vector_allocator. - //!Never throws - template - BOOST_CONTAINER_FORCEINLINE small_vector_allocator & - operator=(BOOST_RV_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW - { return static_cast(this->Allocator::operator=(::boost::move(other.as_base()))); } - - //!Allocates storage from the standard-conforming allocator - BOOST_CONTAINER_FORCEINLINE pointer allocate(size_type count, const_void_pointer hint = const_void_pointer()) - { return allocator_traits_type::allocate(this->as_base(), count, hint); } - - //!Deallocates previously allocated memory. - //!Never throws - void deallocate(pointer ptr, size_type n) BOOST_NOEXCEPT_OR_NOTHROW - { - if(!this->is_internal_storage(ptr)) - allocator_traits_type::deallocate(this->as_base(), ptr, n); - } - - //!Returns the maximum number of elements that could be allocated. - //!Never throws - BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW - { return allocator_traits_type::max_size(this->as_base()); } - - small_vector_allocator select_on_container_copy_construction() const - { return small_vector_allocator(allocator_traits_type::select_on_container_copy_construction(this->as_base())); } - - bool storage_is_unpropagable(pointer p) const - { return this->is_internal_storage(p) || allocator_traits_type::storage_is_unpropagable(this->as_base(), p); } - - //!Swaps two allocators, does nothing - //!because this small_vector_allocator is stateless - BOOST_CONTAINER_FORCEINLINE friend void swap(small_vector_allocator &l, small_vector_allocator &r) BOOST_NOEXCEPT_OR_NOTHROW - { boost::adl_move_swap(l.as_base(), r.as_base()); } - - //!An small_vector_allocator always compares to true, as memory allocated with one - //!instance can be deallocated by another instance (except for unpropagable storage) - BOOST_CONTAINER_FORCEINLINE friend bool operator==(const small_vector_allocator &l, const small_vector_allocator &r) BOOST_NOEXCEPT_OR_NOTHROW - { return allocator_traits_type::equal(l.as_base(), r.as_base()); } - - //!An small_vector_allocator always compares to false, as memory allocated with one - //!instance can be deallocated by another instance - BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const small_vector_allocator &l, const small_vector_allocator &r) BOOST_NOEXCEPT_OR_NOTHROW - { return !(l == r); } - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - /* - //!An advanced function that offers in-place expansion shrink to fit and new allocation - //!capabilities. Memory allocated with this function can only be deallocated with deallocate() - //!or deallocate_many(). - //!This function is available only with Version == 2 - pointer allocation_command(allocation_type command, - size_type limit_size, - size_type &prefer_in_recvd_out_size, - pointer &reuse) - { return allocator_traits_type::allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse); } - - //!Returns maximum the number of objects the previously allocated memory - //!pointed by p can hold. - //!Memory must not have been allocated with - //!allocate_one or allocate_individual. - //!This function is available only with Version == 2 - size_type size(pointer p) const BOOST_NOEXCEPT_OR_NOTHROW - { return allocator_traits_type::size(p); } - */ - private: - /* - //!Allocates just one object. Memory allocated with this function - //!must be deallocated only with deallocate_one(). - //!Throws bad_alloc if there is no enough memory - //!This function is available only with Version == 2 - using Allocator::allocate_one; - using Allocator::allocate_individual; - using Allocator::deallocate_one; - using Allocator::deallocate_individual; - using Allocator::allocate_many; - using Allocator::deallocate_many;*/ - - BOOST_CONTAINER_FORCEINLINE bool is_internal_storage(pointer p) const - { return this->internal_storage() == p; } - - pointer internal_storage() const - { - typedef typename Allocator::value_type value_type; - typedef container_detail::vector_alloc_holder< small_vector_allocator > vector_alloc_holder_t; - typedef vector > vector_base; - typedef small_vector_base derived_type; - // - const vector_alloc_holder_t &v_holder = static_cast(*this); - const vector_base &v_base = reinterpret_cast(v_holder); - const derived_type &d_base = static_cast(v_base); - return d_base.internal_storage(); - } - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -}; - -//! This class consists of common code from all small_vector types that don't depend on the -//! "N" template parameter. This class is non-copyable and non-destructible, so this class typically -//! used as reference argument to functions that read or write small vectors. Since `small_vector` -//! derives from `small_vector_base`, the conversion to `small_vector_base` is implicit -//!
-//!
-//! //Clients can pass any small_vector.
-//! void read_any_small_vector_of_foo(const small_vector_base &in_parameter);
-//!
-//! void modify_any_small_vector_of_foo(small_vector_base &in_out_parameter);
-//!
-//! void some_function()
-//! {
-//! 
-//!    small_vector myvector;
-//!
-//!    read_any_small_vector_of_foo(myvector);   // Reads myvector
-//!
-//!    modify_any_small_vector_of_foo(myvector); // Modifies myvector
-//! 
-//! }
-//! 
-//! -//! All `boost::container:vector` member functions are inherited. See `vector` documentation for details. -//! -template -class small_vector_base - : public vector > -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - public: - //Make it public as it will be inherited by small_vector and container - //must have this public member - typedef typename allocator_traits::pointer pointer; - - private: - BOOST_COPYABLE_AND_MOVABLE(small_vector_base) - - friend class small_vector_allocator; - - pointer internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW - { - return boost::intrusive::pointer_traits::pointer_to - (*const_cast(static_cast(static_cast(&m_storage_start)))); - } - - typedef vector > base_type; - base_type &as_base() { return static_cast(*this); } - const base_type &as_base() const { return static_cast(*this); } - - public: - typedef typename container_detail::aligned_storage - ::value>::type storage_type; - typedef small_vector_allocator allocator_type; - - protected: - typedef typename base_type::initial_capacity_t initial_capacity_t; - - BOOST_CONTAINER_FORCEINLINE explicit small_vector_base(initial_capacity_t, std::size_t initial_capacity) - : base_type(initial_capacity_t(), this->internal_storage(), initial_capacity) - {} - - template - BOOST_CONTAINER_FORCEINLINE explicit small_vector_base(initial_capacity_t, std::size_t capacity, BOOST_FWD_REF(AllocFwd) a) - : base_type(initial_capacity_t(), this->internal_storage(), capacity, ::boost::forward(a)) - {} - - //~small_vector_base(){} - - private: - //The only member - storage_type m_storage_start; - - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - BOOST_CONTAINER_FORCEINLINE small_vector_base& operator=(BOOST_COPY_ASSIGN_REF(small_vector_base) other) - { return static_cast(this->base_type::operator=(static_cast(other))); } - - BOOST_CONTAINER_FORCEINLINE small_vector_base& operator=(BOOST_RV_REF(small_vector_base) other) - { return static_cast(this->base_type::operator=(BOOST_MOVE_BASE(base_type, other))); } - - BOOST_CONTAINER_FORCEINLINE void swap(small_vector_base &other) - { return this->base_type::swap(other); } - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - protected: - void move_construct_impl(base_type &x, const allocator_type &a) - { - if(base_type::is_propagable_from(x.get_stored_allocator(), x.data(), a, true)){ - this->steal_resources(x); - } - else{ - this->assign( boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(x.begin())) - , boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(x.end ())) - ); - } - } - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -}; - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -///////////////////////////////////////////////////// -// -// small_vector_storage_calculator -// -///////////////////////////////////////////////////// -template -struct small_vector_storage_calculator_helper -{ - static const std::size_t value = (Needed - Hdr - 1u)/SSize + 1u; -}; - -template -struct small_vector_storage_calculator_helper -{ - static const std::size_t value = 0u; -}; - -template -struct small_vector_storage_calculator -{ - typedef small_vector_base svh_type; - typedef vector > svhb_type; - static const std::size_t s_align = container_detail::alignment_of::value; - static const std::size_t s_size = sizeof(Storage); - static const std::size_t svh_sizeof = sizeof(svh_type); - static const std::size_t svhb_sizeof = sizeof(svhb_type); - static const std::size_t s_start = ((svhb_sizeof-1)/s_align+1)*s_align; - static const std::size_t header_bytes = svh_sizeof-s_start; - static const std::size_t needed_bytes = sizeof(T)*N; - static const std::size_t needed_extra_storages = - small_vector_storage_calculator_helper::value; -}; - -///////////////////////////////////////////////////// -// -// small_vector_storage_definer -// -///////////////////////////////////////////////////// -template -struct small_vector_storage -{ - Storage m_rest_of_storage[N]; -}; - -template -struct small_vector_storage -{}; - -template -struct small_vector_storage_definer -{ - typedef typename Allocator::value_type value_type; - typedef typename small_vector_base::storage_type storage_type; - static const std::size_t needed_extra_storages = - small_vector_storage_calculator::needed_extra_storages; - typedef small_vector_storage type; -}; - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! small_vector is a vector-like container optimized for the case when it contains few elements. -//! It contains some preallocated elements in-place, which can avoid the use of dynamic storage allocation -//! when the actual number of elements is below that preallocated threshold. -//! -//! `small_vector` is convertible to `small_vector_base` that is independent -//! from the preallocated element capacity, so client code does not need to be templated on that N argument. -//! -//! All `boost::container::vector` member functions are inherited. See `vector` documentation for details. -//! -//! \tparam T The type of object that is stored in the small_vector -//! \tparam N The number of preallocated elements stored inside small_vector. It shall be less than Allocator::max_size(); -//! \tparam Allocator The allocator used for memory management when the number of elements exceeds N. -template ) > -class small_vector : public small_vector_base - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - , private small_vector_storage_definer::type - #endif -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - typedef small_vector_base base_type; - typedef typename small_vector_storage_definer::type remaining_storage_holder; - - BOOST_COPYABLE_AND_MOVABLE(small_vector) - - typedef typename base_type::initial_capacity_t initial_capacity_t; - typedef allocator_traits allocator_traits_type; - - public: - typedef small_vector_storage_calculator< typename small_vector_base - ::storage_type, Allocator, T, N> storage_test; - - static const std::size_t needed_extra_storages = storage_test::needed_extra_storages; - static const std::size_t needed_bytes = storage_test::needed_bytes; - static const std::size_t header_bytes = storage_test::header_bytes; - static const std::size_t s_start = storage_test::s_start; - - typedef typename base_type::allocator_type allocator_type; - typedef typename base_type::size_type size_type; - typedef typename base_type::value_type value_type; - - BOOST_CONTAINER_FORCEINLINE static std::size_t internal_capacity() - { return (sizeof(small_vector) - storage_test::s_start)/sizeof(T); } - - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - //! @brief The capacity/max size of the container - static const size_type static_capacity = N; - - public: - BOOST_CONTAINER_FORCEINLINE small_vector() - BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible::value) - : base_type(initial_capacity_t(), internal_capacity()) - {} - - BOOST_CONTAINER_FORCEINLINE explicit small_vector(const allocator_type &a) - : base_type(initial_capacity_t(), internal_capacity(), a) - {} - - BOOST_CONTAINER_FORCEINLINE explicit small_vector(size_type n) - : base_type(initial_capacity_t(), internal_capacity()) - { this->resize(n); } - - BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, const allocator_type &a) - : base_type(initial_capacity_t(), internal_capacity(), a) - { this->resize(n); } - - BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, default_init_t) - : base_type(initial_capacity_t(), internal_capacity()) - { this->resize(n, default_init_t()); } - - BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, default_init_t, const allocator_type &a) - : base_type(initial_capacity_t(), internal_capacity(), a) - { this->resize(n, default_init_t()); } - - BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, const value_type &v) - : base_type(initial_capacity_t(), internal_capacity()) - { this->resize(n, v); } - - BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, const value_type &v, const allocator_type &a) - : base_type(initial_capacity_t(), internal_capacity(), a) - { this->resize(n, v); } - - template - BOOST_CONTAINER_FORCEINLINE small_vector(InIt first, InIt last - BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename container_detail::disable_if_c - < container_detail::is_convertible::value - BOOST_MOVE_I container_detail::nat >::type * = 0) - ) - : base_type(initial_capacity_t(), internal_capacity()) - { this->assign(first, last); } - - template - BOOST_CONTAINER_FORCEINLINE small_vector(InIt first, InIt last, const allocator_type& a - BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename container_detail::disable_if_c - < container_detail::is_convertible::value - BOOST_MOVE_I container_detail::nat >::type * = 0) - ) - : base_type(initial_capacity_t(), internal_capacity(), a) - { this->assign(first, last); } - - BOOST_CONTAINER_FORCEINLINE small_vector(const small_vector &other) - : base_type( initial_capacity_t(), internal_capacity() - , allocator_traits_type::select_on_container_copy_construction(other.get_stored_allocator())) - { this->assign(other.cbegin(), other.cend()); } - - BOOST_CONTAINER_FORCEINLINE small_vector(const small_vector &other, const allocator_type &a) - : base_type(initial_capacity_t(), internal_capacity(), a) - { this->assign(other.cbegin(), other.cend()); } - - BOOST_CONTAINER_FORCEINLINE explicit small_vector(const base_type &other) - : base_type( initial_capacity_t(), internal_capacity() - , allocator_traits_type::select_on_container_copy_construction(other.get_stored_allocator())) - { this->assign(other.cbegin(), other.cend()); } - - BOOST_CONTAINER_FORCEINLINE explicit small_vector(BOOST_RV_REF(base_type) other) - : base_type(initial_capacity_t(), internal_capacity(), ::boost::move(other.get_stored_allocator())) - { this->move_construct_impl(other, other.get_stored_allocator()); } - - BOOST_CONTAINER_FORCEINLINE small_vector(BOOST_RV_REF(small_vector) other) - : base_type(initial_capacity_t(), internal_capacity(), ::boost::move(other.get_stored_allocator())) - { this->move_construct_impl(other, other.get_stored_allocator()); } - - BOOST_CONTAINER_FORCEINLINE small_vector(BOOST_RV_REF(small_vector) other, const allocator_type &a) - : base_type(initial_capacity_t(), internal_capacity(), a) - { this->move_construct_impl(other, a); } - - #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - BOOST_CONTAINER_FORCEINLINE small_vector(std::initializer_list il, const allocator_type& a = allocator_type()) - : base_type(initial_capacity_t(), internal_capacity(), a) - { - this->assign(il.begin(), il.end()); - } - #endif - - BOOST_CONTAINER_FORCEINLINE small_vector& operator=(BOOST_COPY_ASSIGN_REF(small_vector) other) - { return static_cast(this->base_type::operator=(static_cast(other))); } - - BOOST_CONTAINER_FORCEINLINE small_vector& operator=(BOOST_RV_REF(small_vector) other) - { return static_cast(this->base_type::operator=(BOOST_MOVE_BASE(base_type, other))); } - - BOOST_CONTAINER_FORCEINLINE small_vector& operator=(const base_type &other) - { return static_cast(this->base_type::operator=(other)); } - - BOOST_CONTAINER_FORCEINLINE small_vector& operator=(BOOST_RV_REF(base_type) other) - { return static_cast(this->base_type::operator=(boost::move(other))); } - - BOOST_CONTAINER_FORCEINLINE void swap(small_vector &other) - { return this->base_type::swap(other); } -}; - -}} - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -/* -namespace boost { - -//!has_trivial_destructor_after_move<> == true_type -//!specialization for optimizations -template -struct has_trivial_destructor_after_move > -{ - typedef typename ::boost::container::allocator_traits::pointer pointer; - static const bool value = ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value; -}; - -} -*/ -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -#include - -#endif // #ifndef BOOST_CONTAINER_CONTAINER_SMALL_VECTOR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/stable_vector.hpp b/contrib/libboost/boost_1_65_0/boost/container/stable_vector.hpp deleted file mode 100644 index cf156e04def..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/stable_vector.hpp +++ /dev/null @@ -1,2112 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2008-2015. 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. -// -////////////////////////////////////////////////////////////////////////////// -// Stable vector. -// -// Copyright 2008 Joaquin M Lopez Munoz. -// 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_CONTAINER_STABLE_VECTOR_HPP -#define BOOST_CONTAINER_STABLE_VECTOR_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include - -// container -#include -#include -#include //new_allocator -#include -// container/detail -#include -#include //algo_equal(), algo_lexicographical_compare -#include -#include -#include -#include -#include -#include -#include -#include -// intrusive -#include -// intrusive/detail -#include //pair -// move -#include -#include -#include -// move/detail -#include -// other -#include -#include -// std -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) -#include -#endif - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - #include - //#define STABLE_VECTOR_ENABLE_INVARIANT_CHECKING -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -namespace boost { -namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -namespace stable_vector_detail{ - -template -class clear_on_destroy -{ - public: - clear_on_destroy(C &c) - : c_(c), do_clear_(true) - {} - - void release() - { do_clear_ = false; } - - ~clear_on_destroy() - { - if(do_clear_){ - c_.clear(); - c_.priv_clear_pool(); - } - } - - private: - clear_on_destroy(const clear_on_destroy &); - clear_on_destroy &operator=(const clear_on_destroy &); - C &c_; - bool do_clear_; -}; - -template -struct node; - -template -struct node_base -{ - private: - typedef typename boost::intrusive:: - pointer_traits void_ptr_traits; - typedef typename void_ptr_traits:: - template rebind_pointer - ::type node_base_ptr; - typedef typename void_ptr_traits:: - template rebind_pointer - ::type node_base_ptr_ptr; - - public: - node_base(const node_base_ptr_ptr &n) - : up(n) - {} - - node_base() - : up() - {} - - node_base_ptr_ptr up; -}; - -template -struct node - : public node_base - ::template - rebind_pointer::type - > -{ - private: - node(); - - public: - typename ::boost::intrusive::pointer_traits::element_type value; -}; - -template -struct index_traits -{ - typedef boost::intrusive:: - pointer_traits - void_ptr_traits; - typedef stable_vector_detail:: - node_base node_base_type; - typedef typename void_ptr_traits::template - rebind_pointer::type node_base_ptr; - typedef typename void_ptr_traits::template - rebind_pointer::type node_base_ptr_ptr; - typedef boost::intrusive:: - pointer_traits node_base_ptr_traits; - typedef boost::intrusive:: - pointer_traits node_base_ptr_ptr_traits; - typedef typename allocator_traits:: - template portable_rebind_alloc - ::type node_base_ptr_allocator; - typedef ::boost::container::vector - index_type; - typedef typename index_type::iterator index_iterator; - typedef typename index_type::const_iterator const_index_iterator; - typedef typename index_type::size_type size_type; - - static const size_type ExtraPointers = 3; - //Stable vector stores metadata at the end of the index (node_base_ptr vector) with additional 3 pointers: - // back() is this->index.back() - ExtraPointers; - // end node index is *(this->index.end() - 3) - // Node cache first is *(this->index.end() - 2); - // Node cache last is this->index.back(); - - static node_base_ptr_ptr ptr_to_node_base_ptr(node_base_ptr &n) - { return node_base_ptr_ptr_traits::pointer_to(n); } - - static void fix_up_pointers(index_iterator first, index_iterator last) - { - while(first != last){ - typedef typename index_type::reference node_base_ptr_ref; - node_base_ptr_ref nbp = *first; - nbp->up = index_traits::ptr_to_node_base_ptr(nbp); - ++first; - } - } - - static index_iterator get_fix_up_end(index_type &index) - { return index.end() - (ExtraPointers - 1); } - - static void fix_up_pointers_from(index_type & index, index_iterator first) - { index_traits::fix_up_pointers(first, index_traits::get_fix_up_end(index)); } - - static void readjust_end_node(index_type &index, node_base_type &end_node) - { - if(!index.empty()){ - index_iterator end_node_it(index_traits::get_fix_up_end(index)); - node_base_ptr &end_node_idx_ref = *(--end_node_it); - end_node_idx_ref = node_base_ptr_traits::pointer_to(end_node); - end_node.up = node_base_ptr_ptr_traits::pointer_to(end_node_idx_ref); - } - else{ - end_node.up = node_base_ptr_ptr(); - } - } - - static void initialize_end_node(index_type &index, node_base_type &end_node, const size_type index_capacity_if_empty) - { - if(index.empty()){ - index.reserve(index_capacity_if_empty + ExtraPointers); - index.resize(ExtraPointers); - node_base_ptr &end_node_ref = *index.data(); - end_node_ref = node_base_ptr_traits::pointer_to(end_node); - end_node.up = index_traits::ptr_to_node_base_ptr(end_node_ref); - } - } - - #ifdef STABLE_VECTOR_ENABLE_INVARIANT_CHECKING - static bool invariants(index_type &index) - { - for( index_iterator it = index.begin() - , it_end = index_traits::get_fix_up_end(index) - ; it != it_end - ; ++it){ - if((*it)->up != index_traits::ptr_to_node_base_ptr(*it)){ - return false; - } - } - return true; - } - #endif //STABLE_VECTOR_ENABLE_INVARIANT_CHECKING -}; - -} //namespace stable_vector_detail - -template -class stable_vector_iterator -{ - typedef boost::intrusive::pointer_traits non_const_ptr_traits; - public: - typedef std::random_access_iterator_tag iterator_category; - typedef typename non_const_ptr_traits::element_type value_type; - typedef typename non_const_ptr_traits::difference_type difference_type; - typedef typename ::boost::container::container_detail::if_c - < IsConst - , typename non_const_ptr_traits::template - rebind_pointer::type - , Pointer - >::type pointer; - typedef boost::intrusive::pointer_traits ptr_traits; - typedef typename ptr_traits::reference reference; - - private: - typedef typename non_const_ptr_traits::template - rebind_pointer::type void_ptr; - typedef stable_vector_detail::node node_type; - typedef stable_vector_detail::node_base node_base_type; - typedef typename non_const_ptr_traits::template - rebind_pointer::type node_ptr; - typedef boost::intrusive:: - pointer_traits node_ptr_traits; - typedef typename non_const_ptr_traits::template - rebind_pointer::type node_base_ptr; - typedef typename non_const_ptr_traits::template - rebind_pointer::type node_base_ptr_ptr; - - node_base_ptr m_pn; - - public: - - explicit stable_vector_iterator(node_base_ptr p) BOOST_NOEXCEPT_OR_NOTHROW - : m_pn(p) - {} - - stable_vector_iterator() BOOST_NOEXCEPT_OR_NOTHROW - : m_pn() //Value initialization to achieve "null iterators" (N3644) - {} - - stable_vector_iterator(stable_vector_iterator const& other) BOOST_NOEXCEPT_OR_NOTHROW - : m_pn(other.node_pointer()) - {} - - node_ptr node_pointer() const BOOST_NOEXCEPT_OR_NOTHROW - { return node_ptr_traits::static_cast_from(m_pn); } - - public: - //Pointer like operators - reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW - { return node_pointer()->value; } - - pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW - { return ptr_traits::pointer_to(this->operator*()); } - - //Increment / Decrement - stable_vector_iterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW - { - node_base_ptr_ptr p(this->m_pn->up); - this->m_pn = *(++p); - return *this; - } - - stable_vector_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW - { stable_vector_iterator tmp(*this); ++*this; return stable_vector_iterator(tmp); } - - stable_vector_iterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW - { - node_base_ptr_ptr p(this->m_pn->up); - this->m_pn = *(--p); - return *this; - } - - stable_vector_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW - { stable_vector_iterator tmp(*this); --*this; return stable_vector_iterator(tmp); } - - reference operator[](difference_type off) const BOOST_NOEXCEPT_OR_NOTHROW - { return node_ptr_traits::static_cast_from(this->m_pn->up[off])->value; } - - stable_vector_iterator& operator+=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW - { - if(off) this->m_pn = this->m_pn->up[off]; - return *this; - } - - friend stable_vector_iterator operator+(const stable_vector_iterator &left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW - { - stable_vector_iterator tmp(left); - tmp += off; - return tmp; - } - - friend stable_vector_iterator operator+(difference_type off, const stable_vector_iterator& right) BOOST_NOEXCEPT_OR_NOTHROW - { - stable_vector_iterator tmp(right); - tmp += off; - return tmp; - } - - stable_vector_iterator& operator-=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW - { *this += -off; return *this; } - - friend stable_vector_iterator operator-(const stable_vector_iterator &left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW - { - stable_vector_iterator tmp(left); - tmp -= off; - return tmp; - } - - friend difference_type operator-(const stable_vector_iterator &left, const stable_vector_iterator &right) BOOST_NOEXCEPT_OR_NOTHROW - { return left.m_pn->up - right.m_pn->up; } - - //Comparison operators - friend bool operator== (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return l.m_pn == r.m_pn; } - - friend bool operator!= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return l.m_pn != r.m_pn; } - - friend bool operator< (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return l.m_pn->up < r.m_pn->up; } - - friend bool operator<= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return l.m_pn->up <= r.m_pn->up; } - - friend bool operator> (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return l.m_pn->up > r.m_pn->up; } - - friend bool operator>= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW - { return l.m_pn->up >= r.m_pn->up; } -}; - - #if defined(STABLE_VECTOR_ENABLE_INVARIANT_CHECKING) - - #define STABLE_VECTOR_CHECK_INVARIANT \ - invariant_checker BOOST_JOIN(check_invariant_,__LINE__)(*this); \ - BOOST_JOIN(check_invariant_,__LINE__).touch(); - - #else //STABLE_VECTOR_ENABLE_INVARIANT_CHECKING - - #define STABLE_VECTOR_CHECK_INVARIANT - - #endif //#if defined(STABLE_VECTOR_ENABLE_INVARIANT_CHECKING) - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! Originally developed by Joaquin M. Lopez Munoz, stable_vector is a std::vector -//! drop-in replacement implemented as a node container, offering iterator and reference -//! stability. -//! -//! Here are the details taken from the author's blog -//! (
-//! Introducing stable_vector): -//! -//! We present stable_vector, a fully STL-compliant stable container that provides -//! most of the features of std::vector except element contiguity. -//! -//! General properties: stable_vector satisfies all the requirements of a container, -//! a reversible container and a sequence and provides all the optional operations -//! present in std::vector. Like std::vector, iterators are random access. -//! stable_vector does not provide element contiguity; in exchange for this absence, -//! the container is stable, i.e. references and iterators to an element of a stable_vector -//! remain valid as long as the element is not erased, and an iterator that has been -//! assigned the return value of end() always remain valid until the destruction of -//! the associated stable_vector. -//! -//! Operation complexity: The big-O complexities of stable_vector operations match -//! exactly those of std::vector. In general, insertion/deletion is constant time at -//! the end of the sequence and linear elsewhere. Unlike std::vector, stable_vector -//! does not internally perform any value_type destruction, copy or assignment -//! operations other than those exactly corresponding to the insertion of new -//! elements or deletion of stored elements, which can sometimes compensate in terms -//! of performance for the extra burden of doing more pointer manipulation and an -//! additional allocation per element. -//! -//! Exception safety: As stable_vector does not internally copy elements around, some -//! operations provide stronger exception safety guarantees than in std::vector. -//! -//! \tparam T The type of object that is stored in the stable_vector -//! \tparam Allocator The allocator used for all internal memory management -#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED -template > -#else -template -#endif -class stable_vector -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - typedef allocator_traits allocator_traits_type; - typedef boost::intrusive:: - pointer_traits - ptr_traits; - typedef typename ptr_traits:: - template rebind_pointer::type void_ptr; - typedef typename allocator_traits_type:: - template portable_rebind_alloc - ::type void_allocator_type; - typedef stable_vector_detail::index_traits - index_traits_type; - typedef typename index_traits_type::node_base_type node_base_type; - typedef typename index_traits_type::node_base_ptr node_base_ptr; - typedef typename index_traits_type:: - node_base_ptr_ptr node_base_ptr_ptr; - typedef typename index_traits_type:: - node_base_ptr_traits node_base_ptr_traits; - typedef typename index_traits_type:: - node_base_ptr_ptr_traits node_base_ptr_ptr_traits; - typedef typename index_traits_type::index_type index_type; - typedef typename index_traits_type::index_iterator index_iterator; - typedef typename index_traits_type:: - const_index_iterator const_index_iterator; - typedef stable_vector_detail::node - node_type; - typedef typename ptr_traits::template - rebind_pointer::type node_ptr; - typedef boost::intrusive:: - pointer_traits node_ptr_traits; - typedef typename ptr_traits::template - rebind_pointer::type const_node_ptr; - typedef boost::intrusive:: - pointer_traits const_node_ptr_traits; - typedef typename node_ptr_traits::reference node_reference; - typedef typename const_node_ptr_traits::reference const_node_reference; - - typedef ::boost::container::container_detail::integral_constant - ::value> alloc_version; - typedef typename allocator_traits_type:: - template portable_rebind_alloc - ::type node_allocator_type; - - typedef ::boost::container::container_detail:: - allocator_version_traits allocator_version_traits_t; - typedef typename allocator_version_traits_t::multiallocation_chain multiallocation_chain; - - node_ptr allocate_one() - { return allocator_version_traits_t::allocate_one(this->priv_node_alloc()); } - - void deallocate_one(const node_ptr &p) - { allocator_version_traits_t::deallocate_one(this->priv_node_alloc(), p); } - - void allocate_individual(typename allocator_traits_type::size_type n, multiallocation_chain &m) - { allocator_version_traits_t::allocate_individual(this->priv_node_alloc(), n, m); } - - void deallocate_individual(multiallocation_chain &holder) - { allocator_version_traits_t::deallocate_individual(this->priv_node_alloc(), holder); } - - friend class stable_vector_detail::clear_on_destroy; - typedef stable_vector_iterator - < typename allocator_traits::pointer - , false> iterator_impl; - typedef stable_vector_iterator - < typename allocator_traits::pointer - , true> const_iterator_impl; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - public: - - ////////////////////////////////////////////// - // - // types - // - ////////////////////////////////////////////// - typedef T value_type; - typedef typename ::boost::container::allocator_traits::pointer pointer; - typedef typename ::boost::container::allocator_traits::const_pointer const_pointer; - typedef typename ::boost::container::allocator_traits::reference reference; - typedef typename ::boost::container::allocator_traits::const_reference const_reference; - typedef typename ::boost::container::allocator_traits::size_type size_type; - typedef typename ::boost::container::allocator_traits::difference_type difference_type; - typedef Allocator allocator_type; - typedef node_allocator_type stored_allocator_type; - typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator; - typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator; - typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) reverse_iterator; - typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) const_reverse_iterator; - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - BOOST_COPYABLE_AND_MOVABLE(stable_vector) - static const size_type ExtraPointers = index_traits_type::ExtraPointers; - - class insert_rollback; - friend class insert_rollback; - - class push_back_rollback; - friend class push_back_rollback; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - ////////////////////////////////////////////// - // - // construct/copy/destroy - // - ////////////////////////////////////////////// - - //! Effects: Default constructs a stable_vector. - //! - //! Throws: If allocator_type's default constructor throws. - //! - //! Complexity: Constant. - stable_vector() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible::value) - : internal_data(), index() - { - STABLE_VECTOR_CHECK_INVARIANT; - } - - //! Effects: Constructs a stable_vector taking the allocator as parameter. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - explicit stable_vector(const allocator_type& al) BOOST_NOEXCEPT_OR_NOTHROW - : internal_data(al), index(al) - { - STABLE_VECTOR_CHECK_INVARIANT; - } - - //! Effects: Constructs a stable_vector - //! and inserts n value initialized values. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's default or copy constructor throws. - //! - //! Complexity: Linear to n. - explicit stable_vector(size_type n) - : internal_data(), index() - { - stable_vector_detail::clear_on_destroy cod(*this); - this->resize(n); - STABLE_VECTOR_CHECK_INVARIANT; - cod.release(); - } - - //! Effects: Constructs a stable_vector - //! and inserts n default initialized values. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's default or copy constructor throws. - //! - //! Complexity: Linear to n. - //! - //! Note: Non-standard extension - stable_vector(size_type n, default_init_t) - : internal_data(), index() - { - stable_vector_detail::clear_on_destroy cod(*this); - this->resize(n, default_init); - STABLE_VECTOR_CHECK_INVARIANT; - cod.release(); - } - - //! Effects: Constructs a stable_vector that will use a copy of allocator a - //! and inserts n value initialized values. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's default or copy constructor throws. - //! - //! Complexity: Linear to n. - explicit stable_vector(size_type n, const allocator_type &a) - : internal_data(), index(a) - { - stable_vector_detail::clear_on_destroy cod(*this); - this->resize(n); - STABLE_VECTOR_CHECK_INVARIANT; - cod.release(); - } - - //! Effects: Constructs a stable_vector that will use a copy of allocator a - //! and inserts n default initialized values. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's default or copy constructor throws. - //! - //! Complexity: Linear to n. - //! - //! Note: Non-standard extension - stable_vector(size_type n, default_init_t, const allocator_type &a) - : internal_data(), index(a) - { - stable_vector_detail::clear_on_destroy cod(*this); - this->resize(n, default_init); - STABLE_VECTOR_CHECK_INVARIANT; - cod.release(); - } - - //! Effects: Constructs a stable_vector that will use a copy of allocator a - //! and inserts n copies of value. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's default or copy constructor throws. - //! - //! Complexity: Linear to n. - stable_vector(size_type n, const T& t, const allocator_type& al = allocator_type()) - : internal_data(al), index(al) - { - stable_vector_detail::clear_on_destroy cod(*this); - this->insert(this->cend(), n, t); - STABLE_VECTOR_CHECK_INVARIANT; - cod.release(); - } - - //! Effects: Constructs a stable_vector that will use a copy of allocator a - //! and inserts a copy of the range [first, last) in the stable_vector. - //! - //! Throws: If allocator_type's default constructor - //! throws or T's constructor taking a dereferenced InIt throws. - //! - //! Complexity: Linear to the range [first, last). - template - stable_vector(InputIterator first,InputIterator last, const allocator_type& al = allocator_type()) - : internal_data(al), index(al) - { - stable_vector_detail::clear_on_destroy cod(*this); - this->insert(this->cend(), first, last); - STABLE_VECTOR_CHECK_INVARIANT; - cod.release(); - } - - //! Effects: Copy constructs a stable_vector. - //! - //! Postcondition: x == *this. - //! - //! Complexity: Linear to the elements x contains. - stable_vector(const stable_vector& x) - : internal_data(allocator_traits:: - select_on_container_copy_construction(x.priv_node_alloc())) - , index(allocator_traits:: - select_on_container_copy_construction(x.index.get_stored_allocator())) - { - stable_vector_detail::clear_on_destroy cod(*this); - this->insert(this->cend(), x.begin(), x.end()); - STABLE_VECTOR_CHECK_INVARIANT; - cod.release(); - } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Constructs a stable_vector that will use a copy of allocator a - //! and inserts a copy of the range [il.begin(), il.last()) in the stable_vector - //! - //! Throws: If allocator_type's default constructor - //! throws or T's constructor taking a dereferenced initializer_list iterator throws. - //! - //! Complexity: Linear to the range [il.begin(), il.end()). - stable_vector(std::initializer_list il, const allocator_type& l = allocator_type()) - : internal_data(l), index(l) - { - stable_vector_detail::clear_on_destroy cod(*this); - insert(cend(), il.begin(), il.end()); - STABLE_VECTOR_CHECK_INVARIANT; - cod.release(); - } -#endif - - //! Effects: Move constructor. Moves x's resources to *this. - //! - //! Throws: If allocator_type's copy constructor throws. - //! - //! Complexity: Constant. - stable_vector(BOOST_RV_REF(stable_vector) x) BOOST_NOEXCEPT_OR_NOTHROW - : internal_data(boost::move(x.priv_node_alloc())), index(boost::move(x.index)) - { - this->priv_swap_members(x); - } - - //! Effects: Copy constructs a stable_vector using the specified allocator. - //! - //! Postcondition: x == *this. - //! - //! Complexity: Linear to the elements x contains. - stable_vector(const stable_vector& x, const allocator_type &a) - : internal_data(a), index(a) - { - stable_vector_detail::clear_on_destroy cod(*this); - this->insert(this->cend(), x.begin(), x.end()); - STABLE_VECTOR_CHECK_INVARIANT; - cod.release(); - } - - //! Effects: Move constructor using the specified allocator. - //! Moves x's resources to *this. - //! - //! Throws: If allocator_type's copy constructor throws. - //! - //! Complexity: Constant if a == x.get_allocator(), linear otherwise - stable_vector(BOOST_RV_REF(stable_vector) x, const allocator_type &a) - : internal_data(a), index(a) - { - if(this->priv_node_alloc() == x.priv_node_alloc()){ - this->index.swap(x.index); - this->priv_swap_members(x); - } - else{ - stable_vector_detail::clear_on_destroy cod(*this); - this->insert(this->cend(), boost::make_move_iterator(x.begin()), boost::make_move_iterator(x.end())); - STABLE_VECTOR_CHECK_INVARIANT; - cod.release(); - } - } - - //! Effects: Destroys the stable_vector. All stored values are destroyed - //! and used memory is deallocated. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the number of elements. - ~stable_vector() - { - this->clear(); - this->priv_clear_pool(); - } - - //! Effects: Makes *this contain the same elements as x. - //! - //! Postcondition: this->size() == x.size(). *this contains a copy - //! of each of x's elements. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to the number of elements in x. - stable_vector& operator=(BOOST_COPY_ASSIGN_REF(stable_vector) x) - { - STABLE_VECTOR_CHECK_INVARIANT; - if (&x != this){ - node_allocator_type &this_alloc = this->priv_node_alloc(); - const node_allocator_type &x_alloc = x.priv_node_alloc(); - container_detail::bool_ flag; - if(flag && this_alloc != x_alloc){ - this->clear(); - this->shrink_to_fit(); - } - container_detail::assign_alloc(this->priv_node_alloc(), x.priv_node_alloc(), flag); - container_detail::assign_alloc(this->index.get_stored_allocator(), x.index.get_stored_allocator(), flag); - this->assign(x.begin(), x.end()); - } - return *this; - } - - //! Effects: Move assignment. All x's values are transferred to *this. - //! - //! Postcondition: x.empty(). *this contains a the elements x had - //! before the function. - //! - //! Throws: If allocator_traits_type::propagate_on_container_move_assignment - //! is false and (allocation throws or T's move constructor throws) - //! - //! Complexity: Constant if allocator_traits_type:: - //! propagate_on_container_move_assignment is true or - //! this->get>allocator() == x.get_allocator(). Linear otherwise. - stable_vector& operator=(BOOST_RV_REF(stable_vector) x) - BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value - || allocator_traits_type::is_always_equal::value) - { - //for move constructor, no aliasing (&x != this) is assummed. - BOOST_ASSERT(this != &x); - node_allocator_type &this_alloc = this->priv_node_alloc(); - node_allocator_type &x_alloc = x.priv_node_alloc(); - const bool propagate_alloc = allocator_traits_type:: - propagate_on_container_move_assignment::value; - container_detail::bool_ flag; - const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal; - //Resources can be transferred if both allocators are - //going to be equal after this function (either propagated or already equal) - if(propagate_alloc || allocators_equal){ - STABLE_VECTOR_CHECK_INVARIANT - //Destroy objects but retain memory in case x reuses it in the future - this->clear(); - //Move allocator if needed - container_detail::move_alloc(this_alloc, x_alloc, flag); - //Take resources - this->index.swap(x.index); - this->priv_swap_members(x); - } - //Else do a one by one move - else{ - this->assign( boost::make_move_iterator(x.begin()) - , boost::make_move_iterator(x.end())); - } - return *this; - } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Make *this container contains elements from il. - //! - //! Complexity: Linear to the range [il.begin(), il.end()). - stable_vector& operator=(std::initializer_list il) - { - STABLE_VECTOR_CHECK_INVARIANT; - assign(il.begin(), il.end()); - return *this; - } -#endif - - //! Effects: Assigns the n copies of val to *this. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to n. - void assign(size_type n, const T& t) - { - typedef constant_iterator cvalue_iterator; - this->assign(cvalue_iterator(t, n), cvalue_iterator()); - } - - //! Effects: Assigns the the range [first, last) to *this. - //! - //! Throws: If memory allocation throws or - //! T's constructor from dereferencing InpIt throws. - //! - //! Complexity: Linear to n. - template - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - typename container_detail::disable_if_convertible::type - #else - void - #endif - assign(InputIterator first,InputIterator last) - { - STABLE_VECTOR_CHECK_INVARIANT; - iterator first1 = this->begin(); - iterator last1 = this->end(); - for ( ; first1 != last1 && first != last; ++first1, ++first) - *first1 = *first; - if (first == last){ - this->erase(first1, last1); - } - else{ - this->insert(last1, first, last); - } - } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Effects: Assigns the the range [il.begin(), il.end()) to *this. - //! - //! Throws: If memory allocation throws or - //! T's constructor from dereferencing initializer_list iterator throws. - //! - void assign(std::initializer_list il) - { - STABLE_VECTOR_CHECK_INVARIANT; - assign(il.begin(), il.end()); - } -#endif - - //! Effects: Returns a copy of the internal allocator. - //! - //! Throws: If allocator's copy constructor throws. - //! - //! Complexity: Constant. - allocator_type get_allocator() const - { return this->priv_node_alloc(); } - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->priv_node_alloc(); } - - //! Effects: Returns a reference to the internal allocator. - //! - //! Throws: Nothing - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension. - stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW - { return this->priv_node_alloc(); } - - ////////////////////////////////////////////// - // - // iterators - // - ////////////////////////////////////////////// - - //! Effects: Returns an iterator to the first element contained in the stable_vector. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - iterator begin() BOOST_NOEXCEPT_OR_NOTHROW - { return (this->index.empty()) ? this->end(): iterator(node_ptr_traits::static_cast_from(this->index.front())); } - - //! Effects: Returns a const_iterator to the first element contained in the stable_vector. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW - { return (this->index.empty()) ? this->cend() : const_iterator(node_ptr_traits::static_cast_from(this->index.front())) ; } - - //! Effects: Returns an iterator to the end of the stable_vector. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - iterator end() BOOST_NOEXCEPT_OR_NOTHROW - { return iterator(this->priv_get_end_node()); } - - //! Effects: Returns a const_iterator to the end of the stable_vector. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_iterator(this->priv_get_end_node()); } - - //! Effects: Returns a reverse_iterator pointing to the beginning - //! of the reversed stable_vector. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW - { return reverse_iterator(this->end()); } - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed stable_vector. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_reverse_iterator(this->end()); } - - //! Effects: Returns a reverse_iterator pointing to the end - //! of the reversed stable_vector. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW - { return reverse_iterator(this->begin()); } - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed stable_vector. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_reverse_iterator(this->begin()); } - - //! Effects: Returns a const_iterator to the first element contained in the stable_vector. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->begin(); } - - //! Effects: Returns a const_iterator to the end of the stable_vector. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->end(); } - - //! Effects: Returns a const_reverse_iterator pointing to the beginning - //! of the reversed stable_vector. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->rbegin(); } - - //! Effects: Returns a const_reverse_iterator pointing to the end - //! of the reversed stable_vector. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reverse_iterator crend()const BOOST_NOEXCEPT_OR_NOTHROW - { return this->rend(); } - - ////////////////////////////////////////////// - // - // capacity - // - ////////////////////////////////////////////// - - //! Effects: Returns true if the stable_vector contains no elements. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - bool empty() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->index.size() <= ExtraPointers; } - - //! Effects: Returns the number of the elements contained in the stable_vector. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - size_type size() const BOOST_NOEXCEPT_OR_NOTHROW - { - const size_type index_size = this->index.size(); - return (index_size - ExtraPointers) & (size_type(0u) -size_type(index_size != 0)); - } - - //! Effects: Returns the largest possible size of the stable_vector. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW - { return this->index.max_size() - ExtraPointers; } - - //! Effects: Inserts or erases elements at the end such that - //! the size becomes n. New elements are value initialized. - //! - //! Throws: If memory allocation throws, or T's value initialization throws. - //! - //! Complexity: Linear to the difference between size() and new_size. - void resize(size_type n) - { - typedef value_init_construct_iterator value_init_iterator; - STABLE_VECTOR_CHECK_INVARIANT; - if(n > this->size()) - this->insert(this->cend(), value_init_iterator(n - this->size()), value_init_iterator()); - else if(n < this->size()) - this->erase(this->cbegin() + n, this->cend()); - } - - //! Effects: Inserts or erases elements at the end such that - //! the size becomes n. New elements are default initialized. - //! - //! Throws: If memory allocation throws, or T's default initialization throws. - //! - //! Complexity: Linear to the difference between size() and new_size. - //! - //! Note: Non-standard extension - void resize(size_type n, default_init_t) - { - typedef default_init_construct_iterator default_init_iterator; - STABLE_VECTOR_CHECK_INVARIANT; - if(n > this->size()) - this->insert(this->cend(), default_init_iterator(n - this->size()), default_init_iterator()); - else if(n < this->size()) - this->erase(this->cbegin() + n, this->cend()); - } - - //! Effects: Inserts or erases elements at the end such that - //! the size becomes n. New elements are copy constructed from x. - //! - //! Throws: If memory allocation throws, or T's copy constructor throws. - //! - //! Complexity: Linear to the difference between size() and new_size. - void resize(size_type n, const T& t) - { - STABLE_VECTOR_CHECK_INVARIANT; - if(n > this->size()) - this->insert(this->cend(), n - this->size(), t); - else if(n < this->size()) - this->erase(this->cbegin() + n, this->cend()); - } - - //! Effects: Number of elements for which memory has been allocated. - //! capacity() is always greater than or equal to size(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW - { - const size_type index_size = this->index.size(); - BOOST_ASSERT(!index_size || index_size >= ExtraPointers); - const size_type node_extra_capacity = this->internal_data.pool_size; - //Pool count must be less than index capacity, as index is a vector - BOOST_ASSERT(node_extra_capacity <= (this->index.capacity()- index_size)); - const size_type index_offset = - (node_extra_capacity - ExtraPointers) & (size_type(0u) - size_type(index_size != 0)); - return index_size + index_offset; - } - - //! Effects: If n is less than or equal to capacity(), this call has no - //! effect. Otherwise, it is a request for allocation of additional memory. - //! If the request is successful, then capacity() is greater than or equal to - //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged. - //! - //! Throws: If memory allocation allocation throws. - void reserve(size_type n) - { - STABLE_VECTOR_CHECK_INVARIANT; - if(n > this->max_size()){ - throw_length_error("stable_vector::reserve max_size() exceeded"); - } - - size_type sz = this->size(); - size_type old_capacity = this->capacity(); - if(n > old_capacity){ - index_traits_type::initialize_end_node(this->index, this->internal_data.end_node, n); - const void * old_ptr = &index[0]; - this->index.reserve(n + ExtraPointers); - bool realloced = &index[0] != old_ptr; - //Fix the pointers for the newly allocated buffer - if(realloced){ - index_traits_type::fix_up_pointers_from(this->index, this->index.begin()); - } - //Now fill pool if data is not enough - if((n - sz) > this->internal_data.pool_size){ - this->priv_increase_pool((n - sz) - this->internal_data.pool_size); - } - } - } - - //! Effects: Tries to deallocate the excess of memory created - //! with previous allocations. The size of the stable_vector is unchanged - //! - //! Throws: If memory allocation throws. - //! - //! Complexity: Linear to size(). - void shrink_to_fit() - { - if(this->capacity()){ - //First empty allocated node pool - this->priv_clear_pool(); - //If empty completely destroy the index, let's recover default-constructed state - if(this->empty()){ - this->index.clear(); - this->index.shrink_to_fit(); - this->internal_data.end_node.up = node_base_ptr_ptr(); - } - //Otherwise, try to shrink-to-fit the index and readjust pointers if necessary - else{ - const void* old_ptr = &index[0]; - this->index.shrink_to_fit(); - bool realloced = &index[0] != old_ptr; - //Fix the pointers for the newly allocated buffer - if(realloced){ - index_traits_type::fix_up_pointers_from(this->index, this->index.begin()); - } - } - } - } - - ////////////////////////////////////////////// - // - // element access - // - ////////////////////////////////////////////// - - //! Requires: !empty() - //! - //! Effects: Returns a reference to the first - //! element of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reference front() BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - return static_cast(*this->index.front()).value; - } - - //! Requires: !empty() - //! - //! Effects: Returns a const reference to the first - //! element of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - return static_cast(*this->index.front()).value; - } - - //! Requires: !empty() - //! - //! Effects: Returns a reference to the last - //! element of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reference back() BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - return static_cast(*this->index[this->size()-1u]).value; - } - - //! Requires: !empty() - //! - //! Effects: Returns a const reference to the last - //! element of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - return static_cast(*this->index[this->size()-1u]).value; - } - - //! Requires: size() > n. - //! - //! Effects: Returns a reference to the nth element - //! from the beginning of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->size() > n); - return static_cast(*this->index[n]).value; - } - - //! Requires: size() > n. - //! - //! Effects: Returns a const reference to the nth element - //! from the beginning of the container. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->size() > n); - return static_cast(*this->index[n]).value; - } - - //! Requires: size() >= n. - //! - //! Effects: Returns an iterator to the nth element - //! from the beginning of the container. Returns end() - //! if n == size(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension - iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->size() >= n); - return (this->index.empty()) ? this->end() : iterator(node_ptr_traits::static_cast_from(this->index[n])); - } - - //! Requires: size() >= n. - //! - //! Effects: Returns a const_iterator to the nth element - //! from the beginning of the container. Returns end() - //! if n == size(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension - const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->size() >= n); - return (this->index.empty()) ? this->cend() : iterator(node_ptr_traits::static_cast_from(this->index[n])); - } - - //! Requires: begin() <= p <= end(). - //! - //! Effects: Returns the index of the element pointed by p - //! and size() if p == end(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension - size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW - { return this->priv_index_of(p.node_pointer()); } - - //! Requires: begin() <= p <= end(). - //! - //! Effects: Returns the index of the element pointed by p - //! and size() if p == end(). - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - //! - //! Note: Non-standard extension - size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW - { return this->priv_index_of(p.node_pointer()); } - - //! Requires: size() > n. - //! - //! Effects: Returns a reference to the nth element - //! from the beginning of the container. - //! - //! Throws: std::range_error if n >= size() - //! - //! Complexity: Constant. - reference at(size_type n) - { - if(n >= this->size()){ - throw_out_of_range("vector::at invalid subscript"); - } - return operator[](n); - } - - //! Requires: size() > n. - //! - //! Effects: Returns a const reference to the nth element - //! from the beginning of the container. - //! - //! Throws: std::range_error if n >= size() - //! - //! Complexity: Constant. - const_reference at(size_type n)const - { - if(n >= this->size()){ - throw_out_of_range("vector::at invalid subscript"); - } - return operator[](n); - } - - ////////////////////////////////////////////// - // - // modifiers - // - ////////////////////////////////////////////// - - #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... in the end of the stable_vector. - //! - //! Returns: A reference to the created object. - //! - //! Throws: If memory allocation throws or the in-place constructor throws. - //! - //! Complexity: Amortized constant time. - template - reference emplace_back(Args &&...args) - { - typedef emplace_functor EmplaceFunctor; - typedef emplace_iterator EmplaceIterator; - EmplaceFunctor &&ef = EmplaceFunctor(boost::forward(args)...); - return *this->insert(this->cend(), EmplaceIterator(ef), EmplaceIterator()); - } - - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Inserts an object of type T constructed with - //! std::forward(args)... before p - //! - //! Throws: If memory allocation throws or the in-place constructor throws. - //! - //! Complexity: If p is end(), amortized constant time - //! Linear time otherwise. - template - iterator emplace(const_iterator p, Args && ...args) - { - BOOST_ASSERT(this->priv_in_range_or_end(p)); - size_type pos_n = p - cbegin(); - typedef emplace_functor EmplaceFunctor; - typedef emplace_iterator EmplaceIterator; - EmplaceFunctor &&ef = EmplaceFunctor(boost::forward(args)...); - this->insert(p, EmplaceIterator(ef), EmplaceIterator()); - return iterator(this->begin() + pos_n); - } - - #else - - #define BOOST_CONTAINER_STABLE_VECTOR_EMPLACE_CODE(N) \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - reference emplace_back(BOOST_MOVE_UREF##N)\ - {\ - typedef emplace_functor##N\ - BOOST_MOVE_LT##N BOOST_MOVE_TARG##N BOOST_MOVE_GT##N EmplaceFunctor;\ - typedef emplace_iterator EmplaceIterator;\ - EmplaceFunctor ef BOOST_MOVE_LP##N BOOST_MOVE_FWD##N BOOST_MOVE_RP##N;\ - return *this->insert(this->cend() , EmplaceIterator(ef), EmplaceIterator());\ - }\ - \ - BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \ - iterator emplace(const_iterator p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\ - {\ - BOOST_ASSERT(this->priv_in_range_or_end(p));\ - typedef emplace_functor##N\ - BOOST_MOVE_LT##N BOOST_MOVE_TARG##N BOOST_MOVE_GT##N EmplaceFunctor;\ - typedef emplace_iterator EmplaceIterator;\ - EmplaceFunctor ef BOOST_MOVE_LP##N BOOST_MOVE_FWD##N BOOST_MOVE_RP##N;\ - const size_type pos_n = p - this->cbegin();\ - this->insert(p, EmplaceIterator(ef), EmplaceIterator());\ - return this->begin() += pos_n;\ - }\ - // - BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_STABLE_VECTOR_EMPLACE_CODE) - #undef BOOST_CONTAINER_STABLE_VECTOR_EMPLACE_CODE - - #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Effects: Inserts a copy of x at the end of the stable_vector. - //! - //! Throws: If memory allocation throws or - //! T's copy constructor throws. - //! - //! Complexity: Amortized constant time. - void push_back(const T &x); - - //! Effects: Constructs a new element in the end of the stable_vector - //! and moves the resources of x to this new element. - //! - //! Throws: If memory allocation throws. - //! - //! Complexity: Amortized constant time. - void push_back(T &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH(push_back, T, void, priv_push_back) - #endif - - #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Insert a copy of x before p. - //! - //! Returns: An iterator to the inserted element. - //! - //! Throws: If memory allocation throws or x's copy constructor throws. - //! - //! Complexity: If p is end(), amortized constant time - //! Linear time otherwise. - iterator insert(const_iterator p, const T &x); - - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Insert a new element before p with x's resources. - //! - //! Returns: an iterator to the inserted element. - //! - //! Throws: If memory allocation throws. - //! - //! Complexity: If p is end(), amortized constant time - //! Linear time otherwise. - iterator insert(const_iterator p, T &&x); - #else - BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator) - #endif - - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Insert n copies of x before p. - //! - //! Returns: an iterator to the first inserted element or p if n is 0. - //! - //! Throws: If memory allocation throws or T's copy constructor throws. - //! - //! Complexity: Linear to n. - iterator insert(const_iterator p, size_type n, const T& t) - { - BOOST_ASSERT(this->priv_in_range_or_end(p)); - STABLE_VECTOR_CHECK_INVARIANT; - typedef constant_iterator cvalue_iterator; - return this->insert(p, cvalue_iterator(t, n), cvalue_iterator()); - } - - //! Requires: p must be a valid iterator of *this. -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! Requires: p must be a valid iterator of *this. - //! - //! Effects: Insert a copy of the [il.begin(), il.end()) range before p. - //! - //! Returns: an iterator to the first inserted element or p if first == last. - //! - //! Complexity: Linear to distance [il.begin(), il.end()). - iterator insert(const_iterator p, std::initializer_list il) - { - //Position checks done by insert() - STABLE_VECTOR_CHECK_INVARIANT; - return insert(p, il.begin(), il.end()); - } -#endif - - //! Requires: pos must be a valid iterator of *this. - //! - //! Effects: Insert a copy of the [first, last) range before p. - //! - //! Returns: an iterator to the first inserted element or p if first == last. - //! - //! Throws: If memory allocation throws, T's constructor from a - //! dereferenced InpIt throws or T's copy constructor throws. - //! - //! Complexity: Linear to distance [first, last). - template - iterator insert(const_iterator p, InputIterator first, InputIterator last - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - //Put this as argument instead of the return type as old GCC's like 3.4 - //detect this and the next disable_if_or as overloads - , typename container_detail::disable_if_or - < void - , container_detail::is_convertible - , container_detail::is_not_input_iterator - >::type* = 0 - #endif - ) - { - BOOST_ASSERT(this->priv_in_range_or_end(p)); - STABLE_VECTOR_CHECK_INVARIANT; - const size_type pos_n = p - this->cbegin(); - for(; first != last; ++first){ - this->emplace(p, *first); - } - return this->begin() + pos_n; - } - - #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED) - template - typename container_detail::disable_if_or - < iterator - , container_detail::is_convertible - , container_detail::is_input_iterator - >::type - insert(const_iterator p, FwdIt first, FwdIt last) - { - BOOST_ASSERT(this->priv_in_range_or_end(p)); - const size_type num_new = static_cast(boost::container::iterator_distance(first, last)); - const size_type idx = static_cast(p - this->cbegin()); - if(num_new){ - //Fills the node pool and inserts num_new null pointers in idx. - //If a new buffer was needed fixes up pointers up to idx so - //past-new nodes are not aligned until the end of this function - //or in a rollback in case of exception - index_iterator it_past_newly_constructed(this->priv_insert_forward_non_templated(idx, num_new)); - const index_iterator it_past_new(it_past_newly_constructed + num_new); - { - //Prepare rollback - insert_rollback rollback(*this, it_past_newly_constructed, it_past_new); - while(first != last){ - const node_ptr n = this->priv_get_from_pool(); - BOOST_ASSERT(!!n); - //Put it in the index so rollback can return it in pool if construct_in_place throws - *it_past_newly_constructed = n; - //Constructs and fixes up pointers This can throw - this->priv_build_node_from_it(n, it_past_newly_constructed, first); - ++first; - ++it_past_newly_constructed; - } - //rollback.~insert_rollback() called in case of exception - } - //Fix up pointers for past-new nodes (new nodes were fixed during construction) and - //nodes before insertion p in priv_insert_forward_non_templated(...) - index_traits_type::fix_up_pointers_from(this->index, it_past_newly_constructed); - } - return this->begin() + idx; - } - #endif - - //! Effects: Removes the last element from the stable_vector. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant time. - void pop_back() BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(!this->empty()); - this->erase(--this->cend()); - } - - //! Effects: Erases the element at p. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the elements between p and the - //! last element. Constant if p is the last element. - iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(this->priv_in_range(p)); - STABLE_VECTOR_CHECK_INVARIANT; - const size_type d = p - this->cbegin(); - index_iterator it = this->index.begin() + d; - this->priv_delete_node(p.node_pointer()); - it = this->index.erase(it); - index_traits_type::fix_up_pointers_from(this->index, it); - return iterator(node_ptr_traits::static_cast_from(*it)); - } - - //! Effects: Erases the elements pointed by [first, last). - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the distance between first and last - //! plus linear to the elements between p and the last element. - iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW - { - BOOST_ASSERT(first == last || - (first < last && this->priv_in_range(first) && this->priv_in_range_or_end(last))); - STABLE_VECTOR_CHECK_INVARIANT; - const const_iterator cbeg(this->cbegin()); - const size_type d1 = static_cast(first - cbeg), - d2 = static_cast(last - cbeg); - size_type d_dif = d2 - d1; - if(d_dif){ - multiallocation_chain holder; - const index_iterator it1(this->index.begin() + d1); - const index_iterator it2(it1 + d_dif); - index_iterator it(it1); - while(d_dif--){ - node_base_ptr &nb = *it; - ++it; - node_type &n = *node_ptr_traits::static_cast_from(nb); - this->priv_destroy_node(n); - holder.push_back(node_ptr_traits::pointer_to(n)); - } - this->priv_put_in_pool(holder); - const index_iterator e = this->index.erase(it1, it2); - index_traits_type::fix_up_pointers_from(this->index, e); - } - return iterator(last.node_pointer()); - } - - //! Effects: Swaps the contents of *this and x. - //! - //! Throws: Nothing. - //! - //! Complexity: Constant. - void swap(stable_vector & x) - BOOST_NOEXCEPT_IF( allocator_traits_type::propagate_on_container_swap::value - || allocator_traits_type::is_always_equal::value) - { - BOOST_ASSERT(allocator_traits_type::propagate_on_container_swap::value || - allocator_traits_type::is_always_equal::value || - this->get_stored_allocator() == x.get_stored_allocator()); - STABLE_VECTOR_CHECK_INVARIANT; - container_detail::bool_ flag; - container_detail::swap_alloc(this->priv_node_alloc(), x.priv_node_alloc(), flag); - //vector's allocator is swapped here - this->index.swap(x.index); - this->priv_swap_members(x); - } - - //! Effects: Erases all the elements of the stable_vector. - //! - //! Throws: Nothing. - //! - //! Complexity: Linear to the number of elements in the stable_vector. - void clear() BOOST_NOEXCEPT_OR_NOTHROW - { this->erase(this->cbegin(),this->cend()); } - - //! Effects: Returns true if x and y are equal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator==(const stable_vector& x, const stable_vector& y) - { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); } - - //! Effects: Returns true if x and y are unequal - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator!=(const stable_vector& x, const stable_vector& y) - { return !(x == y); } - - //! Effects: Returns true if x is less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<(const stable_vector& x, const stable_vector& y) - { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); } - - //! Effects: Returns true if x is greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>(const stable_vector& x, const stable_vector& y) - { return y < x; } - - //! Effects: Returns true if x is equal or less than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator<=(const stable_vector& x, const stable_vector& y) - { return !(y < x); } - - //! Effects: Returns true if x is equal or greater than y - //! - //! Complexity: Linear to the number of elements in the container. - friend bool operator>=(const stable_vector& x, const stable_vector& y) - { return !(x < y); } - - //! Effects: x.swap(y) - //! - //! Complexity: Constant. - friend void swap(stable_vector& x, stable_vector& y) - { x.swap(y); } - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - - bool priv_in_range(const_iterator pos) const - { - return (this->begin() <= pos) && (pos < this->end()); - } - - bool priv_in_range_or_end(const_iterator pos) const - { - return (this->begin() <= pos) && (pos <= this->end()); - } - - size_type priv_index_of(node_ptr p) const - { - //Check range - BOOST_ASSERT(this->index.empty() || (this->index.data() <= p->up)); - BOOST_ASSERT(this->index.empty() || p->up <= (this->index.data() + this->index.size())); - return this->index.empty() ? 0 : p->up - this->index.data(); - } - - class insert_rollback - { - public: - - insert_rollback(stable_vector &sv, index_iterator &it_past_constructed, const index_iterator &it_past_new) - : m_sv(sv), m_it_past_constructed(it_past_constructed), m_it_past_new(it_past_new) - {} - - ~insert_rollback() - { - if(m_it_past_constructed != m_it_past_new){ - m_sv.priv_put_in_pool(node_ptr_traits::static_cast_from(*m_it_past_constructed)); - index_iterator e = m_sv.index.erase(m_it_past_constructed, m_it_past_new); - index_traits_type::fix_up_pointers_from(m_sv.index, e); - } - } - - private: - stable_vector &m_sv; - index_iterator &m_it_past_constructed; - const index_iterator &m_it_past_new; - }; - - class push_back_rollback - { - public: - push_back_rollback(stable_vector &sv, const node_ptr &p) - : m_sv(sv), m_p(p) - {} - - ~push_back_rollback() - { - if(m_p){ - m_sv.priv_put_in_pool(m_p); - } - } - - void release() - { m_p = node_ptr(); } - - private: - stable_vector &m_sv; - node_ptr m_p; - }; - - index_iterator priv_insert_forward_non_templated(size_type idx, size_type num_new) - { - index_traits_type::initialize_end_node(this->index, this->internal_data.end_node, num_new); - - //Now try to fill the pool with new data - if(this->internal_data.pool_size < num_new){ - this->priv_increase_pool(num_new - this->internal_data.pool_size); - } - - //Now try to make room in the vector - const node_base_ptr_ptr old_buffer = this->index.data(); - this->index.insert(this->index.begin() + idx, num_new, node_ptr()); - bool new_buffer = this->index.data() != old_buffer; - - //Fix the pointers for the newly allocated buffer - const index_iterator index_beg = this->index.begin(); - if(new_buffer){ - index_traits_type::fix_up_pointers(index_beg, index_beg + idx); - } - return index_beg + idx; - } - - bool priv_capacity_bigger_than_size() const - { - return this->index.capacity() > this->index.size() && - this->internal_data.pool_size > 0; - } - - template - void priv_push_back(BOOST_MOVE_CATCH_FWD(U) x) - { - if(BOOST_LIKELY(this->priv_capacity_bigger_than_size())){ - //Enough memory in the pool and in the index - const node_ptr p = this->priv_get_from_pool(); - BOOST_ASSERT(!!p); - { - push_back_rollback rollback(*this, p); - //This might throw - this->priv_build_node_from_convertible(p, ::boost::forward(x)); - rollback.release(); - } - //This can't throw as there is room for a new elements in the index - index_iterator new_index = this->index.insert(this->index.end() - ExtraPointers, p); - index_traits_type::fix_up_pointers_from(this->index, new_index); - } - else{ - this->insert(this->cend(), ::boost::forward(x)); - } - } - - iterator priv_insert(const_iterator p, const value_type &t) - { - BOOST_ASSERT(this->priv_in_range_or_end(p)); - typedef constant_iterator cvalue_iterator; - return this->insert(p, cvalue_iterator(t, 1), cvalue_iterator()); - } - - iterator priv_insert(const_iterator p, BOOST_RV_REF(T) x) - { - BOOST_ASSERT(this->priv_in_range_or_end(p)); - typedef repeat_iterator repeat_it; - typedef boost::move_iterator repeat_move_it; - //Just call more general insert(p, size, value) and return iterator - return this->insert(p, repeat_move_it(repeat_it(x, 1)), repeat_move_it(repeat_it())); - } - - void priv_clear_pool() - { - if(!this->index.empty() && this->index.back()){ - node_base_ptr &pool_first_ref = *(this->index.end() - 2); - node_base_ptr &pool_last_ref = this->index.back(); - - multiallocation_chain holder; - holder.incorporate_after( holder.before_begin() - , node_ptr_traits::static_cast_from(pool_first_ref) - , node_ptr_traits::static_cast_from(pool_last_ref) - , internal_data.pool_size); - this->deallocate_individual(holder); - pool_first_ref = pool_last_ref = 0; - this->internal_data.pool_size = 0; - } - } - - void priv_increase_pool(size_type n) - { - node_base_ptr &pool_first_ref = *(this->index.end() - 2); - node_base_ptr &pool_last_ref = this->index.back(); - multiallocation_chain holder; - holder.incorporate_after( holder.before_begin() - , node_ptr_traits::static_cast_from(pool_first_ref) - , node_ptr_traits::static_cast_from(pool_last_ref) - , internal_data.pool_size); - multiallocation_chain m; - this->allocate_individual(n, m); - holder.splice_after(holder.before_begin(), m, m.before_begin(), m.last(), n); - this->internal_data.pool_size += n; - std::pair data(holder.extract_data()); - pool_first_ref = data.first; - pool_last_ref = data.second; - } - - void priv_put_in_pool(const node_ptr &p) - { - node_base_ptr &pool_first_ref = *(this->index.end()-2); - node_base_ptr &pool_last_ref = this->index.back(); - multiallocation_chain holder; - holder.incorporate_after( holder.before_begin() - , node_ptr_traits::static_cast_from(pool_first_ref) - , node_ptr_traits::static_cast_from(pool_last_ref) - , internal_data.pool_size); - holder.push_front(p); - ++this->internal_data.pool_size; - std::pair ret(holder.extract_data()); - pool_first_ref = ret.first; - pool_last_ref = ret.second; - } - - void priv_put_in_pool(multiallocation_chain &ch) - { - node_base_ptr &pool_first_ref = *(this->index.end()-(ExtraPointers-1)); - node_base_ptr &pool_last_ref = this->index.back(); - ch.incorporate_after( ch.before_begin() - , node_ptr_traits::static_cast_from(pool_first_ref) - , node_ptr_traits::static_cast_from(pool_last_ref) - , internal_data.pool_size); - this->internal_data.pool_size = ch.size(); - const std::pair ret(ch.extract_data()); - pool_first_ref = ret.first; - pool_last_ref = ret.second; - } - - node_ptr priv_get_from_pool() - { - //Precondition: index is not empty - BOOST_ASSERT(!this->index.empty()); - node_base_ptr &pool_first_ref = *(this->index.end() - (ExtraPointers-1)); - node_base_ptr &pool_last_ref = this->index.back(); - multiallocation_chain holder; - holder.incorporate_after( holder.before_begin() - , node_ptr_traits::static_cast_from(pool_first_ref) - , node_ptr_traits::static_cast_from(pool_last_ref) - , internal_data.pool_size); - node_ptr ret = holder.pop_front(); - --this->internal_data.pool_size; - if(!internal_data.pool_size){ - pool_first_ref = pool_last_ref = node_ptr(); - } - else{ - const std::pair data(holder.extract_data()); - pool_first_ref = data.first; - pool_last_ref = data.second; - } - return ret; - } - - node_base_ptr priv_get_end_node() const - { return node_base_ptr_traits::pointer_to(const_cast(this->internal_data.end_node)); } - - void priv_destroy_node(const node_type &n) - { - allocator_traits:: - destroy(this->priv_node_alloc(), container_detail::addressof(n.value)); - static_cast(&n)->~node_base_type(); - } - - void priv_delete_node(const node_ptr &n) - { - this->priv_destroy_node(*n); - this->priv_put_in_pool(n); - } - - template - void priv_build_node_from_it(const node_ptr &p, const index_iterator &up_index, const Iterator &it) - { - //This can throw - boost::container::construct_in_place - ( this->priv_node_alloc() - , container_detail::addressof(p->value) - , it); - //This does not throw - ::new(static_cast(boost::movelib::to_raw_pointer(p)), boost_container_new_t()) - node_base_type(index_traits_type::ptr_to_node_base_ptr(*up_index)); - } - - template - void priv_build_node_from_convertible(const node_ptr &p, BOOST_FWD_REF(ValueConvertible) value_convertible) - { - //This can throw - boost::container::allocator_traits::construct - ( this->priv_node_alloc() - , container_detail::addressof(p->value) - , ::boost::forward(value_convertible)); - //This does not throw - ::new(static_cast(boost::movelib::to_raw_pointer(p)), boost_container_new_t()) node_base_type; - } - - void priv_swap_members(stable_vector &x) - { - boost::adl_move_swap(this->internal_data.pool_size, x.internal_data.pool_size); - index_traits_type::readjust_end_node(this->index, this->internal_data.end_node); - index_traits_type::readjust_end_node(x.index, x.internal_data.end_node); - } - - #if defined(STABLE_VECTOR_ENABLE_INVARIANT_CHECKING) - bool priv_invariant()const - { - index_type & index_ref = const_cast(this->index); - - const size_type index_size = this->index.size(); - if(!index_size) - return !this->capacity() && !this->size(); - - if(index_size < ExtraPointers) - return false; - - const size_type bucket_extra_capacity = this->index.capacity()- index_size; - const size_type node_extra_capacity = this->internal_data.pool_size; - if(bucket_extra_capacity < node_extra_capacity){ - return false; - } - - if(this->priv_get_end_node() != *(index.end() - ExtraPointers)){ - return false; - } - - if(!index_traits_type::invariants(index_ref)){ - return false; - } - - size_type n = this->capacity() - this->size(); - node_base_ptr &pool_first_ref = *(index_ref.end() - (ExtraPointers-1)); - node_base_ptr &pool_last_ref = index_ref.back(); - multiallocation_chain holder; - holder.incorporate_after( holder.before_begin() - , node_ptr_traits::static_cast_from(pool_first_ref) - , node_ptr_traits::static_cast_from(pool_last_ref) - , internal_data.pool_size); - typename multiallocation_chain::iterator beg(holder.begin()), end(holder.end()); - size_type num_pool = 0; - while(beg != end){ - ++num_pool; - ++beg; - } - return n >= num_pool && num_pool == internal_data.pool_size; - } - - class invariant_checker - { - invariant_checker(const invariant_checker &); - invariant_checker & operator=(const invariant_checker &); - const stable_vector* p; - - public: - invariant_checker(const stable_vector& v):p(&v){} - ~invariant_checker(){BOOST_ASSERT(p->priv_invariant());} - void touch(){} - }; - #endif - - class ebo_holder - : public node_allocator_type - { - private: - BOOST_MOVABLE_BUT_NOT_COPYABLE(ebo_holder) - - public: - template - explicit ebo_holder(BOOST_FWD_REF(AllocatorRLValue) a) - : node_allocator_type(boost::forward(a)) - , pool_size(0) - , end_node() - {} - - ebo_holder() - : node_allocator_type() - , pool_size(0) - , end_node() - {} - - size_type pool_size; - node_base_type end_node; - } internal_data; - - node_allocator_type &priv_node_alloc() { return internal_data; } - const node_allocator_type &priv_node_alloc() const { return internal_data; } - - index_type index; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -}; - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -#undef STABLE_VECTOR_CHECK_INVARIANT - -} //namespace container { - -//!has_trivial_destructor_after_move<> == true_type -//!specialization for optimizations -template -struct has_trivial_destructor_after_move > -{ - typedef typename ::boost::container::allocator_traits::pointer pointer; - static const bool value = ::boost::has_trivial_destructor_after_move::value && - ::boost::has_trivial_destructor_after_move::value; -}; - -namespace container { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -}} //namespace boost{ namespace container { - -#include - -#endif //BOOST_CONTAINER_STABLE_VECTOR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/static_vector.hpp b/contrib/libboost/boost_1_65_0/boost/container/static_vector.hpp deleted file mode 100644 index 21168cbf960..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/static_vector.hpp +++ /dev/null @@ -1,1227 +0,0 @@ -// Boost.Container static_vector -// -// Copyright (c) 2012-2013 Adam Wulkiewicz, Lodz, Poland. -// Copyright (c) 2011-2013 Andrew Hundt. -// Copyright (c) 2013-2014 Ion Gaztanaga -// -// 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_CONTAINER_STATIC_VECTOR_HPP -#define BOOST_CONTAINER_STATIC_VECTOR_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include -#include - -#include -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) -#include -#endif - -namespace boost { namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -namespace container_detail { - -template -class static_storage_allocator -{ - public: - typedef T value_type; - - BOOST_CONTAINER_FORCEINLINE static_storage_allocator() BOOST_NOEXCEPT_OR_NOTHROW - {} - - BOOST_CONTAINER_FORCEINLINE static_storage_allocator(const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - {} - - BOOST_CONTAINER_FORCEINLINE static_storage_allocator & operator=(const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - { return *this; } - - BOOST_CONTAINER_FORCEINLINE T* internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW - { return const_cast(static_cast(static_cast(&storage))); } - - BOOST_CONTAINER_FORCEINLINE T* internal_storage() BOOST_NOEXCEPT_OR_NOTHROW - { return static_cast(static_cast(&storage)); } - - static const std::size_t internal_capacity = N; - - std::size_t max_size() const - { return N; } - - typedef boost::container::container_detail::version_type version; - - BOOST_CONTAINER_FORCEINLINE friend bool operator==(const static_storage_allocator &, const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - { return false; } - - BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const static_storage_allocator &, const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW - { return true; } - - private: - typename aligned_storage::value>::type storage; -}; - -} //namespace container_detail { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! -//!@brief A variable-size array container with fixed capacity. -//! -//!static_vector is a sequence container like boost::container::vector with contiguous storage that can -//!change in size, along with the static allocation, low overhead, and fixed capacity of boost::array. -//! -//!A static_vector is a sequence that supports random access to elements, constant time insertion and -//!removal of elements at the end, and linear time insertion and removal of elements at the beginning or -//!in the middle. The number of elements in a static_vector may vary dynamically up to a fixed capacity -//!because elements are stored within the object itself similarly to an array. However, objects are -//!initialized as they are inserted into static_vector unlike C arrays or std::array which must construct -//!all elements on instantiation. The behavior of static_vector enables the use of statically allocated -//!elements in cases with complex object lifetime requirements that would otherwise not be trivially -//!possible. -//! -//!@par Error Handling -//! Insertion beyond the capacity result in throwing std::bad_alloc() if exceptions are enabled or -//! calling throw_bad_alloc() if not enabled. -//! -//! std::out_of_range is thrown if out of bound access is performed in at() if exceptions are -//! enabled, throw_out_of_range() if not enabled. -//! -//!@tparam Value The type of element that will be stored. -//!@tparam Capacity The maximum number of elements static_vector can store, fixed at compile time. -template -class static_vector - : public vector > -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - typedef vector > base_t; - - BOOST_COPYABLE_AND_MOVABLE(static_vector) - - template - friend class static_vector; - - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -public: - //! @brief The type of elements stored in the container. - typedef typename base_t::value_type value_type; - //! @brief The unsigned integral type used by the container. - typedef typename base_t::size_type size_type; - //! @brief The pointers difference type. - typedef typename base_t::difference_type difference_type; - //! @brief The pointer type. - typedef typename base_t::pointer pointer; - //! @brief The const pointer type. - typedef typename base_t::const_pointer const_pointer; - //! @brief The value reference type. - typedef typename base_t::reference reference; - //! @brief The value const reference type. - typedef typename base_t::const_reference const_reference; - //! @brief The iterator type. - typedef typename base_t::iterator iterator; - //! @brief The const iterator type. - typedef typename base_t::const_iterator const_iterator; - //! @brief The reverse iterator type. - typedef typename base_t::reverse_iterator reverse_iterator; - //! @brief The const reverse iterator. - typedef typename base_t::const_reverse_iterator const_reverse_iterator; - - //! @brief The capacity/max size of the container - static const size_type static_capacity = Capacity; - - //! @brief Constructs an empty static_vector. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - BOOST_CONTAINER_FORCEINLINE static_vector() BOOST_NOEXCEPT_OR_NOTHROW - : base_t() - {} - - //! @pre count <= capacity() - //! - //! @brief Constructs a static_vector containing count value initialized values. - //! - //! @param count The number of values which will be contained in the container. - //! - //! @par Throws - //! If Value's value initialization throws. - //! - //! @par Complexity - //! Linear O(N). - BOOST_CONTAINER_FORCEINLINE explicit static_vector(size_type count) - : base_t(count) - {} - - //! @pre count <= capacity() - //! - //! @brief Constructs a static_vector containing count default initialized values. - //! - //! @param count The number of values which will be contained in the container. - //! - //! @par Throws - //! If Value's default initialization throws. - //! - //! @par Complexity - //! Linear O(N). - //! - //! @par Note - //! Non-standard extension - BOOST_CONTAINER_FORCEINLINE static_vector(size_type count, default_init_t) - : base_t(count, default_init_t()) - {} - - //! @pre count <= capacity() - //! - //! @brief Constructs a static_vector containing count copies of value. - //! - //! @param count The number of copies of a values that will be contained in the container. - //! @param value The value which will be used to copy construct values. - //! - //! @par Throws - //! If Value's copy constructor throws. - //! - //! @par Complexity - //! Linear O(N). - BOOST_CONTAINER_FORCEINLINE static_vector(size_type count, value_type const& value) - : base_t(count, value) - {} - - //! @pre - //! @li distance(first, last) <= capacity() - //! @li Iterator must meet the \c ForwardTraversalIterator concept. - //! - //! @brief Constructs a static_vector containing copy of a range [first, last). - //! - //! @param first The iterator to the first element in range. - //! @param last The iterator to the one after the last element in range. - //! - //! @par Throws - //! If Value's constructor taking a dereferenced Iterator throws. - //! - //! @par Complexity - //! Linear O(N). - template - BOOST_CONTAINER_FORCEINLINE static_vector(Iterator first, Iterator last) - : base_t(first, last) - {} - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! @pre - //! @li distance(il.begin(), il.end()) <= capacity() - //! - //! @brief Constructs a static_vector containing copy of a range [il.begin(), il.end()). - //! - //! @param il std::initializer_list with values to initialize vector. - //! - //! @par Throws - //! If Value's constructor taking a dereferenced std::initializer_list throws. - //! - //! @par Complexity - //! Linear O(N). - BOOST_CONTAINER_FORCEINLINE static_vector(std::initializer_list il) - : base_t(il) - {} -#endif - - //! @brief Constructs a copy of other static_vector. - //! - //! @param other The static_vector which content will be copied to this one. - //! - //! @par Throws - //! If Value's copy constructor throws. - //! - //! @par Complexity - //! Linear O(N). - BOOST_CONTAINER_FORCEINLINE static_vector(static_vector const& other) - : base_t(other) - {} - - //! @pre other.size() <= capacity(). - //! - //! @brief Constructs a copy of other static_vector. - //! - //! @param other The static_vector which content will be copied to this one. - //! - //! @par Throws - //! If Value's copy constructor throws. - //! - //! @par Complexity - //! Linear O(N). - template - BOOST_CONTAINER_FORCEINLINE static_vector(static_vector const& other) - : base_t(other) - {} - - //! @brief Move constructor. Moves Values stored in the other static_vector to this one. - //! - //! @param other The static_vector which content will be moved to this one. - //! - //! @par Throws - //! @li If \c has_nothrow_move::value is \c true and Value's move constructor throws. - //! @li If \c has_nothrow_move::value is \c false and Value's copy constructor throws. - //! - //! @par Complexity - //! Linear O(N). - BOOST_CONTAINER_FORCEINLINE static_vector(BOOST_RV_REF(static_vector) other) - BOOST_NOEXCEPT_IF(boost::container::container_detail::is_nothrow_move_constructible::value) - : base_t(BOOST_MOVE_BASE(base_t, other)) - {} - - //! @pre other.size() <= capacity() - //! - //! @brief Move constructor. Moves Values stored in the other static_vector to this one. - //! - //! @param other The static_vector which content will be moved to this one. - //! - //! @par Throws - //! @li If \c has_nothrow_move::value is \c true and Value's move constructor throws. - //! @li If \c has_nothrow_move::value is \c false and Value's copy constructor throws. - //! - //! @par Complexity - //! Linear O(N). - template - BOOST_CONTAINER_FORCEINLINE static_vector(BOOST_RV_REF_BEG static_vector BOOST_RV_REF_END other) - : base_t(BOOST_MOVE_BASE(typename static_vector::base_t, other)) - {} - - //! @brief Copy assigns Values stored in the other static_vector to this one. - //! - //! @param other The static_vector which content will be copied to this one. - //! - //! @par Throws - //! If Value's copy constructor or copy assignment throws. - //! - //! @par Complexity - //! Linear O(N). - BOOST_CONTAINER_FORCEINLINE static_vector & operator=(BOOST_COPY_ASSIGN_REF(static_vector) other) - { - return static_cast(base_t::operator=(static_cast(other))); - } - -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) - //! @brief Copy assigns Values stored in std::initializer_list to *this. - //! - //! @param il The std::initializer_list which content will be copied to this one. - //! - //! @par Throws - //! If Value's copy constructor or copy assignment throws. - //! - //! @par Complexity - //! Linear O(N). - BOOST_CONTAINER_FORCEINLINE static_vector & operator=(std::initializer_list il) - { return static_cast(base_t::operator=(il)); } -#endif - - //! @pre other.size() <= capacity() - //! - //! @brief Copy assigns Values stored in the other static_vector to this one. - //! - //! @param other The static_vector which content will be copied to this one. - //! - //! @par Throws - //! If Value's copy constructor or copy assignment throws. - //! - //! @par Complexity - //! Linear O(N). - template - BOOST_CONTAINER_FORCEINLINE static_vector & operator=(static_vector const& other) - { - return static_cast(base_t::operator= - (static_cast::base_t const&>(other))); - } - - //! @brief Move assignment. Moves Values stored in the other static_vector to this one. - //! - //! @param other The static_vector which content will be moved to this one. - //! - //! @par Throws - //! @li If \c has_nothrow_move::value is \c true and Value's move constructor or move assignment throws. - //! @li If \c has_nothrow_move::value is \c false and Value's copy constructor or copy assignment throws. - //! - //! @par Complexity - //! Linear O(N). - BOOST_CONTAINER_FORCEINLINE static_vector & operator=(BOOST_RV_REF(static_vector) other) - { - return static_cast(base_t::operator=(BOOST_MOVE_BASE(base_t, other))); - } - - //! @pre other.size() <= capacity() - //! - //! @brief Move assignment. Moves Values stored in the other static_vector to this one. - //! - //! @param other The static_vector which content will be moved to this one. - //! - //! @par Throws - //! @li If \c has_nothrow_move::value is \c true and Value's move constructor or move assignment throws. - //! @li If \c has_nothrow_move::value is \c false and Value's copy constructor or copy assignment throws. - //! - //! @par Complexity - //! Linear O(N). - template - BOOST_CONTAINER_FORCEINLINE static_vector & operator=(BOOST_RV_REF_BEG static_vector BOOST_RV_REF_END other) - { - return static_cast(base_t::operator= - (BOOST_MOVE_BASE(typename static_vector::base_t, other))); - } - -#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED - - //! @brief Destructor. Destroys Values stored in this container. - //! - //! @par Throws - //! Nothing - //! - //! @par Complexity - //! Linear O(N). - ~static_vector(); - - //! @brief Swaps contents of the other static_vector and this one. - //! - //! @param other The static_vector which content will be swapped with this one's content. - //! - //! @par Throws - //! @li If \c has_nothrow_move::value is \c true and Value's move constructor or move assignment throws, - //! @li If \c has_nothrow_move::value is \c false and Value's copy constructor or copy assignment throws, - //! - //! @par Complexity - //! Linear O(N). - void swap(static_vector & other); - - //! @pre other.size() <= capacity() && size() <= other.capacity() - //! - //! @brief Swaps contents of the other static_vector and this one. - //! - //! @param other The static_vector which content will be swapped with this one's content. - //! - //! @par Throws - //! @li If \c has_nothrow_move::value is \c true and Value's move constructor or move assignment throws, - //! @li If \c has_nothrow_move::value is \c false and Value's copy constructor or copy assignment throws, - //! - //! @par Complexity - //! Linear O(N). - template - void swap(static_vector & other); - - //! @pre count <= capacity() - //! - //! @brief Inserts or erases elements at the end such that - //! the size becomes count. New elements are value initialized. - //! - //! @param count The number of elements which will be stored in the container. - //! - //! @par Throws - //! If Value's value initialization throws. - //! - //! @par Complexity - //! Linear O(N). - void resize(size_type count); - - //! @pre count <= capacity() - //! - //! @brief Inserts or erases elements at the end such that - //! the size becomes count. New elements are default initialized. - //! - //! @param count The number of elements which will be stored in the container. - //! - //! @par Throws - //! If Value's default initialization throws. - //! - //! @par Complexity - //! Linear O(N). - //! - //! @par Note - //! Non-standard extension - void resize(size_type count, default_init_t); - - //! @pre count <= capacity() - //! - //! @brief Inserts or erases elements at the end such that - //! the size becomes count. New elements are copy constructed from value. - //! - //! @param count The number of elements which will be stored in the container. - //! @param value The value used to copy construct the new element. - //! - //! @par Throws - //! If Value's copy constructor throws. - //! - //! @par Complexity - //! Linear O(N). - void resize(size_type count, value_type const& value); - - //! @pre count <= capacity() - //! - //! @brief This call has no effect because the Capacity of this container is constant. - //! - //! @param count The number of elements which the container should be able to contain. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Linear O(N). - void reserve(size_type count) BOOST_NOEXCEPT_OR_NOTHROW; - - //! @pre size() < capacity() - //! - //! @brief Adds a copy of value at the end. - //! - //! @param value The value used to copy construct the new element. - //! - //! @par Throws - //! If Value's copy constructor throws. - //! - //! @par Complexity - //! Constant O(1). - void push_back(value_type const& value); - - //! @pre size() < capacity() - //! - //! @brief Moves value to the end. - //! - //! @param value The value to move construct the new element. - //! - //! @par Throws - //! If Value's move constructor throws. - //! - //! @par Complexity - //! Constant O(1). - void push_back(BOOST_RV_REF(value_type) value); - - //! @pre !empty() - //! - //! @brief Destroys last value and decreases the size. - //! - //! @par Throws - //! Nothing by default. - //! - //! @par Complexity - //! Constant O(1). - void pop_back(); - - //! @pre - //! @li \c p must be a valid iterator of \c *this in range [begin(), end()]. - //! @li size() < capacity() - //! - //! @brief Inserts a copy of element at p. - //! - //! @param p The position at which the new value will be inserted. - //! @param value The value used to copy construct the new element. - //! - //! @par Throws - //! @li If Value's copy constructor or copy assignment throws - //! @li If Value's move constructor or move assignment throws. - //! - //! @par Complexity - //! Constant or linear. - iterator insert(const_iterator p, value_type const& value); - - //! @pre - //! @li \c p must be a valid iterator of \c *this in range [begin(), end()]. - //! @li size() < capacity() - //! - //! @brief Inserts a move-constructed element at p. - //! - //! @param p The position at which the new value will be inserted. - //! @param value The value used to move construct the new element. - //! - //! @par Throws - //! If Value's move constructor or move assignment throws. - //! - //! @par Complexity - //! Constant or linear. - iterator insert(const_iterator p, BOOST_RV_REF(value_type) value); - - //! @pre - //! @li \c p must be a valid iterator of \c *this in range [begin(), end()]. - //! @li size() + count <= capacity() - //! - //! @brief Inserts a count copies of value at p. - //! - //! @param p The position at which new elements will be inserted. - //! @param count The number of new elements which will be inserted. - //! @param value The value used to copy construct new elements. - //! - //! @par Throws - //! @li If Value's copy constructor or copy assignment throws. - //! @li If Value's move constructor or move assignment throws. - //! - //! @par Complexity - //! Linear O(N). - iterator insert(const_iterator p, size_type count, value_type const& value); - - //! @pre - //! @li \c p must be a valid iterator of \c *this in range [begin(), end()]. - //! @li distance(first, last) <= capacity() - //! @li \c Iterator must meet the \c ForwardTraversalIterator concept. - //! - //! @brief Inserts a copy of a range [first, last) at p. - //! - //! @param p The position at which new elements will be inserted. - //! @param first The iterator to the first element of a range used to construct new elements. - //! @param last The iterator to the one after the last element of a range used to construct new elements. - //! - //! @par Throws - //! @li If Value's constructor and assignment taking a dereferenced \c Iterator. - //! @li If Value's move constructor or move assignment throws. - //! - //! @par Complexity - //! Linear O(N). - template - iterator insert(const_iterator p, Iterator first, Iterator last); - - //! @pre - //! @li \c p must be a valid iterator of \c *this in range [begin(), end()]. - //! @li distance(il.begin(), il.end()) <= capacity() - //! - //! @brief Inserts a copy of a range [il.begin(), il.end()) at p. - //! - //! @param p The position at which new elements will be inserted. - //! @param il The std::initializer_list which contains elements that will be inserted. - //! - //! @par Throws - //! @li If Value's constructor and assignment taking a dereferenced std::initializer_list iterator. - //! - //! @par Complexity - //! Linear O(N). - iterator insert(const_iterator p, std::initializer_list il); - - //! @pre \c p must be a valid iterator of \c *this in range [begin(), end()) - //! - //! @brief Erases Value from p. - //! - //! @param p The position of the element which will be erased from the container. - //! - //! @par Throws - //! If Value's move assignment throws. - //! - //! @par Complexity - //! Linear O(N). - iterator erase(const_iterator p); - - //! @pre - //! @li \c first and \c last must define a valid range - //! @li iterators must be in range [begin(), end()] - //! - //! @brief Erases Values from a range [first, last). - //! - //! @param first The position of the first element of a range which will be erased from the container. - //! @param last The position of the one after the last element of a range which will be erased from the container. - //! - //! @par Throws - //! If Value's move assignment throws. - //! - //! @par Complexity - //! Linear O(N). - iterator erase(const_iterator first, const_iterator last); - - //! @pre distance(first, last) <= capacity() - //! - //! @brief Assigns a range [first, last) of Values to this container. - //! - //! @param first The iterator to the first element of a range used to construct new content of this container. - //! @param last The iterator to the one after the last element of a range used to construct new content of this container. - //! - //! @par Throws - //! If Value's copy constructor or copy assignment throws, - //! - //! @par Complexity - //! Linear O(N). - template - void assign(Iterator first, Iterator last); - - //! @pre distance(il.begin(), il.end()) <= capacity() - //! - //! @brief Assigns a range [il.begin(), il.end()) of Values to this container. - //! - //! @param il std::initializer_list with values used to construct new content of this container. - //! - //! @par Throws - //! If Value's copy constructor or copy assignment throws, - //! - //! @par Complexity - //! Linear O(N). - void assign(std::initializer_list il); - - //! @pre count <= capacity() - //! - //! @brief Assigns a count copies of value to this container. - //! - //! @param count The new number of elements which will be container in the container. - //! @param value The value which will be used to copy construct the new content. - //! - //! @par Throws - //! If Value's copy constructor or copy assignment throws. - //! - //! @par Complexity - //! Linear O(N). - void assign(size_type count, value_type const& value); - - //! @pre size() < capacity() - //! - //! @brief Inserts a Value constructed with - //! \c std::forward(args)... in the end of the container. - //! - //! @return A reference to the created object. - //! - //! @param args The arguments of the constructor of the new element which will be created at the end of the container. - //! - //! @par Throws - //! If in-place constructor throws or Value's move constructor throws. - //! - //! @par Complexity - //! Constant O(1). - template - reference emplace_back(Args &&...args); - - //! @pre - //! @li \c p must be a valid iterator of \c *this in range [begin(), end()] - //! @li size() < capacity() - //! - //! @brief Inserts a Value constructed with - //! \c std::forward(args)... before p - //! - //! @param p The position at which new elements will be inserted. - //! @param args The arguments of the constructor of the new element. - //! - //! @par Throws - //! If in-place constructor throws or if Value's move constructor or move assignment throws. - //! - //! @par Complexity - //! Constant or linear. - template - iterator emplace(const_iterator p, Args &&...args); - - //! @brief Removes all elements from the container. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - void clear() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @pre i < size() - //! - //! @brief Returns reference to the i-th element. - //! - //! @param i The element's index. - //! - //! @return reference to the i-th element - //! from the beginning of the container. - //! - //! @par Throws - //! \c std::out_of_range exception by default. - //! - //! @par Complexity - //! Constant O(1). - reference at(size_type i); - - //! @pre i < size() - //! - //! @brief Returns const reference to the i-th element. - //! - //! @param i The element's index. - //! - //! @return const reference to the i-th element - //! from the beginning of the container. - //! - //! @par Throws - //! \c std::out_of_range exception by default. - //! - //! @par Complexity - //! Constant O(1). - const_reference at(size_type i) const; - - //! @pre i < size() - //! - //! @brief Returns reference to the i-th element. - //! - //! @param i The element's index. - //! - //! @return reference to the i-th element - //! from the beginning of the container. - //! - //! @par Throws - //! Nothing by default. - //! - //! @par Complexity - //! Constant O(1). - reference operator[](size_type i); - - //! @pre i < size() - //! - //! @brief Returns const reference to the i-th element. - //! - //! @param i The element's index. - //! - //! @return const reference to the i-th element - //! from the beginning of the container. - //! - //! @par Throws - //! Nothing by default. - //! - //! @par Complexity - //! Constant O(1). - const_reference operator[](size_type i) const; - - //! @pre i =< size() - //! - //! @brief Returns a iterator to the i-th element. - //! - //! @param i The element's index. - //! - //! @return a iterator to the i-th element. - //! - //! @par Throws - //! Nothing by default. - //! - //! @par Complexity - //! Constant O(1). - iterator nth(size_type i); - - //! @pre i =< size() - //! - //! @brief Returns a const_iterator to the i-th element. - //! - //! @param i The element's index. - //! - //! @return a const_iterator to the i-th element. - //! - //! @par Throws - //! Nothing by default. - //! - //! @par Complexity - //! Constant O(1). - const_iterator nth(size_type i) const; - - //! @pre begin() <= p <= end() - //! - //! @brief Returns the index of the element pointed by p. - //! - //! @param p An iterator to the element. - //! - //! @return The index of the element pointed by p. - //! - //! @par Throws - //! Nothing by default. - //! - //! @par Complexity - //! Constant O(1). - size_type index_of(iterator p); - - //! @pre begin() <= p <= end() - //! - //! @brief Returns the index of the element pointed by p. - //! - //! @param p A const_iterator to the element. - //! - //! @return a const_iterator to the i-th element. - //! - //! @par Throws - //! Nothing by default. - //! - //! @par Complexity - //! Constant O(1). - size_type index_of(const_iterator p) const; - - //! @pre \c !empty() - //! - //! @brief Returns reference to the first element. - //! - //! @return reference to the first element - //! from the beginning of the container. - //! - //! @par Throws - //! Nothing by default. - //! - //! @par Complexity - //! Constant O(1). - reference front(); - - //! @pre \c !empty() - //! - //! @brief Returns const reference to the first element. - //! - //! @return const reference to the first element - //! from the beginning of the container. - //! - //! @par Throws - //! Nothing by default. - //! - //! @par Complexity - //! Constant O(1). - const_reference front() const; - - //! @pre \c !empty() - //! - //! @brief Returns reference to the last element. - //! - //! @return reference to the last element - //! from the beginning of the container. - //! - //! @par Throws - //! Nothing by default. - //! - //! @par Complexity - //! Constant O(1). - reference back(); - - //! @pre \c !empty() - //! - //! @brief Returns const reference to the first element. - //! - //! @return const reference to the last element - //! from the beginning of the container. - //! - //! @par Throws - //! Nothing by default. - //! - //! @par Complexity - //! Constant O(1). - const_reference back() const; - - //! @brief Pointer such that [data(), data() + size()) is a valid range. - //! For a non-empty vector data() == &front(). - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - Value * data() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @brief Const pointer such that [data(), data() + size()) is a valid range. - //! For a non-empty vector data() == &front(). - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - const Value * data() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @brief Returns iterator to the first element. - //! - //! @return iterator to the first element contained in the vector. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - iterator begin() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @brief Returns const iterator to the first element. - //! - //! @return const_iterator to the first element contained in the vector. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @brief Returns const iterator to the first element. - //! - //! @return const_iterator to the first element contained in the vector. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @brief Returns iterator to the one after the last element. - //! - //! @return iterator pointing to the one after the last element contained in the vector. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - iterator end() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @brief Returns const iterator to the one after the last element. - //! - //! @return const_iterator pointing to the one after the last element contained in the vector. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @brief Returns const iterator to the one after the last element. - //! - //! @return const_iterator pointing to the one after the last element contained in the vector. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @brief Returns reverse iterator to the first element of the reversed container. - //! - //! @return reverse_iterator pointing to the beginning - //! of the reversed static_vector. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @brief Returns const reverse iterator to the first element of the reversed container. - //! - //! @return const_reverse_iterator pointing to the beginning - //! of the reversed static_vector. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @brief Returns const reverse iterator to the first element of the reversed container. - //! - //! @return const_reverse_iterator pointing to the beginning - //! of the reversed static_vector. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @brief Returns reverse iterator to the one after the last element of the reversed container. - //! - //! @return reverse_iterator pointing to the one after the last element - //! of the reversed static_vector. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @brief Returns const reverse iterator to the one after the last element of the reversed container. - //! - //! @return const_reverse_iterator pointing to the one after the last element - //! of the reversed static_vector. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @brief Returns const reverse iterator to the one after the last element of the reversed container. - //! - //! @return const_reverse_iterator pointing to the one after the last element - //! of the reversed static_vector. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @brief Returns container's capacity. - //! - //! @return container's capacity. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - static size_type capacity() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @brief Returns container's capacity. - //! - //! @return container's capacity. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - static size_type max_size() BOOST_NOEXCEPT_OR_NOTHROW; - - //! @brief Returns the number of stored elements. - //! - //! @return Number of elements contained in the container. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - size_type size() const BOOST_NOEXCEPT_OR_NOTHROW; - - //! @brief Queries if the container contains elements. - //! - //! @return true if the number of elements contained in the - //! container is equal to 0. - //! - //! @par Throws - //! Nothing. - //! - //! @par Complexity - //! Constant O(1). - bool empty() const BOOST_NOEXCEPT_OR_NOTHROW; -#else - - BOOST_CONTAINER_FORCEINLINE friend void swap(static_vector &x, static_vector &y) - { - x.swap(y); - } - -#endif // BOOST_CONTAINER_DOXYGEN_INVOKED - -}; - -#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! @brief Checks if contents of two static_vectors are equal. -//! -//! @ingroup static_vector_non_member -//! -//! @param x The first static_vector. -//! @param y The second static_vector. -//! -//! @return \c true if containers have the same size and elements in both containers are equal. -//! -//! @par Complexity -//! Linear O(N). -template -bool operator== (static_vector const& x, static_vector const& y); - -//! @brief Checks if contents of two static_vectors are not equal. -//! -//! @ingroup static_vector_non_member -//! -//! @param x The first static_vector. -//! @param y The second static_vector. -//! -//! @return \c true if containers have different size or elements in both containers are not equal. -//! -//! @par Complexity -//! Linear O(N). -template -bool operator!= (static_vector const& x, static_vector const& y); - -//! @brief Lexicographically compares static_vectors. -//! -//! @ingroup static_vector_non_member -//! -//! @param x The first static_vector. -//! @param y The second static_vector. -//! -//! @return \c true if x compares lexicographically less than y. -//! -//! @par Complexity -//! Linear O(N). -template -bool operator< (static_vector const& x, static_vector const& y); - -//! @brief Lexicographically compares static_vectors. -//! -//! @ingroup static_vector_non_member -//! -//! @param x The first static_vector. -//! @param y The second static_vector. -//! -//! @return \c true if y compares lexicographically less than x. -//! -//! @par Complexity -//! Linear O(N). -template -bool operator> (static_vector const& x, static_vector const& y); - -//! @brief Lexicographically compares static_vectors. -//! -//! @ingroup static_vector_non_member -//! -//! @param x The first static_vector. -//! @param y The second static_vector. -//! -//! @return \c true if y don't compare lexicographically less than x. -//! -//! @par Complexity -//! Linear O(N). -template -bool operator<= (static_vector const& x, static_vector const& y); - -//! @brief Lexicographically compares static_vectors. -//! -//! @ingroup static_vector_non_member -//! -//! @param x The first static_vector. -//! @param y The second static_vector. -//! -//! @return \c true if x don't compare lexicographically less than y. -//! -//! @par Complexity -//! Linear O(N). -template -bool operator>= (static_vector const& x, static_vector const& y); - -//! @brief Swaps contents of two static_vectors. -//! -//! This function calls static_vector::swap(). -//! -//! @ingroup static_vector_non_member -//! -//! @param x The first static_vector. -//! @param y The second static_vector. -//! -//! @par Complexity -//! Linear O(N). -template -inline void swap(static_vector & x, static_vector & y); - -#else - -template -inline void swap(static_vector & x, static_vector & y - , typename container_detail::enable_if_c< C1 != C2>::type * = 0) -{ - x.swap(y); -} - -#endif // BOOST_CONTAINER_DOXYGEN_INVOKED - -}} // namespace boost::container - -#include - -#endif // BOOST_CONTAINER_STATIC_VECTOR_HPP diff --git a/contrib/libboost/boost_1_65_0/boost/container/string.hpp b/contrib/libboost/boost_1_65_0/boost/container/string.hpp deleted file mode 100644 index 24056781c96..00000000000 --- a/contrib/libboost/boost_1_65_0/boost/container/string.hpp +++ /dev/null @@ -1,3395 +0,0 @@ -////////////////////////////////////////////////////////////////////////////// -// -// (C) Copyright Ion Gaztanaga 2005-2015. 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_STRING_HPP -#define BOOST_CONTAINER_STRING_HPP - -#ifndef BOOST_CONFIG_HPP -# include -#endif - -#if defined(BOOST_HAS_PRAGMA_ONCE) -# pragma once -#endif - -#include -#include -#include -// container -#include -#include //new_allocator -#include -// container/detail -#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 -#include -#include - -//std -#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) -#include //for std::initializer_list -#endif - - -namespace boost { -namespace container { - -#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED -namespace container_detail { -// ------------------------------------------------------------ -// Class basic_string_base. - -// basic_string_base is a helper class that makes it it easier to write -// an exception-safe version of basic_string. The constructor allocates, -// but does not initialize, a block of memory. The destructor -// deallocates, but does not destroy elements within, a block of -// memory. The destructor assumes that the memory either is the internal buffer, -// or else points to a block of memory that was allocated using string_base's -// allocator and whose size is this->m_storage. -template -class basic_string_base -{ - basic_string_base & operator=(const basic_string_base &); - basic_string_base(const basic_string_base &); - - typedef allocator_traits allocator_traits_type; - public: - typedef Allocator allocator_type; - typedef allocator_type stored_allocator_type; - typedef typename allocator_traits_type::pointer pointer; - typedef typename allocator_traits_type::value_type value_type; - typedef typename allocator_traits_type::size_type size_type; - typedef ::boost::intrusive::pointer_traits pointer_traits; - - basic_string_base() - : members_() - { init(); } - - explicit basic_string_base(const allocator_type& a) - : members_(a) - { init(); } - - explicit basic_string_base(BOOST_RV_REF(allocator_type) a) - : members_(boost::move(a)) - { this->init(); } - - basic_string_base(const allocator_type& a, size_type n) - : members_(a) - { - this->init(); - this->allocate_initial_block(n); - } - - explicit basic_string_base(size_type n) - : members_() - { - this->init(); - this->allocate_initial_block(n); - } - - ~basic_string_base() - { - if(!this->is_short()){ - this->deallocate(this->priv_long_addr(), this->priv_long_storage()); - } - } - - private: - - //This is the structure controlling a long string - struct long_t - { - size_type is_short : 1; - size_type length : (sizeof(size_type)*CHAR_BIT - 1); - size_type storage; - pointer start; - - long_t() - {} - - long_t(const long_t &other) - { - this->is_short = false; - length = other.length; - storage = other.storage; - start = other.start; - } - - long_t &operator= (const long_t &other) - { - length = other.length; - storage = other.storage; - start = other.start; - return *this; - } - }; - - //This type is the first part of the structure controlling a short string - //The "data" member stores - struct short_header - { - unsigned char is_short : 1; - unsigned char length : (CHAR_BIT - 1); - }; - - //This type has the same alignment and size as long_t but it's POD - //so, unlike long_t, it can be placed in a union - - typedef typename container_detail::aligned_storage - ::value>::type long_raw_t; - - protected: - static const size_type MinInternalBufferChars = 8; - static const size_type AlignmentOfValueType = - alignment_of::value; - static const size_type ShortDataOffset = ((sizeof(short_header)-1)/AlignmentOfValueType+1)*AlignmentOfValueType; - static const size_type ZeroCostInternalBufferChars = - (sizeof(long_t) - ShortDataOffset)/sizeof(value_type); - static const size_type UnalignedFinalInternalBufferChars = - (ZeroCostInternalBufferChars > MinInternalBufferChars) ? - ZeroCostInternalBufferChars : MinInternalBufferChars; - - struct short_t - { - short_header h; - value_type data[UnalignedFinalInternalBufferChars]; - }; - - union repr_t - { - long_raw_t r; - short_t s; - - const short_t &short_repr() const - { return s; } - - const long_t &long_repr() const - { return *static_cast(static_cast(&r)); } - - short_t &short_repr() - { return s; } - - long_t &long_repr() - { return *static_cast(static_cast(&r)); } - }; - - struct members_holder - : public Allocator - { - members_holder() - : Allocator() - {} - - template - explicit members_holder(BOOST_FWD_REF(AllocatorConvertible) a) - : Allocator(boost::forward(a)) - {} - - repr_t m_repr; - } members_; - - const Allocator &alloc() const - { return members_; } - - Allocator &alloc() - { return members_; } - - static const size_type InternalBufferChars = (sizeof(repr_t) - ShortDataOffset)/sizeof(value_type); - - private: - - static const size_type MinAllocation = InternalBufferChars*2; - - protected: - bool is_short() const - { - //Access and copy (to avoid UB) the first byte of the union to know if the - //active representation is short or long - short_header hdr; - BOOST_STATIC_ASSERT((sizeof(short_header) == 1)); - *(unsigned char*)&hdr = *(unsigned char*)&this->members_.m_repr; - return hdr.is_short != 0; - } - - void is_short(bool yes) - { - const bool was_short = this->is_short(); - if(yes && !was_short){ - allocator_traits_type::destroy - ( this->alloc() - , static_cast(static_cast(&this->members_.m_repr.r)) - ); - this->members_.m_repr.s.h.is_short = true; - } - else if(!yes && was_short){ - allocator_traits_type::construct - ( this->alloc() - , static_cast(static_cast(&this->members_.m_repr.r)) - ); - this->members_.m_repr.s.h.is_short = false; - } - } - - private: - void init() - { - this->members_.m_repr.s.h.is_short = 1; - this->members_.m_repr.s.h.length = 0; - } - - protected: - - typedef container_detail::integral_constant::value> alloc_version; - - pointer allocation_command(allocation_type command, - size_type limit_size, - size_type &prefer_in_recvd_out_size, - pointer &reuse) - { - if(this->is_short() && (command & (expand_fwd | expand_bwd)) ){ - reuse = 0; - command &= ~(expand_fwd | expand_bwd); - } - return container_detail::allocator_version_traits::allocation_command - (this->alloc(), command, limit_size, prefer_in_recvd_out_size, reuse); - } - - size_type next_capacity(size_type additional_objects) const - { - return next_capacity_calculator - :: - get( allocator_traits_type::max_size(this->alloc()) - , this->priv_storage(), additional_objects ); - } - - void deallocate(pointer p, size_type n) - { - if (p && (n > InternalBufferChars)) - this->alloc().deallocate(p, n); - } - - void construct(pointer p, const value_type &value = value_type()) - { - allocator_traits_type::construct - ( this->alloc() - , boost::movelib::to_raw_pointer(p) - , value - ); - } - - void destroy(pointer p, size_type n) - { - value_type *raw_p = boost::movelib::to_raw_pointer(p); - for(; n--; ++raw_p){ - allocator_traits_type::destroy( this->alloc(), raw_p); - } - } - - void destroy(pointer p) - { - allocator_traits_type::destroy - ( this->alloc() - , boost::movelib::to_raw_pointer(p) - ); - } - - void allocate_initial_block(size_type n) - { - if (n <= this->max_size()) { - if(n > InternalBufferChars){ - size_type new_cap = this->next_capacity(n); - pointer reuse = 0; - pointer p = this->allocation_command(allocate_new, n, new_cap, reuse); - this->is_short(false); - this->priv_long_addr(p); - this->priv_long_size(0); - this->priv_storage(new_cap); - } - } - else{ - throw_length_error("basic_string::allocate_initial_block max_size() exceeded"); - } - } - - void deallocate_block() - { this->deallocate(this->priv_addr(), this->priv_storage()); } - - size_type max_size() const - { return allocator_traits_type::max_size(this->alloc()) - 1; } - - protected: - size_type priv_capacity() const - { return this->priv_storage() - 1; } - - pointer priv_short_addr() const - { return pointer_traits::pointer_to(const_cast(this->members_.m_repr.short_repr().data[0])); } - - pointer priv_long_addr() const - { return this->members_.m_repr.long_repr().start; } - - pointer priv_addr() const - { - return this->is_short() - ? priv_short_addr() - : priv_long_addr() - ; - } - - pointer priv_end_addr() const - { - return this->is_short() - ? this->priv_short_addr() + this->priv_short_size() - : this->priv_long_addr() + this->priv_long_size() - ; - } - - void priv_long_addr(pointer addr) - { this->members_.m_repr.long_repr().start = addr; } - - size_type priv_storage() const - { return this->is_short() ? priv_short_storage() : priv_long_storage(); } - - size_type priv_short_storage() const - { return InternalBufferChars; } - - size_type priv_long_storage() const - { return this->members_.m_repr.long_repr().storage; } - - void priv_storage(size_type storage) - { - if(!this->is_short()) - this->priv_long_storage(storage); - } - - void priv_long_storage(size_type storage) - { - this->members_.m_repr.long_repr().storage = storage; - } - - size_type priv_size() const - { return this->is_short() ? this->priv_short_size() : this->priv_long_size(); } - - size_type priv_short_size() const - { return this->members_.m_repr.short_repr().h.length; } - - size_type priv_long_size() const - { return this->members_.m_repr.long_repr().length; } - - void priv_size(size_type sz) - { - if(this->is_short()) - this->priv_short_size(sz); - else - this->priv_long_size(sz); - } - - void priv_short_size(size_type sz) - { - this->members_.m_repr.s.h.length = (unsigned char)sz; - } - - void priv_long_size(size_type sz) - { - this->members_.m_repr.long_repr().length = sz; - } - - void swap_data(basic_string_base& other) - { - if(this->is_short()){ - if(other.is_short()){ - repr_t tmp(this->members_.m_repr); - this->members_.m_repr = other.members_.m_repr; - other.members_.m_repr = tmp; - } - else{ - short_t short_backup(this->members_.m_repr.short_repr()); - this->members_.m_repr.short_repr().~short_t(); - ::new(&this->members_.m_repr.long_repr()) long_t(other.members_.m_repr.long_repr()); - other.members_.m_repr.long_repr().~long_t(); - ::new(&other.members_.m_repr.short_repr()) short_t(short_backup); - } - } - else{ - if(other.is_short()){ - short_t short_backup(other.members_.m_repr.short_repr()); - other.members_.m_repr.short_repr().~short_t(); - ::new(&other.members_.m_repr.long_repr()) long_t(this->members_.m_repr.long_repr()); - this->members_.m_repr.long_repr().~long_t(); - ::new(&this->members_.m_repr.short_repr()) short_t(short_backup); - } - else{ - boost::adl_move_swap(this->members_.m_repr.long_repr(), other.members_.m_repr.long_repr()); - } - } - } -}; - -} //namespace container_detail { - -#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - -//! The basic_string class represents a Sequence of characters. It contains all the -//! usual operations of a Sequence, and, additionally, it contains standard string -//! operations such as search and concatenation. -//! -//! The basic_string class is parameterized by character type, and by that type's -//! Character Traits. -//! -//! This class has performance characteristics very much like vector<>, meaning, -//! for example, that it does not perform reference-count or copy-on-write, and that -//! concatenation of two strings is an O(N) operation. -//! -//! Some of basic_string's member functions use an unusual method of specifying positions -//! and ranges. In addition to the conventional method using iterators, many of -//! basic_string's member functions use a single value pos of type size_type to represent a -//! position (in which case the position is begin() + pos, and many of basic_string's -//! member functions use two values, pos and n, to represent a range. In that case pos is -//! the beginning of the range and n is its size. That is, the range is -//! [begin() + pos, begin() + pos + n). -//! -//! Note that the C++ standard does not specify the complexity of basic_string operations. -//! In this implementation, basic_string has performance characteristics very similar to -//! those of vector: access to a single character is O(1), while copy and concatenation -//! are O(N). -//! -//! In this implementation, begin(), -//! end(), rbegin(), rend(), operator[], c_str(), and data() do not invalidate iterators. -//! In this implementation, iterators are only invalidated by member functions that -//! explicitly change the string's contents. -//! -//! \tparam CharT The type of character it contains. -//! \tparam Traits The Character Traits type, which encapsulates basic character operations -//! \tparam Allocator The allocator, used for internal memory management. -#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED -template , class Allocator = new_allocator > -#else -template -#endif -class basic_string - : private container_detail::basic_string_base -{ - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - typedef allocator_traits allocator_traits_type; - BOOST_COPYABLE_AND_MOVABLE(basic_string) - typedef container_detail::basic_string_base base_t; - static const typename base_t::size_type InternalBufferChars = base_t::InternalBufferChars; - - protected: - // Allocator helper class to use a char_traits as a function object. - - template - struct Eq_traits - { - //Compatibility with std::binary_function - typedef typename Tr::char_type first_argument_type; - typedef typename Tr::char_type second_argument_type; - typedef bool result_type; - - bool operator()(const first_argument_type& x, const second_argument_type& y) const - { return Tr::eq(x, y); } - }; - - template - struct Not_within_traits - { - typedef typename Tr::char_type argument_type; - typedef bool result_type; - - typedef const typename Tr::char_type* Pointer; - const Pointer m_first; - const Pointer m_last; - - Not_within_traits(Pointer f, Pointer l) - : m_first(f), m_last(l) {} - - bool operator()(const typename Tr::char_type& x) const - { - return boost::container::find_if(m_first, m_last, - boost::container::bind1st(Eq_traits(), x)) == m_last; - } - }; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: - ////////////////////////////////////////////// - // - // types - // - ////////////////////////////////////////////// - typedef Traits traits_type; - typedef CharT value_type; - typedef typename ::boost::container::allocator_traits::pointer pointer; - typedef typename ::boost::container::allocator_traits::const_pointer const_pointer; - typedef typename ::boost::container::allocator_traits::reference reference; - typedef typename ::boost::container::allocator_traits::const_reference const_reference; - typedef typename ::boost::container::allocator_traits::size_type size_type; - typedef typename ::boost::container::allocator_traits::difference_type difference_type; - typedef Allocator allocator_type; - typedef BOOST_CONTAINER_IMPDEF(allocator_type) stored_allocator_type; - typedef BOOST_CONTAINER_IMPDEF(pointer) iterator; - typedef BOOST_CONTAINER_IMPDEF(const_pointer) const_iterator; - typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) reverse_iterator; - typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator) const_reverse_iterator; - static const size_type npos = size_type(-1); - - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - private: - typedef constant_iterator cvalue_iterator; - typedef typename base_t::alloc_version alloc_version; - typedef ::boost::intrusive::pointer_traits pointer_traits; - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - public: // Constructor, destructor, assignment. - ////////////////////////////////////////////// - // - // construct/copy/destroy - // - ////////////////////////////////////////////// - #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - struct reserve_t {}; - - basic_string(reserve_t, size_type n, - const allocator_type& a = allocator_type()) - //Select allocator as in copy constructor as reserve_t-based constructors - //are two step copies optimized for capacity - : base_t( allocator_traits_type::select_on_container_copy_construction(a) - , n + 1) - { this->priv_terminate_string(); } - - #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED - - //! Effects: Default constructs a basic_string. - //! - //! Throws: If allocator_type's default constructor throws. - basic_string() BOOST_NOEXCEPT_IF(container_detail::is_nothrow_default_constructible::value) - : base_t() - { this->priv_terminate_string(); } - - - //! Effects: Constructs a basic_string taking the allocator as parameter. - //! - //! Throws: Nothing - explicit basic_string(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW - : base_t(a) - { this->priv_terminate_string(); } - - //! Effects: Copy constructs a basic_string. - //! - //! Postcondition: x == *this. - //! - //! Throws: If allocator_type's default constructor or allocation throws. - basic_string(const basic_string& s) - : base_t(allocator_traits_type::select_on_container_copy_construction(s.alloc())) - { - this->priv_terminate_string(); - this->assign(s.begin(), s.end()); - } - - //! Effects: Same as basic_string(sv.data(), sv.size(), a). - //! - //! Throws: If allocator_type's default constructor or allocation throws. - template