You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Timothy St. Clair (JIRA)" <ji...@apache.org> on 2013/09/26 18:30:02 UTC
[jira] [Created] (MESOS-706) enable tr1/c++11/c++14 compiler checks
where possible.
Timothy St. Clair created MESOS-706:
---------------------------------------
Summary: 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
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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira