diff --git a/UNITTESTS/features/netsocket/TCPServer/test_TCPServer.cpp b/UNITTESTS/features/netsocket/TCPServer/test_TCPServer.cpp index a3bcd1587b..e2240f3900 100644 --- a/UNITTESTS/features/netsocket/TCPServer/test_TCPServer.cpp +++ b/UNITTESTS/features/netsocket/TCPServer/test_TCPServer.cpp @@ -54,7 +54,7 @@ TEST_F(TestTCPServer, constructor) TEST_F(TestTCPServer, constructor_parameters) { - TCPServer serverParam = TCPServer(&stack); + TCPServer serverParam(&stack); const SocketAddress a("127.0.0.1", 1024); EXPECT_EQ(serverParam.connect(a), NSAPI_ERROR_OK); } diff --git a/platform/NonCopyable.h b/platform/NonCopyable.h index 48da6ae7cd..e29b8fb0f6 100644 --- a/platform/NonCopyable.h +++ b/platform/NonCopyable.h @@ -17,11 +17,6 @@ #ifndef MBED_NONCOPYABLE_H_ #define MBED_NONCOPYABLE_H_ -#if (!defined(MBED_DEBUG) && (MBED_CONF_PLATFORM_FORCE_NON_COPYABLE_ERROR == 0)) -#include "platform/mbed_toolchain.h" -#include "platform/mbed_debug.h" -#endif - namespace mbed { /** \addtogroup platform-public-api */ @@ -176,39 +171,6 @@ protected: */ ~NonCopyable() = default; -#if (!defined(MBED_DEBUG) && (MBED_CONF_PLATFORM_FORCE_NON_COPYABLE_ERROR == 0)) - /** - * NonCopyable copy constructor. - * - * A compile time warning is issued when this function is used, and a runtime - * warning is printed when the copy construction of the noncopyable happens. - * - * If you see this warning, your code is probably doing something unspecified. - * Copying of noncopyable resources can lead to resource leak and random error. - */ - MBED_DEPRECATED("Invalid copy construction of a NonCopyable resource.") - NonCopyable(const NonCopyable &) - { - debug("Invalid copy construction of a NonCopyable resource: %s\r\n", MBED_PRETTY_FUNCTION); - } - - /** - * NonCopyable copy assignment operator. - * - * A compile time warning is issued when this function is used, and a runtime - * warning is printed when the copy construction of the noncopyable happens. - * - * If you see this warning, your code is probably doing something unspecified. - * Copying of noncopyable resources can lead to resource leak and random error. - */ - MBED_DEPRECATED("Invalid copy assignment of a NonCopyable resource.") - NonCopyable &operator=(const NonCopyable &) - { - debug("Invalid copy assignment of a NonCopyable resource: %s\r\n", MBED_PRETTY_FUNCTION); - return *this; - } - -#else public: /** * Define copy constructor as deleted. Any attempt to copy construct @@ -222,7 +184,6 @@ public: */ NonCopyable &operator=(const NonCopyable &) = delete; #endif -#endif }; /**@}*/ diff --git a/platform/mbed_lib.json b/platform/mbed_lib.json index ec05b76a96..97e13c5c4c 100644 --- a/platform/mbed_lib.json +++ b/platform/mbed_lib.json @@ -36,11 +36,6 @@ "value": 9600 }, - "force-non-copyable-error": { - "help": "Force compile time error when a NonCopyable object is copied", - "value": false - }, - "poll-use-lowpower-timer": { "help": "Enable use of low power timer class for poll(). May cause missing events.", "value": false