Opened 11 years ago

Closed 4 years ago

#6430 closed Feature Requests (wontfix)

Optimized code for `boost::iterator_range<std::string::iterator>`

Reported by: Michel Morin <mimomorin@…> Owned by: Antony Polukhin
Milestone: To Be Determined Component: lexical_cast
Version: Boost Development Trunk Severity: Problem
Keywords: Cc:

Description

Currently, lexical_cast has optimized code for std::string but not for boost::iterator_range<std::string::iterator>. It would be nice to have optimized code for boost::iterator_range<std::string::iterator> too.

Here is a related thread: [lexical_cast] Fast conversion from boost::iterator_range<std::string::iterator>?

Change History (5)

comment:1 by John Maddock, 11 years ago

Owner: changed from nasonov to Antony Polukhin

comment:2 by Antony Polukhin, 11 years ago

(In [78059]) Merge lexical_cast library from trunk:

  • multiple optimizations and bugfixes for boost::iterator_range (refs #6786, refs #6430, refs #6663)
  • documentation update
  • new Unicode characters support updated
  • much more tests, removed incorrect tests

comment:3 by Antony Polukhin, 10 years ago

(In [80291]) Added lexical_cast(const CharType* chars, std::size_t count) function overload (refs #6430 and refs #6663) Fixed GCC warning in numeric_cast_test.cpp

comment:4 by Antony Polukhin, 10 years ago

(In [80409]) Merge from trunk: 1) #warning replaced with #error (refs #7228) 2) Pavel Korzh added to thanks list (refs #7157) 3) BOOST_NOEXCEPT modifiers added where possible 4) better support for c++11 Unicode characters 5) fixed compilation with MSVC+STLPort 6) more agressive usage of Traits template parameter 7) Added lexical_cast(const CharType* chars, std::size_t count) function overload (refs #6430 and refs #6663) 8) Fixed GCC warning in numeric_cast_test.cpp 9) Fix compilation of lexical cast with MSVC 2003 (refs #7255)

comment:5 by Antony Polukhin, 4 years ago

Resolution: wontfix
Status: newclosed

Sorry, no good way to solve this issue - adding specializations for different classes is not a scalable idea, so we have to stop at some point...

On modern compilers the most time consuming operation within LexicalCast is the std::locale construction. It should be optimized first, rather than adding the specializations for different classes.

Note: See TracTickets for help on using tickets.