Antony Polukhin
5a3587c988
simplify code
2023-08-26 21:45:41 +03:00
Antony Polukhin
668030fcd6
Remove hard error about C++11 requirement and update CI
2023-08-25 14:59:53 +03:00
Antony Polukhin
2598281d10
drop c++03 support
2023-08-10 18:52:03 +03:00
Antony Polukhin
9a03296816
add C++03 deprecation warnings
2023-05-14 19:49:21 +03:00
Antony Polukhin
7ba0984b34
Update copyright years
2023-01-19 10:01:52 +03:00
Antony Polukhin
4ae8b4d495
update copyright years
2022-01-30 12:52:42 +03:00
Antony Polukhin
9e3216d22f
make boost::implicit_cast constexpr ( fixes #25 )
2021-04-21 20:51:14 +03:00
Antony Polukhin
4fec53f3db
update copyright years
2021-01-03 13:57:41 +03:00
Antony Polukhin
58c33270a2
Use boost::addressof and update docs
2020-01-25 10:59:32 +03:00
Julien DELACROIX
e130cd860c
boost::polymorphic_downcast only supports raw pointer cast, which is a gap compared to static_cast.
...
To make it clear:
Base* base = new Base();
static_cast<Derived*>(base) ===> OK
static_cast<Derived&>(*base) ===> OK
boost::polymorphic_downcast<Derived*>(base) ===> OK
boost::polymorphic_downcast<Derived&>(*base) ===> IMPOSSIBLE
boost::polymorphic_downcast being a kind of "debug-safe version" of
static_cast, it should provide the same capabilities.
This patch extend boost::polymorphic_downcast to support references just
like static_cast does.
This is achieved by introducing a partial specialization for references.
Unit tests have been updated accordingly.
2019-12-09 08:51:10 +01:00
Antony Polukhin
e38c0753ef
update copyright years
2019-01-30 23:13:06 +03:00
Antony Polukhin
a6100358f4
Add missing include
2015-03-24 22:24:08 +03:00
Antony Polukhin
dc25edb4dd
Fixed type deduction on old compilers
2015-02-03 13:00:37 +03:00
Antony Polukhin
00b6a53f7e
Add polymorphic_pointer_cast
2014-11-10 15:02:20 +04:00
Antony Polukhin
6199649ae2
Move polymorphic_pointer_downcast to a separate header, use pragma once and boost::throw_exception
2014-11-10 14:24:39 +04:00
Boris Rasin
6a224fa5e9
=add polymorphic_pointer_downcast function template
2014-11-09 00:02:44 +02:00
Peter Dimov
800c10a4eb
Remove use of mpl::identity from implicit_cast.hpp.
2014-06-11 14:45:37 +03:00
Peter Dimov
24d6ac1e87
Remove unnecessary includes from polymorphic_cast.hpp.
2014-06-11 14:38:48 +03:00
Antony Polukhin
40c42eb740
cast.hpp was moved to the numeric_cast library
2014-06-11 11:44:02 +04:00
Antony Polukhin
a0922ab598
Remove lexical_cast, add polymorphic_cast.hpp, minor fixes
2014-06-09 12:36:42 +04:00
Daniel James
ee91295ac4
Fix link to test.
2014-06-08 15:01:02 +01:00
Antony Polukhin
d1a51b897d
Fix conversions to bool with leading zeros (refs #9659 )
2014-03-05 14:48:21 +04:00
Antony Polukhin
90b4286753
Because of the errors in MSVC with fowarding and static_casting arrays it was decided to drop minor optimization and do not perfect forward source types in try_lexical_convert
2014-02-06 11:22:40 +04:00
Antony Polukhin
5a757dcece
Docs updated and minor fixes for MSVC2013
2014-02-04 13:13:33 +04:00
Antony Polukhin
36bc5aea44
Attempt to fix access violation during forwarding of arrays on MSVC
2014-02-03 16:22:27 +04:00
Antony Polukhin
1707131ac3
Added some tests for try_lexical_convert and fixed some issues.
2014-01-01 21:47:09 +04:00
Antony Polukhin
91b77e7373
Do forward input streamable parameter during lexical input streaming.
2013-12-16 19:05:43 +04:00
Antony Polukhin
e3dec04dd5
Applied improvements from [boost] [conversion] try_lexical_cast discussion: function is called try_lexical_convert and now uses perfect forwardings when possible.
2013-12-16 18:47:41 +04:00
Antony Polukhin
b40bc02f94
try_lexical_cast is now implemented in optimal way
2013-12-13 13:52:18 +04:00
Antony Polukhin
07082420b3
Sketch implementaion of try_lexical_cast
2013-12-12 18:41:51 +04:00
Antony Polukhin
e913b7cb1c
Fix some of the implicit conversion warnings (refs #8991 )
...
[SVN r86750]
2013-11-18 11:06:06 +00:00
Antony Polukhin
edde5f442e
Another attempt to suppress MSVC warnings (refs #9271 )
...
[SVN r86388]
2013-10-22 09:07:02 +00:00
Antony Polukhin
d78d334dbb
Add missing #pragma wraning(push) (refs #9271 )
...
[SVN r86378]
2013-10-21 09:21:35 +00:00
Antony Polukhin
39d1abe754
Suppress some of the Level 4 MSVC warnings in the basic_pointerbuf.hpp (refs #9271 )
...
[SVN r86377]
2013-10-21 06:46:01 +00:00
Antony Polukhin
524232ebab
Supressing MSVC2013 warnings and ensuring that lexical cast io classes are not copied (refs #9271 )
...
[SVN r86374]
2013-10-20 17:57:15 +00:00
Stephen Kelly
472ebeff30
Simplify multi-component ifdefs containing BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
...
[SVN r86248]
2013-10-11 23:20:59 +00:00
Stephen Kelly
13f14db751
lexical_cast: Remove obsolete GCC version check.
...
[SVN r86113]
2013-10-01 08:47:00 +00:00
Stephen Kelly
8a49514506
cast: Remove obsolete MSVC version check.
...
[SVN r86026]
2013-09-30 00:18:40 +00:00
Stephen Kelly
c8bd860de6
Remove obsolete MSVC check from pragma guard
...
git grep -h -B1 "^#\s*pragma once" | grep -v pragma | sort | uniq
is now clean.
[SVN r85952]
2013-09-26 13:02:51 +00:00
Antony Polukhin
701963d3c4
lexical_cast.hpp improvements: fix bug with floats conversions and improve docs (refs #9046 )
...
[SVN r85852]
2013-09-23 11:59:06 +00:00
Antony Polukhin
ce7a54af7f
Minor update of lexical cast before fixing mingw issues (refs #9046 )
...
[SVN r85830]
2013-09-22 16:06:45 +00:00
Antony Polukhin
c359ed53b2
Fix unused parameter warning ( fix #9106 )
...
[SVN r85683]
2013-09-15 19:28:36 +00:00
Antony Polukhin
47041de63a
lexical_cast.hpp improvements: interpreter was split to input and output streams to reduce size of binaries and improve compilation times, fixed typo from previous commit (refs #9046 )
...
[SVN r85528]
2013-08-30 14:37:32 +00:00
Antony Polukhin
c58a55a512
lexical_cast.hpp improvements: more comments, BOOST_NOEXCEPT and const; parser_buf moved to boost/detail/basic_pointerbuf.hpp, better formatting and simplified type traits (refs #9046 )
...
[SVN r85523]
2013-08-30 08:59:59 +00:00
Antony Polukhin
dd165b4b0f
lexical_cast.hpp improvements: no more const_casts, much shorter and better template specializations, some code formatting fixes (refs #9046 )
...
[SVN r85513]
2013-08-29 15:35:02 +00:00
Antony Polukhin
b5552e351c
lexical_cast.hpp improvements: better overflow detections for float conversions, more const modifiers (refs #9046 )
...
[SVN r85512]
2013-08-29 11:41:28 +00:00
Antony Polukhin
297b115e6c
lcast_put_unsigned in lexical_cast.hpp header is refactored, duplicate code removed (refs #9046 )
...
[SVN r85499]
2013-08-28 12:55:09 +00:00
Antony Polukhin
a2299ec1f9
Fix bug introduced by previous commits during conversion of wide character to wide character. Remove duplicate code and add more comments for lcast_ret_unsigned method. Optimize and simplify overflow detection (refs #9046 )
...
[SVN r85486]
2013-08-27 14:23:19 +00:00
Antony Polukhin
bf551ad8c9
Delay character trait extraction (refs #9046 )
...
[SVN r85483]
2013-08-27 07:51:27 +00:00
Antony Polukhin
fac805ddf6
Improved some of the metaprogramming methods (refs #9046 )
...
[SVN r85482]
2013-08-27 07:07:15 +00:00