mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
also use TR1 code for bind and shared_ptr when compiling with GCC >= 4.4
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34600 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f403c0a601
commit
807fc1443a
@ -37,7 +37,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
using namespace lyx::support;
|
using namespace lyx::support;
|
||||||
|
@ -12,10 +12,17 @@
|
|||||||
#ifndef LYX_BIND_H
|
#ifndef LYX_BIND_H
|
||||||
#define LYX_BIND_H
|
#define LYX_BIND_H
|
||||||
|
|
||||||
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
|
#include "checktr1.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef LYX_USE_TR1
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#include <tr1/functional>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace lyx
|
namespace lyx
|
||||||
{
|
{
|
||||||
using std::tr1::bind;
|
using std::tr1::bind;
|
||||||
|
24
src/support/checktr1.h
Normal file
24
src/support/checktr1.h
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
// -*- C++ -*-
|
||||||
|
/**
|
||||||
|
* \file checktr1.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_CHECKTR1_H
|
||||||
|
#define LYX_CHECKTR1_H
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
|
||||||
|
#define LYX_USE_TR1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if __GNUC__ == 4 && __GNUC_MINOR__ >= 4
|
||||||
|
#define LYX_USE_TR1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
@ -12,10 +12,17 @@
|
|||||||
#ifndef LYX_SHARED_PTR_H
|
#ifndef LYX_SHARED_PTR_H
|
||||||
#define LYX_SHARED_PTR_H
|
#define LYX_SHARED_PTR_H
|
||||||
|
|
||||||
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
|
#include "checktr1.h"
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef LYX_USE_TR1
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#include <tr1/memory>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace lyx
|
namespace lyx
|
||||||
{
|
{
|
||||||
using std::tr1::shared_ptr;
|
using std::tr1::shared_ptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user