Merge branch 'poco-1.10.0' into devel

This commit is contained in:
Günter Obiltschnig 2020-01-25 15:16:51 +01:00
commit 44f3792032
18 changed files with 95 additions and 67 deletions

View File

@ -4,6 +4,9 @@ Release 1.10.0 (2020-01-xx)
==========================
- This release now requires a C++14 compiler (GCC 5, Clang 3.4, Visual C++ 2015).
- Visual Studio project and solution files for versions prior to 2015 have
been removed. Furthermore, the separate projects and solutions for 64-bit builds
have been removed and configurations have been merged in a single project file.
- POCO's fixed-size integer types are now based on <cstdint> types. This changes
the definition of Poco::Int64 and Poco::UInt64 on some platforms.
- Many methods exposing raw pointers have been changed to use smart pointers
@ -86,6 +89,7 @@ Release 1.10.0 (2020-01-xx)
- GH #2408: add ordered containers
- GH #2042: Android abstract namespace local socket address
- GH #2088: Fix race condition in TCPServerDispatcher.cpp
- GH #2892: SocketImpl::bind --> bind wrong config
Release 1.9.4 (2019-09-18)

View File

@ -117,7 +117,7 @@ void Foundation_API format(std::string& result, const std::string& fmt, const st
template <
typename T,
typename... Args>
void format(std::string &result, const std::string &fmt, T arg1, Args... args)
void format(std::string& result, const std::string& fmt, T arg1, Args... args)
/// Appends the formatted string to result.
{
std::vector<Any> values;
@ -129,11 +129,39 @@ void format(std::string &result, const std::string &fmt, T arg1, Args... args)
template <
typename FMT,
typename T,
typename... Args,
typename std::enable_if<std::is_const<typename std::remove_reference<FMT>::type>::value, int>::type = 0>
std::string format(FMT &fmt, T arg1, Args... args)
typename... Args>
void format(std::string& result, const char* fmt, T arg1, Args... args)
/// Appends the formatted string to result.
{
std::vector<Any> values;
values.reserve(sizeof...(Args) + 1);
values.emplace_back(arg1);
values.insert(values.end(), { args... });
format(result, fmt, values);
}
template <
typename T,
typename... Args>
std::string format(const std::string& fmt, T arg1, Args... args)
/// Returns the formatted string.
{
std::vector<Any> values;
values.reserve(sizeof...(Args) + 1);
values.emplace_back(arg1);
values.insert(values.end(), { args... });
std::string result;
format(result, fmt, values);
return result;
}
template <
typename T,
typename... Args>
std::string format(const char* fmt, T arg1, Args... args)
/// Returns the formatted string.
{
std::vector<Any> values;

View File

@ -31,7 +31,7 @@ class MongoDB_API Array: public Document
/// This class represents a BSON Array.
{
public:
typedef SharedPtr<Array> Ptr;
using Ptr = SharedPtr<Array>;
Array();
/// Creates an empty Array.

View File

@ -38,7 +38,7 @@ class MongoDB_API Binary
/// A Binary stores its data in a Poco::Buffer<unsigned char>.
{
public:
typedef SharedPtr<Binary> Ptr;
using Ptr = SharedPtr<Binary>;
Binary();
/// Creates an empty Binary with subtype 0.

View File

@ -37,7 +37,7 @@ class MongoDB_API Connection
/// for more information on the wire protocol.
{
public:
typedef Poco::SharedPtr<Connection> Ptr;
using Ptr = Poco::SharedPtr<Connection>;
class MongoDB_API SocketFactory
{

View File

@ -52,8 +52,8 @@ class MongoDB_API Document
/// Represents a MongoDB (BSON) document.
{
public:
typedef SharedPtr<Document> Ptr;
typedef std::vector<Document::Ptr> Vector;
using Ptr = SharedPtr<Document>;
using Vector = std::vector<Document::Ptr>;
Document();
/// Creates an empty Document.

View File

@ -43,7 +43,7 @@ class MongoDB_API Element
/// Represents an Element of a Document or an Array.
{
public:
typedef Poco::SharedPtr<Element> Ptr;
using Ptr = Poco::SharedPtr<Element>;
explicit Element(const std::string& name);
/// Creates the Element with the given name.
@ -78,7 +78,7 @@ inline const std::string& Element::name() const
}
typedef std::list<Element::Ptr> ElementSet;
using ElementSet = std::list<Element::Ptr>;
template<typename T>
@ -259,7 +259,7 @@ inline void BSONWriter::write<Timestamp>(Timestamp& from)
}
typedef Nullable<unsigned char> NullValue;
using NullValue = Nullable<unsigned char>;
// BSON Null Value

View File

@ -33,7 +33,7 @@ class MongoDB_API JavaScriptCode
/// Represents JavaScript type in BSON.
{
public:
typedef SharedPtr<JavaScriptCode> Ptr;
using Ptr = SharedPtr<JavaScriptCode>;
JavaScriptCode();
/// Creates an empty JavaScriptCode object.

View File

@ -42,7 +42,7 @@ class MongoDB_API ObjectId
/// as its value.
{
public:
typedef SharedPtr<ObjectId> Ptr;
using Ptr = SharedPtr<ObjectId>;
explicit ObjectId(const std::string& id);
/// Creates an ObjectId from a string.

View File

@ -31,7 +31,7 @@ class MongoDB_API RegularExpression
/// Represents a regular expression in BSON format.
{
public:
typedef SharedPtr<RegularExpression> Ptr;
using Ptr = SharedPtr<RegularExpression>;
RegularExpression();
/// Creates an empty RegularExpression.

View File

@ -229,7 +229,7 @@ void SocketImpl::bind(const SocketAddress& address, bool reuseAddress, bool reus
void SocketImpl::bind6(const SocketAddress& address, bool reuseAddress, bool ipV6Only)
{
bind6(address, reuseAddress, true, ipV6Only);
bind6(address, reuseAddress, reuseAddress, ipV6Only);
}

View File

@ -278,14 +278,6 @@ protected:
Environment::set("PATH", path);
}
logger().debug("exec " + exec);
logger().debug("path " + path);
for (int no = 0; no < args.size(); ++no)
{
logger().debug("arg " + args[no]);
}
if (usePipe)
{
Poco::Pipe inPipe;

View File

@ -35,7 +35,7 @@ class Redis_API Array
/// value.
{
public:
typedef std::vector<RedisType::Ptr>::const_iterator const_iterator;
using const_iterator = std::vector<RedisType::Ptr>::const_iterator;
Array();
/// Creates an Array. As long as there are no elements added,
@ -157,7 +157,7 @@ private:
void checkNull();
/// Checks for null array and sets a new vector if true.
Nullable<std::vector<RedisType::Ptr> > _elements;
Nullable<std::vector<RedisType::Ptr>> _elements;
};

View File

@ -37,7 +37,7 @@ class Redis_API Client
/// bit integer, a simple string, a bulk string, an array or an error. The
/// first element of the command array is the Redis command. A simple string
/// is a string that cannot contain a CR or LF character. A bulk string is
/// implemented as a typedef for Poco::Nullable<std::string>. This is
/// implemented as an alias for Poco::Nullable<std::string>. This is
/// because a bulk string can represent a Null value.
///
/// BulkString bs = client.execute<BulkString>(...);
@ -71,7 +71,7 @@ class Redis_API Client
/// command << "list";
{
public:
typedef SharedPtr<Client> Ptr;
using Ptr = SharedPtr<Client>;
Client();
/// Creates an unconnected Client.

View File

@ -49,7 +49,7 @@ class Redis_API Command: public Array
///
{
public:
typedef std::vector<std::string> StringVec;
using StringVec = std::vector<std::string>;
Command(const std::string& command);
/// Creates a command.

View File

@ -45,7 +45,7 @@ public:
REDIS_ERROR /// Redis Error
};
typedef SharedPtr<RedisType> Ptr;
using Ptr = SharedPtr<RedisType>;
RedisType();
/// Creates the RedisType.
@ -174,9 +174,9 @@ struct RedisTypeTraits<std::string>
};
typedef Nullable<std::string> BulkString;
using BulkString = Nullable<std::string>;
/// A bulk string is a string that can contain a NULL value.
/// So, BulkString is a typedef for Nullable<std::string>.
/// So, BulkString is an alias for Nullable<std::string>.
template<>

View File

@ -53,7 +53,7 @@ SHAREDLIBLINKEXT = .dylib
# Compiler and Linker Flags
#
CFLAGS = $(ARCHFLAGS) $(OSFLAGS) -std=c99
CXXFLAGS = $(ARCHFLAGS) $(OSFLAGS) -std=c++11 -stdlib=libc++ -Wall -Wno-sign-compare -Wno-unused-variable -Wno-unused-function -Wno-unneeded-internal-declaration
CXXFLAGS = $(ARCHFLAGS) $(OSFLAGS) -std=c++14 -stdlib=libc++ -Wall -Wno-sign-compare -Wno-unused-variable -Wno-unused-function -Wno-unneeded-internal-declaration
LINKFLAGS = $(ARCHFLAGS) $(OSFLAGS) -stdlib=libc++
SHLIBFLAGS = $(ARCHFLAGS) $(OSFLAGS) -stdlib=libc++
DYLIBFLAGS = $(ARCHFLAGS) $(OSFLAGS) -stdlib=libc++

View File

@ -6,6 +6,9 @@ AAAIntroduction
!!Summary of Changes
- This release now requires a C++14 compiler (GCC 5, Clang 3.4, Visual C++ 2015).
- Visual Studio project and solution files for versions prior to 2015 have
been removed. Furthermore, the separate projects and solutions for 64-bit builds
have been removed and configurations have been merged in a single project file.
- POCO's fixed-size integer types are now based on <cstdint> types. This changes
the definition of Poco::Int64 and Poco::UInt64 on some platforms.
- Many methods exposing raw pointers have been changed to use smart pointers
@ -88,6 +91,7 @@ AAAIntroduction
- GH #2408: add ordered containers
- GH #2042: Android abstract namespace local socket address
- GH #2088: Fix race condition in TCPServerDispatcher.cpp
- GH #2892: SocketImpl::bind --> bind wrong config
!!Incompatible Changes and Possible Transition Issues