|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r75595 - in trunk/boost/fusion/container/vector: . detail/preprocessed
From: joel_at_[hidden]
Date: 2011-11-21 09:43:22
Author: djowel
Date: 2011-11-21 09:43:19 EST (Mon, 21 Nov 2011)
New Revision: 75595
URL: http://svn.boost.org/trac/boost/changeset/75595
Log:
Fixes for MSVC workarounds from Freundlich: http://codepad.org/wRelwDJt
Text files modified:
trunk/boost/fusion/container/vector/detail/preprocessed/vvector10.hpp | 3 +
trunk/boost/fusion/container/vector/detail/preprocessed/vvector20.hpp | 3 +
trunk/boost/fusion/container/vector/detail/preprocessed/vvector30.hpp | 3 +
trunk/boost/fusion/container/vector/detail/preprocessed/vvector40.hpp | 3 +
trunk/boost/fusion/container/vector/detail/preprocessed/vvector50.hpp | 3 +
trunk/boost/fusion/container/vector/vector.hpp | 54 +++++++++++++++++++++++++--------------
6 files changed, 44 insertions(+), 25 deletions(-)
Modified: trunk/boost/fusion/container/vector/detail/preprocessed/vvector10.hpp
==============================================================================
--- trunk/boost/fusion/container/vector/detail/preprocessed/vvector10.hpp (original)
+++ trunk/boost/fusion/container/vector/detail/preprocessed/vvector10.hpp 2011-11-21 09:43:19 EST (Mon, 21 Nov 2011)
@@ -36,7 +36,7 @@
: vec(rhs.vec) {}
template <typename Sequence>
vector(Sequence const& rhs)
- : vec(rhs) {}
+ : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
@@ -116,6 +116,7 @@
return vec.at_impl(mpl::int_<I::value>());
}
private:
+ BOOST_FUSION_VECTOR_CTOR_HELPER()
vector_n vec;
};
}}
Modified: trunk/boost/fusion/container/vector/detail/preprocessed/vvector20.hpp
==============================================================================
--- trunk/boost/fusion/container/vector/detail/preprocessed/vvector20.hpp (original)
+++ trunk/boost/fusion/container/vector/detail/preprocessed/vvector20.hpp 2011-11-21 09:43:19 EST (Mon, 21 Nov 2011)
@@ -36,7 +36,7 @@
: vec(rhs.vec) {}
template <typename Sequence>
vector(Sequence const& rhs)
- : vec(rhs) {}
+ : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
@@ -136,6 +136,7 @@
return vec.at_impl(mpl::int_<I::value>());
}
private:
+ BOOST_FUSION_VECTOR_CTOR_HELPER()
vector_n vec;
};
}}
Modified: trunk/boost/fusion/container/vector/detail/preprocessed/vvector30.hpp
==============================================================================
--- trunk/boost/fusion/container/vector/detail/preprocessed/vvector30.hpp (original)
+++ trunk/boost/fusion/container/vector/detail/preprocessed/vvector30.hpp 2011-11-21 09:43:19 EST (Mon, 21 Nov 2011)
@@ -36,7 +36,7 @@
: vec(rhs.vec) {}
template <typename Sequence>
vector(Sequence const& rhs)
- : vec(rhs) {}
+ : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
@@ -156,6 +156,7 @@
return vec.at_impl(mpl::int_<I::value>());
}
private:
+ BOOST_FUSION_VECTOR_CTOR_HELPER()
vector_n vec;
};
}}
Modified: trunk/boost/fusion/container/vector/detail/preprocessed/vvector40.hpp
==============================================================================
--- trunk/boost/fusion/container/vector/detail/preprocessed/vvector40.hpp (original)
+++ trunk/boost/fusion/container/vector/detail/preprocessed/vvector40.hpp 2011-11-21 09:43:19 EST (Mon, 21 Nov 2011)
@@ -36,7 +36,7 @@
: vec(rhs.vec) {}
template <typename Sequence>
vector(Sequence const& rhs)
- : vec(rhs) {}
+ : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
@@ -176,6 +176,7 @@
return vec.at_impl(mpl::int_<I::value>());
}
private:
+ BOOST_FUSION_VECTOR_CTOR_HELPER()
vector_n vec;
};
}}
Modified: trunk/boost/fusion/container/vector/detail/preprocessed/vvector50.hpp
==============================================================================
--- trunk/boost/fusion/container/vector/detail/preprocessed/vvector50.hpp (original)
+++ trunk/boost/fusion/container/vector/detail/preprocessed/vvector50.hpp 2011-11-21 09:43:19 EST (Mon, 21 Nov 2011)
@@ -36,7 +36,7 @@
: vec(rhs.vec) {}
template <typename Sequence>
vector(Sequence const& rhs)
- : vec(rhs) {}
+ : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
@@ -196,6 +196,7 @@
return vec.at_impl(mpl::int_<I::value>());
}
private:
+ BOOST_FUSION_VECTOR_CTOR_HELPER()
vector_n vec;
};
}}
Modified: trunk/boost/fusion/container/vector/vector.hpp
==============================================================================
--- trunk/boost/fusion/container/vector/vector.hpp (original)
+++ trunk/boost/fusion/container/vector/vector.hpp 2011-11-21 09:43:19 EST (Mon, 21 Nov 2011)
@@ -17,6 +17,38 @@
#include <boost/type_traits/is_base_of.hpp>
#include <boost/detail/workaround.hpp>
+#if !defined(__WAVE__)
+
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
+
+#define BOOST_FUSION_VECTOR_COPY_INIT() \
+ ctor_helper(rhs, is_base_of<vector, Sequence>()) \
+
+#define BOOST_FUSION_VECTOR_CTOR_HELPER() \
+ static vector_n const& \
+ ctor_helper(vector const& rhs, mpl::true_) \
+ { \
+ return rhs.vec; \
+ } \
+ \
+ template <typename T> \
+ static T const& \
+ ctor_helper(T const& rhs, mpl::false_) \
+ { \
+ return rhs; \
+ }
+
+#else
+
+#define BOOST_FUSION_VECTOR_COPY_INIT() \
+ rhs \
+
+#define BOOST_FUSION_VECTOR_CTOR_HELPER()
+
+#endif
+
+#endif // !defined(__WAVE__)
+
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/vector/detail/preprocessed/vector.hpp>
#else
@@ -76,11 +108,7 @@
template <typename Sequence>
vector(Sequence const& rhs)
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
- : vec(ctor_helper(rhs, is_base_of<vector, Sequence>())) {}
-#else
- : vec(rhs) {}
-#endif
+ : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {}
// Expand a couple of forwarding constructors for arguments
// of type (T0), (T0, T1), (T0, T1, T2) etc. Example:
@@ -149,21 +177,7 @@
private:
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
- static vector_n const&
- ctor_helper(vector const& rhs, mpl::true_)
- {
- return rhs.vec;
- }
-
- template <typename T>
- static T const&
- ctor_helper(T const& rhs, mpl::false_)
- {
- return rhs;
- }
-#endif
-
+ BOOST_FUSION_VECTOR_CTOR_HELPER()
vector_n vec;
};
}}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk