Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(629)

Unified Diff: third_party/boost/boost/fusion/adapted/struct/extension.hpp

Issue 113163: Add gmock into our dependencies. (Closed)
Patch Set: Making gmock work with windows. Requires adding boost. Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/boost/boost/fusion/adapted/struct/extension.hpp
diff --git a/third_party/boost/boost/fusion/adapted/struct/extension.hpp b/third_party/boost/boost/fusion/adapted/struct/extension.hpp
new file mode 100644
index 0000000000000000000000000000000000000000..071b11e98575ab104bdf000b05c71787360906e3
--- /dev/null
+++ b/third_party/boost/boost/fusion/adapted/struct/extension.hpp
@@ -0,0 +1,68 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#if !defined(FUSION_STRUCT_EXTENSION_APRIL_2_2007_1008AM)
+#define FUSION_STRUCT_EXTENSION_APRIL_2_2007_1008AM
+
+#include <boost/type_traits/add_const.hpp>
+
+namespace boost { namespace fusion { namespace extension
+{
+ template <typename Struct, int N>
+ struct struct_member;
+
+ template <typename Struct>
+ struct struct_size;
+
+ template <typename Struct, int N>
+ struct struct_member<Struct const, N>
+ {
+ typedef typename
+ add_const<typename struct_member<Struct, N>::type>::type
+ type;
+
+ static type&
+ call(Struct const& struct_)
+ {
+ return struct_member<Struct, N>::call(
+ const_cast<Struct&>(struct_));
+ }
+ };
+
+ template <typename Struct>
+ struct struct_size<Struct const>
+ : struct_size<Struct>
+ {};
+
+ struct no_such_member;
+
+ template<typename Struct, typename Key>
+ struct struct_assoc_member
+ {
+ typedef no_such_member type;
+ };
+
+ template<typename Struct, typename Key>
+ struct struct_assoc_member<Struct const, Key>
+ {
+ typedef typename
+ add_const<typename struct_assoc_member<Struct, Key>::type>::type
+ type;
+
+ static type&
+ call(Struct const& struct_)
+ {
+ return struct_assoc_member<Struct, Key>::call(
+ const_cast<Struct&>(struct_));
+ }
+ };
+
+}}}
+
+#endif
+
+

Powered by Google App Engine
This is Rietveld 408576698