|
Boost-Commit : |
From: joel_at_[hidden]
Date: 2007-08-11 21:24:24
Author: djowel
Date: 2007-08-11 21:24:22 EDT (Sat, 11 Aug 2007)
New Revision: 38605
URL: http://svn.boost.org/trac/boost/changeset/38605
Log:
pragma push/pop added
Text files modified:
trunk/boost/spirit/core/primitives/impl/primitives.ipp | 335 ++++++++++++++++++++-------------------
trunk/boost/spirit/core/primitives/primitives.hpp | 101 ++++++-----
2 files changed, 223 insertions(+), 213 deletions(-)
Modified: trunk/boost/spirit/core/primitives/impl/primitives.ipp
==============================================================================
--- trunk/boost/spirit/core/primitives/impl/primitives.ipp (original)
+++ trunk/boost/spirit/core/primitives/impl/primitives.ipp 2007-08-11 21:24:22 EDT (Sat, 11 Aug 2007)
@@ -27,6 +27,7 @@
#endif
#if defined(BOOST_MSVC)
+# pragma warning (push)
# pragma warning(disable:4800)
#endif
@@ -34,7 +35,7 @@
template <typename DrivedT> struct char_parser;
- namespace impl
+ namespace impl
{
template <typename IteratorT>
inline IteratorT
@@ -58,7 +59,7 @@
typedef typename ScannerT::iterator_t iterator_t;
iterator_t saved = scan.first;
std::size_t slen = str_last - str_first;
-
+
while (str_first != str_last)
{
if (scan.at_end() || (*str_first != *scan))
@@ -66,7 +67,7 @@
++str_first;
++scan;
}
-
+
return scan.create_match(slen, nil_t(), saved, scan.first);
}
@@ -92,17 +93,17 @@
{
typedef int int_type;
typedef char char_type;
-
- static char_type
+
+ static char_type
to_char_type(int_type c)
- {
- return static_cast<char_type>(c);
+ {
+ return static_cast<char_type>(c);
}
-
- static int
+
+ static int
to_int_type(char c)
- {
- return static_cast<unsigned char>(c);
+ {
+ return static_cast<unsigned char>(c);
}
};
@@ -111,17 +112,17 @@
{
typedef int int_type;
typedef unsigned char char_type;
-
- static char_type
+
+ static char_type
to_char_type(int_type c)
- {
- return static_cast<char_type>(c);
+ {
+ return static_cast<char_type>(c);
}
-
- static int
+
+ static int
to_int_type(unsigned char c)
- {
- return c;
+ {
+ return c;
}
};
@@ -133,17 +134,17 @@
{
typedef wint_t int_type;
typedef wchar_t char_type;
-
- static char_type
+
+ static char_type
to_char_type(int_type c)
- {
- return static_cast<char_type>(c);
+ {
+ return static_cast<char_type>(c);
}
-
- static wint_t
+
+ static wint_t
to_int_type(wchar_t c)
- {
- return c;
+ {
+ return c;
}
};
@@ -174,7 +175,7 @@
//
// in a namespace suitable for Argument Dependent lookup or in
// namespace std (disallowed by the standard).
-
+
template <typename CharT>
struct char_type_char_traits_helper
{
@@ -249,217 +250,221 @@
///////////////////////////////////////////////////////////////////////
template <typename CharT>
- inline bool
+ inline bool
isalnum_(CharT c)
- {
- using namespace std;
- return isalnum(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return isalnum(to_int_type(c)) ? true : false;
}
-
+
template <typename CharT>
- inline bool
+ inline bool
isalpha_(CharT c)
- {
- using namespace std;
- return isalpha(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return isalpha(to_int_type(c)) ? true : false;
}
-
+
template <typename CharT>
- inline bool
+ inline bool
iscntrl_(CharT c)
- {
- using namespace std;
- return iscntrl(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return iscntrl(to_int_type(c)) ? true : false;
}
-
+
template <typename CharT>
- inline bool
+ inline bool
isdigit_(CharT c)
- {
- using namespace std;
- return isdigit(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return isdigit(to_int_type(c)) ? true : false;
}
-
+
template <typename CharT>
- inline bool
+ inline bool
isgraph_(CharT c)
- {
- using namespace std;
- return isgraph(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return isgraph(to_int_type(c)) ? true : false;
}
-
+
template <typename CharT>
- inline bool
+ inline bool
islower_(CharT c)
- {
- using namespace std;
- return islower(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return islower(to_int_type(c)) ? true : false;
}
-
+
template <typename CharT>
- inline bool
+ inline bool
isprint_(CharT c)
- {
- using namespace std;
- return isprint(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return isprint(to_int_type(c)) ? true : false;
}
-
+
template <typename CharT>
- inline bool
+ inline bool
ispunct_(CharT c)
- {
- using namespace std;
- return ispunct(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return ispunct(to_int_type(c)) ? true : false;
}
-
+
template <typename CharT>
- inline bool
+ inline bool
isspace_(CharT c)
- {
- using namespace std;
- return isspace(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return isspace(to_int_type(c)) ? true : false;
}
-
+
template <typename CharT>
- inline bool
+ inline bool
isupper_(CharT c)
- {
- using namespace std;
- return isupper(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return isupper(to_int_type(c)) ? true : false;
}
-
+
template <typename CharT>
- inline bool
+ inline bool
isxdigit_(CharT c)
- {
- using namespace std;
- return isxdigit(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return isxdigit(to_int_type(c)) ? true : false;
}
-
+
template <typename CharT>
- inline bool
+ inline bool
isblank_(CharT c)
- {
- return (c == ' ' || c == '\t');
+ {
+ return (c == ' ' || c == '\t');
}
-
+
template <typename CharT>
- inline CharT
+ inline CharT
tolower_(CharT c)
- {
- using namespace std;
- return to_char_type<CharT>(tolower(to_int_type(c)));
+ {
+ using namespace std;
+ return to_char_type<CharT>(tolower(to_int_type(c)));
}
-
+
template <typename CharT>
- inline CharT
+ inline CharT
toupper_(CharT c)
- {
- using namespace std;
- return to_char_type<CharT>(toupper(to_int_type(c)));
+ {
+ using namespace std;
+ return to_char_type<CharT>(toupper(to_int_type(c)));
}
#if !defined(BOOST_NO_CWCTYPE)
- inline bool
+ inline bool
isalnum_(wchar_t c)
- {
- using namespace std;
- return iswalnum(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return iswalnum(to_int_type(c)) ? true : false;
}
-
- inline bool
+
+ inline bool
isalpha_(wchar_t c)
- {
- using namespace std;
- return iswalpha(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return iswalpha(to_int_type(c)) ? true : false;
}
-
- inline bool
+
+ inline bool
iscntrl_(wchar_t c)
- {
- using namespace std;
- return iswcntrl(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return iswcntrl(to_int_type(c)) ? true : false;
}
-
- inline bool
+
+ inline bool
isdigit_(wchar_t c)
- {
- using namespace std;
- return iswdigit(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return iswdigit(to_int_type(c)) ? true : false;
}
-
- inline bool
+
+ inline bool
isgraph_(wchar_t c)
- {
- using namespace std;
- return iswgraph(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return iswgraph(to_int_type(c)) ? true : false;
}
-
- inline bool
+
+ inline bool
islower_(wchar_t c)
- {
- using namespace std;
- return iswlower(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return iswlower(to_int_type(c)) ? true : false;
}
-
- inline bool
+
+ inline bool
isprint_(wchar_t c)
- {
- using namespace std;
- return iswprint(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return iswprint(to_int_type(c)) ? true : false;
}
-
- inline bool
+
+ inline bool
ispunct_(wchar_t c)
- {
- using namespace std;
- return iswpunct(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return iswpunct(to_int_type(c)) ? true : false;
}
-
- inline bool
+
+ inline bool
isspace_(wchar_t c)
- {
- using namespace std;
- return iswspace(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return iswspace(to_int_type(c)) ? true : false;
}
-
- inline bool
+
+ inline bool
isupper_(wchar_t c)
- {
- using namespace std;
- return iswupper(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return iswupper(to_int_type(c)) ? true : false;
}
-
- inline bool
+
+ inline bool
isxdigit_(wchar_t c)
- {
- using namespace std;
- return iswxdigit(to_int_type(c)) ? true : false;
+ {
+ using namespace std;
+ return iswxdigit(to_int_type(c)) ? true : false;
}
-
- inline bool
+
+ inline bool
isblank_(wchar_t c)
- {
- return (c == L' ' || c == L'\t');
- }
-
- inline wchar_t
+ {
+ return (c == L' ' || c == L'\t');
+ }
+
+ inline wchar_t
tolower_(wchar_t c)
- {
- using namespace std;
- return to_char_type<wchar_t>(towlower(to_int_type(c)));
+ {
+ using namespace std;
+ return to_char_type<wchar_t>(towlower(to_int_type(c)));
}
-
- inline wchar_t
+
+ inline wchar_t
toupper_(wchar_t c)
- {
- using namespace std;
- return to_char_type<wchar_t>(towupper(to_int_type(c)));
+ {
+ using namespace std;
+ return to_char_type<wchar_t>(towupper(to_int_type(c)));
}
#endif // !defined(BOOST_NO_CWCTYPE)
}}} // namespace boost::spirit::impl
+#ifdef BOOST_MSVC
+#pragma warning (pop)
+#endif
+
#endif
Modified: trunk/boost/spirit/core/primitives/primitives.hpp
==============================================================================
--- trunk/boost/spirit/core/primitives/primitives.hpp (original)
+++ trunk/boost/spirit/core/primitives/primitives.hpp 2007-08-11 21:24:22 EDT (Sat, 11 Aug 2007)
@@ -17,6 +17,7 @@
#include <boost/spirit/core/primitives/impl/primitives.ipp>
#ifdef BOOST_MSVC
+#pragma warning (push)
#pragma warning(disable : 4512)
#endif
@@ -79,8 +80,8 @@
template <typename T>
bool test(T ch) const
- {
- return !positive.test(ch);
+ {
+ return !positive.test(ch);
}
positive_t const positive;
@@ -113,8 +114,8 @@
template <typename T>
bool test(T ch_) const
- {
- return ch_ == ch;
+ {
+ return ch_ == ch;
}
CharT ch;
@@ -123,8 +124,8 @@
template <typename CharT>
inline chlit<CharT>
ch_p(CharT ch)
- {
- return chlit<CharT>(ch);
+ {
+ return chlit<CharT>(ch);
}
// This should take care of ch_p("a") "bugs"
@@ -154,8 +155,8 @@
template <typename T>
bool test(T ch) const
- {
- return !(CharT(ch) < first) && !(last < CharT(ch));
+ {
+ return !(CharT(ch) < first) && !(last < CharT(ch));
}
CharT first;
@@ -165,8 +166,8 @@
template <typename CharT>
inline range<CharT>
range_p(CharT first, CharT last)
- {
- return range<CharT>(first, last);
+ {
+ return range<CharT>(first, last);
}
///////////////////////////////////////////////////////////////////////////
@@ -208,15 +209,15 @@
template <typename CharT>
inline chseq<CharT const*>
chseq_p(CharT const* str)
- {
- return chseq<CharT const*>(str);
+ {
+ return chseq<CharT const*>(str);
}
template <typename IteratorT>
inline chseq<IteratorT>
chseq_p(IteratorT first, IteratorT last)
- {
- return chseq<IteratorT>(first, last);
+ {
+ return chseq<IteratorT>(first, last);
}
///////////////////////////////////////////////////////////////////////////
@@ -254,22 +255,22 @@
template <typename CharT>
inline strlit<CharT const*>
str_p(CharT const* str)
- {
- return strlit<CharT const*>(str);
+ {
+ return strlit<CharT const*>(str);
}
template <typename CharT>
inline strlit<CharT *>
str_p(CharT * str)
- {
- return strlit<CharT *>(str);
+ {
+ return strlit<CharT *>(str);
}
template <typename IteratorT>
inline strlit<IteratorT>
str_p(IteratorT first, IteratorT last)
- {
- return strlit<IteratorT>(first, last);
+ {
+ return strlit<IteratorT>(first, last);
}
// This should take care of str_p('a') "bugs"
@@ -294,8 +295,8 @@
template <typename ScannerT>
typename parser_result<self_t, ScannerT>::type
parse(ScannerT const& scan) const
- {
- return scan.no_match();
+ {
+ return scan.no_match();
}
};
@@ -314,8 +315,8 @@
template <typename CharT>
bool test(CharT) const
- {
- return true;
+ {
+ return true;
}
};
@@ -340,8 +341,8 @@
template <typename CharT>
bool test(CharT ch) const
- {
- return impl::isalnum_(ch);
+ {
+ return impl::isalnum_(ch);
}
};
@@ -360,8 +361,8 @@
template <typename CharT>
bool test(CharT ch) const
- {
- return impl::isalpha_(ch);
+ {
+ return impl::isalpha_(ch);
}
};
@@ -380,8 +381,8 @@
template <typename CharT>
bool test(CharT ch) const
- {
- return impl::iscntrl_(ch);
+ {
+ return impl::iscntrl_(ch);
}
};
@@ -400,8 +401,8 @@
template <typename CharT>
bool test(CharT ch) const
- {
- return impl::isdigit_(ch);
+ {
+ return impl::isdigit_(ch);
}
};
@@ -420,8 +421,8 @@
template <typename CharT>
bool test(CharT ch) const
- {
- return impl::isgraph_(ch);
+ {
+ return impl::isgraph_(ch);
}
};
@@ -440,8 +441,8 @@
template <typename CharT>
bool test(CharT ch) const
- {
- return impl::islower_(ch);
+ {
+ return impl::islower_(ch);
}
};
@@ -460,7 +461,7 @@
template <typename CharT>
bool test(CharT ch) const
- {
+ {
return impl::isprint_(ch);
}
};
@@ -480,8 +481,8 @@
template <typename CharT>
bool test(CharT ch) const
- {
- return impl::ispunct_(ch);
+ {
+ return impl::ispunct_(ch);
}
};
@@ -500,7 +501,7 @@
template <typename CharT>
bool test(CharT ch) const
- {
+ {
return impl::isblank_(ch);
}
};
@@ -520,8 +521,8 @@
template <typename CharT>
bool test(CharT ch) const
- {
- return impl::isspace_(ch);
+ {
+ return impl::isspace_(ch);
}
};
@@ -540,8 +541,8 @@
template <typename CharT>
bool test(CharT ch) const
- {
- return impl::isupper_(ch);
+ {
+ return impl::isupper_(ch);
}
};
@@ -560,8 +561,8 @@
template <typename CharT>
bool test(CharT ch) const
- {
- return impl::isxdigit_(ch);
+ {
+ return impl::isxdigit_(ch);
}
};
@@ -636,10 +637,14 @@
///////////////////////////////////////////////////////////////////////////
inline strlit<char const*> const
pizza_p(char const* your_favorite_pizza)
- {
- return your_favorite_pizza;
+ {
+ return your_favorite_pizza;
}
}} // namespace boost::spirit
+#ifdef BOOST_MSVC
+#pragma warning (pop)
+#endif
+
#endif
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk