Skip to content

Commit 941ecef

Browse files
committed
Merge pull request monero-project#9638
cb54a0a ci: common: remove duplicated definition (tobtoht)
2 parents 06ab84d + cb54a0a commit 941ecef

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

src/common/variant.h

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -214,35 +214,4 @@ class optional_variant: public variant<boost::blank, Types...>
214214
bool is_empty() const noexcept { return this->index() == 0; }
215215
};
216216

217-
template <typename... Types>
218-
class optional_variant: public variant<boost::blank, Types...>
219-
{
220-
public:
221-
//constructors
222-
/// default constructor
223-
optional_variant() = default;
224-
225-
/// construct from variant type (use enable_if to avoid issues with copy/move constructor)
226-
template <typename T,
227-
typename std::enable_if<
228-
!std::is_same<
229-
std::remove_cv_t<std::remove_reference_t<T>>,
230-
optional_variant<Types...>
231-
>::value,
232-
bool
233-
>::type = true>
234-
optional_variant(T &&value) : variant<boost::blank, Types...>(std::forward<T>(value)) {}
235-
236-
// construct like boost::optional
237-
optional_variant(boost::none_t) {}
238-
239-
//overloaded operators
240-
/// boolean operator: true if the variant isn't empty/uninitialized
241-
explicit operator bool() const noexcept { return !this->is_empty(); }
242-
243-
//member functions
244-
/// check if empty/uninitialized
245-
bool is_empty() const noexcept { return this->index() == 0; }
246-
};
247-
248217
} //namespace tools

0 commit comments

Comments
 (0)