Skip to content

Commit

Permalink
Remove unused helpers in op/Create.h
Browse files Browse the repository at this point in the history
Summary: Remove unused helpers

Reviewed By: vitaut

Differential Revision: D51972637

fbshipit-source-id: 3e83762100cfe951959eb06cc245db10e8cb90d2
  • Loading branch information
thedavekwon authored and facebook-github-bot committed Dec 9, 2023
1 parent 8bcd425 commit ffda496
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions thrift/lib/cpp2/op/detail/Create.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,21 +106,6 @@ constexpr bool isAbsent(std::shared_ptr<T>& ptr) {
return ptr == nullptr;
}

template <typename T>
if_opt_type<T> resetValue(T&& opt) {
opt.reset();
}
template <typename T>
constexpr if_not_opt_type<T> resetValue(T&&) {}

template <typename T>
if_opt_type<T> clearValue(T&& opt) {
opt.reset();
}
template <typename T>
if_not_opt_type<T> clearValue(T& unn) {
thrift::clear(unn);
}
template <typename T, typename = if_opt_type<T>>
auto ensureValue(T&& opt) -> decltype(opt.value()) {
if (isAbsent(opt)) {
Expand Down

0 comments on commit ffda496

Please sign in to comment.