Opened 10 years ago
Closed 10 years ago
#7421 closed Bugs (fixed)
previous way of coupling lexical_cast with std::transform is not working
Reported by: | Owned by: | Antony Polukhin | |
---|---|---|---|
Milestone: | Boost 1.54.0 | Component: | lexical_cast |
Version: | Boost 1.53.0 | Severity: | Regression |
Keywords: | Cc: |
Description
After change
SVN changelist 80291 (git commit 5ce9c1e41909537371a526bd2e951ff1466eeb9a)
coupling lexical_cast with std::transform in the way
std::transform(vector.begin(), vector.end(), str_list.begin(), boost::lexical_cast<string, double>);
is not working because lexical_cast is overloaded. Compilation error is
base_helper.cpp:25:5: error: no matching function for call to 'transform'
std::transform(vector.begin(), vector.end(), str_list.begin(), boost::lexical_cast<string, double>);
~
/usr/lib/gcc/i686-redhat-linux/4.7.0/include/c++/4.7.0/bits/stl_algo.h:4940:5: note: candidate template ignored: couldn't infer template argument '_UnaryOperation'
transform(_InputIterator first, _InputIterator last,
/usr/lib/gcc/i686-redhat-linux/4.7.0/include/c++/4.7.0/bits/stl_algo.h:4977:5: note: candidate function template not viable: requires 5 arguments, but 4 were provided
transform(_InputIterator1 first1, _InputIterator1 last1,
Change History (7)
comment:1 by , 10 years ago
comment:4 by , 10 years ago
Milestone: | To Be Determined → Boost 1.52.0 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:5 by , 10 years ago
Milestone: | Boost 1.52.0 → Boost 1.54.0 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
Version: | Boost 1.52.0 → Boost 1.53.0 |
In [81278] this fix was somehow removed.
comment:6 by , 10 years ago
comment:7 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
(In [80715]) Do not overload lexical_cast<To, From>(const From&), instead add lexical_cast<To>(character_type,size_type) templates (refs #7421). Added tests for getting &boost::lexical_cast<To,from> functions pointers