Permalink
Browse files

Imported upstream 1.9.102

Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
  • Loading branch information...
1 parent b3aebf0 commit 52036585d60c658a0044384d343df1f2f0d85353 Stefan Naewe committed Aug 2, 2012
View
30 CHANGES.txt
@@ -2,7 +2,7 @@
STLSoft - Changes
; Created: 29th March 2002
-; Updated: 30th September 2010
+; Updated: 8th November 2010
============================================================================
@@ -19,6 +19,34 @@ STLSoft - Changes
============================================================================
+Changes for 1.9.102 (8th November 2010)
+
+Summary:
+========
+
+ * added wide string string access shims for std::exception
+ * fixed infinite-recursion defects in ambient shim function definitions
+ * other compatibility fixes
+
+Changes:
+========
+
+ STLSoft:
+ ========
+
+ ~ include/stlsoft/shims/access/string/std/exception.hpp:
+ + added wide string string access shims for std::exception
+ ~ fixed infinite-recursion defects in ambient shim function definitions
+
+ ~ include/stlsoft/util/std/library_discriminator.hpp:
+ ~ fixed VC9 (in)compatibility (which occurred only when including <functional> *before* STLSoft header files)
+
+ ~ include/winstl/error/error_functions.h:
+ ~ fixed incorrectly specified obsolete symbols
+
+
+============================================================================
+
Changes for 1.9.101 (30th September 2010)
Summary:
View
10 HISTORY.txt
@@ -2,11 +2,19 @@
STLSoft - History
; Created: 29th March 2002
-; Updated: 30th September 2010
+; Updated: 8th November 2010
============================================================================
+8th November 2010 - 1.9.102 released
+------------------------------------
+
+ * added wide string string access shims for std::exception
+ * fixed infinite-recursion defects in ambient shim function definitions
+ * other compatibility fixes
+
+
30th September 2010 - 1.9.101 released
--------------------------------------
View
12 INSTALL.txt
@@ -2,7 +2,7 @@
STLSoft - Install
; Created: 29th March 2002
-; Updated: 30th September 2010
+; Updated: 8th November 2010
============================================================================
@@ -11,16 +11,16 @@ STLSoft - Install
It is recommended that you define an STLSOFT environment variable.
For example, if you're using UNIX and you install
- to /usr/local/stlsoft/stlsoft-1.9.101 then you should set the environment
- variable STLSOFT to /usr/local/stlsoft/stlsoft-1.9.101 in which case the
+ to /usr/local/stlsoft/stlsoft-1.9.102 then you should set the environment
+ variable STLSOFT to /usr/local/stlsoft/stlsoft-1.9.102 in which case the
file stlsoft/stlsoft.h will be located in
$STLSOFT/include/stlsoft/stlsoft.h
Conversely, if you're using Windows and you intall
- to C:\3pty\STLSoft\stlsoft-1.9.101 then you should set the environment
- variable STLSoft to C:\3pty\STLSoft\stlsoft-1.9.101 in which case the
+ to C:\3pty\STLSoft\stlsoft-1.9.102 then you should set the environment
+ variable STLSoft to C:\3pty\STLSoft\stlsoft-1.9.102 in which case the
file stlsoft/stlsoft.h will be located in
- C:\3pty\STLSoft\stlsoft-1.9.101\stlsoft\stlsoft.h
+ C:\3pty\STLSoft\stlsoft-1.9.102\stlsoft\stlsoft.h
The makefiles / project files of several other open-source projects expect
this symbol, including:
View
4 NEWS.txt
@@ -2,13 +2,15 @@
STLSoft - News
; Created: 29th March 2002
-; Updated: 30th September 2010
+; Updated: 8th November 2010
============================================================================
News:
+ 8th November 2010 - Release of STLSoft 1.9.102
+
30th September 2010 - Release of STLSoft 1.9.101
12th August 2010 - Release of STLSoft 1.9.100
View
280 include/mfcstl/shims/access/string/CException.hpp
@@ -0,0 +1,280 @@
+/* /////////////////////////////////////////////////////////////////////////
+ * File: mfcstl/shims/access/string/CException.hpp
+ *
+ * Purpose: Contains classes and functions for dealing with MFC
+ * exceptions.
+ *
+ * Created: 15th September 2010
+ * Updated: 15th September 2010
+ *
+ * Home: http://stlsoft.org/
+ *
+ * Copyright (c) 2010, Matthew Wilson and Synesis Software
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of
+ * any contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * ////////////////////////////////////////////////////////////////////// */
+
+
+/** \file mfcstl/shims/access/string/CException.hpp
+ *
+ * \brief [C++] Definition of the string access shims for
+ * <code>CException</code>
+ * (\ref group__concept__shim__string_access "String Access Shims" Concept).
+ */
+
+#ifndef MFCSTL_INCL_MFCSTL_SHIMS_ACCESS_STRING_HPP_CEXCEPTION
+#define MFCSTL_INCL_MFCSTL_SHIMS_ACCESS_STRING_HPP_CEXCEPTION
+
+#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
+# define MFCSTL_VER_MFCSTL_SHIMS_ACCESS_STRING_HPP_CEXCEPTION_MAJOR 1
+# define MFCSTL_VER_MFCSTL_SHIMS_ACCESS_STRING_HPP_CEXCEPTION_MINOR 0
+# define MFCSTL_VER_MFCSTL_SHIMS_ACCESS_STRING_HPP_CEXCEPTION_REVISION 1
+# define MFCSTL_VER_MFCSTL_SHIMS_ACCESS_STRING_HPP_CEXCEPTION_EDIT 90
+#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
+
+/* /////////////////////////////////////////////////////////////////////////
+ * Includes
+ */
+
+#ifndef MFCSTL_INCL_MFCSTL_HPP_MFCSTL
+# include <mfcstl/mfcstl.hpp>
+#endif /* !MFCSTL_INCL_MFCSTL_HPP_MFCSTL */
+#ifndef STLSOFT_INCL_STLSOFT_MEMORY_HPP_AUTO_BUFFER
+# include <stlsoft/memory/auto_buffer.hpp>
+#endif /* !STLSOFT_INCL_STLSOFT_MEMORY_HPP_AUTO_BUFFER */
+#ifndef STLSOFT_INCL_STLSOFT_SHIMS_ACCESS_STRING_H_FWD
+# include <stlsoft/shims/access/string/fwd.h>
+#endif /* !STLSOFT_INCL_STLSOFT_SHIMS_ACCESS_STRING_H_FWD */
+#ifndef STLSOFT_INCL_STLSOFT_STRING_HPP_SHIM_STRING
+# include <stlsoft/string/shim_string.hpp>
+#endif /* !STLSOFT_INCL_STLSOFT_STRING_HPP_SHIM_STRING */
+
+/* /////////////////////////////////////////////////////////////////////////
+ * Namespace
+ */
+
+#ifndef _MFCSTL_NO_NAMESPACE
+# if defined(_STLSOFT_NO_NAMESPACE) || \
+ defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
+/* There is no stlsoft namespace, so must define ::mfcstl */
+namespace mfcstl
+{
+# else
+/* Define stlsoft::mfcstl_project */
+
+namespace stlsoft
+{
+
+namespace mfcstl_project
+{
+
+# endif /* _STLSOFT_NO_NAMESPACE */
+#endif /* !_MFCSTL_NO_NAMESPACE */
+
+/* /////////////////////////////////////////////////////////////////////////
+ * Constants
+ */
+
+ms_size_t const MFCSTL_EXCEPTION_SAS_CCH = 128;
+
+/* /////////////////////////////////////////////////////////////////////////
+ * Functions
+ */
+
+#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
+struct ximpl_CException_sas_util
+{
+ typedef stlsoft_ns_qual(auto_buffer)<TCHAR, MFCSTL_EXCEPTION_SAS_CCH> buffer_t;
+ typedef stlsoft_ns_qual(basic_shim_string)<TCHAR, MFCSTL_EXCEPTION_SAS_CCH> shim_string_t;
+
+ static shim_string_t create_(CException const& x)
+ {
+ buffer_t buff(buffer_t::internal_size());
+
+ for(; !buff.empty(); buff.resize(1u + 2* buff.size()))
+ {
+ buff[buff.size() - 1] = '~';
+
+ if(!const_cast<CException&>(x).GetErrorMessage(&buff[0], buff.size(), NULL))
+ {
+ }
+ else if('\0' != buff[buff.size() - 1])
+ {
+ break;
+ }
+ }
+
+ return shim_string_t(buff.data());
+ }
+};
+#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
+
+/* /////////////////////////////////////////////////////////////////////////
+ * c_str_data
+ *
+ * This can be applied to an expression, and the return value is either a
+ * pointer to the character string or to an empty string.
+ */
+
+/* CException */
+/** \brief \ref group__concept__shim__string_access__c_str_data for CException
+ *
+ * \ingroup group__concept__shim__string_access
+ *
+ */
+inline stlsoft_ns_qual(basic_shim_string)<TCHAR, MFCSTL_EXCEPTION_SAS_CCH> c_str_data(CException const& x)
+{
+ return ximpl_CException_sas_util::create_(x);
+}
+
+#if defined(UNICODE)
+inline stlsoft_ns_qual(basic_shim_string)<TCHAR, MFCSTL_EXCEPTION_SAS_CCH> c_str_data_w(CException const& x)
+#else /* ? UNICODE */
+inline stlsoft_ns_qual(basic_shim_string)<TCHAR, MFCSTL_EXCEPTION_SAS_CCH> c_str_data_a(CException const& x)
+#endif /* UNICODE */
+{
+ return c_str_data(x);
+}
+
+/* /////////////////////////////////////////////////////////////////////////
+ * c_str_len
+ *
+ * This can be applied to an expression, and the return value is the number of
+ * characters in the character string in the expression.
+ */
+
+/* CException */
+/** \brief \ref group__concept__shim__string_access__c_str_len for CException
+ *
+ * \ingroup group__concept__shim__string_access
+ *
+ */
+inline stlsoft_ns_qual(basic_shim_string)<TCHAR, MFCSTL_EXCEPTION_SAS_CCH> c_str_len(CException const& x)
+{
+ return ximpl_CException_sas_util::create_(x);
+}
+
+#if defined(UNICODE)
+inline stlsoft_ns_qual(basic_shim_string)<TCHAR, MFCSTL_EXCEPTION_SAS_CCH> c_str_len_w(CException const& x)
+#else /* ? UNICODE */
+inline stlsoft_ns_qual(basic_shim_string)<TCHAR, MFCSTL_EXCEPTION_SAS_CCH> c_str_len_a(CException const& x)
+#endif /* UNICODE */
+{
+ return c_str_len(x);
+}
+
+/* /////////////////////////////////////////////////////////////////////////
+ * c_str_ptr
+ *
+ * This can be applied to an expression, and the return value is either a
+ * pointer to the character string or to an empty string.
+ */
+
+/* CException */
+/** \brief \ref group__concept__shim__string_access__c_str_ptr for CException
+ *
+ * \ingroup group__concept__shim__string_access
+ *
+ */
+inline stlsoft_ns_qual(basic_shim_string)<TCHAR, MFCSTL_EXCEPTION_SAS_CCH> c_str_ptr(CException const& x)
+{
+ return ximpl_CException_sas_util::create_(x);
+}
+
+#if defined(UNICODE)
+inline stlsoft_ns_qual(basic_shim_string)<TCHAR, MFCSTL_EXCEPTION_SAS_CCH> c_str_ptr_w(CException const& x)
+#else /* ? UNICODE */
+inline stlsoft_ns_qual(basic_shim_string)<TCHAR, MFCSTL_EXCEPTION_SAS_CCH> c_str_ptr_a(CException const& x)
+#endif /* UNICODE */
+{
+ return c_str_ptr(x);
+}
+
+/* ////////////////////////////////////////////////////////////////////// */
+
+#ifndef _MFCSTL_NO_NAMESPACE
+# if defined(_STLSOFT_NO_NAMESPACE) || \
+ defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
+} // namespace mfcstl
+# else
+} // namespace stlsoft::mfcstl_project
+} // namespace stlsoft
+# endif /* _STLSOFT_NO_NAMESPACE */
+#endif /* !_MFCSTL_NO_NAMESPACE */
+
+/* /////////////////////////////////////////////////////////////////////////
+ * Namespace
+ *
+ * The string access shims exist either in the stlsoft namespace, or in the
+ * global namespace. This is required by the lookup rules.
+ *
+ */
+
+#ifndef _MFCSTL_NO_NAMESPACE
+# if !defined(_STLSOFT_NO_NAMESPACE) && \
+ !defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
+namespace stlsoft
+{
+# else /* ? _STLSOFT_NO_NAMESPACE */
+/* There is no stlsoft namespace, so must define in the global namespace */
+# endif /* !_STLSOFT_NO_NAMESPACE */
+
+using ::mfcstl::c_str_data;
+#if defined(UNICODE)
+using ::mfcstl::c_str_data_w;
+#else /* ? UNICODE */
+using ::mfcstl::c_str_data_a;
+#endif /* UNICODE */
+
+using ::mfcstl::c_str_len;
+#if defined(UNICODE)
+using ::mfcstl::c_str_len_w;
+#else /* ? UNICODE */
+using ::mfcstl::c_str_len_a;
+#endif /* UNICODE */
+
+using ::mfcstl::c_str_ptr;
+#if defined(UNICODE)
+using ::mfcstl::c_str_ptr_w;
+#else /* ? UNICODE */
+using ::mfcstl::c_str_ptr_a;
+#endif /* UNICODE */
+
+
+# if !defined(_STLSOFT_NO_NAMESPACE) && \
+ !defined(STLSOFT_DOCUMENTATION_SKIP_SECTION)
+} // namespace stlsoft
+# else /* ? _STLSOFT_NO_NAMESPACE */
+/* There is no stlsoft namespace, so must define in the global namespace */
+# endif /* !_STLSOFT_NO_NAMESPACE */
+#endif /* !_MFCSTL_NO_NAMESPACE */
+
+/* ////////////////////////////////////////////////////////////////////// */
+
+#endif /* !MFCSTL_INCL_MFCSTL_SHIMS_ACCESS_STRING_HPP_CEXCEPTION */
+
+/* ///////////////////////////// end of file //////////////////////////// */
View
98 include/stlsoft/shims/access/string/std/exception.hpp
@@ -4,11 +4,11 @@
* Purpose: Contains the string access shims for std::exception.
*
* Created: 2nd May 2003
- * Updated: 10th August 2009
+ * Updated: 8th November 2010
*
* Home: http://stlsoft.org/
*
- * Copyright (c) 2003-2009, Matthew Wilson and Synesis Software
+ * Copyright (c) 2003-2010, Matthew Wilson and Synesis Software
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -50,9 +50,9 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define _STLSOFT_VER_STLSOFT_SHIMS_ACCESS_STRING_STD_HPP_EXCEPTION_MAJOR 2
-# define _STLSOFT_VER_STLSOFT_SHIMS_ACCESS_STRING_STD_HPP_EXCEPTION_MINOR 1
-# define _STLSOFT_VER_STLSOFT_SHIMS_ACCESS_STRING_STD_HPP_EXCEPTION_REVISION 3
-# define _STLSOFT_VER_STLSOFT_SHIMS_ACCESS_STRING_STD_HPP_EXCEPTION_EDIT 35
+# define _STLSOFT_VER_STLSOFT_SHIMS_ACCESS_STRING_STD_HPP_EXCEPTION_MINOR 2
+# define _STLSOFT_VER_STLSOFT_SHIMS_ACCESS_STRING_STD_HPP_EXCEPTION_REVISION 2
+# define _STLSOFT_VER_STLSOFT_SHIMS_ACCESS_STRING_STD_HPP_EXCEPTION_EDIT 38
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -68,6 +68,9 @@
#ifndef STLSOFT_INCL_STLSOFT_SHIMS_ACCESS_STRING_STD_H_C_STRING
# include <stlsoft/shims/access/string/std/c_string.h>
#endif /* !STLSOFT_INCL_STLSOFT_SHIMS_ACCESS_STRING_STD_H_C_STRING */
+#ifndef STLSOFT_INCL_STLSOFT_STRING_HPP_SHIM_STRING
+# include <stlsoft/string/shim_string.hpp>
+#endif /* !STLSOFT_INCL_STLSOFT_STRING_HPP_SHIM_STRING */
#ifndef STLSOFT_INCL_EXCEPTION
# define STLSOFT_INCL_EXCEPTION
@@ -108,11 +111,35 @@ inline ss_char_a_t const* c_str_data_a(stlsoft_ns_qual_std(exception) const& x)
*
* \ingroup group__concept__shim__string_access
*
+ * \return None-NULL, non-mutating pointer to a C-style
+ * string of <code>wchar_t</code>.
+ */
+inline
+basic_shim_string<ss_char_w_t, 10>
+c_str_data_w(stlsoft_ns_qual_std(exception) const& x)
+{
+ size_t const len = ::mbstowcs(NULL, x.what(), 0);
+
+ basic_shim_string<ss_char_w_t, 10> s(len);
+
+ size_t const len2 = ::mbstowcs(s.data(), x.what(), 1u + s.size());
+
+ STLSOFT_ASSERT(len2 == s.size());
+ STLSOFT_SUPPRESS_UNUSED(len2);
+
+ return s;
+}
+
+/** \brief \ref group__concept__shim__string_access__c_str_data function
+ * for <code>std::exception</code>.
+ *
+ * \ingroup group__concept__shim__string_access
+ *
* \return None-NULL, non-mutating pointer to a C-style string.
*/
inline ss_char_a_t const* c_str_data(stlsoft_ns_qual_std(exception) const& x)
{
- return c_str_data(x);
+ return c_str_data_a(x);
}
/* /////////////////////////////////////////////////////////////////////////
@@ -139,11 +166,25 @@ inline ss_size_t c_str_len_a(stlsoft_ns_qual_std(exception) const& x)
*
* \ingroup group__concept__shim__string_access
*
+ * \return Length (in bytes) of the string <code>s</code>.
+ */
+inline
+ss_size_t
+c_str_len_w(stlsoft_ns_qual_std(exception) const& x)
+{
+ return ::mbstowcs(NULL, x.what(), 0);
+}
+
+/** \brief \ref group__concept__shim__string_access__c_str_len function
+ * for <code>std::exception</code>.
+ *
+ * \ingroup group__concept__shim__string_access
+ *
* \return Length of the string <code>s</code>.
*/
inline ss_size_t c_str_len(stlsoft_ns_qual_std(exception) const& x)
{
- return c_str_len(x);
+ return c_str_len_a(x);
}
/* /////////////////////////////////////////////////////////////////////////
@@ -172,11 +213,26 @@ inline ss_char_a_t const* c_str_ptr_a(stlsoft_ns_qual_std(exception) const& x)
* \ingroup group__concept__shim__string_access
*
* \return None-NULL, non-mutating pointer to a nul-terminated C-style
+ * string of <code>wchar_t</code>.
+ */
+inline
+basic_shim_string<ss_char_w_t, 10>
+c_str_ptr_w(stlsoft_ns_qual_std(exception) const& x)
+{
+ return c_str_data_w(x);
+}
+
+/** \brief \ref group__concept__shim__string_access__c_str_ptr function
+ * for <code>std::exception</code>.
+ *
+ * \ingroup group__concept__shim__string_access
+ *
+ * \return None-NULL, non-mutating pointer to a nul-terminated C-style
* string.
*/
inline ss_char_a_t const* c_str_ptr(stlsoft_ns_qual_std(exception) const& x)
{
- return c_str_ptr(x);
+ return c_str_ptr_a(x);
}
/* /////////////////////////////////////////////////////////////////////////
@@ -205,11 +261,35 @@ inline ss_char_a_t const* c_str_ptr_null_a(stlsoft_ns_qual_std(exception) const&
* \ingroup group__concept__shim__string_access
*
* \return Possibly NULL, non-mutating pointer to a nul-terminated C-style
+ * string of <code>wchar_t</code>.
+ */
+inline
+basic_shim_string<ss_char_w_t, 10, true>
+c_str_ptr_null_w(stlsoft_ns_qual_std(exception) const& x)
+{
+ size_t const len = ::mbstowcs(NULL, x.what(), 0);
+
+ basic_shim_string<ss_char_w_t, 10, true> s(len);
+
+ size_t const len2 = ::mbstowcs(s.data(), x.what(), 1u + s.size());
+
+ STLSOFT_ASSERT(len2 == s.size());
+ STLSOFT_SUPPRESS_UNUSED(len2);
+
+ return s;
+}
+
+/** \brief \ref group__concept__shim__string_access__c_str_ptr_null function
+ * for <code>std::exception</code>.
+ *
+ * \ingroup group__concept__shim__string_access
+ *
+ * \return Possibly NULL, non-mutating pointer to a nul-terminated C-style
* string.
*/
inline ss_char_a_t const* c_str_ptr_null(stlsoft_ns_qual_std(exception) const& x)
{
- return c_str_ptr_null(x);
+ return c_str_ptr_null_a(x);
}
/* ////////////////////////////////////////////////////////////////////// */
View
11 include/stlsoft/stlsoft.h
@@ -6,7 +6,7 @@
* types.
*
* Created: 15th January 2002
- * Updated: 30th September 2010
+ * Updated: 8th November 2010
*
* Home: http://stlsoft.org/
*
@@ -54,8 +54,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define STLSOFT_VER_STLSOFT_H_STLSOFT_MAJOR 3
# define STLSOFT_VER_STLSOFT_H_STLSOFT_MINOR 23
-# define STLSOFT_VER_STLSOFT_H_STLSOFT_REVISION 2
-# define STLSOFT_VER_STLSOFT_H_STLSOFT_EDIT 408
+# define STLSOFT_VER_STLSOFT_H_STLSOFT_REVISION 4
+# define STLSOFT_VER_STLSOFT_H_STLSOFT_EDIT 410
#else /* ? STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* # include "./internal/doxygen_defs.h" */
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
@@ -264,12 +264,13 @@
# define _STLSOFT_VER_1_9_99 0x010963ff /*!< Version 1.9.99 (21st June 2010) */
# define _STLSOFT_VER_1_9_100 0x010964ff /*!< Version 1.9.100 (29th July 2010) */
# define _STLSOFT_VER_1_9_101 0x010965ff /*!< Version 1.9.101 (30th September 2010) */
+# define _STLSOFT_VER_1_9_102 0x010966ff /*!< Version 1.9.102 (8th November 2010) */
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
#define _STLSOFT_VER_MAJOR 1
#define _STLSOFT_VER_MINOR 9
-#define _STLSOFT_VER_REVISION 101
-#define _STLSOFT_VER _STLSOFT_VER_1_9_101
+#define _STLSOFT_VER_REVISION 102
+#define _STLSOFT_VER _STLSOFT_VER_1_9_102
/* /////////////////////////////////////////////////////////////////////////
* Basic macros
View
20 include/stlsoft/string/container_slice_functions.hpp
@@ -4,13 +4,13 @@
* Purpose: String container slice functions.
*
* Created: 25th April 2005
- * Updated: 10th August 2009
+ * Updated: 12th October 2010
*
* Thanks: To Pablo Aguilar for inspiration for these functions.
*
* Home: http://stlsoft.org/
*
- * Copyright (c) 2005-2009, Matthew Wilson and Synesis Software
+ * Copyright (c) 2005-2010, Matthew Wilson and Synesis Software
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -53,7 +53,7 @@
# define STLSOFT_VER_INCL_STLSOFT_STRING_HPP_CONTAINER_SLICE_FUNCTIONS_MAJOR 2
# define STLSOFT_VER_INCL_STLSOFT_STRING_HPP_CONTAINER_SLICE_FUNCTIONS_MINOR 1
# define STLSOFT_VER_INCL_STLSOFT_STRING_HPP_CONTAINER_SLICE_FUNCTIONS_REVISION 3
-# define STLSOFT_VER_INCL_STLSOFT_STRING_HPP_CONTAINER_SLICE_FUNCTIONS_EDIT 22
+# define STLSOFT_VER_INCL_STLSOFT_STRING_HPP_CONTAINER_SLICE_FUNCTIONS_EDIT 23
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -131,7 +131,7 @@ namespace stlsoft
template <ss_typename_param_k S>
inline ss_size_t left_len(S const& s, ss_size_t n)
{
- const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
+ const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
if(n > len)
{
@@ -168,7 +168,7 @@ inline S right(S const& s, ss_size_t n)
{
typedef string_traits<S> traits_t;
- const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
+ const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
if(n > len)
{
@@ -187,7 +187,7 @@ inline S mid(S const& s, ss_size_t pos, ss_size_t n)
{
typedef string_traits<S> traits_t;
- const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
+ const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
if(pos > len)
{
@@ -265,7 +265,7 @@ inline _STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE<ss_char_a_t> ri
{
typedef _STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE<ss_char_a_t> string_t;
- const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
+ const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
if(n > len)
{
@@ -292,7 +292,7 @@ inline _STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE<ss_char_w_t> ri
{
typedef _STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE<ss_char_w_t> string_t;
- const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
+ const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
if(n > len)
{
@@ -320,7 +320,7 @@ inline _STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE<ss_char_a_t> mi
{
typedef _STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE<ss_char_a_t> string_t;
- const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
+ const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
if(pos > len)
{
@@ -352,7 +352,7 @@ inline _STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE<ss_char_w_t> mi
{
typedef _STLSOFT_STRING_CONTAINER_SLICE_FUNCTIONS_RETURN_TEMPLATE<ss_char_w_t> string_t;
- const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
+ const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
if(pos > len)
{
View
60 include/stlsoft/string/view_slice_functions.hpp
@@ -4,14 +4,14 @@
* Purpose: String view slice functions.
*
* Created: 25th April 2005
- * Updated: 10th August 2009
+ * Updated: 12th October 2010
*
* Thanks: To Pablo Aguilar for inspiration for these functions, and
* collaboration on their implementation.
*
* Home: http://stlsoft.org/
*
- * Copyright (c) 2005-2009, Matthew Wilson and Synesis Software
+ * Copyright (c) 2005-2010, Matthew Wilson and Synesis Software
* Copyright (c) 2005, Pablo Aguilar
* All rights reserved.
*
@@ -54,8 +54,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define STLSOFT_VER_INCL_STLSOFT_STRING_HPP_VIEW_SLICE_FUNCTIONS_MAJOR 2
# define STLSOFT_VER_INCL_STLSOFT_STRING_HPP_VIEW_SLICE_FUNCTIONS_MINOR 1
-# define STLSOFT_VER_INCL_STLSOFT_STRING_HPP_VIEW_SLICE_FUNCTIONS_REVISION 4
-# define STLSOFT_VER_INCL_STLSOFT_STRING_HPP_VIEW_SLICE_FUNCTIONS_EDIT 24
+# define STLSOFT_VER_INCL_STLSOFT_STRING_HPP_VIEW_SLICE_FUNCTIONS_REVISION 5
+# define STLSOFT_VER_INCL_STLSOFT_STRING_HPP_VIEW_SLICE_FUNCTIONS_EDIT 25
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -117,14 +117,15 @@ struct string_view_helper_traits
typedef basic_string_view<char_type> view_type;
};
-#if 0
+# if !defined(STLSOFT_COMPILER_IS_MSVC) || \
+ _MSC_VER >= 1310
STLSOFT_TEMPLATE_SPECIALISATION
struct string_view_helper_traits<ss_char_a_t*>
{
typedef ss_char_a_t char_type;
typedef basic_string_view<char_type> view_type;
};
-#endif /* 0 */
+# endif /* compiler */
STLSOFT_TEMPLATE_SPECIALISATION
struct string_view_helper_traits<ss_char_a_t const*>
@@ -133,14 +134,30 @@ struct string_view_helper_traits<ss_char_a_t const*>
typedef basic_string_view<char_type> view_type;
};
-#if 0
+# ifdef STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT
+template <size_t N>
+struct string_view_helper_traits<ss_char_a_t [N]>
+{
+ typedef ss_char_a_t char_type;
+ typedef basic_string_view<char_type> view_type;
+};
+template <size_t N>
+struct string_view_helper_traits<ss_char_a_t const [N]>
+{
+ typedef ss_char_a_t char_type;
+ typedef basic_string_view<char_type> view_type;
+};
+# endif /* STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT */
+
+# if !defined(STLSOFT_COMPILER_IS_MSVC) || \
+ _MSC_VER >= 1310
STLSOFT_TEMPLATE_SPECIALISATION
struct string_view_helper_traits<ss_char_w_t*>
{
typedef ss_char_w_t char_type;
typedef basic_string_view<char_type> view_type;
};
-#endif /* 0 */
+# endif /* compiler */
STLSOFT_TEMPLATE_SPECIALISATION
struct string_view_helper_traits<ss_char_w_t const*>
@@ -149,6 +166,21 @@ struct string_view_helper_traits<ss_char_w_t const*>
typedef basic_string_view<char_type> view_type;
};
+# ifdef STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT
+template <size_t N>
+struct string_view_helper_traits<ss_char_w_t [N]>
+{
+ typedef ss_char_w_t char_type;
+ typedef basic_string_view<char_type> view_type;
+};
+template <size_t N>
+struct string_view_helper_traits<ss_char_w_t const [N]>
+{
+ typedef ss_char_w_t char_type;
+ typedef basic_string_view<char_type> view_type;
+};
+# endif /* STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT */
+
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -159,7 +191,7 @@ struct string_view_helper_traits<ss_char_w_t const*>
template <ss_typename_param_k C>
inline basic_string_view<C> left_view_helper(C const* s, ss_size_t n)
{
- const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
+ const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
if(n > len)
{
@@ -195,7 +227,7 @@ inline ss_typename_type_ret_k string_view_helper_traits<S>::view_type left_view(
typedef string_view_helper_traits<S> traits_t;
typedef ss_typename_type_k traits_t::view_type view_t;
- const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
+ const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
if(n > len)
{
@@ -210,7 +242,7 @@ inline ss_typename_type_ret_k string_view_helper_traits<S>::view_type left_view(
template <ss_typename_param_k C>
inline basic_string_view<C> right_view_helper(C const* s, ss_size_t n)
{
- const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
+ const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
if(n > len)
{
@@ -251,7 +283,7 @@ inline ss_typename_type_ret_k string_view_helper_traits<S>::view_type right_view
typedef string_view_helper_traits<S> traits_t;
typedef ss_typename_type_k traits_t::view_type view_t;
- const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
+ const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
ss_size_t off = 0;
if(n > len)
@@ -271,7 +303,7 @@ inline ss_typename_type_ret_k string_view_helper_traits<S>::view_type right_view
template <ss_typename_param_k C>
inline basic_string_view<C> mid_view_helper(C const* s, ss_size_t start, ss_size_t n)
{
- const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
+ const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
ss_size_t off = 0;
if(start > len)
@@ -318,7 +350,7 @@ inline ss_typename_type_ret_k string_view_helper_traits<S>::view_type mid_view(S
typedef string_view_helper_traits<S> traits_t;
typedef ss_typename_type_k traits_t::view_type view_t;
- const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
+ const ss_size_t len = stlsoft_ns_qual(c_str_len)(s);
ss_size_t off = 0;
if(start > len)
View
18 include/stlsoft/util/std/library_discriminator.hpp
@@ -4,7 +4,11 @@
* Purpose: Discriminates between standard library implementations
*
* Created: 2nd January 2000
- * Updated: 21st June 2010
+ * Updated: 25th October 2010
+ *
+ * Thanks: To Gabor Fischer, for reporting problems with VC++ 9/10
+ * compatibility, and persisting in (re-)reporting it even when
+ * I was being a thickie and unable to reproduce it.
*
* Home: http://stlsoft.org/
*
@@ -52,8 +56,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define STLSOFT_VER_STLSOFT_UTIL_STD_LIBRARY_DISCRIMINATOR_MAJOR 4
# define STLSOFT_VER_STLSOFT_UTIL_STD_LIBRARY_DISCRIMINATOR_MINOR 6
-# define STLSOFT_VER_STLSOFT_UTIL_STD_LIBRARY_DISCRIMINATOR_REVISION 3
-# define STLSOFT_VER_STLSOFT_UTIL_STD_LIBRARY_DISCRIMINATOR_EDIT 103
+# define STLSOFT_VER_STLSOFT_UTIL_STD_LIBRARY_DISCRIMINATOR_REVISION 4
+# define STLSOFT_VER_STLSOFT_UTIL_STD_LIBRARY_DISCRIMINATOR_EDIT 104
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -77,6 +81,10 @@
#if !defined(STLSOFT_COMPILER_IS_WATCOM)
# include <iterator> // required for detecting header include guards
#endif /* compiler */
+#if defined(STLSOFT_COMPILER_IS_MSVC) && \
+ _MSC_VER >= 1500
+# include <functional>
+#endif /* compiler */
/* /////////////////////////////////////////////////////////////////////////
* Warnings
@@ -252,7 +260,7 @@ namespace stlsoft
* _STCONS in 5, 6, 7.0, 7.1, 8, 9, 10
* _TEMPLATE_MEMBER in 7.0
* _TEMPLATE in 7.0
- * _MESG in 7.0, 7.1, 8, 9
+ * _MESG in 7.0, 7.1, 8, 9, 10
* _HAS_EXCEPTIONS in 7.0, 7.1, 8, 9, 10
* _EMPTY_ARGUMENT in 8, 9, 10
* _THROWS in 9, 10
@@ -295,7 +303,7 @@ namespace stlsoft
defined(_STCONS) && \
!defined(_TEMPLATE_MEMBER) && \
!defined(_TEMPLATE) && \
- !defined(_MESG) && \
+ defined(_MESG) && \
defined(_HAS_EXCEPTIONS) && \
defined(_EMPTY_ARGUMENT) && \
defined(_THROWS) && \
View
38 include/winstl/error/error_functions.h
@@ -4,7 +4,7 @@
* Purpose: Error functions.
*
* Created: 7th May 2000
- * Updated: 26th August 2010
+ * Updated: 18th October 2010
*
* Home: http://stlsoft.org/
*
@@ -51,8 +51,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define WINSTL_VER_WINSTL_ERROR_H_ERROR_FUNCTIONS_MAJOR 4
# define WINSTL_VER_WINSTL_ERROR_H_ERROR_FUNCTIONS_MINOR 2
-# define WINSTL_VER_WINSTL_ERROR_H_ERROR_FUNCTIONS_REVISION 1
-# define WINSTL_VER_WINSTL_ERROR_H_ERROR_FUNCTIONS_EDIT 58
+# define WINSTL_VER_WINSTL_ERROR_H_ERROR_FUNCTIONS_REVISION 2
+# define WINSTL_VER_WINSTL_ERROR_H_ERROR_FUNCTIONS_EDIT 59
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -554,53 +554,53 @@ inline void winstl_C_format_message_free_buff(ws_char_w_t* buffer)
defined(STLSOFT_OBSOLETE) || \
_STLSOFT_VER < 0x010a0000
-/** \def winstl_format_message_buff_inst_a
+/** \def winstl__format_message_buff_inst_a
*
* \deprecated Use winstl_C_format_message_buff_inst_a
*/
-# define winstl_format_message_buff_inst_a winstl_C_format_message_buff_inst_a
+# define winstl__format_message_buff_inst_a winstl_C_format_message_buff_inst_a
-/** \def winstl_format_message_buff_inst_w
+/** \def winstl__format_message_buff_inst_w
*
* \deprecated Use winstl_C_format_message_buff_inst_w
*/
-# define winstl_format_message_buff_inst_w winstl_C_format_message_buff_inst_w
+# define winstl__format_message_buff_inst_w winstl_C_format_message_buff_inst_w
-/** \def winstl_format_message_buff_a
+/** \def winstl__format_message_buff_a
*
* \deprecated Use winstl_C_format_message_buff_a
*/
-# define winstl_format_message_buff_a winstl_C_format_message_buff_a
+# define winstl__format_message_buff_a winstl_C_format_message_buff_a
-/** \def winstl_format_message_buff_w
+/** \def winstl__format_message_buff_w
*
* \deprecated Use winstl_C_format_message_buff_w
*/
-# define winstl_format_message_buff_w winstl_C_format_message_buff_w
+# define winstl__format_message_buff_w winstl_C_format_message_buff_w
-/** \def winstl_format_message_alloc_a
+/** \def winstl__format_message_alloc_a
*
* \deprecated Use winstl_C_format_message_alloc_a
*/
-# define winstl_format_message_alloc_a winstl_C_format_message_alloc_a
+# define winstl__format_message_alloc_a winstl_C_format_message_alloc_a
-/** \def winstl_format_message_alloc_w
+/** \def winstl__format_message_alloc_w
*
* \deprecated Use winstl_C_format_message_alloc_w
*/
-# define winstl_format_message_alloc_w winstl_C_format_message_alloc_w
+# define winstl__format_message_alloc_w winstl_C_format_message_alloc_w
-/** \def winstl_format_message_free_buff_a
+/** \def winstl__format_message_free_buff_a
*
* \deprecated Use winstl_C_format_message_free_buff_a
*/
-# define winstl_format_message_free_buff_a winstl_C_format_message_free_buff_a
+# define winstl__format_message_free_buff_a winstl_C_format_message_free_buff_a
-/** \def winstl_format_message_free_buff_w
+/** \def winstl__format_message_free_buff_w
*
* \deprecated Use winstl_C_format_message_free_buff_w
*/
-# define winstl_format_message_free_buff_w winstl_C_format_message_free_buff_w
+# define winstl__format_message_free_buff_w winstl_C_format_message_free_buff_w
#endif /* obsolete || 1.9 */

0 comments on commit 5203658

Please sign in to comment.