This patch deprecates getValueOr in favor of value_or.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Event Timeline
Comment Actions
I was originally planning to deprecate this method, but I cannot put [[deprecated]] on C++ templates.
Hmm, I'm not sure I understand what you mean. It looks like you could put [[deprecated]] on a member function template: https://godbolt.org/z/jG1KxMT1f
Comment Actions
Oops. I was putting [[deprecated]] before template. It works now with [[deprecated]] immediately before the return type. Let me revise the patch.
Comment Actions
Looks good to me, if it's sufficiently portable to supported compilers, etc.
llvm/include/llvm/ADT/Optional.h | ||
---|---|---|
321 | Do we have prior art (other instances of use of the raw [[deprecated]] attribute without any macro conditionals/feature checking/etc) that this is compatible with all LLVM supported compilers, etc? |
Do we have prior art (other instances of use of the raw [[deprecated]] attribute without any macro conditionals/feature checking/etc) that this is compatible with all LLVM supported compilers, etc?