From 147ae6f480c39c0acf4638101a28ecd2ba4b017a Mon Sep 17 00:00:00 2001 From: Ara Ayvazyan Date: Sat, 8 Feb 2020 22:32:02 -0800 Subject: [PATCH] Build with /permissive- (#30) --- Inc/IPC/Client.h | 6 ++--- Inc/IPC/Connector.h | 18 ++++++------- .../Managed/detail/Interop/VectorImpl.h | 8 +++--- Inc/IPC/Containers/Vector.h | 2 +- Inc/IPC/Managed/detail/Accept.h | 2 +- Inc/IPC/Managed/detail/Client.h | 6 ++--- Inc/IPC/Managed/detail/ComponentHolder.h | 2 +- Inc/IPC/Managed/detail/Connect.h | 2 +- .../detail/Interop/ClientConnectorImpl.h | 2 +- Inc/IPC/Managed/detail/Interop/ClientImpl.h | 2 +- .../detail/Interop/ServerAcceptorImpl.h | 2 +- Inc/IPC/Managed/detail/Interop/ServerImpl.h | 2 +- Inc/IPC/Managed/detail/Interop/Transport.h | 6 ++--- .../Managed/detail/Interop/TransportImpl.h | 26 +++++++++++++++---- Inc/IPC/Managed/detail/NativeObject.h | 2 +- Inc/IPC/Managed/detail/Server.h | 4 +-- Inc/IPC/Server.h | 6 ++--- Inc/IPC/detail/ChannelFactory.h | 6 ++--- Inc/IPC/detail/Connect.h | 2 +- Inc/IPC/detail/PacketConnectionHolder.h | 2 +- Interop/Build/Interop.vcxproj | 3 ++- Managed/Build/Managed.vcxproj | 3 ++- .../Src/detail/Policies/ReceiverFactory.cpp | 4 +-- .../Build/ManagedContainers.vcxproj | 3 ++- Native/Build/Native.vcxproj | 5 ++-- .../Build/NativeContainers.vcxproj | 3 ++- .../Build/TestManagedTransport.vcxproj | 3 ++- UnitTests/AcceptTests.cpp | 2 +- UnitTests/Build/UnitTests.vcxproj | 3 ++- UnitTests/ConnectTests.cpp | 2 +- 30 files changed, 81 insertions(+), 58 deletions(-) diff --git a/Inc/IPC/Client.h b/Inc/IPC/Client.h index c028ef6..570c266 100644 --- a/Inc/IPC/Client.h +++ b/Inc/IPC/Client.h @@ -37,12 +37,12 @@ namespace IPC using typename PacketConnectionHolder::OutputPacket; public: - static_assert(!std::is_void::value, "Request cannot be void."); - static_assert(std::is_same>::value, "Connection definitions must be the same."); - using typename PacketConnectionHolder::Connection; using TransactionManager = typename PacketConnectionHolder::Context; + static_assert(!std::is_void::value, "Request cannot be void."); + static_assert(std::is_same>::value, "Connection definitions must be the same."); + template ::value>* = nullptr> Client(std::unique_ptr connection, CloseHandler&& closeHandler, TransactionManager transactionManager = {}) : PacketConnectionHolder{ diff --git a/Inc/IPC/Connector.h b/Inc/IPC/Connector.h index abc9772..3564861 100644 --- a/Inc/IPC/Connector.h +++ b/Inc/IPC/Connector.h @@ -161,9 +161,7 @@ namespace IPC } private: - using Client = Client; - - class ConnectorClient : public Client + class ConnectorClient : public Client { public: ConnectorClient( @@ -202,8 +200,8 @@ namespace IPC typename Traits::TransactionManagerFactory&& transactionManagerFactory, detail::Callback&& closeHandler, detail::KernelProcess process) - : Client{ - std::make_unique( + : ConnectorClient::Client{ + std::make_unique( detail::KernelEvent{ create_only, false, false, pingInfo.m_connectorCloseEventName.c_str() }, true, detail::KernelEvent{ open_only, acceptorHostInfo.m_acceptorCloseEventName.c_str() }, @@ -212,7 +210,7 @@ namespace IPC std::move(channels.first), std::move(channels.second)), std::move(closeHandler), - std::move(transactionManagerFactory)(detail::Identity{}) }, + std::move(transactionManagerFactory)(detail::Identity{}) }, m_process{ std::move(process) }, m_channelFactory{ std::move(channelFactory) } {} @@ -222,8 +220,10 @@ namespace IPC auto channelFactoryInstance = channelFactory.MakeInstance(); // Create in a strict order. Must be the reverse of the acceptor. - auto output = channelFactoryInstance.template CreateOutput(pingInfo.m_connectorInfoChannelName.c_str()); - auto input = channelFactoryInstance.template CreateInput(pingInfo.m_acceptorInfoChannelName.c_str()); + auto output = channelFactoryInstance.template CreateOutput( + pingInfo.m_connectorInfoChannelName.c_str()); + auto input = channelFactoryInstance.template CreateInput( + pingInfo.m_acceptorInfoChannelName.c_str()); return std::make_pair(std::move(input), std::move(output)); } @@ -425,7 +425,7 @@ namespace IPC public: template PacketConnector(Args&&... args) // TODO: Inherit constructors instead when VC14 bugs are fixed. - : Connector{ std::forward(args)... } + : PacketConnector::Connector{ std::forward(args)... } {} }; diff --git a/Inc/IPC/Containers/Managed/detail/Interop/VectorImpl.h b/Inc/IPC/Containers/Managed/detail/Interop/VectorImpl.h index 340818a..acc9b59 100644 --- a/Inc/IPC/Containers/Managed/detail/Interop/VectorImpl.h +++ b/Inc/IPC/Containers/Managed/detail/Interop/VectorImpl.h @@ -36,7 +36,7 @@ namespace Managed template Vector::Iterator::Iterator(const BaseIterator& it) - : shared_ptr{ std::make_shared(it) } + : std::shared_ptr{ std::make_shared(it) } {} template @@ -53,7 +53,7 @@ namespace Managed { if (!this->operator bool()) { - shared_ptr::operator=(std::make_shared(container.m_impl->begin())); + std::shared_ptr::operator=(std::make_shared(container.m_impl->begin())); } else if (*this->get() != container.m_impl->end()) { @@ -126,13 +126,13 @@ namespace Managed template auto Vector::begin() -> Iterator { - return m_impl->begin(); + return { m_impl->begin() }; } template auto Vector::end() -> Iterator { - return m_impl->end(); + return { m_impl->end() }; } template diff --git a/Inc/IPC/Containers/Vector.h b/Inc/IPC/Containers/Vector.h index 3ddd8d0..1bf6323 100644 --- a/Inc/IPC/Containers/Vector.h +++ b/Inc/IPC/Containers/Vector.h @@ -11,7 +11,7 @@ namespace Containers template class Vector : public detail::Container>> { - using Container::Container; + using Vector::Container::Container; }; } // Containers diff --git a/Inc/IPC/Managed/detail/Accept.h b/Inc/IPC/Managed/detail/Accept.h index 476e358..caf54be 100644 --- a/Inc/IPC/Managed/detail/Accept.h +++ b/Inc/IPC/Managed/detail/Accept.h @@ -64,7 +64,7 @@ namespace Managed { public: ServerFactoryLambda(HandlerFactory^ handlerFactory, const NativeConfig& config, ServersAccessor^ accessor) - : ComponentFactoryLambdaBase{ config, accessor }, + : ServerFactoryLambda::ComponentFactoryLambdaBase{ config, accessor }, m_handlerFactory{ handlerFactory } {} diff --git a/Inc/IPC/Managed/detail/Client.h b/Inc/IPC/Managed/detail/Client.h index 991409a..0affcd3 100644 --- a/Inc/IPC/Managed/detail/Client.h +++ b/Inc/IPC/Managed/detail/Client.h @@ -26,7 +26,7 @@ namespace Managed { try { - (*m_component)( + (*this->m_component)( Cast(request), MakeManagedCallback(gcnew InvokeLambda{ promise }), std::chrono::milliseconds{ static_cast(timeout.TotalMilliseconds) }); @@ -46,11 +46,11 @@ namespace Managed internal: Client(typename NativeClient::ConnectionPtr&& connection, const NativeConfig& config) - : Component{ std::move(connection), nullptr, *config } + : Client::Component{ std::move(connection), nullptr, *config } {} Client(typename NativeClient::ConnectionPtr&& connection, Interop::Callback&& closeHandler, const NativeConfig& config) - : Component{ std::move(connection), std::move(closeHandler), *config } + : Client::Component{ std::move(connection), std::move(closeHandler), *config } {} ref struct InvokeLambda diff --git a/Inc/IPC/Managed/detail/ComponentHolder.h b/Inc/IPC/Managed/detail/ComponentHolder.h index cfc45c7..81a2e61 100644 --- a/Inc/IPC/Managed/detail/ComponentHolder.h +++ b/Inc/IPC/Managed/detail/ComponentHolder.h @@ -22,7 +22,7 @@ namespace Managed ref struct SelfDisposer : NativeObject { explicit SelfDisposer(const T& obj) - : NativeObject{ obj } + : NativeObject{ obj } {} void operator()(void*) diff --git a/Inc/IPC/Managed/detail/Connect.h b/Inc/IPC/Managed/detail/Connect.h index e89dd74..24012f8 100644 --- a/Inc/IPC/Managed/detail/Connect.h +++ b/Inc/IPC/Managed/detail/Connect.h @@ -56,7 +56,7 @@ namespace Managed { public: ClientFactoryLambda(const NativeConfig& config, ClientAccessor^ accessor) - : ComponentFactoryLambdaBase{ config, accessor } + : ClientFactoryLambda::ComponentFactoryLambdaBase{ config, accessor } {} protected: diff --git a/Inc/IPC/Managed/detail/Interop/ClientConnectorImpl.h b/Inc/IPC/Managed/detail/Interop/ClientConnectorImpl.h index e619158..45a93cf 100644 --- a/Inc/IPC/Managed/detail/Interop/ClientConnectorImpl.h +++ b/Inc/IPC/Managed/detail/Interop/ClientConnectorImpl.h @@ -14,7 +14,7 @@ namespace Managed { template Transport::ClientConnector::ClientConnector(const Config& config) - : shared_ptr{ std::make_shared>( + : ClientConnector::shared_ptr{ std::make_shared>( config.m_channelSettings, Policies::TransactionManagerFactory{ config.m_timeoutFactory, config.m_defaultRequestTimeout }) } {} diff --git a/Inc/IPC/Managed/detail/Interop/ClientImpl.h b/Inc/IPC/Managed/detail/Interop/ClientImpl.h index 0025168..fb5e749 100644 --- a/Inc/IPC/Managed/detail/Interop/ClientImpl.h +++ b/Inc/IPC/Managed/detail/Interop/ClientImpl.h @@ -34,7 +34,7 @@ namespace Managed template Transport::Client::Client(ConnectionPtr&& connection, CloseHandler&& closeHandler, const Config& config) - : unique_ptr{ std::make_unique>( + : Client::unique_ptr{ std::make_unique>( std::move(connection), std::move(closeHandler), typename IPC::Client::TransactionManager{ config.m_timeoutFactory, config.m_defaultRequestTimeout }) } diff --git a/Inc/IPC/Managed/detail/Interop/ServerAcceptorImpl.h b/Inc/IPC/Managed/detail/Interop/ServerAcceptorImpl.h index 71ab796..2673b11 100644 --- a/Inc/IPC/Managed/detail/Interop/ServerAcceptorImpl.h +++ b/Inc/IPC/Managed/detail/Interop/ServerAcceptorImpl.h @@ -14,7 +14,7 @@ namespace Managed { template Transport::ServerAcceptor::ServerAcceptor(const char* name, HandlerFactory&& handlerFactory, const Config& config) - : unique_ptr{ std::make_unique>( + : ServerAcceptor::unique_ptr{ std::make_unique>( name, [handlerFactory = std::move(handlerFactory)](auto&& futureConnection) mutable { diff --git a/Inc/IPC/Managed/detail/Interop/ServerImpl.h b/Inc/IPC/Managed/detail/Interop/ServerImpl.h index 0f560af..057ba1f 100644 --- a/Inc/IPC/Managed/detail/Interop/ServerImpl.h +++ b/Inc/IPC/Managed/detail/Interop/ServerImpl.h @@ -33,7 +33,7 @@ namespace Managed template Transport::Server::Server(ConnectionPtr&& connection, CloseHandler&& closeHandler, Handler&& handler, const Config& /*config*/) - : unique_ptr{ std::make_unique>(std::move(connection), std::move(handler), std::move(closeHandler)) } + : Server::unique_ptr{ std::make_unique>(std::move(connection), std::move(handler), std::move(closeHandler)) } {} template diff --git a/Inc/IPC/Managed/detail/Interop/Transport.h b/Inc/IPC/Managed/detail/Interop/Transport.h index 9cf3e32..167fcbb 100644 --- a/Inc/IPC/Managed/detail/Interop/Transport.h +++ b/Inc/IPC/Managed/detail/Interop/Transport.h @@ -46,7 +46,7 @@ namespace Managed class Transport { public: - using CloseHandler = Callback; + typedef Callback CloseHandler; class Server : public std::unique_ptr> @@ -54,7 +54,7 @@ namespace Managed public: struct ConnectionPtr : std::unique_ptr> { - using unique_ptr::unique_ptr; + using std::unique_ptr>::unique_ptr; ConnectionPtr(ConnectionPtr&& other); @@ -88,7 +88,7 @@ namespace Managed public: struct ConnectionPtr : std::unique_ptr> { - using unique_ptr::unique_ptr; + using std::unique_ptr>::unique_ptr; ConnectionPtr(ConnectionPtr&& other); diff --git a/Inc/IPC/Managed/detail/Interop/TransportImpl.h b/Inc/IPC/Managed/detail/Interop/TransportImpl.h index 1f53460..4aac43c 100644 --- a/Inc/IPC/Managed/detail/Interop/TransportImpl.h +++ b/Inc/IPC/Managed/detail/Interop/TransportImpl.h @@ -3,11 +3,6 @@ #include "IPC/Connect.h" #include "IPC/Accept.h" #include "Transport.h" -#include "ClientImpl.h" -#include "ServerImpl.h" -#include "ClientConnectorImpl.h" -#include "ServerAcceptorImpl.h" -#include namespace IPC @@ -34,7 +29,28 @@ namespace Managed Traits::TimeoutFactory m_timeoutFactory; }; + } // Interop + } // detail +} // Managed +} // IPC + + +#include "ClientImpl.h" +#include "ServerImpl.h" +#include "ClientConnectorImpl.h" +#include "ServerAcceptorImpl.h" +#include + + +namespace IPC +{ +namespace Managed +{ + namespace detail + { + namespace Interop + { auto MakeChannelSettings(std::size_t memorySize, Traits::ReceiverFactory receiverFactory, Traits::WaitHandleFactory waitHandleFactory) { ChannelSettings settings{ std::move(waitHandleFactory), std::move(receiverFactory) }; diff --git a/Inc/IPC/Managed/detail/NativeObject.h b/Inc/IPC/Managed/detail/NativeObject.h index 5484bd5..cadb30f 100644 --- a/Inc/IPC/Managed/detail/NativeObject.h +++ b/Inc/IPC/Managed/detail/NativeObject.h @@ -89,7 +89,7 @@ namespace Managed { if (!m_obj) { - throw gcnew System::ObjectDisposedException{ gcnew System::String{ typeid(T).name() } }; + throw gcnew System::ObjectDisposedException{ NativeObject::typeid->FullName }; } return *m_obj; diff --git a/Inc/IPC/Managed/detail/Server.h b/Inc/IPC/Managed/detail/Server.h index af3d69d..b531ddb 100644 --- a/Inc/IPC/Managed/detail/Server.h +++ b/Inc/IPC/Managed/detail/Server.h @@ -36,11 +36,11 @@ namespace Managed internal: Server(typename NativeServer::ConnectionPtr&& connection, HandlerFactory^ handlerFactory, const NativeConfig& config) - : Component{ std::move(connection), nullptr, MakeHandlerFactory(connection, handlerFactory), *config } + : Server::Component{ std::move(connection), nullptr, MakeHandlerFactory(connection, handlerFactory), *config } {} Server(typename NativeServer::ConnectionPtr&& connection, HandlerFactory^ handlerFactory, Interop::Callback&& closeHandler, const NativeConfig& config) - : Component{ std::move(connection), std::move(closeHandler), MakeHandlerFactory(connection, handlerFactory), *config } + : Server::Component{ std::move(connection), std::move(closeHandler), MakeHandlerFactory(connection, handlerFactory), *config } {} ~Server() diff --git a/Inc/IPC/Server.h b/Inc/IPC/Server.h index de59eea..c6dbb15 100644 --- a/Inc/IPC/Server.h +++ b/Inc/IPC/Server.h @@ -36,12 +36,12 @@ namespace IPC using typename PacketConnectionHolder::OutputPacket; public: - static_assert(!std::is_void::value, "Request cannot be void."); - static_assert(std::is_same>::value, "Connection definitions must be the same."); - using typename PacketConnectionHolder::Connection; using HandlerCallback = typename PacketConnectionHolder::HandlerCallback; + static_assert(!std::is_void::value, "Request cannot be void."); + static_assert(std::is_same>::value, "Connection definitions must be the same."); + template Server(std::unique_ptr connection, Handler&& handler, CloseHandler&& closeHandler) : PacketConnectionHolder{ diff --git a/Inc/IPC/detail/ChannelFactory.h b/Inc/IPC/detail/ChannelFactory.h index a624cbb..1108af9 100644 --- a/Inc/IPC/detail/ChannelFactory.h +++ b/Inc/IPC/detail/ChannelFactory.h @@ -39,7 +39,7 @@ namespace IPC { public: explicit Instance(ChannelSettings settings) - : ChannelSettings{ std::move(settings) } + : Instance::ChannelSettings{ std::move(settings) } {} template @@ -71,7 +71,7 @@ namespace IPC auto MakeInput(OpenOrCreate openOrCreate, const char* name) { return InputChannel{ - openOrCreate, name, GetMemory(openOrCreate, true, name, *this), GetWaitHandleFactory(), GetReceiverFactory() }; + openOrCreate, name, GetMemory(openOrCreate, true, name, *this), this->GetWaitHandleFactory(), this->GetReceiverFactory() }; } template @@ -83,7 +83,7 @@ namespace IPC explicit ChannelFactory(ChannelSettings settings) - : ChannelSettings{ std::move(settings) } + : ChannelFactory::ChannelSettings{ std::move(settings) } {} auto MakeInstance() const diff --git a/Inc/IPC/detail/Connect.h b/Inc/IPC/detail/Connect.h index 58a6199..8d0ea11 100644 --- a/Inc/IPC/detail/Connect.h +++ b/Inc/IPC/detail/Connect.h @@ -23,7 +23,7 @@ namespace IPC ComponentFactory&& componentFactory, TransactionArgs&&... transactionArgs) { - using Component = decltype(componentFactory( + using Component = typename decltype(componentFactory( std::declval>(), std::declval>()))::element_type; // Deduce the component type. diff --git a/Inc/IPC/detail/PacketConnectionHolder.h b/Inc/IPC/detail/PacketConnectionHolder.h index 437ae3c..92b0b3a 100644 --- a/Inc/IPC/detail/PacketConnectionHolder.h +++ b/Inc/IPC/detail/PacketConnectionHolder.h @@ -26,7 +26,7 @@ namespace IPC protected: template PacketConnectionHolder(std::unique_ptr connection, Context context, Handlers&&... handlers) - : ConnectionHolder{ std::move(connection) }, + : PacketConnectionHolder::ConnectionHolder{ std::move(connection) }, Context{ std::move(context) } { this->Register(std::forward(handlers)...); diff --git a/Interop/Build/Interop.vcxproj b/Interop/Build/Interop.vcxproj index 04c3046..6a48ef4 100644 --- a/Interop/Build/Interop.vcxproj +++ b/Interop/Build/Interop.vcxproj @@ -65,12 +65,13 @@ ..\..\Inc;..\Inc;%(AdditionalIncludeDirectories) Use $(IntDir)$(TargetName).pdb - _CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;BOOST_USE_WINDOWS_H;%(PreprocessorDefinitions) NDEBUG;%(PreprocessorDefinitions) 4494;%(DisableSpecificWarnings) false AnySuitable Speed + true diff --git a/Managed/Build/Managed.vcxproj b/Managed/Build/Managed.vcxproj index e88efb9..292ccf9 100644 --- a/Managed/Build/Managed.vcxproj +++ b/Managed/Build/Managed.vcxproj @@ -44,8 +44,9 @@ ..\Inc;..\..\Inc;%(AdditionalIncludeDirectories) - IPC_MANAGED_EXPORT;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + IPC_MANAGED_EXPORT;_SCL_SECURE_NO_WARNINGS;BOOST_USE_WINDOWS_H;%(PreprocessorDefinitions) NDEBUG;%(PreprocessorDefinitions) + true diff --git a/Managed/Src/detail/Policies/ReceiverFactory.cpp b/Managed/Src/detail/Policies/ReceiverFactory.cpp index 178d7af..50240fe 100644 --- a/Managed/Src/detail/Policies/ReceiverFactory.cpp +++ b/Managed/Src/detail/Policies/ReceiverFactory.cpp @@ -77,7 +77,7 @@ namespace Managed Interop::Policies::ReceiverFactory MakeReceiverFactory() { - return [] + return { [] { msclr::gcroot scheduler{ gcnew Scheduler{} }; @@ -87,7 +87,7 @@ namespace Managed { scheduler->Schedule(std::move(callback)); }; - }; + } }; } } // Policies diff --git a/ManagedContainers/Build/ManagedContainers.vcxproj b/ManagedContainers/Build/ManagedContainers.vcxproj index 74c3689..4559170 100644 --- a/ManagedContainers/Build/ManagedContainers.vcxproj +++ b/ManagedContainers/Build/ManagedContainers.vcxproj @@ -41,8 +41,9 @@ ..\Inc;..\..\Inc;%(AdditionalIncludeDirectories) - _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + _SCL_SECURE_NO_WARNINGS;BOOST_USE_WINDOWS_H;%(PreprocessorDefinitions) NDEBUG;%(PreprocessorDefinitions) + true diff --git a/Native/Build/Native.vcxproj b/Native/Build/Native.vcxproj index b1c55a6..707f2a8 100644 --- a/Native/Build/Native.vcxproj +++ b/Native/Build/Native.vcxproj @@ -127,9 +127,10 @@ ..\..\Inc;..\Inc;%(AdditionalIncludeDirectories) Use $(IntDir)$(TargetName).pdb - _CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - NDEBUG;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;BOOST_USE_WINDOWS_H;%(PreprocessorDefinitions) + NDEBUG;BOOST_USE_WINDOWS_H;%(PreprocessorDefinitions) 4494;%(DisableSpecificWarnings) + true diff --git a/NativeContainers/Build/NativeContainers.vcxproj b/NativeContainers/Build/NativeContainers.vcxproj index 6954f5c..d860dde 100644 --- a/NativeContainers/Build/NativeContainers.vcxproj +++ b/NativeContainers/Build/NativeContainers.vcxproj @@ -46,8 +46,9 @@ ..\..\Inc;..\Inc;%(AdditionalIncludeDirectories) $(IntDir)$(TargetName).pdb - _CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;BOOST_USE_WINDOWS_H;%(PreprocessorDefinitions) NDEBUG;%(PreprocessorDefinitions) + true diff --git a/TestManagedTransport/Build/TestManagedTransport.vcxproj b/TestManagedTransport/Build/TestManagedTransport.vcxproj index 8aabcab..cb4b6e4 100644 --- a/TestManagedTransport/Build/TestManagedTransport.vcxproj +++ b/TestManagedTransport/Build/TestManagedTransport.vcxproj @@ -42,9 +42,10 @@ ..\Inc;..\..\Inc;%(AdditionalIncludeDirectories) - _SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + _SCL_SECURE_NO_WARNINGS;BOOST_USE_WINDOWS_H;%(PreprocessorDefinitions) NDEBUG;%(PreprocessorDefinitions) 4494;%(DisableSpecificWarnings) + true diff --git a/UnitTests/AcceptTests.cpp b/UnitTests/AcceptTests.cpp index c771e3d..15a540b 100644 --- a/UnitTests/AcceptTests.cpp +++ b/UnitTests/AcceptTests.cpp @@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE(AcceptedServerAutoRemovalTest) BOOST_TEST(context.use_count() == 2); BOOST_TEST(serversAccessor()->empty()); - std::make_unique(std::move(serversAccessor)); + (void)std::make_unique(std::move(serversAccessor)); BOOST_TEST(waitHandleFactory.Process() != 0); BOOST_TEST(context.unique()); diff --git a/UnitTests/Build/UnitTests.vcxproj b/UnitTests/Build/UnitTests.vcxproj index 76c0b92..4eb90f6 100644 --- a/UnitTests/Build/UnitTests.vcxproj +++ b/UnitTests/Build/UnitTests.vcxproj @@ -42,9 +42,10 @@ ..\..\Inc;..\..\Native\Inc;%(AdditionalIncludeDirectories) /bigobj %(AdditionalOptions) Use - _CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + _CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;BOOST_USE_WINDOWS_H;%(PreprocessorDefinitions) NDEBUG;%(PreprocessorDefinitions) 4494;%(DisableSpecificWarnings) + true diff --git a/UnitTests/ConnectTests.cpp b/UnitTests/ConnectTests.cpp index 9222e5c..e84b47a 100644 --- a/UnitTests/ConnectTests.cpp +++ b/UnitTests/ConnectTests.cpp @@ -262,7 +262,7 @@ BOOST_AUTO_TEST_CASE(ServerReconnectionTest) BOOST_TEST(!connection->IsClosed()); } - std::make_unique(std::move(serverAccessor)); + (void)std::make_unique(std::move(serverAccessor)); BOOST_TEST(context.unique()); }