Boost logo

Boost-Commit :

From: john_at_[hidden]
Date: 2008-04-21 05:19:31


Author: johnmaddock
Date: 2008-04-21 05:19:30 EDT (Mon, 21 Apr 2008)
New Revision: 44689
URL: http://svn.boost.org/trac/boost/changeset/44689

Log:
Added new macro BOOST_NO_TEMPLATED_IOSTREAMS in response to issue #1765.
Added:
   trunk/libs/config/test/boost_no_template_streams.ipp (contents, props changed)
   trunk/libs/config/test/no_template_streams_fail.cpp (contents, props changed)
   trunk/libs/config/test/no_template_streams_pass.cpp (contents, props changed)
Text files modified:
   trunk/libs/config/doc/html/boost_config/boost_macro_reference.html | 17 +++++++++++++++++
   trunk/libs/config/doc/html/index.html | 2 +-
   trunk/libs/config/doc/macro_reference.qbk | 3 +++
   trunk/libs/config/test/all/Jamfile.v2 | 5 ++++-
   trunk/libs/config/test/config_info.cpp | 2 ++
   trunk/libs/config/test/config_test.cpp | 12 +++++++++++-
   6 files changed, 38 insertions(+), 3 deletions(-)

Modified: trunk/libs/config/doc/html/boost_config/boost_macro_reference.html
==============================================================================
--- trunk/libs/config/doc/html/boost_config/boost_macro_reference.html (original)
+++ trunk/libs/config/doc/html/boost_config/boost_macro_reference.html 2008-04-21 05:19:30 EDT (Mon, 21 Apr 2008)
@@ -1029,6 +1029,23 @@
 <tr>
 <td>
               <p>
+ <code class="computeroutput"><span class="identifier">BOOST_NO_TEMPLATED_IOSTREAMS</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Standard library
+ </p>
+ </td>
+<td>
+ <p>
+ The standard library does not provide templated iostream classes.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
                 <code class="computeroutput"><span class="identifier">BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS</span></code>
               </p>
               </td>

Modified: trunk/libs/config/doc/html/index.html
==============================================================================
--- trunk/libs/config/doc/html/index.html (original)
+++ trunk/libs/config/doc/html/index.html 2008-04-21 05:19:30 EDT (Mon, 21 Apr 2008)
@@ -960,7 +960,7 @@
   </p>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: April 21, 2008 at 08:38:49 GMT</small></p></td>
+<td align="left"><p><small>Last revised: April 21, 2008 at 09:16:51 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: trunk/libs/config/doc/macro_reference.qbk
==============================================================================
--- trunk/libs/config/doc/macro_reference.qbk (original)
+++ trunk/libs/config/doc/macro_reference.qbk 2008-04-21 05:19:30 EDT (Mon, 21 Apr 2008)
@@ -250,6 +250,9 @@
 Class template partial specialization (14.5.4 \[temp.class.spec\]) not
 supported.
 ]]
