-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace std::unary_function<> with std::function<> #2097
Merged
jwillemsen
merged 3 commits into
DOCGroup:master
from
ClausKlein:feature/replace-unary_function
Aug 28, 2023
Merged
Replace std::unary_function<> with std::function<> #2097
jwillemsen
merged 3 commits into
DOCGroup:master
from
ClausKlein:feature/replace-unary_function
Aug 28, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jwillemsen
reviewed
Aug 18, 2023
ClausKlein
commented
Aug 18, 2023
Only in this sources bash-3.2$ grep -rw --color auto_ptr */examples
ACE/examples/Smart_Pointers/Widget_Impl.h: /// - We cannot use auto_ptr to manage the objects, since auto_ptr does not
ACE/examples/Web_Crawler/URL_Visitor.h: * This class is similar to an auto_ptr<> and should be used to
ACE/examples/Reactor/WFMO_Reactor/Window_Messages.cpp: auto_ptr<ACE_Reactor> reactor (new ACE_Reactor (impl, 1));
ACE/examples/Reactor/WFMO_Reactor/Handle_Close.cpp: auto_ptr<ACE_Reactor> reactor (create_reactor ());
ACE/examples/Reactor/TP_Reactor/client.cpp: // put someData in a kind of auto_ptr so it gets deleted automatically
TAO/examples/Load_Balancing/Load_Balancer_i.cpp: // Temporarily put the servant into the auto_ptr.
TAO/examples/Borland/ChatClientWnd.h: auto_ptr<TORBThread> orb_thread_;
TAO/examples/Borland/ChatClientWnd.cpp: auto_ptr<TStringList> ior (new TStringList);
bash-3.2$ |
jwillemsen
reviewed
Aug 22, 2023
(deprecated in C++11) and removed in C++17 Add missing #include <memory> Make the hack clear: respect review comment ace/Auto_Ptr.h must still include <memory>
ClausKlein
force-pushed
the
feature/replace-unary_function
branch
from
August 22, 2023 16:13
70b7a3e
to
b192a37
Compare
On my iMAC with current OSX and clang++16: clang++ -Wnon-virtual-dtor -std=c++20 -std=c++20 -g -m64 -Wall -Wextra -Wpointer-arith -DACE_HAS_CUSTOM_EXPORT_MACROS=0 -I/Users/clausklein/Workspace/cpp/ACE_TAO/ACE -D__ACE_INLINE__ -I.. -DACE_HAS_IPV6 -DACE_HAS_VERSIONED_NAMESPACE=1 -DACE_BUILD_DLL -c -o .shobj/Argv_Type_Converter.o /Users/clausklein/Workspace/cpp/ACE_TAO/ACE/ace/Argv_Type_Converter.cpp
In file included from /Users/clausklein/Workspace/cpp/ACE_TAO/ACE/ace/ACE.cpp:5:
/Users/clausklein/Workspace/cpp/ACE_TAO/ACE/ace/Auto_Ptr.h:73:12: error: no member named 'auto_ptr' in namespace 'std'
using std::auto_ptr; // FIXME(CK): This does NOT compile with c++17 or newer!!!
~~~~~^
In file included from /Users/clausklein/Workspace/cpp/ACE_TAO/ACE/ace/Argv_Type_Converter.cpp:1:
In file included from /Users/clausklein/Workspace/cpp/ACE_TAO/ACE/ace/Argv_Type_Converter.h:17:
In file included from /Users/clausklein/Workspace/cpp/ACE_TAO/ACE/ace/OS_Memory.h:152:
In file included from /Users/clausklein/Workspace/cpp/ACE_TAO/ACE/ace/OS_NS_stdlib.h:452:
/Users/clausklein/Workspace/cpp/ACE_TAO/ACE/ace/OS_NS_stdlib.inl:265:12: warning: 'mktemp' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of mktemp(3), it is highly recommended that you use mkstemp(3) instead. [-Wdeprecated-declarations]
return ::mktemp (s);
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/stdlib.h:210:1: note: 'mktemp' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of mktemp(3), it is highly recommended that you use mkstemp(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
In file included from /Users/clausklein/Workspace/cpp/ACE_TAO/ACE/ace/Argv_Type_Converter.cpp:1:
In file included from /Users/clausklein/Workspace/cpp/ACE_TAO/ACE/ace/Argv_Type_Converter.h:17:
In file included from /Users/clausklein/Workspace/cpp/ACE_TAO/ACE/ace/OS_Memory.h:152:
In file included from /Users/clausklein/Workspace/cpp/ACE_TAO/ACE/ace/OS_NS_stdlib.h:452:
/Users/clausklein/Workspace/cpp/ACE_TAO/ACE/ace/OS_NS_stdlib.inl:280:9: warning: 'mktemp' is deprecated: This function is provided for compatibility reasons only. Due to security concerns inherent in the design of mktemp(3), it is highly recommended that you use mkstemp(3) instead. [-Wdeprecated-declarations]
if (::mktemp (narrow_s.char_rep ()) == 0)
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/stdlib.h:210:1: note: 'mktemp' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only. Due to security concerns inherent in the design of mktemp(3), it is highly recommended that you use mkstemp(3) instead.")
^
/Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/sys/cdefs.h:215:48: note: expanded from macro '__deprecated_msg'
#define __deprecated_msg(_msg) __attribute__((__deprecated__(_msg)))
^
3 warnings and 1 error generated.
make[1]: *** [.shobj/ACE.o] Error 1
make[1]: *** Waiting for unfinished jobs....
2 warnings generated.
3 warnings generated.
3 warnings generated.
3 warnings generated.
3 warnings generated.
make: *** [ACE] Error 2
bash-3.2$ |
See #2109 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
(deprecated in C++11) and removed in C++17