X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Finclude%2FOCRepresentation.h;h=65760e7d4585bf12786af5641d04f876ec2cc0e4;hb=b977ebaabf86148935a1ed7f6f0f18a30eb145ca;hp=4a18fe7466e546c276db6e0415c8e4faccd95790;hpb=1d9eb84071b9db4f0d84a719b1ebfdfd791cc7ae;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/include/OCRepresentation.h b/resource/include/OCRepresentation.h index 4a18fe7..65760e7 100644 --- a/resource/include/OCRepresentation.h +++ b/resource/include/OCRepresentation.h @@ -28,6 +28,9 @@ #ifndef OC_REPRESENTATION_H_ #define OC_REPRESENTATION_H_ +#define GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) #include #include @@ -99,13 +102,28 @@ namespace OC // this fix will work in the meantime. OCRepresentation(): m_interfaceType(InterfaceType::None){} +#if defined(_MSC_VER) && (_MSC_VER < 1900) + OCRepresentation(OCRepresentation&& o) + { + std::memmove(this, &o, sizeof(o)); + } +#else OCRepresentation(OCRepresentation&&) = default; +#endif OCRepresentation(const OCRepresentation&) = default; OCRepresentation& operator=(const OCRepresentation&) = default; +#if defined(_MSC_VER) && (_MSC_VER < 1900) + OCRepresentation& operator=(OCRepresentation&& o) + { + std::memmove(this, &o, sizeof(o)); + return *this; + } +#else OCRepresentation& operator=(OCRepresentation&&) = default; +#endif virtual ~OCRepresentation(){} @@ -306,12 +324,38 @@ namespace OC // Enable-if required to prevent conversions to alternate types. This prevents // ambigious conversions in the case where conversions can include a number of // types, such as the string constructor. +#if (defined(_MSC_VER) ) || (defined(__GNUC__) && (GCC_VERSION <= 50000)) + template::value || + std::is_same::value || + std::is_same::value || + std::is_same::value || + std::is_same::value || + std::is_same>::value || + std::is_same>>::value || + std::is_same>>>::value || + std::is_same>::value || + std::is_same>>::value || + std::is_same>>>::value || + std::is_same>::value || + std::is_same>>::value || + std::is_same>>>::value || + std::is_same>::value || + std::is_same>>::value || + std::is_same>>>::value || + std::is_same>::value || + std::is_same>>::value || + std::is_same>>>::value + , int>::type = 0// enable_if + > +#else template::type >::value , int>::type = 0 > +#endif operator T() const { return this->getValue();