mirror of
https://github.com/boostorg/regex.git
synced 2025-07-19 15:22:09 +02:00
Misc. fixes and new config options.
[SVN r13971]
This commit is contained in:
@ -262,10 +262,12 @@ public:
|
||||
unsigned int Grep(std::vector<std::string>& v, const std::string& s, unsigned int flags = match_default) { return Grep(v, s.c_str(), flags); }
|
||||
unsigned int Grep(std::vector<std::size_t>& v, const char* p, unsigned int flags = match_default);
|
||||
unsigned int Grep(std::vector<std::size_t>& v, const std::string& s, unsigned int flags = match_default) { return Grep(v, s.c_str(), flags); }
|
||||
#ifndef BOOST_REGEX_NO_FILEITER
|
||||
unsigned int GrepFiles(GrepFileCallback cb, const char* files, bool recurse = false, unsigned int flags = match_default);
|
||||
unsigned int GrepFiles(GrepFileCallback cb, const std::string& files, bool recurse = false, unsigned int flags = match_default) { return GrepFiles(cb, files.c_str(), recurse, flags); }
|
||||
unsigned int FindFiles(FindFilesCallback cb, const char* files, bool recurse = false, unsigned int flags = match_default);
|
||||
unsigned int FindFiles(FindFilesCallback cb, const std::string& files, bool recurse = false, unsigned int flags = match_default) { return FindFiles(cb, files.c_str(), recurse, flags); }
|
||||
#endif
|
||||
|
||||
std::string Merge(const std::string& in, const std::string& fmt,
|
||||
bool copy = true, unsigned int flags = match_default);
|
||||
|
@ -874,7 +874,8 @@ protected:
|
||||
sub_match<iterator> head, tail, null;
|
||||
unsigned int lines;
|
||||
iterator line_pos, base;
|
||||
c_reference(const Allocator& a) : c_alloc(a) { }
|
||||
c_reference(const Allocator& a)
|
||||
: c_alloc(a), cmatches(0), count(0), lines(0) { }
|
||||
|
||||
bool operator==(const c_reference& that)const
|
||||
{
|
||||
|
@ -54,15 +54,6 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef __MWERKS__
|
||||
# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
#endif
|
||||
#ifdef __IBMCPP__
|
||||
# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Include all the headers we need here:
|
||||
@ -159,6 +150,19 @@
|
||||
# define BOOST_REGEX_NO_BOOL
|
||||
#endif
|
||||
|
||||
// We don't make our templates external if the compiler
|
||||
// can't handle it:
|
||||
#if defined(BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS) || defined(__ICL) || defined(__ICC)\
|
||||
&& !defined(BOOST_MSVC) && !defined(__BORLANDC__)
|
||||
# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
|
||||
#endif
|
||||
|
||||
// disable our own file-iterators and mapfiles if we can't
|
||||
// support them:
|
||||
#if !defined(BOOST_HAS_DIRENT_H) && !(defined(_WIN32) && !defined(BOOST_REGEX_NO_W32))
|
||||
# define BOOST_REGEX_NO_FILEITER
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifndef MB_CUR_MAX
|
||||
// yuk!
|
||||
@ -599,10 +603,19 @@ namespace std{
|
||||
#ifdef __cplusplus
|
||||
namespace boost{ namespace re_detail{
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable : 4100)
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
inline void pointer_destroy(T* p)
|
||||
{ p->~T(); (void)p; }
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning (pop)
|
||||
#endif
|
||||
|
||||
template <class T>
|
||||
inline void pointer_construct(T* p, const T& t)
|
||||
{ new (p) T(t); }
|
||||
@ -614,3 +627,4 @@ inline void pointer_construct(T* p, const T& t)
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -27,6 +27,8 @@
|
||||
|
||||
#include <boost/regex/config.hpp>
|
||||
|
||||
#ifndef BOOST_REGEX_NO_FILEITER
|
||||
|
||||
#if (defined(__CYGWIN__) || defined(__CYGWIN32__)) && !defined(BOOST_REGEX_NO_W32)
|
||||
#error "Sorry, can't mix <windows.h> with STL code and gcc compiler: if you ran configure, try again with configure --disable-ms-windows"
|
||||
#define BOOST_REGEX_FI_WIN32_MAP
|
||||
@ -431,7 +433,8 @@ using boost::re_detail::file_iterator;
|
||||
using boost::re_detail::mapfile;
|
||||
} // namespace boost
|
||||
|
||||
#endif // _FILEITER_H
|
||||
#endif // BOOST_REGEX_NO_FILEITER
|
||||
#endif // BOOST_RE_FILEITER_HPP
|
||||
|
||||
|
||||
|
||||
|
@ -101,11 +101,11 @@ template class BOOST_REGEX_DECL match_results<std::basic_string<BOOST_REGEX_CHAR
|
||||
# define template template<>
|
||||
# endif
|
||||
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression<BOOST_REGEX_CHAR_T>(const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)&);
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression<BOOST_REGEX_CHAR_T>(const BOOST_REGEX_CHAR_T* p, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f, const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)& a);
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression<BOOST_REGEX_CHAR_T>(const BOOST_REGEX_CHAR_T* p, size_type len, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f, const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)&);
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression<BOOST_REGEX_CHAR_T>(const reg_expression<BOOST_REGEX_CHAR_T>&);
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::~reg_expression<BOOST_REGEX_CHAR_T>();
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)&);
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const BOOST_REGEX_CHAR_T* p, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f, const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)& a);
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const BOOST_REGEX_CHAR_T* p, size_type len, reg_expression<BOOST_REGEX_CHAR_T>::flag_type f, const BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T)&);
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::reg_expression(const reg_expression<BOOST_REGEX_CHAR_T>&);
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>::~reg_expression();
|
||||
template reg_expression<BOOST_REGEX_CHAR_T>& BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::operator=(const reg_expression&);
|
||||
template BOOST_DEFAULT_ALLOCATOR(BOOST_REGEX_CHAR_T) BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::get_allocator()const;
|
||||
template bool BOOST_REGEX_CALL reg_expression<BOOST_REGEX_CHAR_T>::operator==(const reg_expression<BOOST_REGEX_CHAR_T>&)const;
|
||||
|
Reference in New Issue
Block a user