Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56666 - in trunk/libs/iostreams/test: . detail
From: bdawes_at_[hidden]
Date: 2009-10-09 08:16:39


Author: bemandawes
Date: 2009-10-09 08:16:38 EDT (Fri, 09 Oct 2009)
New Revision: 56666
URL: http://svn.boost.org/trac/boost/changeset/56666

Log:
iostreams: fix for LWG issue 811, which it causing GCC 4.4.x errors
Text files modified:
   trunk/libs/iostreams/test/component_access_test.cpp | 2 +-
   trunk/libs/iostreams/test/detail/closable.hpp | 12 ++++++------
   2 files changed, 7 insertions(+), 7 deletions(-)

Modified: trunk/libs/iostreams/test/component_access_test.cpp
==============================================================================
--- trunk/libs/iostreams/test/component_access_test.cpp (original)
+++ trunk/libs/iostreams/test/component_access_test.cpp 2009-10-09 08:16:38 EDT (Fri, 09 Oct 2009)
@@ -39,7 +39,7 @@
     void foo() { }
     std::pair<char*, char*> input_sequence()
     {
- return std::pair<char*, char*>(0, 0);
+ return std::pair<char*, char*>(static_cast<char*>(0), static_cast<char*>(0));;
     }
 };
 

Modified: trunk/libs/iostreams/test/detail/closable.hpp
==============================================================================
--- trunk/libs/iostreams/test/detail/closable.hpp (original)
+++ trunk/libs/iostreams/test/detail/closable.hpp 2009-10-09 08:16:38 EDT (Fri, 09 Oct 2009)
@@ -126,7 +126,7 @@
     typedef direct_input category;
     closable_device(operation close) : close_(close) { }
     std::pair<char*, char*> input_sequence()
- { return std::pair<char*, char*>(0, 0); }
+ { return std::pair<char*, char*>(static_cast<char*>(0), static_cast<char*>(0)); }
     void close() { close_.execute(); }
 private:
     operation close_;
@@ -140,7 +140,7 @@
     typedef direct_output category;
     closable_device(operation close) : close_(close) { }
     std::pair<char*, char*> output_sequence()
- { return std::pair<char*, char*>(0, 0); }
+ { return std::pair<char*, char*>(static_cast<char*>(0), static_cast<char*>(0)); }
     void close() { close_.execute(); }
 private:
     operation close_;
@@ -156,9 +156,9 @@
         : close_input_(close_input), close_output_(close_output)
         { }
     std::pair<char*, char*> input_sequence()
- { return std::pair<char*, char*>(0, 0); }
+ { return std::pair<char*, char*>(static_cast<char*>(0), static_cast<char*>(0)); }
     std::pair<char*, char*> output_sequence()
- { return std::pair<char*, char*>(0, 0); }
+ { return std::pair<char*, char*>(static_cast<char*>(0), static_cast<char*>(0)); }
     void close(BOOST_IOS::openmode which)
     {
         switch (which) {
@@ -185,9 +185,9 @@
     typedef direct_seekable category;
     closable_device(operation close) : close_(close) { }
     std::pair<char*, char*> input_sequence()
- { return std::pair<char*, char*>(0, 0); }
+ { return std::pair<char*, char*>(static_cast<char*>(0), static_cast<char*>(0)); }
     std::pair<char*, char*> output_sequence()
- { return std::pair<char*, char*>(0, 0); }
+ { return std::pair<char*, char*>(static_cast<char*>(0), static_cast<char*>(0)); }
     void close() { close_.execute(); }
 private:
     operation close_;


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