+[[`BOOST_NO_TEMPLATED_IOSTREAMS`][Standard library][
+The standard library does not provide templated iostream classes.
+]]
 [[`BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS`][Standard library][
 The standard library does not provide templated iterator constructors
 for its containers.

Modified: trunk/libs/config/test/all/Jamfile.v2
==============================================================================
--- trunk/libs/config/test/all/Jamfile.v2 (original)
+++ trunk/libs/config/test/all/Jamfile.v2 2008-04-21 05:19:30 EDT (Mon, 21 Apr 2008)
@@ -1,7 +1,7 @@
 #
 # Regression test Jamfile for boost configuration setup.
 # *** DO NOT EDIT THIS FILE BY HAND ***
-# This file was automatically generated on Mon Apr 14 17:10:09 2008
+# This file was automatically generated on Mon Apr 21 10:10:52 2008
 # by libs/config/tools/generate.cpp
 # Copyright John Maddock.
 # Use, modification and distribution are subject to the
@@ -337,6 +337,9 @@
 test-suite "BOOST_NO_SWPRINTF" :
 [ run ../no_swprintf_pass.cpp ]
 [ compile-fail ../no_swprintf_fail.cpp ] ;
+test-suite "BOOST_NO_TEMPLATED_IOSTREAMS" :
+[ run ../no_template_streams_pass.cpp ]
+[ compile-fail ../no_template_streams_fail.cpp ] ;
 test-suite "BOOST_NO_TEMPLATE_TEMPLATES" :
 [ run ../no_template_template_pass.cpp ]
 [ compile-fail ../no_template_template_fail.cpp ] ;

Added: trunk/libs/config/test/boost_no_template_streams.ipp
==============================================================================
--- (empty file)
+++ trunk/libs/config/test/boost_no_template_streams.ipp 2008-04-21 05:19:30 EDT (Mon, 21 Apr 2008)
@@ -0,0 +1,28 @@
+// (C) Copyright John Maddock 2008.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/config for most recent version.
+
+// MACRO: BOOST_NO_TEMPLATED_IOSTREAMS
+// TITLE: basic_iostream<>
+// DESCRIPTION: The platform supports "new style" templated iostreams.
+
+#include <iostream>
+
+
+namespace boost_no_templated_iostreams{
+
+int test()
+{
+ std::basic_ostream<char, std::char_traits<char> >& osr = std::cout;
+ return 0;
+}
+
+}
+
+
+
+
+

Modified: trunk/libs/config/test/config_info.cpp
==============================================================================
--- trunk/libs/config/test/config_info.cpp (original)
+++ trunk/libs/config/test/config_info.cpp 2008-04-21 05:19:30 EDT (Mon, 21 Apr 2008)
@@ -1002,6 +1002,7 @@
    PRINT_MACRO(BOOST_NO_STD_WSTRING);
    PRINT_MACRO(BOOST_NO_STRINGSTREAM);
    PRINT_MACRO(BOOST_NO_SWPRINTF);
+ PRINT_MACRO(BOOST_NO_TEMPLATED_IOSTREAMS);
    PRINT_MACRO(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS);
    PRINT_MACRO(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION);
    PRINT_MACRO(BOOST_NO_TEMPLATE_TEMPLATES);
@@ -1028,6 +1029,7 @@
 
 
 
+
    // END GENERATED BLOCK
 
    PRINT_MACRO(BOOST_INTEL);

Modified: trunk/libs/config/test/config_test.cpp
==============================================================================
--- trunk/libs/config/test/config_test.cpp (original)
+++ trunk/libs/config/test/config_test.cpp 2008-04-21 05:19:30 EDT (Mon, 21 Apr 2008)
@@ -1,4 +1,4 @@
-// This file was automatically generated on Mon Apr 14 17:10:09 2008
+// This file was automatically generated on Mon Apr 21 10:10:52 2008
 // by libs/config/tools/generate.cpp
 // Copyright John Maddock 2002-4.
 // Use, modification and distribution are subject to the
@@ -292,6 +292,11 @@
 #else
 namespace boost_no_swprintf = empty_boost;
 #endif
+#ifndef BOOST_NO_TEMPLATED_IOSTREAMS
+#include "boost_no_template_streams.ipp"
+#else
+namespace boost_no_templated_iostreams = empty_boost;
+#endif
 #ifndef BOOST_NO_TEMPLATE_TEMPLATES
 #include "boost_no_template_template.ipp"
 #else
@@ -1116,6 +1121,11 @@
       std::cerr << "Failed test for BOOST_NO_SWPRINTF at: " << __FILE__ << ":" << __LINE__ << std::endl;
       ++error_count;
    }
+ if(0 != boost_no_templated_iostreams::test())
+ {
+ std::cerr << "Failed test for BOOST_NO_TEMPLATED_IOSTREAMS at: " << __FILE__ << ":" << __LINE__ << std::endl;
+ ++error_count;
+ }
    if(0 != boost_no_template_templates::test())
    {
       std::cerr << "Failed test for BOOST_NO_TEMPLATE_TEMPLATES at: " << __FILE__ << ":" << __LINE__ << std::endl;

Added: trunk/libs/config/test/no_template_streams_fail.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/config/test/no_template_streams_fail.cpp 2008-04-21 05:19:30 EDT (Mon, 21 Apr 2008)
@@ -0,0 +1,37 @@
+// This file was automatically generated on Mon Apr 21 10:10:52 2008
+// by libs/config/tools/generate.cpp
+// Copyright John Maddock 2002-4.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/config for the most recent version.//
+// Revision $Id: generate.cpp 44422 2008-04-14 18:06:59Z johnmaddock $
+//
+
+
+// Test file for macro BOOST_NO_TEMPLATED_IOSTREAMS
+// This file should not compile, if it does then
+// BOOST_NO_TEMPLATED_IOSTREAMS should not be defined.
+// See file boost_no_template_streams.ipp for details
+
+// Must not have BOOST_ASSERT_CONFIG set; it defeats
+// the objective of this file:
+#ifdef BOOST_ASSERT_CONFIG
+# undef BOOST_ASSERT_CONFIG
+#endif
+
+#include <boost/config.hpp>
+#include "test.hpp"
+
+#ifdef BOOST_NO_TEMPLATED_IOSTREAMS
+#include "boost_no_template_streams.ipp"
+#else
+#error "this file should not compile"
+#endif
+
+int main( int, char *[] )
+{
+ return boost_no_templated_iostreams::test();
+}
+

Added: trunk/libs/config/test/no_template_streams_pass.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/config/test/no_template_streams_pass.cpp 2008-04-21 05:19:30 EDT (Mon, 21 Apr 2008)
@@ -0,0 +1,37 @@
+// This file was automatically generated on Mon Apr 21 10:10:52 2008
+// by libs/config/tools/generate.cpp
+// Copyright John Maddock 2002-4.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/config for the most recent version.//
+// Revision $Id: generate.cpp 44422 2008-04-14 18:06:59Z johnmaddock $
+//
+
+
+// Test file for macro BOOST_NO_TEMPLATED_IOSTREAMS
+// This file should compile, if it does not then
+// BOOST_NO_TEMPLATED_IOSTREAMS should be defined.
+// See file boost_no_template_streams.ipp for details
+
+// Must not have BOOST_ASSERT_CONFIG set; it defeats
+// the objective of this file:
+#ifdef BOOST_ASSERT_CONFIG
+# undef BOOST_ASSERT_CONFIG
+#endif
+
+#include <boost/config.hpp>
+#include "test.hpp"
+
+#ifndef BOOST_NO_TEMPLATED_IOSTREAMS
+#include "boost_no_template_streams.ipp"
+#else
+namespace boost_no_templated_iostreams = empty_boost;
+#endif
+
+int main( int, char *[] )
+{
+ return boost_no_templated_iostreams::test();
+}
+


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