Merge branch 'develop'

This commit is contained in:
John Maddock
2020-06-23 18:57:40 +01:00
37 changed files with 181 additions and 72 deletions

View File

@ -17,7 +17,7 @@
* using a C++ Builder closure as a callback.
*/
#ifdef __BORLANDC__
#if defined(__BORLANDC__) && !defined(__clang__)
#include <boost/regex.hpp>
#include <string>
@ -140,7 +140,7 @@ int main(int argc, const char** argv)
return 0;
}
#else // __BORLANDC__
#else // __BORLANDC__ && !defined(__clang__)
int main()
{

View File

@ -49,7 +49,7 @@ int process_ftp(const char* response, std::string* msg)
return -1;
}
#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && (__BORLANDC__ == 0x550))
#if defined(BOOST_MSVC) || (defined(BOOST_BORLANDC) && (BOOST_BORLANDC == 0x550))
//
// problem with std::getline under MSVC6sp3
istream& getline(istream& is, std::string& s)

View File

@ -30,7 +30,7 @@ unsigned tokenise(std::list<std::string>& l, std::string& s)
using namespace std;
#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && (__BORLANDC__ == 0x550))
#if defined(BOOST_MSVC) || (defined(BOOST_BORLANDC) && (BOOST_BORLANDC == 0x550))
//
// problem with std::getline under MSVC6sp3
istream& getline(istream& is, std::string& s)

View File

@ -23,7 +23,7 @@
using namespace std;
#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && (__BORLANDC__ == 0x550))
#if defined(BOOST_MSVC) || (defined(BOOST_BORLANDC) && (BOOST_BORLANDC == 0x550))
//
// problem with std::getline under MSVC6sp3
istream& getline(istream& is, std::string& s)

View File

@ -89,7 +89,7 @@ public:
};
namespace boost{
#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && (__BORLANDC__ == 0x550)) || defined(__SGI_STL_PORT)
#if defined(BOOST_MSVC) || (defined(BOOST_BORLANDC) && (BOOST_BORLANDC == 0x550)) || defined(__SGI_STL_PORT)
//
// problem with std::getline under MSVC6sp3
// and C++ Builder 5.5, is this really that hard?
@ -367,16 +367,9 @@ int main(int argc, char**argv)
}
#if defined(_WIN32) && defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(UNDER_CE)
#if !defined(BOOST_EMBTC)
#pragma comment(lib, "user32.lib")
#else
#pragma comment(lib, "user32.a")
#endif
#endif

View File

@ -22,7 +22,7 @@
* Borland C++ Fix/error check
* this has to go *before* we include any std lib headers:
*/
#if defined(__BORLANDC__)
#if defined(__BORLANDC__) && !defined(__clang__)
# include <boost/regex/config/borland.hpp>
#endif
#include <boost/version.hpp>
@ -279,9 +279,14 @@
#endif
#if defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32)
#if defined(__clang__)
# define BOOST_REGEX_CALL __cdecl
# define BOOST_REGEX_CCALL __cdecl
#else
# define BOOST_REGEX_CALL __fastcall
# define BOOST_REGEX_CCALL __stdcall
#endif
#endif
#ifndef BOOST_REGEX_CALL
# define BOOST_REGEX_CALL
@ -378,7 +383,7 @@ if(0 == (x))\
#if !defined(BOOST_REGEX_NO_W32) && !defined(BOOST_REGEX_V3)
# if(defined(_WIN32) || defined(_WIN64) || defined(_WINCE)) \
&& !defined(__GNUC__) \
&& !(defined(__GNUC__) || defined(__BORLANDC__) && defined(__clang__)) \
&& !(defined(__BORLANDC__) && (__BORLANDC__ >= 0x600)) \
&& !(defined(__MWERKS__) && (__MWERKS__ <= 0x3003))
# define BOOST_REGEX_HAS_MS_STACK_GUARD

View File

@ -17,7 +17,7 @@
*/
#if defined(__BORLANDC__)
#if defined(__BORLANDC__) && !defined(__clang__)
# if (__BORLANDC__ == 0x550) || (__BORLANDC__ == 0x551)
// problems with std::basic_string and dll RTL:
# if defined(_RTLDLL) && defined(_RWSTD_COMPILE_INSTANTIATE)

View File

