mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
msvcUsing "using namespace std" with msvc10 makes also std::tr1::shared_ptr visible and generates conflicts with boost::shared_ptr.
Solution: don't use boost::shared_ptr for msvc10 (could also be extended to several GCC versions) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34259 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
87c6a4679a
commit
c9b9748cee
@ -103,7 +103,7 @@
|
||||
#include "support/types.h"
|
||||
|
||||
#include "support/bind.h"
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "support/shared_ptr.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <fstream>
|
||||
@ -3067,9 +3067,9 @@ public:
|
||||
AutoSaveBuffer(Buffer const & buffer, FileName const & fname)
|
||||
: buffer_(buffer), fname_(fname) {}
|
||||
///
|
||||
virtual boost::shared_ptr<ForkedProcess> clone() const
|
||||
virtual shared_ptr<ForkedProcess> clone() const
|
||||
{
|
||||
return boost::shared_ptr<ForkedProcess>(new AutoSaveBuffer(*this));
|
||||
return shared_ptr<ForkedProcess>(new AutoSaveBuffer(*this));
|
||||
}
|
||||
///
|
||||
int start()
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
#include "support/strfwd.h"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "support/shared_ptr.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@ -163,7 +163,7 @@ private:
|
||||
/// Modifier masks
|
||||
ModifierPair mod;
|
||||
/// Keymap for prefix keys
|
||||
boost::shared_ptr<KeyMap> prefixes;
|
||||
shared_ptr<KeyMap> prefixes;
|
||||
/// Action for !prefix keys
|
||||
FuncRequest func;
|
||||
};
|
||||
|
@ -13,7 +13,7 @@
|
||||
#define OUTPUTPARAMS_H
|
||||
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "support/shared_ptr.h"
|
||||
#include "Changes.h"
|
||||
|
||||
|
||||
@ -165,7 +165,7 @@ public:
|
||||
This is a hack: Make it possible to add stuff to constant
|
||||
OutputParams instances.
|
||||
*/
|
||||
boost::shared_ptr<ExportData> exportdata;
|
||||
shared_ptr<ExportData> exportdata;
|
||||
|
||||
/** Whether we are inside a comment inset. Insets that are including
|
||||
* external files like InsetGraphics, InsetInclude and InsetExternal
|
||||
|
@ -40,7 +40,7 @@
|
||||
using namespace std;
|
||||
using namespace lyx::support;
|
||||
|
||||
using boost::shared_ptr;
|
||||
|
||||
|
||||
namespace lyx {
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "support/FileName.h"
|
||||
#include "support/socktools.h"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "support/shared_ptr.h"
|
||||
|
||||
#include <string>
|
||||
#include <map>
|
||||
@ -61,7 +61,7 @@ private:
|
||||
MAX_CLIENTS = 10
|
||||
};
|
||||
/// All connections
|
||||
std::map<int, boost::shared_ptr<LyXDataSocket> > clients;
|
||||
std::map<int, shared_ptr<LyXDataSocket> > clients;
|
||||
};
|
||||
|
||||
|
||||
|
@ -191,7 +191,7 @@ private:
|
||||
/// Toolbar store providing access to individual toolbars by name.
|
||||
typedef map<string, GuiToolbar *> ToolbarMap;
|
||||
|
||||
typedef boost::shared_ptr<Dialog> DialogPtr;
|
||||
typedef shared_ptr<Dialog> DialogPtr;
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
@ -69,7 +69,7 @@
|
||||
#include <QMenuBar>
|
||||
#include <QString>
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "support/shared_ptr.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
@ -190,7 +190,7 @@ public:
|
||||
func_.setOrigin(origin);
|
||||
}
|
||||
|
||||
// boost::shared_ptr<MenuDefinition> needs this apprently...
|
||||
// shared_ptr<MenuDefinition> needs this apprently...
|
||||
~MenuItem() {}
|
||||
|
||||
/// The label of a given menuitem
|
||||
|
@ -20,7 +20,7 @@
|
||||
#ifndef GRAPHICSCACHE_H
|
||||
#define GRAPHICSCACHE_H
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "support/shared_ptr.h"
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
@ -59,13 +59,13 @@ public:
|
||||
* Returns an empty container if there is no such item.
|
||||
*
|
||||
* IMPORTANT: whatever uses an image must make a local copy of this
|
||||
* ItemPtr. The boost::shared_ptr<>::use_count() function is
|
||||
* ItemPtr. The shared_ptr<>::use_count() function is
|
||||
* used to ascertain whether or not to remove the item from the cache
|
||||
* when remove(file) is called.
|
||||
*
|
||||
* You have been warned!
|
||||
*/
|
||||
typedef boost::shared_ptr<CacheItem> ItemPtr;
|
||||
typedef shared_ptr<CacheItem> ItemPtr;
|
||||
///
|
||||
ItemPtr const item(support::FileName const & file) const;
|
||||
|
||||
|
@ -107,7 +107,7 @@ public:
|
||||
bool remove_loaded_file_;
|
||||
|
||||
/// The image and its loading status.
|
||||
boost::shared_ptr<Image> image_;
|
||||
shared_ptr<Image> image_;
|
||||
///
|
||||
ImageStatus status_;
|
||||
|
||||
|
@ -159,7 +159,7 @@ void LoaderQueue::touch(Cache::ItemPtr const & item)
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
typedef boost::shared_ptr<Image> ImagePtr;
|
||||
typedef shared_ptr<Image> ImagePtr;
|
||||
|
||||
class Loader::Impl : public boost::signals::trackable {
|
||||
public:
|
||||
|
@ -222,7 +222,7 @@ private:
|
||||
/** cache_ allows easy retrieval of already-generated images
|
||||
* using the LaTeX snippet as the identifier.
|
||||
*/
|
||||
typedef boost::shared_ptr<PreviewImage> PreviewImagePtr;
|
||||
typedef shared_ptr<PreviewImage> PreviewImagePtr;
|
||||
///
|
||||
typedef map<string, PreviewImagePtr> Cache;
|
||||
///
|
||||
|
@ -32,7 +32,7 @@ LyXRC_PreviewStatus Previews::status()
|
||||
|
||||
|
||||
namespace {
|
||||
typedef boost::shared_ptr<PreviewLoader> PreviewLoaderPtr;
|
||||
typedef shared_ptr<PreviewLoader> PreviewLoaderPtr;
|
||||
///
|
||||
typedef map<Buffer const *, PreviewLoaderPtr> LyxCacheType;
|
||||
///
|
||||
|
@ -70,7 +70,6 @@
|
||||
using namespace std;
|
||||
using namespace lyx::support;
|
||||
|
||||
using boost::shared_ptr;
|
||||
|
||||
|
||||
namespace lyx {
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "Layout.h"
|
||||
#include "Length.h"
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "support/shared_ptr.h"
|
||||
|
||||
#include <iosfwd>
|
||||
#include <vector>
|
||||
@ -451,13 +451,13 @@ public:
|
||||
///
|
||||
// end longtable support
|
||||
///
|
||||
boost::shared_ptr<InsetTableCell> cellInset(idx_type cell) const;
|
||||
shared_ptr<InsetTableCell> cellInset(idx_type cell) const;
|
||||
///
|
||||
boost::shared_ptr<InsetTableCell> cellInset(row_type row,
|
||||
shared_ptr<InsetTableCell> cellInset(row_type row,
|
||||
col_type column) const;
|
||||
///
|
||||
void setCellInset(row_type row, col_type column,
|
||||
boost::shared_ptr<InsetTableCell>) const;
|
||||
shared_ptr<InsetTableCell>) const;
|
||||
/// Search for \param inset in the tabular, with the
|
||||
///
|
||||
void validate(LaTeXFeatures &) const;
|
||||
@ -509,7 +509,7 @@ public:
|
||||
///
|
||||
Length p_width; // this is only set for multicolumn!!!
|
||||
///
|
||||
boost::shared_ptr<InsetTableCell> inset;
|
||||
shared_ptr<InsetTableCell> inset;
|
||||
};
|
||||
CellData & cellInfo(idx_type cell) const;
|
||||
///
|
||||
@ -807,9 +807,9 @@ public:
|
||||
/// number of cells
|
||||
size_t nargs() const { return tabular.numberofcells; }
|
||||
///
|
||||
boost::shared_ptr<InsetTableCell const> cell(idx_type) const;
|
||||
shared_ptr<InsetTableCell const> cell(idx_type) const;
|
||||
///
|
||||
boost::shared_ptr<InsetTableCell> cell(idx_type);
|
||||
shared_ptr<InsetTableCell> cell(idx_type);
|
||||
///
|
||||
Text * getText(int) const;
|
||||
|
||||
|
@ -61,6 +61,8 @@
|
||||
#include "support/bind.h"
|
||||
#include "support/lassert.h"
|
||||
|
||||
|
||||
|
||||
using namespace std;
|
||||
using namespace lyx::support;
|
||||
|
||||
|
@ -520,7 +520,7 @@ string const getChildErrorMessage()
|
||||
|
||||
namespace ForkedCallsController {
|
||||
|
||||
typedef boost::shared_ptr<ForkedProcess> ForkedProcessPtr;
|
||||
typedef shared_ptr<ForkedProcess> ForkedProcessPtr;
|
||||
typedef list<ForkedProcessPtr> ListType;
|
||||
typedef ListType::iterator iterator;
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#ifndef FORKEDCALLS_H
|
||||
#define FORKEDCALLS_H
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include "support/shared_ptr.h"
|
||||
#include <boost/signal.hpp>
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
@ -41,7 +41,7 @@ public:
|
||||
///
|
||||
virtual ~ForkedProcess() {}
|
||||
///
|
||||
virtual boost::shared_ptr<ForkedProcess> clone() const = 0;
|
||||
virtual shared_ptr<ForkedProcess> clone() const = 0;
|
||||
|
||||
/** A SignalType signal can be emitted once the forked process
|
||||
* has finished. It passes:
|
||||
@ -62,7 +62,7 @@ public:
|
||||
*
|
||||
* It doesn't matter if the slot disappears, SigC takes care of that.
|
||||
*/
|
||||
typedef boost::shared_ptr<SignalType> SignalTypePtr;
|
||||
typedef shared_ptr<SignalType> SignalTypePtr;
|
||||
|
||||
/** Invoking the following methods makes sense only if the command
|
||||
* is running asynchronously!
|
||||
@ -151,8 +151,8 @@ private:
|
||||
class ForkedCall : public ForkedProcess {
|
||||
public:
|
||||
///
|
||||
virtual boost::shared_ptr<ForkedProcess> clone() const {
|
||||
return boost::shared_ptr<ForkedProcess>(new ForkedCall(*this));
|
||||
virtual shared_ptr<ForkedProcess> clone() const {
|
||||
return shared_ptr<ForkedProcess>(new ForkedCall(*this));
|
||||
}
|
||||
|
||||
/** Start the child process.
|
||||
|
28
src/support/shared_ptr.h
Normal file
28
src/support/shared_ptr.h
Normal file
@ -0,0 +1,28 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file shared_ptr.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_SHARED_PTR_H
|
||||
#define LYX_SHARED_PTR_H
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1600)
|
||||
|
||||
#include <memory>
|
||||
using std::tr1::shared_ptr;
|
||||
|
||||
#else
|
||||
|
||||
#include <boost/shared_ptr.hpp>
|
||||
using boost::shared_ptr;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user