forked from boostorg/regex
Merge pull request #91 from rdoeffinger/staticptrfix
Avoid generating pointers in writeable data section.
This commit is contained in:
@ -859,7 +859,7 @@ escape_type_class_jump:
|
||||
{
|
||||
bool have_brace = false;
|
||||
bool negative = false;
|
||||
static const char* incomplete_message = "Incomplete \\g escape found.";
|
||||
static const char incomplete_message[] = "Incomplete \\g escape found.";
|
||||
if(++m_position == m_end)
|
||||
{
|
||||
fail(regex_constants::error_escape, m_position - m_base, incomplete_message);
|
||||
@ -1133,7 +1133,7 @@ bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_
|
||||
template <class charT, class traits>
|
||||
bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
|
||||
{
|
||||
static const char* incomplete_message = "Missing } in quantified repetition.";
|
||||
static const char incomplete_message[] = "Missing } in quantified repetition.";
|
||||
//
|
||||
// parse a repeat-range:
|
||||
//
|
||||
@ -1339,7 +1339,7 @@ bool basic_regex_parser<charT, traits>::parse_alt()
|
||||
template <class charT, class traits>
|
||||
bool basic_regex_parser<charT, traits>::parse_set()
|
||||
{
|
||||
static const char* incomplete_message = "Character set declaration starting with [ terminated prematurely - either no ] was found or the set had no content.";
|
||||
static const char incomplete_message[] = "Character set declaration starting with [ terminated prematurely - either no ] was found or the set had no content.";
|
||||
++m_position;
|
||||
if(m_position == m_end)
|
||||
{
|
||||
@ -1431,7 +1431,7 @@ bool basic_regex_parser<charT, traits>::parse_set()
|
||||
template <class charT, class traits>
|
||||
bool basic_regex_parser<charT, traits>::parse_inner_set(basic_char_set<charT, traits>& char_set)
|
||||
{
|
||||
static const char* incomplete_message = "Character class declaration starting with [ terminated prematurely - either no ] was found or the set had no content.";
|
||||
static const char incomplete_message[] = "Character class declaration starting with [ terminated prematurely - either no ] was found or the set had no content.";
|
||||
//
|
||||
// we have either a character class [:name:]
|
||||
// a collating element [.name.]
|
||||
|
@ -208,8 +208,8 @@ int get_default_class_id(const charT* p1, const charT* p2)
|
||||
{data+63, data+67,}, // word
|
||||
{data+67, data+73,}, // xdigit
|
||||
};
|
||||
static const character_pointer_range<charT>* ranges_begin = ranges;
|
||||
static const character_pointer_range<charT>* ranges_end = ranges + (sizeof(ranges)/sizeof(ranges[0]));
|
||||
const character_pointer_range<charT>* ranges_begin = ranges;
|
||||
const character_pointer_range<charT>* ranges_end = ranges + (sizeof(ranges)/sizeof(ranges[0]));
|
||||
|
||||
character_pointer_range<charT> t = { p1, p2, };
|
||||
const character_pointer_range<charT>* p = std::lower_bound(ranges_begin, ranges_end, t);
|
||||
|
@ -354,8 +354,8 @@ icu_regex_traits::char_class_type icu_regex_traits::lookup_icu_mask(const ::UCha
|
||||
};
|
||||
|
||||
|
||||
static const BOOST_REGEX_DETAIL_NS::character_pointer_range< ::UChar32>* ranges_begin = range_data;
|
||||
static const BOOST_REGEX_DETAIL_NS::character_pointer_range< ::UChar32>* ranges_end = range_data + (sizeof(range_data)/sizeof(range_data[0]));
|
||||
const BOOST_REGEX_DETAIL_NS::character_pointer_range< ::UChar32>* ranges_begin = range_data;
|
||||
const BOOST_REGEX_DETAIL_NS::character_pointer_range< ::UChar32>* ranges_end = range_data + (sizeof(range_data)/sizeof(range_data[0]));
|
||||
|
||||
BOOST_REGEX_DETAIL_NS::character_pointer_range< ::UChar32> t = { p1, p2, };
|
||||
const BOOST_REGEX_DETAIL_NS::character_pointer_range< ::UChar32>* p = std::lower_bound(ranges_begin, ranges_end, t);
|
||||
|
Reference in New Issue
Block a user