Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76211 - trunk/libs/geometry/doc/src/docutils/tools/support_status
From: bruno.lalande_at_[hidden]
Date: 2011-12-28 14:11:48


Author: bruno.lalande
Date: 2011-12-28 14:11:47 EST (Wed, 28 Dec 2011)
New Revision: 76211
URL: http://svn.boost.org/trac/boost/changeset/76211

Log:
Fixed support_status compilation errors with GCC.
Text files modified:
   trunk/libs/geometry/doc/src/docutils/tools/support_status/qbk_outputter.hpp | 12 +-----------
   trunk/libs/geometry/doc/src/docutils/tools/support_status/support_status.cpp | 16 +++++++---------
   trunk/libs/geometry/doc/src/docutils/tools/support_status/text_outputter.hpp | 12 ++----------
   3 files changed, 10 insertions(+), 30 deletions(-)

Modified: trunk/libs/geometry/doc/src/docutils/tools/support_status/qbk_outputter.hpp
==============================================================================
--- trunk/libs/geometry/doc/src/docutils/tools/support_status/qbk_outputter.hpp (original)
+++ trunk/libs/geometry/doc/src/docutils/tools/support_status/qbk_outputter.hpp 2011-12-28 14:11:47 EST (Wed, 28 Dec 2011)
@@ -56,7 +56,7 @@
         return out.str();
     }
 
- qbk_outputter(std::string const& name)
+ explicit qbk_outputter(std::string const& name)
         : m_out(filename(name).c_str())
     {
     }
@@ -102,14 +102,4 @@
 };
 
 
-struct qbk_output_factory
-{
- typedef qbk_outputter type;
-
- static inline qbk_outputter create(std::string const& name)
- {
- return qbk_outputter(name);
- }
-};
-
 #endif // BOOST_GEOMETRY_SUPPORT_STATUS_QBK_OUTPUTTER_HPP

Modified: trunk/libs/geometry/doc/src/docutils/tools/support_status/support_status.cpp
==============================================================================
--- trunk/libs/geometry/doc/src/docutils/tools/support_status/support_status.cpp (original)
+++ trunk/libs/geometry/doc/src/docutils/tools/support_status/support_status.cpp 2011-12-28 14:11:47 EST (Wed, 28 Dec 2011)
@@ -97,22 +97,20 @@
     template <typename G2>
     void operator()(G2)
     {
- m_outputter.begin_row<G2>();
+ m_outputter.template begin_row<G2>();
          boost::mpl::for_each<Types>(do_test<Dispatcher, Outputter, G2>(m_outputter));
          m_outputter.end_row();
     }
 };
 
-template <template <typename, typename> class Dispatcher, typename Types1, typename Types2, typename OutputFactory>
+template <template <typename, typename> class Dispatcher, typename Types1, typename Types2, typename Outputter>
 void test_binary_algorithm(std::string const& name)
 {
- typedef typename OutputFactory::type outputter_type;
-
- outputter_type outputter = OutputFactory::create(name);
+ Outputter outputter(name);
     outputter.header(name);
 
- outputter.table_header<Types2>();
- boost::mpl::for_each<Types1>(test<Dispatcher, Types2, outputter_type>(outputter));
+ outputter.template table_header<Types2>();
+ boost::mpl::for_each<Types1>(test<Dispatcher, Types2, Outputter>(outputter));
 
     outputter.table_footer();
 }
@@ -131,11 +129,11 @@
 {
     if (argc > 1 && ! strcmp(argv[1], "qbk"))
     {
- support_status<qbk_output_factory>();
+ support_status<qbk_outputter>();
     }
     else
     {
- support_status<text_output_factory>();
+ support_status<text_outputter>();
     }
     return 0;
 }

Modified: trunk/libs/geometry/doc/src/docutils/tools/support_status/text_outputter.hpp
==============================================================================
--- trunk/libs/geometry/doc/src/docutils/tools/support_status/text_outputter.hpp (original)
+++ trunk/libs/geometry/doc/src/docutils/tools/support_status/text_outputter.hpp 2011-12-28 14:11:47 EST (Wed, 28 Dec 2011)
@@ -14,6 +14,8 @@
 
 struct text_outputter
 {
+ explicit text_outputter(const std::string&) {}
+
     static inline void ok() { std::cout << "OK\t"; }
     static inline void nyi() { std::cout << "-\t"; }
     static inline void header(std::string const& algo) { std::cout << algo << std::endl; }
@@ -30,14 +32,4 @@
 
 };
 
-struct text_output_factory
-{
- typedef text_outputter type;
-
- static inline text_outputter create(std::string const& name)
- {
- return text_outputter();
- }
-};
-
 #endif // BOOST_GEOMETRY_SUPPORT_STATUS_TEXT_OUTPUTTER_HPP


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk