DateTime: add default constructor (#1220)
This commit is contained in:
parent
e3d8719281
commit
d40b4fb642
@ -5,9 +5,10 @@
|
||||
### New Features
|
||||
|
||||
- Added a WinHTTP-based `HttpTransport` called `WinHttpTransport` and use that as the default `TransportPolicyOptions.Transport` on Windows when sending and receiving requests and responses over the wire.
|
||||
- Added `Range` type to `Azure::Core::Http` namespace.
|
||||
- Added `Range` type to `Azure::Core::Http` namespace.
|
||||
- Added support for long-running operations with `Operation<T>`.
|
||||
- Added support for setting a custom transport adapter by implementing the method `std::shared_ptr<HttpTransport> ::AzureSdkGetCustomHttpTransport()`.
|
||||
- Added default constructor to `DateTime`.
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
|
||||
@ -227,5 +227,11 @@ namespace Azure { namespace Core {
|
||||
// Private constructor. Use static methods to create an instance.
|
||||
explicit DateTime(Duration const& since1601) : m_since1601(since1601) {}
|
||||
Duration m_since1601;
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Construct an instance of @DateTime.
|
||||
*/
|
||||
DateTime() : m_since1601(0) {}
|
||||
};
|
||||
}} // namespace Azure::Core
|
||||
|
||||
@ -578,3 +578,9 @@ TEST(DateTime, ArithmeticOperators)
|
||||
dt3 = dt2 - 24h;
|
||||
EXPECT_EQ(dt3, dt1);
|
||||
}
|
||||
|
||||
TEST(DateTime, DefaultConstructible)
|
||||
{
|
||||
DateTime dt;
|
||||
EXPECT_EQ(0, (dt - Year1601).count());
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user