Fixed a bug preventing g++ 4.6 from working

This commit is contained in:
John Wiegley 2011-02-04 22:53:22 -05:00
parent 2208ac1226
commit 0f8e0251f4
3 changed files with 9 additions and 2 deletions

View file

@ -149,7 +149,7 @@ typedef std::ostream::pos_type ostream_pos_type;
#include <boost/filesystem/fstream.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
#if !(__cplusplus > 199711)
#if !(defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)
#include <boost/foreach.hpp>
#endif
#include <boost/function.hpp>

View file

@ -439,6 +439,13 @@ void expr_t::token_t::next(std::istream& in, const parse_flags_t& pflags,
unexpected(expecting);
}
} else {
if (! in.good()) {
in.clear();
in.seekg(0, std::ios::end);
if (in.fail())
throw_(parse_error, _("Failed to reset input stream"));
}
kind = VALUE;
value = temp;
length = static_cast<std::size_t>(in.tellg() - pos);

View file

@ -523,7 +523,7 @@ inline void check_for_signal() {
*/
/*@{*/
#if (__cplusplus > 199711)
#if defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__
#define foreach(x, y) for (x : y)
#define unique_ptr std::unique_ptr
#else