mirror of
https://github.com/monero-project/monero.git
synced 2025-01-18 16:54:42 +00:00
Merge pull request #9638
Some checks failed
ci/gh-actions/cli / source-archive (push) Has been cancelled
ci/gh-actions/guix / cache-sources (push) Has been cancelled
ci/gh-actions/cli / build-macos (push) Has been cancelled
ci/gh-actions/cli / build-windows (push) Has been cancelled
ci/gh-actions/cli / build-debian (debian-10) (push) Has been cancelled
ci/gh-actions/cli / build-ubuntu (ubuntu-20.04) (push) Has been cancelled
ci/gh-actions/cli / build-ubuntu (ubuntu-22.04) (push) Has been cancelled
ci/gh-actions/cli / libwallet-ubuntu (push) Has been cancelled
ci/gh-actions/depends / Cross-Mac aarch64 (push) Has been cancelled
ci/gh-actions/depends / ARMv8 Android (push) Has been cancelled
ci/gh-actions/depends / ARM v8 (push) Has been cancelled
ci/gh-actions/depends / ARM v7 (push) Has been cancelled
ci/gh-actions/depends / i686 Linux (push) Has been cancelled
ci/gh-actions/depends / i686 Win (push) Has been cancelled
ci/gh-actions/depends / RISCV 64bit (push) Has been cancelled
ci/gh-actions/depends / Cross-Mac x86_64 (push) Has been cancelled
ci/gh-actions/depends / x86_64 Freebsd (push) Has been cancelled
ci/gh-actions/depends / x86_64 Linux (push) Has been cancelled
ci/gh-actions/depends / Win64 (push) Has been cancelled
ci/gh-actions/guix / aarch64-apple-darwin (push) Has been cancelled
ci/gh-actions/guix / aarch64-linux-android (push) Has been cancelled
ci/gh-actions/guix / aarch64-linux-gnu (push) Has been cancelled
ci/gh-actions/guix / arm-linux-androideabi (push) Has been cancelled
ci/gh-actions/guix / arm-linux-gnueabihf (push) Has been cancelled
ci/gh-actions/guix / i686-linux-gnu (push) Has been cancelled
ci/gh-actions/guix / riscv64-linux-gnu (push) Has been cancelled
ci/gh-actions/guix / x86_64-apple-darwin (push) Has been cancelled
ci/gh-actions/guix / x86_64-linux-gnu (push) Has been cancelled
ci/gh-actions/guix / x86_64-unknown-freebsd (push) Has been cancelled
ci/gh-actions/guix / x86_64-w64-mingw32 (push) Has been cancelled
ci/gh-actions/guix / bundle-logs (push) Has been cancelled
ci/gh-actions/cli / test-ubuntu (push) Has been cancelled
Some checks failed
ci/gh-actions/cli / source-archive (push) Has been cancelled
ci/gh-actions/guix / cache-sources (push) Has been cancelled
ci/gh-actions/cli / build-macos (push) Has been cancelled
ci/gh-actions/cli / build-windows (push) Has been cancelled
ci/gh-actions/cli / build-debian (debian-10) (push) Has been cancelled
ci/gh-actions/cli / build-ubuntu (ubuntu-20.04) (push) Has been cancelled
ci/gh-actions/cli / build-ubuntu (ubuntu-22.04) (push) Has been cancelled
ci/gh-actions/cli / libwallet-ubuntu (push) Has been cancelled
ci/gh-actions/depends / Cross-Mac aarch64 (push) Has been cancelled
ci/gh-actions/depends / ARMv8 Android (push) Has been cancelled
ci/gh-actions/depends / ARM v8 (push) Has been cancelled
ci/gh-actions/depends / ARM v7 (push) Has been cancelled
ci/gh-actions/depends / i686 Linux (push) Has been cancelled
ci/gh-actions/depends / i686 Win (push) Has been cancelled
ci/gh-actions/depends / RISCV 64bit (push) Has been cancelled
ci/gh-actions/depends / Cross-Mac x86_64 (push) Has been cancelled
ci/gh-actions/depends / x86_64 Freebsd (push) Has been cancelled
ci/gh-actions/depends / x86_64 Linux (push) Has been cancelled
ci/gh-actions/depends / Win64 (push) Has been cancelled
ci/gh-actions/guix / aarch64-apple-darwin (push) Has been cancelled
ci/gh-actions/guix / aarch64-linux-android (push) Has been cancelled
ci/gh-actions/guix / aarch64-linux-gnu (push) Has been cancelled
ci/gh-actions/guix / arm-linux-androideabi (push) Has been cancelled
ci/gh-actions/guix / arm-linux-gnueabihf (push) Has been cancelled
ci/gh-actions/guix / i686-linux-gnu (push) Has been cancelled
ci/gh-actions/guix / riscv64-linux-gnu (push) Has been cancelled
ci/gh-actions/guix / x86_64-apple-darwin (push) Has been cancelled
ci/gh-actions/guix / x86_64-linux-gnu (push) Has been cancelled
ci/gh-actions/guix / x86_64-unknown-freebsd (push) Has been cancelled
ci/gh-actions/guix / x86_64-w64-mingw32 (push) Has been cancelled
ci/gh-actions/guix / bundle-logs (push) Has been cancelled
ci/gh-actions/cli / test-ubuntu (push) Has been cancelled
cb54a0a
ci: common: remove duplicated definition (tobtoht)
This commit is contained in:
commit
941ecefab2
1 changed files with 0 additions and 31 deletions
|
@ -214,35 +214,4 @@ public:
|
|||
bool is_empty() const noexcept { return this->index() == 0; }
|
||||
};
|
||||
|
||||
template <typename... Types>
|
||||
class optional_variant: public variant<boost::blank, Types...>
|
||||
{
|
||||
public:
|
||||
//constructors
|
||||
/// default constructor
|
||||
optional_variant() = default;
|
||||
|
||||
/// construct from variant type (use enable_if to avoid issues with copy/move constructor)
|
||||
template <typename T,
|
||||
typename std::enable_if<
|
||||
!std::is_same<
|
||||
std::remove_cv_t<std::remove_reference_t<T>>,
|
||||
optional_variant<Types...>
|
||||
>::value,
|
||||
bool
|
||||
>::type = true>
|
||||
optional_variant(T &&value) : variant<boost::blank, Types...>(std::forward<T>(value)) {}
|
||||
|
||||
// construct like boost::optional
|
||||
optional_variant(boost::none_t) {}
|
||||
|
||||
//overloaded operators
|
||||
/// boolean operator: true if the variant isn't empty/uninitialized
|
||||
explicit operator bool() const noexcept { return !this->is_empty(); }
|
||||
|
||||
//member functions
|
||||
/// check if empty/uninitialized
|
||||
bool is_empty() const noexcept { return this->index() == 0; }
|
||||
};
|
||||
|
||||
} //namespace tools
|
||||
|
|
Loading…
Reference in a new issue