Glen Fernandes
dabf53a703
Refactor stream write functionality into a standalone utility
2019-04-19 09:53:29 -04:00
Glen Fernandes
5fe9df91c0
Make string_view operator<< use rdbuf directly
2019-04-12 18:06:35 -04:00
Marshall Clow
db05c11f50
Fix string_ref::find/rfind's handling of empty strings. Thanks to 'reluctantbugreporter' for the bug report
2018-09-14 09:48:13 -07:00
Peter Dimov
bdf55e0b6f
Add boilerplate reference to LICENSE_1_0.txt
2018-07-31 00:22:42 +03:00
Dimitrij Mijoski
e2d115db97
Use hash_fwd.hpp in string_view for more lightweight dependencies.
2018-04-20 23:18:31 +02:00
Dimitrij Mijoski
6ad6bc005c
Implement boost hash for string_view
2018-04-20 13:42:07 +02:00
Dimitrij Mijoski
eacea4664d
implement string_view.find(string) in terms of traits.compare and find.
...
This should be faster that it's previous implementations
in terms of std::search()
2018-04-02 00:52:57 +02:00
Dimitrij Mijoski
1fe5af5264
Faster find functions in string_view by using traits::find()
2018-04-01 20:00:03 +02:00
Peter Dimov
c88936800d
Remove dependency on Random in operators_test.cpp
2017-12-23 06:19:43 +02:00
Peter Dimov
9d46de1578
Replace use of mpl/has_xxx.hpp with handwritten traits
2017-12-21 06:30:03 +02:00
Peter Dimov
7d101d420c
Replace mpl primitives with type_traits
2017-12-20 21:55:07 +02:00
morinmorin
fb2f110eb4
Fix result_of_is_callable to support references to function pointers.
...
On compilers without the support of expression SFINAE, decltype-based
result_of<FP&(...)> failed to compile (FP is a function pointer type).
2017-09-20 23:40:56 +09:00
Peter Dimov
21261a8630
Add visible dependency to result_of_iterate.hpp
2017-05-30 01:20:02 +03:00
Marshall Clow
330b49d602
Mark comparison operators for string_view as constexpr; add tests. Reference: https://svn.boost.org/trac/boost/ticket/12896
2017-05-03 19:58:02 -07:00
Marshall Clow
68b26cddbe
Merge branch 'develop' of github.com:boostorg/utility into develop
2017-04-06 07:59:12 -07:00
Marshall Clow
6c4ab93573
Revert change disallowing construction of string_view/string_ref from rvalue string
2017-03-28 15:17:09 +02:00
Marshall Clow
0876da45db
Fix potential overflow in substr; Trac #11536 . Also change string_view::copy to use the traits::copy
2017-02-13 10:49:17 -08:00
Marshall Clow
00f02167e3
Add tests to ensure that string_view|ref from rvalue fails (whenever it can)
2017-02-13 10:25:04 -08:00
Marshall Clow
9960d9f395
Don't construct string_view|string_ref from rvalue string. That way lies pain
2017-02-13 08:15:44 -08:00
Surogate
38121f2af3
Allow string_view::at() to be constexpr again on VS2015
...
VS2015 doesn't support extended constexpr. Thanks to Lastique for the
ternary trick
2016-12-12 23:45:34 +01:00
Surogate
38b536ff05
Fixing visual studio compilation of string_view::at()
...
VS2013, VS2015 & VS2017RC don't like the ternary throwing an exception :
'return': cannot convert from 'void' to 'const char &'
Now using classic if when compiling on a windows platform.
2016-12-12 22:57:56 +01:00
zerotypos-found
816607e212
Remove tabs and Non-ASCII characters.
2016-11-15 11:59:51 +09:00
Peter Dimov
ff445c0ece
Remove std::binary_function use, it has been removed in C++17
2016-11-06 14:38:13 +02: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
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
gnaggnoyil
e5932ebb08
fix compile error on basic_string_view::to_string when Allocator is user-defined
2016-09-01 21:56:20 +03:00
Marshall Clow
39577f86d1
Fix rfind (and other finders). Fixes bug https://svn.boost.org/trac/boost/ticket/9518
2016-08-14 11:20:28 -07:00
Marshall Clow
8392991c46
Remove extraneous semicolon; no functional change
2016-08-14 11:19:32 -07:00
Marshall Clow
c5b1256650
rename routines in detail namespace so that someone who includes both <string_ref> and <string_view> won't get duplicate decls
2016-08-14 11:11:12 -07:00
Marshall Clow
c56dd13592
Mark the copy ctor/assignment operator as '= default' when the compiler supports it. This makes these types trivially copy/move assignable/constructible. See https://svn.boost.org/trac/boost/ticket/11684
2016-07-27 11:18:18 -07:00
Marshall Clow
181f302ee4
Fix Ticket 12140; mark only single-arg ctor as explicit. Thanks to Thimo for the patch.
2016-06-15 15:50:21 -07:00
Marshall Clow
0b492bee9c
Re-install string_ref - to be removed in the future
2016-04-14 07:50:28 -07:00
Andrey Semashev
a9236d00a9
Ensure the file ends with a newline. Fixes compiler warnings.
2016-03-26 14:00:12 +03:00
Marshall Clow
8ab8e36dcf
Remove the 'basic_string_ref template; use 'basic_string_view' instead. Keep the string_ref, etc typedefs around, though
2016-02-17 11:32:16 -08:00
Marshall Clow
1caa745dd7
Introduce new 'string_view' to match the one in the standard. Step #2 (up next) is to retire string_ref in favor of string_view
2015-12-21 11:39:59 -08:00
Marshall Clow
13610caa36
Update copyright notice; change to_string to avoid UB by calling a different constructor. Fixes #11150
2015-03-28 12:02:41 -07:00
K-ballo
51e482edfe
Added base_from_member specialization for members of lvalue-reference type
2014-06-11 18:55:12 -03:00
Peter Dimov
87bc4c8dce
Remove declval.hpp, moved to type_traits.
2014-06-05 17:41:17 +03: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
Peter Dimov
1ed9aaa2a4
Remove headers that have been moved into core.
2014-06-01 03:22:30 +03:00
Andrey Semashev
f5869d0f82
Merge pull request #6 from Lastique/develop
...
Added a new macro BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT
2014-05-10 08:57:32 +04:00
Eric Niebler
379e2111e2
value_init and swap work on nvidia gpu's
2014-05-01 15:29:43 -07: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
Eric Niebler
de0e18ca0a
work around nvcc bug by only defining has_result when it's needed
2014-04-23 15:54:27 -07:00
Peter Dimov
50eafe2027
Fix addressof for nullptr_t values. Fixes #5487 .
2013-12-11 01:57:20 +02:00
Stephen Kelly
03047e3f00
Simplify multi-component ifdefs containing BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
...
[SVN r86248]
2013-10-11 23:20:59 +00:00
Joel Falcou
a90bc68a7f
Fix #9170 - Add BOOST_FORCEINLINE in address_of for performance issues
...
[SVN r86125]
2013-10-01 15:05:39 +00:00
Stephen Kelly
fc4bc227b5
Utility: Remove obsolete MSVC version check
...
[SVN r85932]
2013-09-26 09:41:00 +00:00
Stephen Kelly
bcd50e9105
Remove use of obsolete BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE{,_SPEC} macro.
...
[SVN r85896]
2013-09-25 10:29:44 +00:00
Andrey Semashev
9df000eece
Extracted empty_deleter to Boost.Utility.
...
[SVN r85577]
2013-09-05 18:25:41 +00:00