Download it now!
Bug 63020 - Replace ::comphelper::stl_begin() with boost::begin()
Summary: Replace ::comphelper::stl_begin() with boost::begin()
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Marcos Souza
URL:
Whiteboard: target:4.2.0
Keywords: difficultyBeginner, easyHack, skillCpp
Depends on:
Blocks:
 
Reported: 2013-04-02 10:00 UTC by Björn Michaelsen
Modified: 2016-02-18 16:37 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Michaelsen 2013-04-02 10:00:28 UTC
Since C++11 non-member std::begin() and std::end() are available.

It would be nice:
- to have these being able to handle UNO Sequences too
- and then remove ::comphelper::stl_begin / ::comphelper::stl_end and use the std::begin() std::end() instead
Comment 2 Michael Meeks 2013-04-02 14:54:13 UTC
It's worth checking that we can in fact use C++11 in LibreOffice. I currently see zero hits for std::begin() in the code, so this seems a tad risky to me; Bjoern ?
Comment 3 Stephan Bergmann 2013-04-02 15:00:36 UTC
(In reply to comment #0)
> Since C++11 non-member std::begin() and std::end() are available.

But we cannot rely on them being available in our code base, which still needs to compile with non-C++11 compilers.  And breaking contracts by hacking nonmember begin/end functions into those compilers' std namespaces in order to get rid of comphelper::stl_begin/end is arguably not worth the trouble.
Comment 4 Björn Michaelsen 2013-04-02 15:11:26 UTC
wontfix for now then.
Comment 5 David Tardon 2013-04-03 05:06:01 UTC
We could use boost::begin() and boost::end().
Comment 6 Björn Michaelsen 2013-04-03 11:32:25 UTC
indeed, that gives a nice migration-path to C++11 and is still standard compliant.
Comment 7 Björn Michaelsen 2013-10-04 18:46:36 UTC
adding LibreOffice developer list as CC to unresolved EasyHacks for better visibility.

see e.g. http://nabble.documentfoundation.org/minutes-of-ESC-call-td4076214.html for details
Comment 8 Commit Notification 2013-11-07 16:53:57 UTC
Marcos Paulo de Souza committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bcb51cff22f385abe71555f8d7fdbec2697bf188

fdo#63020: Replace ::comphelper::stl_begin()...



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Robinson Tryon (qubit) 2015-12-15 16:47:38 UTC
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillCpp )
[NinjaEdit]
Comment 10 Robinson Tryon (qubit) 2016-02-18 16:37:12 UTC
Remove LibreOffice Dev List from CC on EasyHacks
(curtailing excessive email to list)
[NinjaEdit]