@ -616,7 +616,7 @@ typename cpp_regex_traits_implementation<charT>::string_type
// std::collate<wchar_t>::transform returns a different string!
// So as a workaround, we'll truncate the string at the first NULL
// which _seems_ to work....
#if BOOST_WORKAROUND(__BORLANDC__, < 0x580)
#if BOOST_WORKAROUND(BOOST_BORLANDC, < 0x580)
result.erase(result.find(charT(0)));
#else
//
@ -669,7 +669,7 @@ typename cpp_regex_traits_implementation<charT>::string_type
return pos->second;
}
#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\
&& !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)
&& !BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x0551)
std::string name(p1, p2);
#else
std::string name;
@ -679,7 +679,7 @@ typename cpp_regex_traits_implementation<charT>::string_type
#endif
name = lookup_default_collate_name(name);
#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\
&& !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)
&& !BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x0551)
if(name.size())
return string_type(name.begin(), name.end());
#else

View File

@ -231,7 +231,7 @@ struct pred4;
} /* namespace BOOST_REGEX_DETAIL_NS */
#if (defined(BOOST_MSVC) || defined(__BORLANDC__)) && !defined(BOOST_DISABLE_WIN32)
#if (defined(BOOST_MSVC) || defined(BOOST_BORLANDC)) && !defined(BOOST_DISABLE_WIN32)
typedef bool (__cdecl *GrepCallback)(const RegEx& expression);
typedef bool (__cdecl *GrepFileCallback)(const char* file, const RegEx& expression);
typedef bool (__cdecl *FindFilesCallback)(const char* file);

View File

@ -270,6 +270,8 @@ public:
return *this;
}
#if !defined(BOOST_EMBTC)
friend inline bool operator==(const mapfile_iterator& i, const mapfile_iterator& j)
{
return (i.file == j.file) && (i.node == j.node) && (i.offset == j.offset);
@ -308,8 +310,64 @@ public:
{
return i.position() - j.position();
}
#else
friend bool operator==(const mapfile_iterator& i, const mapfile_iterator& j);
friend bool operator!=(const mapfile_iterator& i, const mapfile_iterator& j);
friend bool operator<(const mapfile_iterator& i, const mapfile_iterator& j);
friend bool operator>(const mapfile_iterator& i, const mapfile_iterator& j);
friend bool operator<=(const mapfile_iterator& i, const mapfile_iterator& j);
friend bool operator>=(const mapfile_iterator& i, const mapfile_iterator& j);
friend mapfile_iterator operator + (const mapfile_iterator& i, long off);
friend mapfile_iterator operator + (long off, const mapfile_iterator& i);
friend mapfile_iterator operator - (const mapfile_iterator& i, long off);
friend long operator - (const mapfile_iterator& i, const mapfile_iterator& j);
#endif
};
#if defined(BOOST_EMBTC)
inline bool operator==(const mapfile_iterator& i, const mapfile_iterator& j)
{
return (i.file == j.file) && (i.node == j.node) && (i.offset == j.offset);
}
inline bool operator!=(const mapfile_iterator& i, const mapfile_iterator& j)
{
return !(i == j);
}
inline bool operator<(const mapfile_iterator& i, const mapfile_iterator& j)
{
return i.position() < j.position();
}
inline bool operator>(const mapfile_iterator& i, const mapfile_iterator& j)
{
return i.position() > j.position();
}
inline bool operator<=(const mapfile_iterator& i, const mapfile_iterator& j)
{
return i.position() <= j.position();
}
inline bool operator>=(const mapfile_iterator& i, const mapfile_iterator& j)
{
return i.position() >= j.position();
}
mapfile_iterator operator + (long off, const mapfile_iterator& i)
{
mapfile_iterator tmp(i);
return tmp += off;
}
inline long operator - (const mapfile_iterator& i, const mapfile_iterator& j)
{
return i.position() - j.position();
}
#endif
#endif
// _fi_sep determines the directory separator, either '\\' or '/'
@ -351,6 +409,8 @@ public:
file_iterator operator++(int);
const char* operator*() { return path(); }
#if !defined(BOOST_EMBTC)
friend inline bool operator == (const file_iterator& f1, const file_iterator& f2)
{
return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
@ -361,8 +421,29 @@ public:
return !(f1 == f2);
}
#else
friend bool operator == (const file_iterator& f1, const file_iterator& f2);
friend bool operator != (const file_iterator& f1, const file_iterator& f2);
#endif
};
#if defined(BOOST_EMBTC)
inline bool operator == (const file_iterator& f1, const file_iterator& f2)
{
return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
}
inline bool operator != (const file_iterator& f1, const file_iterator& f2)
{
return !(f1 == f2);
}
#endif
// dwa 9/13/00 - suppress unused parameter warning
inline bool operator < (const file_iterator&, const file_iterator&)
{
@ -401,6 +482,8 @@ public:
static const char* separator() { return _fi_sep; }
#if !defined(BOOST_EMBTC)
friend inline bool operator == (const directory_iterator& f1, const directory_iterator& f2)
{
return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
@ -412,8 +495,30 @@ public:
return !(f1 == f2);
}
#else
friend bool operator == (const directory_iterator& f1, const directory_iterator& f2);
friend bool operator != (const directory_iterator& f1, const directory_iterator& f2);
#endif
};
#if defined(BOOST_EMBTC)
inline bool operator == (const directory_iterator& f1, const directory_iterator& f2)
{
return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
}
inline bool operator != (const directory_iterator& f1, const directory_iterator& f2)
{
return !(f1 == f2);
}
#endif
inline bool operator < (const directory_iterator&, const directory_iterator&)
{
return false;

View File

@ -41,7 +41,7 @@ namespace boost{
// what follows is compiler specific:
//
#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600)
#if defined(BOOST_BORLANDC) && (BOOST_BORLANDC < 0x600)
#ifdef BOOST_HAS_ABI_HEADERS
# include BOOST_ABI_PREFIX

View File

@ -89,7 +89,7 @@ typedef enum _match_flags
} match_flags;
#if defined(__BORLANDC__) || (defined(_MSC_VER) && (_MSC_VER <= 1310))
#if defined(BOOST_BORLANDC) || (defined(_MSC_VER) && (_MSC_VER <= 1310))
typedef unsigned long match_flag_type;
#else
typedef match_flags match_flag_type;

View File

@ -34,7 +34,7 @@
#pragma warning(pop)
#endif
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
# pragma option push -w-8008 -w-8066
#endif
#ifdef BOOST_MSVC
@ -1012,7 +1012,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_lit()
# pragma warning(pop)
#endif
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
# pragma option pop
#endif
#ifdef BOOST_MSVC

View File

@ -600,7 +600,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_rep()
#pragma warning(push)
#pragma warning(disable:4127 4244)
#endif
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma option push -w-8008 -w-8066 -w-8004
#endif
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
@ -691,7 +691,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_rep()
}
}
return false;
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma option pop
#endif
#ifdef BOOST_MSVC
@ -790,7 +790,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat()
#pragma warning(push)
#pragma warning(disable:4127)
#endif
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma option push -w-8008 -w-8066 -w-8004
#endif
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
@ -850,7 +850,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat()
pstate = rep->alt.p;
return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip);
}
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma option pop
#endif
#ifdef BOOST_MSVC
@ -865,7 +865,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat()
#pragma warning(push)
#pragma warning(disable:4127)
#endif
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma option push -w-8008 -w-8066 -w-8004
#endif
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
@ -924,7 +924,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat()
pstate = rep->alt.p;
return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip);
}
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma option pop
#endif
#ifdef BOOST_MSVC
@ -939,7 +939,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat()
#pragma warning(push)
#pragma warning(disable:4127)
#endif
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma option push -w-8008 -w-8066 -w-8004
#endif
typedef typename traits::char_class_type m_type;
@ -999,7 +999,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat()
pstate = rep->alt.p;
return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip);
}
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma option pop
#endif
#ifdef BOOST_MSVC

View File

@ -548,7 +548,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat()
#pragma warning(disable:4127)
#pragma warning(disable:4267)
#endif
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma option push -w-8008 -w-8066 -w-8004
#endif
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
@ -637,7 +637,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat()
return false;
}
}while(true);
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma option pop
#endif
#ifdef BOOST_MSVC
@ -652,7 +652,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat()
#pragma warning(push)
#pragma warning(disable:4127)
#endif
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma option push -w-8008 -w-8066 -w-8004
#endif
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
@ -732,7 +732,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat()
return false;
}
}while(true);
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma option pop
#endif
#ifdef BOOST_MSVC
@ -747,7 +747,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat()
#pragma warning(push)
#pragma warning(disable:4127)
#endif
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma option push -w-8008 -w-8066 -w-8004
#endif
typedef typename traits::char_class_type char_class_type;
@ -828,7 +828,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat()
return false;
}
}while(true);
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma option pop
#endif
#ifdef BOOST_MSVC

View File

@ -21,7 +21,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/detail/workaround.hpp>
#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
#if (BOOST_WORKAROUND(BOOST_BORLANDC, >= 0x560) && BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x570)))\
|| BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
//
// Borland C++ Builder 6, and Visual C++ 6,
@ -71,7 +71,7 @@ public:
regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector<int>& v, match_flag_type f)
: end(last), re(*p), flags(f), N(0), subs(v){}
#if !BOOST_WORKAROUND(__HP_aCC, < 60700)
#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
#if (BOOST_WORKAROUND(BOOST_BORLANDC, >= 0x560) && BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x570)))\
|| BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \
|| BOOST_WORKAROUND(__HP_aCC, < 60700)
template <class T>
@ -196,7 +196,7 @@ public:
pdata.reset();
}
#if !BOOST_WORKAROUND(__HP_aCC, < 60700)
#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
#if (BOOST_WORKAROUND(BOOST_BORLANDC, >= 0x560) && BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x570)))\
|| BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \
|| BOOST_WORKAROUND(__HP_aCC, < 60700)
template <class T>

View File

@ -39,7 +39,7 @@
# include <boost/regex/v4/cpp_regex_traits.hpp>
# endif
#endif
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x560)
# ifndef BOOST_C_REGEX_TRAITS_HPP_INCLUDED
# include <boost/regex/v4/c_regex_traits.hpp>
# endif

View File

@ -50,7 +50,7 @@ struct sub_match : public std::pair<BidiIterator, BidiIterator>
sub_match() : std::pair<BidiIterator, BidiIterator>(), matched(false) {}
sub_match(BidiIterator i) : std::pair<BidiIterator, BidiIterator>(i, i), matched(false) {}
#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\
&& !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)\
&& !BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x0551)\
&& !BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
template <class T, class A>
operator std::basic_string<value_type, T, A> ()const

View File

@ -19,7 +19,7 @@
#ifndef BOOST_REGEX_V4_U32REGEX_TOKEN_ITERATOR_HPP
#define BOOST_REGEX_V4_U32REGEX_TOKEN_ITERATOR_HPP
#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
#if (BOOST_WORKAROUND(BOOST_BORLANDC, >= 0x560) && BOOST_WORKAROUND(BOOST_BORLANDC, BOOST_TESTED_AT(0x570)))\
|| BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
//
// Borland C++ Builder 6, and Visual C++ 6,

View File

@ -403,7 +403,7 @@ typename w32_regex_traits_implementation<charT>::string_type
return pos->second;
}
#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\
&& !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)
&& !BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x0551)
std::string name(p1, p2);
#else
std::string name;
@ -413,7 +413,7 @@ typename w32_regex_traits_implementation<charT>::string_type
#endif
name = lookup_default_collate_name(name);
#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\
&& !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)
&& !BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x0551)
if(name.size())
return string_type(name.begin(), name.end());
#else

View File

@ -23,7 +23,7 @@
#include <boost/detail/workaround.hpp>
#include "internals.hpp"
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x560)
#include <boost/regex/v4/c_regex_traits.hpp>
#include <boost/regex/v4/primary_transform.hpp>

View File

@ -37,8 +37,8 @@ typedef boost::match_flag_type match_flag_type;
namespace boost{
#ifdef __BORLANDC__
#if __BORLANDC__ < 0x530
#ifdef BOOST_BORLANDC
#if BOOST_BORLANDC < 0x530
//
// we need to instantiate the vector classes we use
// since declaring a reference to type doesn't seem to
@ -590,7 +590,7 @@ const std::size_t RegEx::npos = ~static_cast<std::size_t>(0);
} // namespace boost
#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x550) && (__BORLANDC__ <= 0x551) && !defined(_RWSTD_COMPILE_INSTANTIATE)
#if defined(BOOST_BORLANDC) && (BOOST_BORLANDC >= 0x550) && (BOOST_BORLANDC <= 0x551) && !defined(_RWSTD_COMPILE_INSTANTIATE)
//
// this is an ugly hack to work around an ugly problem:
// by default this file will produce unresolved externals during

View File

