Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Mosier <smosier@microsoft.com>2015-11-05 01:51:04 +0300
committerScott Mosier <smosier@microsoft.com>2015-11-20 03:06:03 +0300
commitc03d823a11f54e734e340813e6cd1e543ca448ef (patch)
tree9253c3230e07568377a5744ffd8c0932774a3989 /src/Native/Runtime/holder.h
parent896131b2af7bc8f3f01e56e391e9c186726f5c6f (diff)
Changes required to integrate code back into ProjectN tree
Diffstat (limited to 'src/Native/Runtime/holder.h')
-rw-r--r--src/Native/Runtime/holder.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/Native/Runtime/holder.h b/src/Native/Runtime/holder.h
index 7eeccc5be..aead6d84d 100644
--- a/src/Native/Runtime/holder.h
+++ b/src/Native/Runtime/holder.h
@@ -12,6 +12,12 @@
// -----------------------------------------------------------------------------------------------------------
// This version of holder does not have a default constructor.
+#if defined(_MSC_VER) && (_MSC_VER < 1900)
+#define EQUALS_DEFAULT
+#else
+#define EQUALS_DEFAULT = default
+#endif
+
template <typename TYPE, void (*ACQUIRE_FUNC)(TYPE), void (*RELEASE_FUNC)(TYPE)>
class HolderNoDefaultValue
{
@@ -28,7 +34,7 @@ public:
void SuppressRelease() { m_held = false; }
TYPE Extract() { m_held = false; return GetValue(); }
- HolderNoDefaultValue(HolderNoDefaultValue && other) = default;
+ HolderNoDefaultValue(HolderNoDefaultValue && other) EQUALS_DEFAULT;
protected:
TYPE m_value;
@@ -49,7 +55,7 @@ public:
Holder() : MY_PARENT(DEFAULTVALUE, false) {}
Holder(TYPE value, bool fTake = true) : MY_PARENT(value, fTake) {}
- Holder(Holder && other) = default;
+ Holder(Holder && other) EQUALS_DEFAULT;
private:
// No one should be copying around holder types.
@@ -66,7 +72,7 @@ class Wrapper : public Holder<TYPE, ACQUIRE_FUNC, RELEASE_FUNC, DEFAULTVALUE>
public:
Wrapper() : MY_PARENT() {}
Wrapper(TYPE value, bool fTake = true) : MY_PARENT(value, fTake) {}
- Wrapper(Wrapper && other) = default;
+ Wrapper(Wrapper && other) EQUALS_DEFAULT;
FORCEINLINE TYPE& operator=(TYPE const & value)
{
@@ -88,7 +94,7 @@ private:
// -----------------------------------------------------------------------------------------------------------
template <typename TYPE>
-FORCEINLINE void DoNothing(TYPE value)
+FORCEINLINE void DoNothing(TYPE /*value*/)
{
}