Bug 94228 - replace BOOST_PP macros with C++11 variadic templates where possible
Summary: replace BOOST_PP macros with C++11 variadic templates where possible
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium trivial
Assignee: Not Assigned
URL:
Whiteboard: target:5.1.0
Keywords: difficultyInteresting, easyHack, skillCpp, skillScript
Depends on:
Blocks:
 
Reported: 2015-09-15 07:04 UTC by Björn Michaelsen
Modified: 2016-10-25 19:17 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 2015-09-15 07:04:25 UTC
C++11 supports variadic templates:

 https://en.wikipedia.org/wiki/Variadic_template#C.2B.2B

Previously this was worked around with preprocessor macros. If handwritten, those might be hard to find, but some are using the BOOST__PP preprocessor macros and should be easily greppable:

 http://opengrok.libreoffice.org/search?q=BOOST_PP_REPEAT&project=core&defs=&refs=&path=&hist=
 git grep BOOST_PP include/

This task to remove the use of those boost macros and use plain C++11 variadic templates instead. There is hope this will also lead to less confusing compiler error messages if those classes are misused.
Comment 1 Commit Notification 2015-09-16 11:03:49 UTC
Daniel Robertson committed a patch related to this issue.
It has been pushed to "master":

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

tdf#94228 vcl: replace BOOST_PP with templates

It will be available in 5.1.0.

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 2 Commit Notification 2015-09-25 21:13:59 UTC
Daniel Robertson committed a patch related to this issue.
It has been pushed to "master":

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

tdf#94228 comphelper: replace BOOST_PP

It will be available in 5.1.0.

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 3 Commit Notification 2015-10-06 19:30:28 UTC
Daniel Robertson committed a patch related to this issue.
It has been pushed to "master":

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

tdf#94228 comphelper: replace BOOST_PP

It will be available in 5.1.0.

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 4 Daniel L Robertson 2015-10-10 01:42:24 UTC
The last commit should have removed the last use of BOOST_PP in include. I know of at least two other uses of BOOST_PP, but I'm not sure if they should be removed. I'll continue to look for cases in which handwritten macros are used, but I expect my activity on this will slow down significantly.
Comment 5 Robinson Tryon (qubit) 2015-12-14 07:00:55 UTC Comment hidden (obsolete)
Comment 6 Björn Michaelsen 2016-01-26 11:39:41 UTC
(In reply to Daniel L Robertson from comment #4)
> The last commit should have removed the last use of BOOST_PP in include. I
> know of at least two other uses of BOOST_PP, but I'm not sure if they should
> be removed. I'll continue to look for cases in which handwritten macros are
> used, but I expect my activity on this will slow down significantly.

Hi Daniel,

thanks a lot for your work here. Closing this issue for now as per above, if only to not block people from seeing more interesting easyHacks.
Comment 7 Robinson Tryon (qubit) 2016-02-18 16:37:31 UTC Comment hidden (obsolete)