@ -61,7 +61,7 @@ namespace boost{
namespace BOOST_REGEX_DETAIL_NS{
// start with the operating system specific stuff:
#if (defined(__BORLANDC__) || defined(BOOST_REGEX_FI_WIN32_DIR) || defined(BOOST_MSVC)) && !defined(BOOST_RE_NO_WIN32)
#if (defined(BOOST_BORLANDC) || defined(BOOST_REGEX_FI_WIN32_DIR) || defined(BOOST_MSVC)) && !defined(BOOST_RE_NO_WIN32)
// platform is DOS or Windows
// directories are separated with '\\'

View File

@ -23,7 +23,7 @@
#if !defined(BOOST_REGEX_NO_EXTERNAL_TEMPLATES)
#define BOOST_REGEX_NARROW_INSTANTIATE
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma hrdstop
#endif

View File

@ -71,7 +71,7 @@ template BOOST_REGEX_STDLIB_DECL bool __cdecl operator>(
#include <boost/regex/config.hpp>
#include <boost/detail/workaround.hpp>
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x560)
#include <boost/regex/v4/c_regex_traits.hpp>
#ifndef BOOST_NO_WREGEX
@ -224,7 +224,7 @@ c_regex_traits<wchar_t>::string_type BOOST_REGEX_CALL c_regex_traits<wchar_t>::l
{
#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\
&& !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\
&& !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)
&& !BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x0551)
std::string name(p1, p2);
#else
std::string name;
@ -235,7 +235,7 @@ c_regex_traits<wchar_t>::string_type BOOST_REGEX_CALL c_regex_traits<wchar_t>::l
name = ::boost::BOOST_REGEX_DETAIL_NS::lookup_default_collate_name(name);
#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\
&& !BOOST_WORKAROUND(BOOST_MSVC, < 1300)\
&& !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)
&& !BOOST_WORKAROUND(BOOST_BORLANDC, <= 0x0551)
if(name.size())
return string_type(name.begin(), name.end());
#else
@ -257,7 +257,7 @@ c_regex_traits<wchar_t>::string_type BOOST_REGEX_CALL c_regex_traits<wchar_t>::l
int BOOST_REGEX_CALL c_regex_traits<wchar_t>::value(wchar_t c, int radix)
{
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
// workaround for broken wcstol:
if((std::iswxdigit)(c) == 0)
return -1;
@ -310,5 +310,5 @@ int BOOST_REGEX_CALL c_regex_traits<unsigned short>::value(unsigned short c, int
#endif // BOOST_NO_WREGEX
#endif // __BORLANDC__
#endif // BOOST_BORLANDC

View File

@ -23,7 +23,7 @@
#if !defined(BOOST_NO_WREGEX) && !defined(BOOST_REGEX_NO_EXTERNAL_TEMPLATES)
#define BOOST_REGEX_WIDE_INSTANTIATE
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma hrdstop
#endif

View File

@ -69,6 +69,8 @@ void test_captures(const std::string& regx, const std::string& text, T& expected
}
}
#if !defined(BOOST_NO_WREGEX)
std::wstring wre(regx.begin(), regx.end());
std::wstring wtext(text.begin(), text.end());
boost::wregex we(wre);
@ -90,6 +92,8 @@ void test_captures(const std::string& regx, const std::string& text, T& expected
}
}
#endif
#ifdef BOOST_HAS_ICU
boost::u32regex ure = boost::make_u32regex(regx);
what = boost::smatch();

View File

@ -230,7 +230,7 @@ int cpp_main(int /*argc*/, char * /*argv*/[])
print_cpp_info(wchar_t(0), "wchar_t");
#endif
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x560)
boost::c_regex_traits<char> a;
print_sort_syntax(a, "boost::c_regex_traits<char>");
#ifndef BOOST_NO_WREGEX

View File

@ -15,7 +15,7 @@
// this lets us compile at warning level 4 without seeing concept-check related warnings
# pragma warning(disable:4100)
#endif
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma option -w-8019 -w-8004 -w-8008
#endif
#ifdef BOOST_INTEL
@ -53,7 +53,7 @@ int main()
>();
#endif
#endif
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x560)
boost::function_requires<
boost::BoostRegexConcept<
boost::basic_regex<char, boost::c_regex_traits<char> >

View File

@ -21,7 +21,7 @@
// this lets us compile at warning level 4 without seeing concept-check related warnings
# pragma warning(disable:4100)
#endif
#ifdef __BORLANDC__
#ifdef BOOST_BORLANDC
#pragma option -w-8019 -w-8004 -w-8008
#endif

