diff options
author | David Beck <david.beck@arm.com> | 2018-10-11 15:47:00 +0100 |
---|---|---|
committer | Matthew Bentham <matthew.bentham@arm.com> | 2018-10-22 16:57:53 +0100 |
commit | f1153cd864805ad2ed1197a9667e333dc38b8873 (patch) | |
tree | 74295f5361eeae4116de7fd129e5c72631f6f943 /include/armnn | |
parent | 4423ac7fb7ec96c5fe88df2dd6de417c7d8b3709 (diff) | |
download | armnn-f1153cd864805ad2ed1197a9667e333dc38b8873.tar.gz |
IVGCVSW-1969 : remove boost::optional compatibility from ArmNN Optional
* because it was added by mistake, assuming it was released in 18.08
which is not the case
Change-Id: I9c288eba56f3f6192007f79db884b255a14456e4
Diffstat (limited to 'include/armnn')
-rw-r--r-- | include/armnn/Optional.hpp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/include/armnn/Optional.hpp b/include/armnn/Optional.hpp index e55702d915..cfe0d30610 100644 --- a/include/armnn/Optional.hpp +++ b/include/armnn/Optional.hpp @@ -59,28 +59,6 @@ protected: bool m_HasValue; }; -struct HasGetMemberFunction -{ - template <class T> - static auto Check(T* p) -> decltype(p->get(), std::true_type()); - - template <class T> - static auto Check(...) -> std::false_type; -}; - -// -// Predicate checking for boost::optional compatibility -// -template <typename T> -struct CheckBoostOptionalSignature -{ - using ResultType = decltype(HasGetMemberFunction::Check<T>(0)); - - static constexpr bool Result() { - return std::is_same<std::true_type, ResultType>::value; - } -}; - // // The default implementation is the non-reference case. This // has an unsigned char array for storing the optional value which @@ -107,16 +85,6 @@ public: *this = other; } - // enable construction from types that matches the CheckBoostOptionalSignature - // predicate - template <typename O, - typename = std::enable_if_t<CheckBoostOptionalSignature<O>::Result()>> - OptionalReferenceSwitch(const O& other) - : Base{} - { - *this = other; - } - OptionalReferenceSwitch& operator=(const T& value) { reset(); @@ -141,21 +109,6 @@ public: return *this; } - // enable copying from types that matches the CheckBoostOptionalSignature - // predicate - template <typename O, - typename = std::enable_if_t<CheckBoostOptionalSignature<O>::Result()>> - OptionalReferenceSwitch& operator=(const O& other) - { - reset(); - if (other) - { - Construct(other.get()); - } - - return *this; - } - ~OptionalReferenceSwitch() { reset(); @@ -294,10 +247,6 @@ public: Optional(EmptyOptional empty) : BaseSwitch{empty} {} Optional(const Optional& other) : BaseSwitch{other} {} Optional(const BaseSwitch& other) : BaseSwitch{other} {} - - template <typename O, - typename = std::enable_if_t<CheckBoostOptionalSignature<O>::Result()>> - Optional(const O& other) : BaseSwitch{other} {} }; } |