add specialization for unsigned long, and clean up header file

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9454 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2005-01-07 13:32:26 +00:00
parent cacd278a65
commit 5843057992
6 changed files with 24 additions and 31 deletions

View File

@ -1,3 +1,7 @@
2005-01-07 Lars Gullik Bjonnes <larsbj@gullik.net>
* tex-accent.C: add <string>
2005-01-06 José Matos <jamatos@lyx.org>
* ParagraphParameters.C (write): put every parameter in its own line.

View File

@ -120,7 +120,7 @@ bool addRow(MathGridInset & grid, MathGridInset::row_type & cellrow,
// one.
// This does not happen in well formed .lyx files,
// but LyX versions 1.3.x and older could create
// such files and tex2lyx can still do that.
// such files and tex2lyx can still do that.
--cellrow;
lyxerr << "ignoring extra row";
if (!vskip.empty())
@ -151,7 +151,7 @@ bool addCol(MathGridInset & grid, MathGridInset::col_type & cellcol)
// one.
// This does not happen in well formed .lyx files,
// but LyX versions 1.3.x and older could create
// such files and tex2lyx can still do that.
// such files and tex2lyx can still do that.
--cellcol;
lyxerr << "ignoring extra column." << endl;
return false;

View File

@ -1,3 +1,9 @@
2005-01-07 Lars Gullik Bjonnes <larsbj@gullik.net>
* convert.h: remove the specializations, dont included unneeded
headers
* convert.C: add specialization for unsigned long
2005-01-06 Lars Gullik Bjonnes <larsbj@gullik.net>
* tostr.[Ch]: renamed to convert[ch]

View File

@ -15,6 +15,8 @@
#include <boost/lexical_cast.hpp>
#include <string>
using boost::lexical_cast;
using std::string;
@ -55,6 +57,13 @@ string convert<string>(unsigned int ui)
}
template<>
string convert<string>(unsigned long ul)
{
return lexical_cast<string>(ul);
}
template<>
string convert<string>(float f)
{

View File

@ -16,12 +16,9 @@
#ifndef CONVERT_H
#define CONVERT_H
#if 0
#include <boost/static_assert.hpp>
#include <string>
#if 0
// Commented out since BOOST_STATIC_ASSERT does not work with gcc 4.0
template <class Target, class Source>
Target convert(Source arg)
@ -36,29 +33,4 @@ template <class Target, class Source>
Target convert(Source arg);
#endif
template<>
std::string convert<std::string>(bool);
template<>
std::string convert<std::string>(char);
template<>
std::string convert<std::string>(unsigned short);
template<>
std::string convert<std::string>(int);
template<>
std::string convert<std::string>(unsigned int);
template<>
std::string convert<std::string>(float);
template<>
std::string convert<std::string>(double);
template<>
std::string convert<std::string>(std::string);
#endif

View File

@ -14,6 +14,8 @@
#include "tex-accent.h"
#include "support/convert.h"
#include <string>
using std::string;
/* the names used by TeX and XWindows for deadkeys/accents are not the same