Commit Graph
100 Commits
Author SHA1 Message Date
Andrey Semashev 06548cf5fa Added VS2022 job and C++20 and C++latest jobs to AppVeyor CI. 2022-06-06 03:14:01 +03:00
Andrey Semashev c63d36cf5b Added string_view::contains methods.
These methods were added in C++23.

Also updated string_view/ref tests:

- Added tests for string_view::contains.
- Added missing includes.
- Added missing std:: qualification.
- Removed tabs.
- Fixed misleading indentation (fixes gcc warnings).
- Fixed decrementing pointer before beginning of the string.

Closes https://github.com/boostorg/utility/issues/93.
2022-05-04 00:32:30 +03:00
Andrey Semashev 0106ffda5f Added string_view/ref::substr overloads taking no arguments.
This effectively adds support for pos=0 default argument value.
The separate overload is better as it avoids instantiating std::min,
boost::throw_exception and removes std::out_of_range construction, which
potentially reduces code size, while maintaining the same behavior.

Fixes https://github.com/boostorg/utility/issues/96.
2022-05-03 00:46:03 +03:00
Andrey Semashev 0c1d01d30a Removed noexcept from string_view::compare that may throw.
One overload of string_view::compare calls substr internally,
which may throw. This makes compare potentially throwing.

Fixes https://github.com/boostorg/utility/issues/94.
2022-05-03 00:42:20 +03:00
Andrey Semashev 7ac95c156c Fixed string_view/ref::max_size() returning incorrect value.
Fixes https://github.com/boostorg/utility/issues/91.
2022-05-03 00:38:15 +03:00
Andrey Semashev eb29d71245 Corrected argument type in string_view/ref::at(). 2022-05-03 00:23:10 +03:00
Andrey Semashev 69f6588d7c Updated comment. 2022-01-17 17:53:42 +03:00
Andrey Semashev 6950023bca Added a link to the ticket with discussion re. MSVC warning 4913. 2022-01-17 17:49:37 +03:00
Andrey Semashev c3aab6a184 Use #ifdef to test for BOOST_MSVC. 2022-01-17 17:42:45 +03:00
Andrey Semashev e6edd4eb91 Minor formatting improvement. 2021-12-09 15:21:20 +03:00
Andrey Semashev 9d1284ef6d Use paths relative to the point of execution in doxygen rules.
This partly re-applies 5ae025b56a with the
following changes:

- Use path-constant to deduce the path relative to the point of execution
  rather than the Jamfile.
- Use that path only to list source files to be passed to Doxygen.
- Keep the project rule, but remove the duplicate requirements that are
  explicitly specified in standalone_main.

Hopefully, this should work around the problem of Reference generation
in the official docs.
2021-12-09 01:26:44 +03:00
Andrey Semashev aa0ccfa65e Revert "Use path-constant in Jamfile"
This reverts commit 5ae025b56a.

Reason for revert: This breaks local generation of docs due to broken
links to css and images.
2021-12-09 00:02:37 +03:00
Andrey Semashev a1583e3072 Updated a couple C++ standard references. 2021-12-08 16:27:46 +03:00
Andrey Semashev 30caa722c1 Nonessential docs formatting. 2021-12-08 16:18:56 +03:00
Andrey Semashev 96169c9fc6 Added a link to the page describing EBO. 2021-12-08 16:15:48 +03:00
Andrey Semashev b6119df27f Added links to a page describing POD. 2021-12-08 16:12:15 +03:00
Andrey Semashev 9941e831bb Updated references to C++ standard to C++11, added character escaping. 2021-12-08 16:08:36 +03:00
Andrey Semashev a8cdbe516d Fixed a typo, added character escaping in docs. 2021-12-08 16:07:14 +03:00
Andrey Semashev 485a160dde Updated docs formatting. 2021-12-08 15:17:19 +03:00
Andrey Semashev b9a91970be Adjusted code formatting. 2021-11-16 17:28:15 +03:00
Andrey Semashev 73bccf50db Moved auto-generated files to a separate subdirectory. 2021-11-16 17:23:51 +03:00
Andrey Semashev f7c17df050 Adjusted code formatting. 2021-11-16 17:23:51 +03:00
Andrey Semashev 51104850f6 Fixed web URL for the Boost.Utility docs.
Also adjusted formatting, removed unnecessary escaping and glob calls.
2021-11-16 17:23:29 +03:00
Andrey Semashev fede5878c3 Updated check for apt-add-repository capabilities.
In Ubuntu 20.04 there appeared an updated version of the
software-properties-common package in focal-updates, which ships a newer
apt-add-repository version that doesn't support -P/-S/-U command line arguments.

Since we cannot rely on package version checks to determine apt-add-repository
capabilities, we have to parse its --help output instead.

Also, made source list processing more protected against spaces.
2021-11-16 00:54:51 +03:00
Andrey Semashev 05e0d1688d Re-enabled 32-bit clang-win AppVeyor job on VS2019 image.
32-bit clang does not fail with the mspdb error on the VS2019 image.
Apply the same env script workaround as for the 64-bit clang.
2021-10-10 13:59:26 +03:00
Andrey Semashev dcaf2c0e3b Fixed a typo in AppVeyor config. 2021-10-10 00:18:35 +03:00
Andrey Semashev 71107238eb Call env setup script to work around missing msvcrt.lib errors with clang-win. 2021-10-10 00:08:03 +03:00
Andrey Semashev 28c90abaf0 Try switching clang-win to VS2019 image.
This is an attempt to work around the missing msvcrt(d).lib linking errors.
2021-10-09 20:32:03 +03:00
Andrey Semashev 2cc83cc7d5 Added MinGW-w64 gcc 8.1 job to AppVeyor. 2021-10-09 20:31:48 +03:00
Andrey Semashev e8fc7cc2a1 Disabled 32-bit clang-win in AppVeyor because of "unable to load mspdbcore.dll" errors. 2021-10-09 11:18:24 +03:00
Andrey Semashev 09d24c0516 Fixed git version check on Mac OS. 2021-09-26 20:43:44 +03:00
Andrey Semashev 3f51807f24 Disabled random operators tests under UBSAN.
The tests use random input to various arithmetic and bitwise operators,
which cause undefined behavior, such as shifting by more than the left
operand capacity or signed integer overflows.
2021-09-16 02:12:41 +03:00
Andrey Semashev a04a0d9531 Updated link to AppVeyor badge. 2021-09-15 22:18:17 +03:00
Andrey Semashev 449a03e13d Updated README.md to replace Travis CI with GHA and add other links. 2021-09-15 21:43:31 +03:00
Andrey Semashev dc59afafdb Added GitHub Actions config. 2021-09-15 21:40:04 +03:00
Andrey Semashev e845ae6752 Removed Travis CI config.
Since Travis CI no longer runs free jobs for open source projects,
we are migrating to GitHub Actions instead.
2021-09-15 21:38:55 +03:00
Andrey Semashev 1caa002121 Added gcc 10 build jobs to Travis CI. 2020-05-22 18:46:41 +03:00
Andrey Semashev 691f3238d7 Use 20 instead of 2a to refer to C++20 in Travis CI. 2020-05-05 23:12:01 +03:00
Andrey Semashev 8b6da499a3 Added clang-10 jobs to Travis CI. 2020-05-05 23:02:58 +03:00
Andrey Semashev 75276a055d Disabled all but one OS X jobs because they are slow on Travis CI. 2019-10-22 15:11:41 +03:00
Andrey Semashev 309e6a1b31 Updated CI configs, added compilers. 2019-10-22 00:52:54 +03:00
Andrey Semashev 9eeb7f85c5 Replaced tabs with spaces. 2019-06-25 15:46:36 +03:00
Andrey Semashev f03b681d01 Increased the number of git fetch jobs to 8 in CI. 2019-01-15 18:34:38 +03:00
Andrey Semashev e120a83d1e Revert "Use depinst to install dependencies in CI. Increase the number of git fetch jobs to 8."
This reverts commit 424fea5881.

By request from Peter Dimov in https://github.com/boostorg/utility/commit/424fea5881af84bc6fffed97065c8df2e4f50bc5#commitcomment-31945411.

The manual enumeration of Boost.Utility dependencies server as a detection
mechanism for unwanted dependencies creep in.
2019-01-15 18:28:28 +03:00
Andrey Semashev 424fea5881 Use depinst to install dependencies in CI. Increase the number of git fetch jobs to 8. 2019-01-15 14:06:11 +03:00
Andrey Semashev 53d9aa9d2f Use the actual number of logical CPUs for the number of CI build/test jobs. 2019-01-03 23:23:55 +03:00
Andrey Semashev ce64b13846 Added tools/boost_install and libs/headers manual checkout to CI jobs. 2018-12-18 22:14:06 +03:00
Andrey Semashev 32c50e0814 Added an experimental partial CMakeLists.txt for dependency tracking in CMake projects. 2018-12-18 19:51:11 +03:00
Andrey Semashev 05dda09fd3 Added libstdc++5 installation in the clang 7 job.
Apparently, a more recent libstdc++ is needed by Boost.StringView in C++14
and later mode.
2018-11-02 12:12:15 +03:00
Andrey Semashev a4cafcc75d Added gcc 8 and clang 7 CI jobs. 2018-11-01 20:36:52 +03:00
Andrey Semashev 796fb965be Merge branch 'develop' 2018-11-01 17:17:11 +03:00
Andrey Semashev 08da98a551 Added a readme file.
For Boost.Utility logo thanks to Adam Wulkiewicz. The logo was taken from:

