Fixed most of the compiler specific issues in the last commit.

[SVN r23041]
This commit is contained in:
John Maddock committed 2004-06-07 12:50:39 +00:00
1 parent fce31e9800
commit 1d5a14164a
23 files changed
+903 -55

No files matched your search

+3 -3
View File
@@ -528,7 +528,7 @@ struct BaseRegexConcept
BidiIterator m_in;
global_regex_namespace::regex_constants::match_flag_type m_mft;
global_regex_namespace::match_results<pointer_type> m_pmatch;
private:
BaseRegexConcept();
BaseRegexConcept(const BaseRegexConcept&);
BaseRegexConcept& operator=(const BaseRegexConcept&);
@@ -727,7 +727,7 @@ struct RegexConcept
BidiIterator m_in;
global_regex_namespace::regex_constants::match_flag_type m_mft;
global_regex_namespace::match_results<typename string_type::const_iterator> m_smatch;
private:
RegexConcept();
RegexConcept(const RegexConcept&);
RegexConcept& operator=(const RegexConcept&);
@@ -818,7 +818,7 @@ struct BoostRegexConcept
const value_type m_char;
match_results_type m_results;
const match_results_type m_cresults;
private:
BoostRegexConcept();
BoostRegexConcept(const BoostRegexConcept&);
BoostRegexConcept& operator=(const BoostRegexConcept&);
+5 -2
View File
@@ -115,7 +115,6 @@
#if defined(__GNUC__) && (defined(_WIN32) || defined(__CYGWIN__))
// gcc on win32 has problems if you include <windows.h>
// (sporadically generates bad code).
# define BOOST_REGEX_USE_C_LOCALE
# define BOOST_REGEX_NO_W32
#endif
#if defined(__COMO__) && !defined(BOOST_REGEX_NO_W32) && !defined(_MSC_EXTENSIONS)
@@ -214,7 +213,11 @@ namespace boost{ typedef wchar_t regex_wchar_type; }
#if defined(_WIN32) && !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE) && !defined(BOOST_REGEX_NO_W32)
# define BOOST_REGEX_USE_WIN32_LOCALE
#endif
// otherwise use C locale:
// otherwise use C++ locale if supported:
#if !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE) && !defined(BOOST_NO_STD_LOCALE)
# define BOOST_REGEX_USE_CPP_LOCALE
#endif
// otherwise use C+ locale:
#if !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE)
# define BOOST_REGEX_USE_C_LOCALE
#endif
+1 -1
View File
@@ -502,7 +502,7 @@ basic_regex<charT, traits>& basic_regex<charT, traits>::assign(const charT* p1,
{
temp = shared_ptr<re_detail::basic_regex_implementation<charT, traits> >(new re_detail::basic_regex_implementation<charT, traits>());
}
else if(!m_pimpl.unique())
else
{
temp = shared_ptr<re_detail::basic_regex_implementation<charT, traits> >(new re_detail::basic_regex_implementation<charT, traits>(m_pimpl->m_ptraits));
}
+1 -1
View File
@@ -64,7 +64,7 @@ struct BOOST_REGEX_DECL c_regex_traits<char>
}
char translate_nocase(char c) const
{
return (std::tolower)(c);
return static_cast<char>((std::tolower)(static_cast<unsigned char>(c)));
}
static string_type BOOST_REGEX_CALL transform(const char* p1, const char* p2);
@@ -19,6 +19,10 @@
#ifndef BOOST_CPP_REGEX_TRAITS_HPP_INCLUDED
#define BOOST_CPP_REGEX_TRAITS_HPP_INCLUDED
#include <boost/config.hpp>
#ifndef BOOST_NO_STD_LOCALE
#ifndef BOOST_REGEX_TRAITS_DEFAULTS_HPP_INCLUDED
#include <boost/regex/v4/regex_traits_defaults.hpp>
#endif
@@ -801,3 +805,5 @@ static_mutex& cpp_regex_traits<charT>::get_mutex_inst()
#endif
#endif
#endif
+1 -1
View File
@@ -57,7 +57,7 @@ template class BOOST_REGEX_DECL basic_regex< BOOST_REGEX_CHAR_T >;
# include BOOST_ABI_SUFFIX
#endif
#elif defined(BOOST_MSVC) || defined(__GNUC__)
#elif defined(BOOST_MSVC)
# ifndef BOOST_REGEX_INSTANTIATE
# define template extern template
+3 -3
View File
@@ -89,18 +89,18 @@
#ifdef BOOST_REGEX_NARROW_INSTANTIATE
# define BOOST_REGEX_INSTANTIATE
#endif
//#include <boost/regex/v4/instances.hpp>
#include <boost/regex/v4/instances.hpp>
#undef BOOST_REGEX_CHAR_T
#ifdef BOOST_REGEX_INSTANTIATE
# undef BOOST_REGEX_INSTANTIATE
#endif
#ifndef BOOST_NO_WREGEX
#define BOOST_REGEX_CHAR_T boost::regex_wchar_type
#define BOOST_REGEX_CHAR_T wchar_t
#ifdef BOOST_REGEX_WIDE_INSTANTIATE
# define BOOST_REGEX_INSTANTIATE
#endif
//#include <boost/regex/v4/instances.hpp>
#include <boost/regex/v4/instances.hpp>
#undef BOOST_REGEX_CHAR_T
#ifdef BOOST_REGEX_INSTANTIATE
# undef BOOST_REGEX_INSTANTIATE
+4 -4
View File
@@ -31,7 +31,7 @@ namespace boost{
//
// Forward declaration:
//
template <class BidiIterator, class Allocator = BOOST_DEFAULT_ALLOCATOR(sub_match<BidiIterator> ) >
template <class BidiIterator, class Allocator = BOOST_DEDUCED_TYPENAME std::vector<sub_match<BidiIterator> >::allocator_type >
class match_results;
namespace re_detail{
@@ -483,9 +483,9 @@ public:
}
};
template <class OutputIterator, class Iterator, class charT, class traits>
template <class OutputIterator, class Iterator, class Alloc, class charT, class traits>
OutputIterator regex_format_imp(OutputIterator out,
const match_results<Iterator>& m,
const match_results<Iterator, Alloc>& m,
const charT* p1, const charT* p2,
match_flag_type flags,
const traits& t
@@ -493,7 +493,7 @@ OutputIterator regex_format_imp(OutputIterator out,
{
re_detail::basic_regex_formatter<
OutputIterator,
match_results<Iterator>,
match_results<Iterator, Alloc>,
traits > f(out, m, t);
return f.format(p1, p2, flags);
}
+13 -9
View File
@@ -21,7 +21,7 @@
#define BOOST_REGEX_FWD_HPP_INCLUDED
#ifndef BOOST_REGEX_CONFIG_HPP
#include <boost/config.hpp>
#include <boost/regex/config.hpp>
#endif
//
@@ -34,21 +34,25 @@
# endif
#else
//
// If there isn't good enough wide character support then there will
// be no wide character regular expressions:
//
#if (defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING)) && !defined(BOOST_NO_WREGEX)
# define BOOST_NO_WREGEX
#endif
namespace boost{
template <class charT>
class cpp_regex_traits;
template <class charT>
struct c_regex_traits;
template <class charT>
class w32_regex_traits;
#ifdef BOOST_REGEX_USE_WIN32_LOCALE
template <class charT, class implementationT = w32_regex_traits<charT> >
struct regex_traits;
#elif defined(BOOST_REGEX_USE_CPP_LOCALE)
template <class charT, class implementationT = cpp_regex_traits<charT> >
struct regex_traits;
#else
template <class charT, class implementationT = c_regex_traits<charT> >
struct regex_traits;
#endif
template <class charT, class traits = regex_traits<charT> >
class basic_regex;
+64
View File
@@ -135,6 +135,22 @@ inline bool regex_match(const char* str,
match_results<const char*> m;
return regex_match(str, str + regex::traits_type::length(str), m, e, flags);
}
#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32)
inline bool regex_match(const char* str,
cmatch& m,
const basic_regex<char, w32_regex_traits<char> >& e,
match_flag_type flags = match_default)
{
return regex_match(str, str + regex::traits_type::length(str), m, e, flags);
}
inline bool regex_match(const char* str,
const basic_regex<char, w32_regex_traits<char> >& e,
match_flag_type flags = match_default)
{
match_results<const char*> m;
return regex_match(str, str + regex::traits_type::length(str), m, e, flags);
}
#endif
#ifndef BOOST_NO_WREGEX
inline bool regex_match(const wchar_t* str,
wcmatch& m,
@@ -178,6 +194,22 @@ inline bool regex_match(const wchar_t* str,
match_results<const wchar_t*> m;
return regex_match(str, str + wregex::traits_type::length(str), m, e, flags);
}
#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32)
inline bool regex_match(const wchar_t* str,
wcmatch& m,
const basic_regex<wchar_t, w32_regex_traits<wchar_t> >& e,
match_flag_type flags = match_default)
{
return regex_match(str, str + wregex::traits_type::length(str), m, e, flags);
}
inline bool regex_match(const wchar_t* str,
const basic_regex<wchar_t, w32_regex_traits<wchar_t> >& e,
match_flag_type flags = match_default)
{
match_results<const wchar_t*> m;
return regex_match(str, str + wregex::traits_type::length(str), m, e, flags);
}
#endif
#endif
inline bool regex_match(const std::string& s,
smatch& m,
@@ -221,6 +253,22 @@ inline bool regex_match(const std::string& s,
match_results<std::string::const_iterator> m;
return regex_match(s.begin(), s.end(), m, e, flags);
}
#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32)
inline bool regex_match(const std::string& s,
smatch& m,
const basic_regex<char, w32_regex_traits<char> >& e,
match_flag_type flags = match_default)
{
return regex_match(s.begin(), s.end(), m, e, flags);
}
inline bool regex_match(const std::string& s,
const basic_regex<char, w32_regex_traits<char> >& e,
match_flag_type flags = match_default)
{
match_results<std::string::const_iterator> m;
return regex_match(s.begin(), s.end(), m, e, flags);
}
#endif
#if !defined(BOOST_NO_WREGEX)
inline bool regex_match(const std::basic_string<wchar_t>& s,
match_results<std::basic_string<wchar_t>::const_iterator>& m,
@@ -264,6 +312,22 @@ inline bool regex_match(const std::basic_string<wchar_t>& s,
match_results<std::basic_string<wchar_t>::const_iterator> m;
return regex_match(s.begin(), s.end(), m, e, flags);
}
#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32)
inline bool regex_match(const std::basic_string<wchar_t>& s,
match_results<std::basic_string<wchar_t>::const_iterator>& m,
const basic_regex<wchar_t, w32_regex_traits<wchar_t> >& e,
match_flag_type flags = match_default)
{
return regex_match(s.begin(), s.end(), m, e, flags);
}
inline bool regex_match(const std::basic_string<wchar_t>& s,
const basic_regex<wchar_t, w32_regex_traits<wchar_t> >& e,
match_flag_type flags = match_default)
{
match_results<std::basic_string<wchar_t>::const_iterator> m;
return regex_match(s.begin(), s.end(), m, e, flags);
}
#endif
#endif
#endif
+12 -6
View File
@@ -31,14 +31,20 @@
#ifndef BOOST_REGEX_ERROR_TYPE_HPP
#include <boost/regex/v4/error_type.hpp>
#endif
#ifndef BOOST_CPP_REGEX_TRAITS_HPP_INCLUDED
#include <boost/regex/v4/cpp_regex_traits.hpp>
#ifndef BOOST_NO_STD_LOCALE
# ifndef BOOST_CPP_REGEX_TRAITS_HPP_INCLUDED
# include <boost/regex/v4/cpp_regex_traits.hpp>
# endif
#endif
#ifndef BOOST_C_REGEX_TRAITS_HPP_INCLUDED
#include <boost/regex/v4/c_regex_traits.hpp>
#if !BOOST_WORKAROUND(__BORLANDC__, < 0x560)
# ifndef BOOST_C_REGEX_TRAITS_HPP_INCLUDED
# include <boost/regex/v4/c_regex_traits.hpp>
# endif
#endif
#ifndef BOOST_W32_REGEX_TRAITS_HPP_INCLUDED
#include <boost/regex/v4/w32_regex_traits.hpp>
#if defined(_WIN32) && !defined(BOOST_REGEX_NO_W32)
# ifndef BOOST_W32_REGEX_TRAITS_HPP_INCLUDED
# include <boost/regex/v4/w32_regex_traits.hpp>
# endif
#endif
#ifndef BOOST_REGEX_FWD_HPP_INCLUDED
#include <boost/regex_fwd.hpp>
@@ -34,7 +34,6 @@
#include <limits>
#include <boost/assert.hpp>
#include <boost/cstdint.hpp>
#include <boost/detail/allocator.hpp>
#include <boost/throw_exception.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/scoped_array.hpp>
@@ -59,20 +59,34 @@ typedef ::boost::shared_ptr<void> cat_type; // placeholder for dll HANDLE.
//
BOOST_REGEX_DECL lcid_type BOOST_REGEX_CALL w32_get_default_locale();
BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(char, lcid_type);
#ifndef BOOST_NO_WREGEX
BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(wchar_t, lcid_type);
#endif
BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(char, lcid_type);
#ifndef BOOST_NO_WREGEX
BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(wchar_t, lcid_type);
#endif
BOOST_REGEX_DECL cat_type BOOST_REGEX_CALL w32_cat_open(const std::string& name);
BOOST_REGEX_DECL std::string BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type id, int i, const std::string& def);
#ifndef BOOST_NO_WREGEX
BOOST_REGEX_DECL std::wstring BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type id, int i, const std::wstring& def);
#endif
BOOST_REGEX_DECL std::string BOOST_REGEX_CALL w32_transform(lcid_type id, const char* p1, const char* p2);
#ifndef BOOST_NO_WREGEX
BOOST_REGEX_DECL std::wstring BOOST_REGEX_CALL w32_transform(lcid_type id, const wchar_t* p1, const wchar_t* p2);
#endif
BOOST_REGEX_DECL char BOOST_REGEX_CALL w32_tolower(char c, lcid_type);
#ifndef BOOST_NO_WREGEX
BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL w32_tolower(wchar_t c, lcid_type);
#endif
BOOST_REGEX_DECL char BOOST_REGEX_CALL w32_toupper(char c, lcid_type);
#ifndef BOOST_NO_WREGEX
BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL w32_toupper(wchar_t c, lcid_type);
#endif
BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is(lcid_type, boost::uint32_t mask, char c);
#ifndef BOOST_NO_WREGEX
BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is(lcid_type, boost::uint32_t mask, wchar_t c);
#endif
//
// class w32_regex_traits_base:
// acts as a container for locale and the facets we are using.