MySQL++

Check-in [f373a7fbb9]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Pushed back the warnings about throwspecs from C++17 to C++11 to placate g++ 7.3.0 on Cygwin.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:f373a7fbb9a1843d918e074c9c8a8c427a64a6d83bbb4ea617f6ce6e7dbf94cb
User & Date: tangent 2018-09-26 21:26:47
Context
2018-10-17
16:02
Changed several *.txt files from Unix to DOS line endings, per HACKERS.md. check-in: b690497dbb user: tangent tags: trunk
2018-09-26
21:26
Pushed back the warnings about throwspecs from C++17 to C++11 to placate g++ 7.3.0 on Cygwin. check-in: f373a7fbb9 user: tangent tags: trunk
21:13
Fixed another spaces-in-Windows-bakefilize path problem. check-in: 05d91668b6 user: tangent tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to lib/common.h.

132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154

// Workarounds for deprecations in C++11 and newer.  We must still
// support systems whose contemporaneous C++ compiler only understands
// C++98.  Because of the large gap between C++98 and C++11, it will
// likely be years yet until we can start using C++11 unconditionally
// within MySQL++, then years more until we can use C++14, etc.
//
// Our test here currently only works for g++ and clang++: it's testing
// for C++17.
//
// That release finally did away with throwspecs, a feature of C++ that
// is only used by the oldest parts of MySQL++.  We can't drop the
// throwspecs until MySQL++ 4, if we ever get around to that, since
// that would break the library's ABI on systems whose C++ compiler
// still supports throwspecs.
#if __cplusplus < 201703L
#	define MAY_THROW(what) throw(what)
#else
#	define MAY_THROW(junk) noexcept(false)
#endif

// C++11 added unique_ptr as a replacement for auto_ptr.  We don't have
// the ABI problem above with this one, so we switch to it with the







|
|
|
|
|
|
|
|
<







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146

147
148
149
150
151
152
153

// Workarounds for deprecations in C++11 and newer.  We must still
// support systems whose contemporaneous C++ compiler only understands
// C++98.  Because of the large gap between C++98 and C++11, it will
// likely be years yet until we can start using C++11 unconditionally
// within MySQL++, then years more until we can use C++14, etc.
//
// C++11 deprecated throwspecs, a feature of C++ that is only used by
// the oldest parts of MySQL++.  We can't drop the throwspecs until
// MySQL++ 4, if we ever get around to that, since that would break
// the library's ABI on systems whose C++ compiler still supports
// throwspecs.  This feature isn't completely gone until C++17, but we
// don't want the warnings on certain newer compilers expecting C++11
// or newer C++ dialects.
#if __cplusplus < 201103L

#	define MAY_THROW(what) throw(what)
#else
#	define MAY_THROW(junk) noexcept(false)
#endif

// C++11 added unique_ptr as a replacement for auto_ptr.  We don't have
// the ABI problem above with this one, so we switch to it with the

Changes to lib/stadapter.h.

218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
	/// initialized (default ctor called, and no subsequent assignment)
	/// or if there are not at least i + 1 characters in the buffer.
	///
	/// WARNING: The throw-spec is incorrect, but it's irrelevant since
    /// they're obsolete in modern C++ now anyway, since they were
    /// always unreliable.  If we ever get to MySQL++ 4 and can break
    /// the ABI, this throw-spec will just go away.
#if !defined(DOXYGEN_IGNORE) && __cplusplus >= 201703L
    // Can't use MAY_THROW() here: it confuses Doxygen 1.8.14.
	char at(size_type i) const noexcept(false);
#else
	char at(size_type i) const throw(std::out_of_range);
#endif

	/// \brief Compare the internal buffer to the given string







|







218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
	/// initialized (default ctor called, and no subsequent assignment)
	/// or if there are not at least i + 1 characters in the buffer.
	///
	/// WARNING: The throw-spec is incorrect, but it's irrelevant since
    /// they're obsolete in modern C++ now anyway, since they were
    /// always unreliable.  If we ever get to MySQL++ 4 and can break
    /// the ABI, this throw-spec will just go away.
#if !defined(DOXYGEN_IGNORE) && __cplusplus >= 201103L
    // Can't use MAY_THROW() here: it confuses Doxygen 1.8.14.
	char at(size_type i) const noexcept(false);
#else
	char at(size_type i) const throw(std::out_of_range);
#endif

	/// \brief Compare the internal buffer to the given string