]> git.lyx.org Git - lyx.git/blob - src/support/convert.h
Writing code in the presence of preprocessing blocks can be tricky.
[lyx.git] / src / support / convert.h
1 // -*- C++ -*-
2 /**
3  * \file convert.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  * \author Lars Gullik Bjønnes
9  *
10  * Full author contact details are available in file CREDITS.
11  *
12  * A collection of string helper functions that works with string.
13  * Some of these would certainly benefit from a rewrite/optimization.
14  */
15
16 #ifndef CONVERT_H
17 #define CONVERT_H
18
19 #if 0
20 #include <boost/static_assert.hpp>
21
22 // Commented out since BOOST_STATIC_ASSERT does not work with gcc 4.0
23 template <class Target, class Source>
24 Target convert(Source arg)
25 {
26         // We use a static assert here since we want all instances of
27         // this template to be specializations.
28         BOOST_STATIC_ASSERT(sizeof(bool) == 0);
29         return Target();
30 }
31 #else
32 template <class Target, class Source>
33 Target convert(Source arg);
34 #endif
35
36 #endif