[
https://issues.apache.org/jira/browse/MESOS-706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13839227#comment-13839227
]
Timothy St. Clair commented on MESOS-706:
-----------------------------------------
In boost I believe it's all preprocessor based. But they override your
environment iirc, meaning you always use boost::data_structure which isn't bad
in most cases. It becomes an issue when some implementations of data
structures are far superior to others. e.g. compiler writers often optimize
once it's in the standard.
> enable tr1/c++11/c++14 compiler checks where possible.
> ------------------------------------------------------
>
> Key: MESOS-706
> URL: https://issues.apache.org/jira/browse/MESOS-706
> Project: Mesos
> Issue Type: Bug
> Affects Versions: 0.15.0
> Reporter: Timothy St. Clair
> Priority: Minor
>
> This is more of a nit, but it would be nice to enable tr1/c++11/c++14 checks
> into autoconf , and isolate the dependencies on boost or prefer the standard
> if/where possible.
> ----------------------------------
> e.g. _shared_ptr.h
> #ifndef ___SHARED_PTR_H__
> #define ___SHARED_PTR_H__
> // drop'd file by configure.
> #include "config.h"
> #ifdef PREFER_CPP11
> #include <memory>
> #define _weak_ptr std::weak_ptr
> #define _shared_ptr std::shared_ptr
> #elif defined(PREFER_TR1)
> #include <tr1/memory>
> #define _weak_ptr std::tr1::weak_ptr
> #define _shared_ptr std::tr1::shared_ptr
> #else
> #include <boost/shared_ptr.hpp>
> #include <boost/weak_ptr.hpp>
> #define _weak_ptr boost::weak_ptr
> #define _shared_ptr boost::shared_ptr
> #endif
> #endif
> ---------------------------------
> in .cpp files:
> #include "_shared_ptr.h"
> ...
> _shared_ptr<foo> bar;
> This isolates the namespace leakage into the primary code base, and allows an
> easy shift over time.
>
--
This message was sent by Atlassian JIRA
(v6.1#6144)