mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-16 16:18:22 +00:00
90b1f084bf
If we compile in C++11 mode, do not use the boost replacements for bind, functional and shared_ptr. regex is excluded, since it misses match_partial, and gcc does not provide a usable one in versions less than 4.9.0. I also removed the #define for match_partial, since this is dangerous. Now you get a compile error instead of subtle runtime differences.
54 lines
750 B
C++
54 lines
750 B
C++
// -*- C++ -*-
|
|
/**
|
|
* \file bind.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Peter Kümmel
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef LYX_BIND_H
|
|
#define LYX_BIND_H
|
|
|
|
#include "support/functional.h"
|
|
|
|
#ifdef LYX_USE_TR1
|
|
|
|
#define LYX_BIND_NS std::tr1
|
|
|
|
namespace lyx
|
|
{
|
|
using std::tr1::placeholders::_1;
|
|
using std::tr1::placeholders::_2;
|
|
}
|
|
|
|
#elif __cplusplus >= 201103L
|
|
|
|
#define LYX_BIND_NS std
|
|
|
|
namespace lyx
|
|
{
|
|
using std::placeholders::_1;
|
|
using std::placeholders::_2;
|
|
}
|
|
|
|
#else
|
|
|
|
#include <boost/bind.hpp>
|
|
#define LYX_BIND_NS boost
|
|
|
|
#endif
|
|
|
|
namespace lyx
|
|
{
|
|
using LYX_BIND_NS::bind;
|
|
using LYX_BIND_NS::ref;
|
|
}
|
|
|
|
#undef LYX_BIND_NS
|
|
|
|
|
|
#endif
|