lyx_mirror/src/support/functional.h
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

37 lines
570 B
C++

// -*- C++ -*-
/**
* \file functional.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_FUNCTIONAL_H
#define LYX_FUNCTIONAL_H
#ifdef LYX_USE_CXX11
#include <functional>
#define LYX_FUNCTIONAL_NS std
#else
#include <boost/function.hpp>
#include <boost/functional.hpp>
#define LYX_FUNCTIONAL_NS boost
#endif
namespace lyx
{
using LYX_FUNCTIONAL_NS::function;
}
#undef LYX_FUNCTIONAL_NS
#endif