ACE_TAO
ACE_TAO copied to clipboard
Upgrade minimum C++ requirement to C++17
At some point we should upgrade to C++17 as minimum required C++ level
Sorry to say it, but there are still issues to fix:
bash-3.2$ git diff ACE TAO
diff --git a/ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp b/ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp
index e591a9b0159..61a46779914 100644
--- a/ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp
+++ b/ACE/tests/Reactor_Remove_Resume_Test_Dev_Poll.cpp
@@ -375,7 +375,7 @@ dev_poll_reactor_factory ()
*
* Reactor test execution functor.
*/
-struct Run_Test : public std::unary_function<reactor_factory_type, void>
+struct Run_Test : public std::function<void(reactor_factory_type)>
{
/// Function call operator overload.
void operator() (reactor_factory_type factory)
diff --git a/TAO/tests/Any/Recursive/client.cpp b/TAO/tests/Any/Recursive/client.cpp
index 142d5ac6e53..e030acbe376 100644
--- a/TAO/tests/Any/Recursive/client.cpp
+++ b/TAO/tests/Any/Recursive/client.cpp
@@ -399,7 +399,7 @@ directly_recursive_valuetype_typecodefactory_test (CORBA::ORB_ptr /* orb */,
* Test method invocation functor.
*/
template <typename T>
-struct Caller : public std::unary_function<T, void>
+struct Caller : public std::function<void(T)>
{
/// Constructor.
Caller (CORBA::ORB_ptr o, Test::Hello_ptr h)
diff --git a/TAO/tests/Bug_2804_Regression/client.cpp b/TAO/tests/Bug_2804_Regression/client.cpp
index d852e043aa6..abee937b711 100644
--- a/TAO/tests/Bug_2804_Regression/client.cpp
+++ b/TAO/tests/Bug_2804_Regression/client.cpp
@@ -97,7 +97,7 @@ recursive_union_test (CORBA::ORB_ptr /* orb */,
* Test method invocation functor.
*/
template <typename T>
-struct Caller : public std::unary_function<T, void>
+struct Caller : public std::function<void(T)>
{
/// Constructor.
Caller (CORBA::ORB_ptr o, Test::Hello_ptr h)
diff --git a/TAO/tests/Bug_2844_Regression/client.cpp b/TAO/tests/Bug_2844_Regression/client.cpp
index 29fe9fa32c2..7021b6ff0d9 100644
--- a/TAO/tests/Bug_2844_Regression/client.cpp
+++ b/TAO/tests/Bug_2844_Regression/client.cpp
@@ -96,7 +96,7 @@ nested_recursive_struct_test (CORBA::ORB_ptr /* orb */,
* Test method invocation functor.
*/
template <typename T>
-struct Caller : public std::unary_function<T, void>
+struct Caller : public std::function<void(T)>
{
/// Constructor.
Caller (CORBA::ORB_ptr o, Test::Hello_ptr h)
diff --git a/TAO/tests/Bug_2918_Regression/client.cpp b/TAO/tests/Bug_2918_Regression/client.cpp
index 14f608c2f68..7a4d6ed1b5e 100644
--- a/TAO/tests/Bug_2918_Regression/client.cpp
+++ b/TAO/tests/Bug_2918_Regression/client.cpp
@@ -97,7 +97,7 @@ repeated_struct_test (CORBA::ORB_ptr /* orb */,
* Test method invocation functor.
*/
template <typename T>
-struct Caller : public std::unary_function<T, void>
+struct Caller : public std::function<void(T)>
{
/// Constructor.
Caller (CORBA::ORB_ptr o, Test::Hello_ptr h)
diff --git a/TAO/tests/Bug_3919_Regression/client.cpp b/TAO/tests/Bug_3919_Regression/client.cpp
index 959d9b79f01..83e67ab411b 100644
--- a/TAO/tests/Bug_3919_Regression/client.cpp
+++ b/TAO/tests/Bug_3919_Regression/client.cpp
@@ -168,7 +168,7 @@ nested_recursive_typecode_test (CORBA::ORB_ptr /* orb */,
* Test method invocation functor.
*/
template <typename T>
-struct Caller : public std::unary_function<T, void>
+struct Caller : public std::function<void(T)>
{
/// Constructor.
Caller (CORBA::ORB_ptr o, Test::Hello_ptr h)
(END)
And deprecated warnings on OSX build-macosx.log
Feel free to open a pull request with the proposed changes @ClausKlein
Feel free to open a pull request with the proposed changes @ClausKlein
https://github.com/DOCGroup/ACE_TAO/pull/2097
See https://github.com/DOCGroup/ACE_TAO/pull/2109
g++ 11 is the first release which has c++17 as default, for older versions we have to manually enable C++17
Done https://github.com/DOCGroup/ACE_TAO/pull/2224