View File

@ -106,7 +106,9 @@ void test_named_subexpressions(charT)
int cpp_main( int , char* [] )
{
test_named_subexpressions(char(0));
#if !defined(BOOST_NO_WREGEX)
test_named_subexpressions(wchar_t(0));
#endif
return 0;
}

View File

@ -18,7 +18,7 @@
#include <boost/detail/workaround.hpp>
#if BOOST_WORKAROUND(__BORLANDC__, < 0x560)
#if BOOST_WORKAROUND(BOOST_BORLANDC, < 0x560)
// we get unresolved externals from basic_string
// unless we do this, a well known Borland bug:
#define _RWSTD_COMPILE_INSTANTIATE

View File

@ -103,7 +103,7 @@ void do_test(const charT& c, const tagT& tag)
if(test_locale::cpp_locale_state() != test_locale::no_test)
test(e1, tag);
#endif
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x560)
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1200) && defined(TEST_THREADS)
// typeid appears to fail in multithreaded environments:
test_info<charT>::set_typename("");

View File

@ -59,7 +59,7 @@ void test_anchors()
//
TEST_REGEX_SEARCH("^.", boost::regex::extended, " \n \r\n ", match_default, make_array(0, 1, -2, 3, 4, -2, 7, 8, -2, -2));
TEST_REGEX_SEARCH(".$", boost::regex::extended, " \n \r\n ", match_default, make_array(1, 2, -2, 4, 5, -2, 8, 9, -2, -2));
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x560)
TEST_REGEX_SEARCH_W(L"^.", boost::regex::extended, L"\x2028 \x2028", match_default, make_array(0, 1, -2, 1, 2, -2, -2));
TEST_REGEX_SEARCH_W(L".$", boost::regex::extended, L" \x2028 \x2028", match_default, make_array(0, 1, -2, 2, 3, -2, 3, 4, -2, -2));
#endif

View File

@ -61,7 +61,7 @@ void test_character_escapes()
TEST_REGEX_SEARCH("a\\Q+*?\\\\Eb", perl, "a+*?\\b", match_default, make_array(0, 6, -2, -2));
TEST_REGEX_SEARCH("\\C+", perl, "abcde", match_default, make_array(0, 5, -2, -2));
TEST_REGEX_SEARCH("\\X+", perl, "abcde", match_default, make_array(0, 5, -2, -2));
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x560)
TEST_REGEX_SEARCH_W(L"\\X", perl, L"a\x0300\x0301", match_default, make_array(0, 3, -2, -2));
#endif
// unknown escape sequences match themselves:

View File

@ -188,7 +188,7 @@ void test_en_locale(const char* name, boost::uint32_t lcid)
TEST_REGEX_SEARCH_L("[[:graph:]]+", perl, "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe", match_default, make_array(0, 93, -2, -2));
TEST_REGEX_SEARCH_L("[[:word:]]+", perl, "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe", match_default, make_array(0, 61, -2, -2));
// collation sensitive ranges:
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600)
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x600)
// these tests are disabled for Borland C++: a bug in std::collate<wchar_t>
// causes these tests to crash (pointer overrun in std::collate<wchar_t>::do_transform).
TEST_REGEX_SEARCH_L("[a-z]+", perl|::boost::regex_constants::collate, "\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc", match_default, make_array(0, 28, -2, -2));

View File

@ -276,7 +276,7 @@ void test_tricky_cases3()
// posix only:
TEST_REGEX_SEARCH("^[[:blank:]]*#([^\\n]*\\\\[[:space:]]+)*[^\\n]*", awk, "#define some_symbol(x) \\ \r\n foo();\\\r\n printf(#x);", match_default, make_array(0, 53, 28, 42, -2, -2));
// now try and test some unicode specific characters:
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
#if !BOOST_WORKAROUND(BOOST_BORLANDC, < 0x560)
TEST_REGEX_SEARCH_W(L"[[:unicode:]]+", perl, L"a\x0300\x0400z", match_default, make_array(1, 3, -2, -2));
TEST_REGEX_SEARCH_W(L"[\x10-\xff]", perl, L"\x0300\x0400", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH_W(L"[\01-\05]{5}", perl, L"\x0300\x0400\x0300\x0400\x0300\x0400", match_default, make_array(-2, -2));