X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2Fconvert.h;h=be2cb6d5b9874bd6da581cec9a7b8451622e2ca8;hb=c8429d4bbc2e9291a6b5742233aecb089a3eece1;hp=ead674b99cd9d338cd79f220e6555dfb0ec316bf;hpb=9c2ba3c4ff17e15876a2ed6987ea44838a38d43b;p=lyx.git diff --git a/src/support/convert.h b/src/support/convert.h index ead674b99c..be2cb6d5b9 100644 --- a/src/support/convert.h +++ b/src/support/convert.h @@ -1,6 +1,6 @@ // -*- C++ -*- /** - * \file tostr.h + * \file convert.h * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * @@ -13,52 +13,14 @@ * Some of these would certainly benefit from a rewrite/optimization. */ -#ifndef TOSTR_H -#define TOSTR_H +#ifndef CONVERT_H +#define CONVERT_H -#include +namespace lyx { -#include - - -#if 0 -// Commented out since BOOST_STATIC_ASSERT does not work with gcc 4.0 -template -Target convert(Source arg) -{ - // We use a static assert here since we want all instances of - // this template to be specializations. - BOOST_STATIC_ASSERT(sizeof(bool) == 0); - return Target(); -} -#else template Target convert(Source arg); -#endif - - -template<> -std::string convert(bool); - -template<> -std::string convert(char); - -template<> -std::string convert(unsigned short); - -template<> -std::string convert(int); - -template<> -std::string convert(unsigned int); - -template<> -std::string convert(float); - -template<> -std::string convert(double); -template<> -std::string convert(std::string); +} // namespace lyx #endif