Jean-Marc Lasgouttes 329eae5605 Use explicit macro to declare that we want to use C++11
This replaces tests for __cplusplus >= 201103L, which are wrong with gcc 4.6 and earlier. Indeed these versions of gcc define __cplusplus = 1.

Reference:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=1773
2015-05-20 10:19:19 +02:00

44 lines
603 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_CXX11
#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