diff options
Diffstat (limited to 'include/gmock/internal')
-rw-r--r-- | include/gmock/internal/gmock-generated-internal-utils.h | 6 | ||||
-rw-r--r-- | include/gmock/internal/gmock-generated-internal-utils.h.pump | 2 | ||||
-rw-r--r-- | include/gmock/internal/gmock-internal-utils.h | 8 |
3 files changed, 12 insertions, 4 deletions
diff --git a/include/gmock/internal/gmock-generated-internal-utils.h b/include/gmock/internal/gmock-generated-internal-utils.h index 1b52dceb..02258451 100644 --- a/include/gmock/internal/gmock-generated-internal-utils.h +++ b/include/gmock/internal/gmock-generated-internal-utils.h @@ -1,4 +1,6 @@ -// This file was GENERATED by a script. DO NOT EDIT BY HAND!!! +// This file was GENERATED by command: +// pump.py gmock-generated-internal-utils.h.pump +// DO NOT EDIT BY HAND!!! // Copyright 2007, Google Inc. // All rights reserved. @@ -58,7 +60,7 @@ class IgnoredValue { // deliberately omit the 'explicit' keyword in order to allow the // conversion to be implicit. template <typename T> - IgnoredValue(const T&) {} + IgnoredValue(const T& /* ignored */) {} // NOLINT(runtime/explicit) }; // MatcherTuple<T>::type is a tuple type where each field is a Matcher diff --git a/include/gmock/internal/gmock-generated-internal-utils.h.pump b/include/gmock/internal/gmock-generated-internal-utils.h.pump index 821e474e..e7ecc8b8 100644 --- a/include/gmock/internal/gmock-generated-internal-utils.h.pump +++ b/include/gmock/internal/gmock-generated-internal-utils.h.pump @@ -61,7 +61,7 @@ class IgnoredValue { // deliberately omit the 'explicit' keyword in order to allow the // conversion to be implicit. template <typename T> - IgnoredValue(const T&) {} + IgnoredValue(const T& /* ignored */) {} // NOLINT(runtime/explicit) }; // MatcherTuple<T>::type is a tuple type where each field is a Matcher diff --git a/include/gmock/internal/gmock-internal-utils.h b/include/gmock/internal/gmock-internal-utils.h index 34131ef6..aef9388e 100644 --- a/include/gmock/internal/gmock-internal-utils.h +++ b/include/gmock/internal/gmock-internal-utils.h @@ -354,7 +354,8 @@ template <typename T> struct remove_reference<T&> { typedef T type; }; // NOLINT // crashes). template <typename T> inline T Invalid() { - return *static_cast<typename remove_reference<T>::type*>(NULL); + return const_cast<typename remove_reference<T>::type&>( + *static_cast<volatile typename remove_reference<T>::type*>(NULL)); } template <> inline void Invalid<void>() {} @@ -459,6 +460,11 @@ class StlContainerView< ::std::tr1::tuple<ElementPointer, Size> > { // StlContainer with a reference type. template <typename T> class StlContainerView<T&>; +// Mapping from booleans to types. Similar to boost::bool_<kValue> and +// std::integral_constant<bool, kValue>. +template <bool kValue> +struct BooleanConstant {}; + } // namespace internal } // namespace testing |