mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joris Van Remoortere <jo...@mesosphere.io>
Subject Re: constexpr and non-POD static variables
Date Thu, 28 May 2015 23:45:55 GMT
We had an internal discussion about this. White-listing constexpr is fine
by us.
I think technically the google style guide allows c++11 features that are
not explicitly disallowed, but it doesn't hurt to add it to the style guide
:-)

Joris

On Thu, May 28, 2015 at 4:27 PM, Paul Brett <pbrett@twitter.com.invalid>
wrote:

> Despite best efforts to avoid non-POD static variables, we appear to still
> have over 80 instances (see MESOS-2780).  We can, of course, use const
> inline functions to address these but this will change each constant
> reference at the calling site to a constant function reference.
>
> A more natural approach provided by C++11 is to use constexpr.  I have
> submitted for review (https://reviews.apache.org/r/34782/) an example to
> address the TC handle.
>
> What are the views on whitelisting constexpr?
>
> -- Paul Brett
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message