[mythtv] Should 0.28 use C++11? (hint: yes!)

Gary Buhrmaster gary.buhrmaster at gmail.com
Tue Nov 3 20:09:20 UTC 2015


On Tue, Nov 3, 2015 at 7:07 PM, Karl Dietz
<dekarl at spaetfruehstuecken.org> wrote:
....
> Any thoughts or vetos?

I am not a decider, nor an influencer  (although I am on record to
be in favor of C++11, C11, etc.), but I do have a couple of
additional thoughts.

Those that choose to run their MythTV boxes on the various
long(er) term support platforms may find trying to build the
compilers and libraries to support building of a recent
MythTV sufficiently difficult so that they choose to not
upgrade to 0.28 when it is "ready".  Now, by the time 0.28
is "ready" everyone may have upgraded their system, but
then again, maybe not.  There is a long history of some
projects only supporting the latest and greatest.  MythTV has,
historically, been far more conservative and wanted to allow
the greatest number the joy of MythTV.

I think in practice you need a gcc 4.8 or clang 3.1 or
VS2013 (have no idea about icc) and various supporting
libraries.

To the previous point, you may need to add in some
buildbots to insure that any backported code to 0.27 still
compiles on (say) LTS 12.x, or FreeBSD 9.x, or ?.(I have
no idea what all the base compiler versions are, but there
are probably some outliers in the mix).  By observation
the project has a fair mix of recent version builders, but
fewer of the legacy variety.  It should likely be accepted
that if devs start using C++11 that some backports
will never happen (which potentially has scheduling and
support implications).

The future is clear (Qt itself is going to break the
backwards compatibility with 5.7 and require C++11).
So when that Qt version is made available (sometime
in 2016?) it will be a forcing function on the (b)leading
edge distros.  Why not fix any problems with MythTV
and C++11 (and C11) now, to prepare.

I have (over the years) forced C++11 and C11 requirements
for builds to see what breaks.  All the absolute breakage
was (TTBOMK) fixed, although I believe there were some
new warnings (or perhaps these were old warnings that
I stopped seeing ("selecting warnings" to go along with
"selective hearing"?).  So I actually do not expect there
to be any real problems on recent platforms, but I
do not ever recall compiling the plugins, so there may
be some additional "issues" there that will need to be
resolved.

Does the current cppcheck, and coverity static
analysis tools properly handle C++11 checks?
Do we need to upgrade the "infrastructure" tools?

I will note that I was vaguely involved with a discussion
about C++11 with danielk some time ago.  I am not
sure if it was in irc, or various email, but it might be
useful to try to find that to see if there are any relevant
points there (or perhaps one of the devs can directly
send an email to see if he has any recollection regarding
the advantages or concerns he raised them).  I believe
he was in favor for C++11 back then.

I will note that some of the C++11 features can make
a developer more efficient.  Anything that (even in a
small way) makes the devs more efficient has to be a
good thing.


Thanks for asking (and now you know better than to
ask my thoughts, for you shall get them).

Gary


More information about the mythtv-dev mailing list