1 ///////////////////////////////////////////////////////////////
2 // Copyright 2012 John Maddock. Distributed under the Boost
3 // Software License, Version 1.0. (See accompanying file
4 // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
6 #ifndef BOOST_MP_TABLE_TYPE
7 #define BOOST_MP_TABLE_TYPE
9 #include <libs/math/test/table_type.hpp>
10 #include <boost/multiprecision/number.hpp>
12 struct string_table_entry
17 string_table_entry(const char* p) : m_data(p) {}
22 return static_cast<T>(m_data);
26 inline std::ostream& operator << (std::ostream& os, string_table_entry const & what)
28 return os << static_cast<const char*>(what);
31 template <class Backend, boost::multiprecision::expression_template_option ExpressionTemplates>
32 struct table_type<boost::multiprecision::number<Backend, ExpressionTemplates> >
34 typedef string_table_entry type;
37 #define SC_(x) string_table_entry(BOOST_STRINGIZE(x))