mirror of
https://github.com/boostorg/detail.git
synced 2025-07-30 12:27:15 +02:00
Remove path array optimization; problematic when array contains a string shorter than the array length. Reported by Adam Badura.
[SVN r64928]
This commit is contained in:
@ -24,6 +24,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include <boost/current_function.hpp>
|
#include <boost/current_function.hpp>
|
||||||
|
#include <boost/assert.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
namespace boost
|
namespace boost
|
||||||
@ -64,10 +65,31 @@ template<class T, class U> inline void test_eq_impl( char const * expr1, char co
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct report_errors_reminder
|
||||||
|
{
|
||||||
|
bool remembered_to_call_report_errors_function;
|
||||||
|
report_errors_reminder() : remembered_to_call_report_errors_function(false) {}
|
||||||
|
~report_errors_reminder()
|
||||||
|
{
|
||||||
|
BOOST_ASSERT(remembered_to_call_report_errors_function);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
|
|
||||||
|
} // namespace boost
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
boost::detail::report_errors_reminder boost_report_errors_reminder;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace boost
|
||||||
|
{
|
||||||
|
|
||||||
inline int report_errors()
|
inline int report_errors()
|
||||||
{
|
{
|
||||||
|
boost_report_errors_reminder.remembered_to_call_report_errors_function = true;
|
||||||
|
|
||||||
int errors = detail::test_errors();
|
int errors = detail::test_errors();
|
||||||
|
|
||||||
if( errors == 0 )
|
if( errors == 0 )
|
||||||
|
Reference in New Issue
Block a user