https://github.com/awulkiew/boost-logos
2018-11-01 17:09:34 +03:00
Andrey Semashev 2ed5ee9588 Moved numeric_traits_test.cpp to Boost.Detail. 2017-09-20 01:42:15 +03:00
Andrey Semashev 88c36c1941 Remove generator iterator test and docs as these were moved to Boost.Iterator. 2017-08-28 20:41:11 +03:00
Andrey Semashev 0b2409a942 Updated links to next/prior docs. 2017-08-26 20:07:12 +03:00
Andrey Semashev 62b39548be Moved next/prior to Boost.Iterator. 2017-08-26 17:25:14 +03:00
Andrey Semashev 2722fdcda3 Use std::iterator_traits to detect iterators, when possible.
This allows next/prior to detect user's iterators that do not
define iterator_category nested type but specialize
std::iterator_traits instead.
2017-07-23 20:29:25 +03:00
Andrey Semashev 792d0538d2 Merge branch 'develop' 2017-07-17 20:47:57 +03:00
Andrey Semashev d9d076874e Merge branch 'develop' 2017-07-13 20:59:28 +03:00
Andrey Semashev e25d85446e Use Boost.Iterator to advance iterators.
By using Boost.Iterator we rely on the separate traversal category instead of
the standard iterator category to advance iterators efficiently. For instance,
this allows to advance transform iterators over a random access sequence
in constant time, despite that they are formally input iterators.

Also, std::reverse_iterator formally requires at least bidirectional iterator
as the underlying iterator type. Transform iterators from the example above
don't qualify, so potentially std::reverse_iterator could fail to compile.
2017-07-12 21:15:20 +03:00
Andrey Semashev 5bc9e47688 Changed iterator_category nested type detection to work with MSVC and different versions of gcc. 2017-07-12 20:14:48 +03:00
Andrey Semashev 6cf9c22cf1 Reworked iterator handling in next/prior helpers.
The new implementation tries to detect if the incremented/decremented type
is an iterator first and if not falls back to operator probing. This way
iterators that are not SFINAE-friendly (i.e. unconditionally define
arithmetic operators regardless of the iterator category) are still treated
as iterators through std::advance and do not fail the compilation.

The iterator detection is based on probing for the nested iterator_category
type that is expected to be present in class-type iterators. This heuristic
is not flawless since iterators are not required to defined this type.
User-defined iterators may not have it and instead specialize
std::iterator_traits. This use case is not covered by the current implementation
and will likely fail to compile. With C++17 SFINAE-friendly std::iterator_traits
this can be fixed, but currently Boost.Config lacks the macro to detect
availability of this feature. Support for it can be added by a later commit.

Also simplified boost::prior for iterators, removing the possibility of
integer overflow caused by negation of the distance value.
2017-07-09 03:10:01 +03:00
Andrey Semashev a3ab942bc2 Merge branch 'develop' 2016-11-08 16:56:27 +03:00
Andrey Semashev 0f1f793caf Removed std::binary_function from a comment. 2016-11-06 21:18:27 +03:00
Andrey Semashev febca584d9 Removed -u command line option for the compressed_pair_test as this option is not recognized by Boost.Test (and presumably never was). This fixes the test execution failure. 2016-09-03 00:25:51 +03:00
Andrey Semashev 21dc552cf9 Added a workaround for gcc 4.6 in C++11 mode as it can't seem to handle defaulted functions with noexcept specifier. The problem was discovered with autotests. 2016-09-02 19:14:00 +03:00
Andrey Semashev fda210f597 Merge branch 'develop' 2016-09-02 18:34:58 +03:00
Andrey Semashev 3d853b0e83 Reworked to_string test to verify the overload with a custom allocator even when explicit conversion operators are not supported. Made the custom allocator more standard-compliant. 2016-09-01 22:42:29 +03:00
Andrey Semashev 4814d1ebfe Added another overload of to_string when default function template arguments are not supported.
The additional overload more closely emulates the official interface and allows to construct strings with custom allocators.
2016-09-01 22:08:28 +03:00
Andrey Semashev 3982b6d633 Ensure the file ends with a newline. Fixes compiler warnings. 2016-04-14 19:20:15 +03:00
Andrey Semashev a9236d00a9 Ensure the file ends with a newline. Fixes compiler warnings. 2016-03-26 14:00:12 +03:00
Andrey Semashev cf5ad341ed Added a missing include. 2015-09-11 19:31:18 +03:00
Andrey Semashev 7306c8c359 Merge branch 'develop' 2014-09-06 22:19:24 +04:00
Andrey Semashev 492fd7f091 Moved enable_if to Boost.Core. 2014-08-18 18:57:40 +04:00
Andrey Semashev 651a869d4f Reworked next() and prior() taking the distance arguments.
The new version should provide the expected behavior in the case (prior(v.end(), v.size()) == v.begin()). It should also work with integers now, as was originally intended by David Abrahams. Added tests to verify these new use cases.
2014-06-24 01:05:32 +04:00
Andrey Semashev 7a8f16efdc Removed trailing spaces and tab. 2014-06-12 21:34:19 +04:00
Andrey Semashev 2fa70612bb Removed docs and tests of the components moved to Boost.Core. Added links and redirections to the docs in Boost.Core. 2014-06-12 21:31:37 +04:00
Andrey Semashev 61d07273fc Remove executable bit from the file. 2014-06-12 01:44:35 +04:00
Andrey Semashev c0fdaba925 Removed auto-generated files. 2014-06-12 01:06:53 +04:00
Andrey Semashev 10b8041472 boost::swap, boost::empty_deleter and explicit operator bool macros moved from Boost.Utility to Boost.Core. 2014-06-01 22:44:30 +04:00
Andrey Semashev 46b3739b79 Merge commit '5ce9683858f5ced8b0df665aad74271dc7c9648d' 2014-05-13 00:03:10 +04:00
Andrey Semashev c5fc075d07 Merge commit '991539725e5943b7f280f7ecd7a00aa7f3dc0582' 2014-05-13 00:01:31 +04:00
Andrey Semashev 5ce9683858 Merge branch 'develop' of github.com:boostorg/utility into develop 2014-05-10 18:28:20 +04:00
Andrey Semashev 991539725e Replaced left shift of signed integer values with multiplication to keep the expressions constant according to C++11. 2014-05-10 18:27:59 +04:00
Andrey Semashev d1bfa8e7b0 Added a new macro BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT, which implements a noexcept operator. Also added explicit noexcept specification for the constexpr macro. 2014-04-26 15:11:35 +04:00
Andrey Semashev 0f5ae0e73c Corrected comment.
[SVN r85624]
2013-09-09 18:43:27 +00:00
Andrey Semashev e33f8b0055 Merged new added components from trunk. Merged other sublibraries which tests are passing for a long time as well.
[SVN r85613]
2013-09-08 19:28:44 +00:00
Andrey Semashev 497198c624 Made indents similar.
[SVN r85611]
2013-09-08 18:45:41 +00:00
Andrey Semashev 9df000eece Extracted empty_deleter to Boost.Utility.
[SVN r85577]
2013-09-05 18:25:41 +00:00
Andrey Semashev 8e4054467e Attempt to work around explicit_operator_bool_compile_fail_conv_pvoid test failure for VACPP.
[SVN r85570]
2013-09-05 08:28:24 +00:00
Andrey Semashev 7ae5e14681 Extracted BOOST_EXPLICIT_OPERATOR_BOOL macro from Boost.Log.
[SVN r85543]
2013-09-01 16:31:16 +00:00
Andrey Semashev b813232bba Merged recent changes from trunk.
[SVN r85088]
2013-07-20 17:17:10 +00:00
Andrey Semashev 9baf33dd16 Optimized BOOST_ASSERT_MSG so that it is more lightweight and doesn't prevent enclosing functions from inlining. Also added branching hints for the checked conditions.
[SVN r84682]
2013-06-07 20:21:24 +00:00
Andrey Semashev e02523e286 Merged changes from trunk. Fixes operator<< handling of width specification.
[SVN r84674]
2013-06-07 17:33:25 +00:00
Andrey Semashev 6bb1ce9b7b Avoid using ios_base and streamsize, which are not defined in iosfwd.
[SVN r84636]
2013-06-04 18:41:39 +00:00
Andrey Semashev 9092b9277b Added a test for long padding.
[SVN r84613]
2013-06-02 20:00:04 +00:00
Andrey Semashev d09b37d3ef More modifications according to the review.
[SVN r84611]
2013-06-02 19:16:50 +00:00
Andrey Semashev f3bb2a493c Modifications according to the review.
[SVN r84609]
2013-06-02 18:15:53 +00:00
Andrey Semashev 71b501a0b0 Removed constexpr from substr() as it doesn't work with BOOST_THROW_EXCEPTION. Added a test for streaming.
[SVN r84518]
2013-05-26 19:23:52 +00:00
Andrey Semashev 547c562464 Minor change (no need to create a sentry, it will be created by the stream methods).
[SVN r84513]
2013-05-26 15:52:16 +00:00