Fixed a bug preventing g++ 4.6 from working
This commit is contained in:
parent
2208ac1226
commit
0f8e0251f4
3 changed files with 9 additions and 2 deletions
|
|
@ -149,7 +149,7 @@ typedef std::ostream::pos_type ostream_pos_type;
|
||||||
#include <boost/filesystem/fstream.hpp>
|
#include <boost/filesystem/fstream.hpp>
|
||||||
#include <boost/filesystem/operations.hpp>
|
#include <boost/filesystem/operations.hpp>
|
||||||
#include <boost/filesystem/path.hpp>
|
#include <boost/filesystem/path.hpp>
|
||||||
#if !(__cplusplus > 199711)
|
#if !(defined(__GXX_EXPERIMENTAL_CXX0X__) && __GXX_EXPERIMENTAL_CXX0X__)
|
||||||
#include <boost/foreach.hpp>
|
#include <boost/foreach.hpp>
|
||||||
#endif
|
#endif
|
||||||
#include <boost/function.hpp>
|
#include <boost/function.hpp>
|
||||||
|
|
|
||||||
|
|
@ -439,6 +439,13 @@ void expr_t::token_t::next(std::istream& in, const parse_flags_t& pflags,
|
||||||
unexpected(expecting);
|
unexpected(expecting);
|
||||||
}
|
}
|
||||||
} else {
|
} 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;
|
kind = VALUE;
|
||||||
value = temp;
|
value = temp;
|
||||||
length = static_cast<std::size_t>(in.tellg() - pos);
|
length = static_cast<std::size_t>(in.tellg() - pos);
|
||||||
|
|
|
||||||
|
|
@ -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 foreach(x, y) for (x : y)
|
||||||
#define unique_ptr std::unique_ptr
|
#define unique_ptr std::unique_ptr
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue