You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Dominic Hamon (JIRA)" <ji...@apache.org> on 2014/03/25 18:36:17 UTC

[jira] [Comment Edited] (MESOS-750) Require compilers that support c++11

    [ https://issues.apache.org/jira/browse/MESOS-750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13945593#comment-13945593 ] 

Dominic Hamon edited comment on MESOS-750 at 3/25/14 5:35 PM:
--------------------------------------------------------------

Current master has the following semantics for CXX11:

 * Default --with_cxx11 to 'yes'.
 * If clang is detected, force --with_cxx11 to yes and warn.
 * If g++-4.7 is detected, force --with_cxx11 to no and warn.
 * Use m4 template to check C++11 feature support.
 * If g++ version < 4.7, link with the C++11 runtime and support C++11 language features.
 * if g++ version > 4.7 (or clang), compile codepaths behind {{#if __cplusplus >= 201103L}} guards.

The gcc 4.7 check is required as libprocess' future code uses CXX11 features that are not supported by gcc 4.7 in the CXX11 code path. The non-CXX11 code path uses std::tr1 so can't be used for gcc 4.7 in CXX11 mode.

To get to the point where we require CXX11, the following steps should be taken:

 * Change the configure scripts to remove with_cxx11.
 * Ensure CXX11 language features we want to use are covered by the m4 template.
 * Decide how to handle gcc 4.7:
 ** Disallow it completely.
 ** Change libprocess to not use std::tr1 in the 'non-CXX11 path' and force gcc 4.7 to use that path
 * Publish style guide changes covering use of CXX11:
 ** Which features are allowed.
 ** Best practices for things like capturing in lambdas.


was (Author: dhamon):
Current master has the following semantics for CXX11:

 * Default --with_cxx11 to 'yes'.
 * If clang is detected, force --with_cxx11 to yes and warn.
 * If g++-4.7 is detected, force --with_cxx11 to no and warn.
 * Use m4 template to check C++11 feature support.

The gcc 4.7 check is required as libprocess' future code uses CXX11 features that are not supported by gcc 4.7 in the CXX11 code path. The non-CXX11 code path uses std::tr1 so can't be used for gcc 4.7 in CXX11 mode.

To get to the point where we require CXX11, the following steps should be taken:

 * Change the configure scripts to remove with_cxx11.
 * Ensure CXX11 language features we want to use are covered by the m4 template.
 * Decide how to handle gcc 4.7:
 ** Disallow it completely.
 ** Change libprocess to not use std::tr1 in the 'non-CXX11 path' and force gcc 4.7 to use that path
 * Publish style guide changes covering use of CXX11:
 ** Which features are allowed.
 ** Best practices for things like capturing in lambdas.

> Require compilers that support c++11
> ------------------------------------
>
>                 Key: MESOS-750
>                 URL: https://issues.apache.org/jira/browse/MESOS-750
>             Project: Mesos
>          Issue Type: Improvement
>            Reporter: Benjamin Mahler
>              Labels: technical_debt
>             Fix For: 0.19.0
>
>
> Requiring C++11 support will provide substantial benefits to Mesos.
> Most notably, the lack of lambda support has resulted in a proliferation of continuation style functions scattered throughout the code. Having lambdas will allow us to reduce this clutter and simplify the code.
> This will require carefully documenting how to get Mesos compiling on various systems to make this transition easy.



--
This message was sent by Atlassian JIRA
(v6.2#6252)